mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-25 11:39:56 +08:00
OK
This commit is contained in:
+20
-6
@@ -25,6 +25,12 @@
|
||||
Margin="0 0 145 0" Height="30"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top">
|
||||
<MenuItem Width="50" Command="{ReflectionBinding About_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.About,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<MenuItem.Header>
|
||||
<PathIcon Data="{StaticResource AboutPageSvg}" Width="14"></PathIcon>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
<MenuItem Width="50" Command="{ReflectionBinding Refresh_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.RefreshList,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<MenuItem.Header>
|
||||
@@ -93,6 +99,11 @@
|
||||
<Panel Grid.Column="1" Margin="10 5">
|
||||
<StackPanel>
|
||||
<DockPanel LastChildFill="True">
|
||||
<controls:ProgressRing IsIndeterminate="True"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Loading,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
HorizontalAlignment="Stretch" Height="30"
|
||||
Width="30"
|
||||
IsVisible="{Binding SteamNickName,Converter={StaticResource IsNullConverter}}"/>
|
||||
<Ellipse VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center" x:Name="circle" Margin="2 -5 5 0" Height="10" Width="10" StrokeThickness="0" ToolTip.Tip="{Binding OnlineState}">
|
||||
<i:Interaction.Behaviors>
|
||||
@@ -109,11 +120,11 @@
|
||||
FontSize="20"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
Cursor="Hand"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_BtnTootlip,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Top,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<i:Interaction.Behaviors>
|
||||
<ia:EventTriggerBehavior EventName="Tapped"
|
||||
SourceObject="{ReflectionBinding #nickname}">
|
||||
<ia:InvokeCommandAction Command="{ReflectionBinding #u.DataContext.SteamId_Click}"
|
||||
<ia:InvokeCommandAction Command="{ReflectionBinding #u.DataContext.SetFirstButton_Click}"
|
||||
CommandParameter="{Binding}"/>
|
||||
</ia:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
@@ -166,7 +177,8 @@
|
||||
</Button>
|
||||
</Panel>
|
||||
<WrapPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness=".66 .66 .66 0" ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_OfflineBtn,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness=".66 .66 .66 0"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Top,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Button Classes="flatbutton" Cursor="Hand"
|
||||
x:Name="firstBtn"
|
||||
HorizontalAlignment="Stretch" MaxWidth="200"
|
||||
@@ -183,7 +195,8 @@
|
||||
<controls:ScrollingTextBlock Text="{ReflectionBinding Path=Res.Top,Mode=OneWay,Source={x:Static resx:R.Current}}"></controls:ScrollingTextBlock>
|
||||
</Button>
|
||||
</Border>
|
||||
<Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness=".66 .66 .66 0" ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_OfflineBtn,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness=".66 .66 .66 0"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Up,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
|
||||
<Button Classes="flatbutton" Cursor="Hand"
|
||||
x:Name="upBtn"
|
||||
@@ -201,10 +214,11 @@
|
||||
<controls:ScrollingTextBlock Text="{ReflectionBinding Path=Res.Up,Mode=OneWay,Source={x:Static resx:R.Current}}"></controls:ScrollingTextBlock>
|
||||
</Button>
|
||||
</Border>
|
||||
<Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness="0 .66 0 0" ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_BtnTootlip,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Border BorderBrush="{DynamicResource SemiactiveBackgroundBrushKey}" BorderThickness="0 .66 0 0"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Dow,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Button Classes="flatbutton" Cursor="Hand" MaxWidth="250"
|
||||
HorizontalAlignment="Stretch"
|
||||
x:Name="dowBtn"
|
||||
x:Name="dowBtn"
|
||||
Command="{ReflectionBinding #u.DataContext.DowButton_Click}"
|
||||
CommandParameter="{Binding}">
|
||||
<i:Interaction.Behaviors>
|
||||
|
||||
@@ -141,6 +141,24 @@ namespace System.Application.UI.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 修改的数据生效需要重启Steam是否需要重启Steam。 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string AccountChange_RestartSteam {
|
||||
get {
|
||||
return ResourceManager.GetString("AccountChange_RestartSteam", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 置顶的为当前首选家庭共享库,适用于特殊场景。 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string AccountChange_ShareManageAboutTips {
|
||||
get {
|
||||
return ResourceManager.GetString("AccountChange_ShareManageAboutTips", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 家庭共享库管理 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1601,6 +1619,15 @@ namespace System.Application.UI.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 加载中 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Loading {
|
||||
get {
|
||||
return ResourceManager.GetString("Loading", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 本地令牌 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -144,6 +144,12 @@
|
||||
<data name="About_UpdateLog" xml:space="preserve">
|
||||
<value>更新日志</value>
|
||||
</data>
|
||||
<data name="AccountChange_RestartSteam" xml:space="preserve">
|
||||
<value>修改的数据生效需要重启Steam是否需要重启Steam。</value>
|
||||
</data>
|
||||
<data name="AccountChange_ShareManageAboutTips" xml:space="preserve">
|
||||
<value>置顶的为当前首选家庭共享库,适用于特殊场景。</value>
|
||||
</data>
|
||||
<data name="AccountChange_Title" xml:space="preserve">
|
||||
<value>家庭共享库管理</value>
|
||||
</data>
|
||||
@@ -633,6 +639,9 @@
|
||||
<data name="Import" xml:space="preserve">
|
||||
<value>导入</value>
|
||||
</data>
|
||||
<data name="Loading" xml:space="preserve">
|
||||
<value>加载中</value>
|
||||
</data>
|
||||
<data name="LocalAuth" xml:space="preserve">
|
||||
<value>本地令牌</value>
|
||||
</data>
|
||||
|
||||
+22
-9
@@ -13,6 +13,8 @@ using System.Linq;
|
||||
using System.Properties;
|
||||
using System.Reactive.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using static System.Application.Services.CloudService.Constants;
|
||||
|
||||
namespace System.Application.UI.ViewModels
|
||||
{
|
||||
@@ -90,7 +92,7 @@ namespace System.Application.UI.ViewModels
|
||||
{
|
||||
|
||||
var accountRemarks = Serializable.Clone<IReadOnlyDictionary<long, string?>?>(SteamAccountSettings.AccountRemarks.Value);
|
||||
|
||||
|
||||
foreach (var item in _AuthorizedSourceList.Items)
|
||||
{
|
||||
string? remark = null;
|
||||
@@ -98,12 +100,14 @@ namespace System.Application.UI.ViewModels
|
||||
accountRemarks?.TryGetValue(item.SteamId64_Int, out remark);
|
||||
item.Remark = remark;
|
||||
item.SteamID = temp.SteamID;
|
||||
item.OnlineState = temp.OnlineState;
|
||||
item.SteamNickName = temp.SteamNickName;
|
||||
item.OnlineState = temp.OnlineState?? "offline";
|
||||
item.SteamNickName = temp.SteamNickName ?? item.AccountName ?? item.SteamId3_Int.ToString();
|
||||
item.AvatarIcon = temp.AvatarIcon;
|
||||
item.AvatarMedium = temp.AvatarMedium;
|
||||
item.AvatarStream = httpService.GetImageAsync(temp.AvatarFull, ImageChannelType.SteamAvatars);
|
||||
}
|
||||
|
||||
_AuthorizedSourceList.AddOrUpdate(_AuthorizedSourceList.Items);
|
||||
_AuthorizedSourceList.Refresh();
|
||||
foreach (var item in _AuthorizedSourceList.Items)
|
||||
{
|
||||
@@ -116,18 +120,19 @@ namespace System.Application.UI.ViewModels
|
||||
//miniProfile.AvatarFrameStream = httpService.GetImageAsync(miniProfile.AvatarFrame, ImageChannelType.SteamAvatars);
|
||||
}
|
||||
}
|
||||
|
||||
_AuthorizedSourceList.AddOrUpdate(_AuthorizedSourceList.Items);
|
||||
_AuthorizedSourceList.Refresh();
|
||||
}
|
||||
public void SteamId_Click(AuthorizedDevice user)
|
||||
public void OpenUserProfileUrl(AuthorizedDevice user)
|
||||
{
|
||||
|
||||
BrowserOpen(user.ProfileUrl);
|
||||
}
|
||||
public void DeleteButton_Click(AuthorizedDevice user)
|
||||
public void About_Click()
|
||||
{
|
||||
|
||||
var result = MessageBoxCompat.ShowAsync(@AppResources.AccountChange_ShareManageAboutTips, ThisAssembly.AssemblyTrademark, MessageBoxButtonCompat.OK).ContinueWith(async (s) =>
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
public void SetFirstButton_Click(AuthorizedDevice item)
|
||||
{
|
||||
item.Index = 1;
|
||||
@@ -164,6 +169,14 @@ namespace System.Application.UI.ViewModels
|
||||
{
|
||||
if (_AuthorizedList != null)
|
||||
steamService.UpdateAuthorizedDeviceList(_AuthorizedList);
|
||||
var result = MessageBoxCompat.ShowAsync(@AppResources.AccountChange_RestartSteam, ThisAssembly.AssemblyTrademark, MessageBoxButtonCompat.OKCancel).ContinueWith(async (s) =>
|
||||
{
|
||||
if (s.Result == MessageBoxResultCompat.OK)
|
||||
{
|
||||
steamService.TryKillSteamProcess();
|
||||
steamService.StartSteam();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user