大量的窗口新增

进程操作修改
子模块更新
This commit is contained in:
rmbgame
2021-05-07 23:07:47 +08:00
parent 9faa8a8738
commit 6a07bb4fd9
20 changed files with 533 additions and 57 deletions
@@ -209,11 +209,11 @@
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Padding="0 0 0 10">
<ItemsRepeater Items="{Binding SteamApps}">
<ItemsRepeater.Layout>
<UniformGridLayout ItemsJustification="SpaceEvenly" MinRowSpacing="20" MaximumRowsOrColumns="8" ItemsStretch="Fill" />
<UniformGridLayout ItemsJustification="SpaceEvenly" MinRowSpacing="10" MinColumnSpacing="10" MaximumRowsOrColumns="10" ItemsStretch="Fill" />
</ItemsRepeater.Layout>
<ItemsRepeater.ItemTemplate>
<DataTemplate>
<StackPanel Margin="20 0" Spacing="8">
<StackPanel Spacing="8">
<Border DockPanel.Dock="Top" Classes="paper">
<Border.ContextMenu>
<ContextMenu>
@@ -247,14 +247,18 @@
<PathIcon Data="{StaticResource TrophyDrawing}" Width="16"></PathIcon>
</MenuItem.Icon>
</MenuItem>
<!--<MenuItem
Header="{ReflectionBinding Path=Res.GameList_HideTheGame,Mode=OneWay,Source={x:Static resx:R.Current}}"
<MenuItem
Header="{ReflectionBinding Path=Res.GameList_HideTheGame,Mode=OneWay,Source={x:Static resx:R.Current}}"
Command="{ReflectionBinding #u.DataContext.DeleteUserButton_Click}"
CommandParameter="{Binding}" />
<MenuItem
Header="{ReflectionBinding Path=Res.GameList_SetCustomImage,Mode=OneWay,Source={x:Static resx:R.Current}}"
Command="{ReflectionBinding #u.DataContext.DeleteUserButton_Click}"
CommandParameter="{Binding}" />-->
<MenuItem
Header="添加到挂时长列表"
Command="{ReflectionBinding #u.DataContext.OpenAppStoreUrl}"
CommandParameter="{Binding}" />
<!--<MenuItem
Header="{ReflectionBinding Path=Res.GameList_SetCustomImage,Mode=OneWay,Source={x:Static resx:R.Current}}"
Command="{ReflectionBinding #u.DataContext.DeleteUserButton_Click}"
CommandParameter="{Binding}" />-->
<MenuItem
Header="{ReflectionBinding Path=Res.GameList_OpenStoreUrl,Mode=OneWay,Source={x:Static resx:R.Current}}"
Command="{ReflectionBinding #u.DataContext.OpenAppStoreUrl}"
@@ -0,0 +1,28 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="600" Height="450"
x:Class="System.Application.UI.Views.Windows.HideAppWindow"
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
Background="Transparent"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="30"
Title="{Binding Title}"
x:DataType="vm:EditAppInfoWindowViewModel"
x:CompileBindings="True">
<DockPanel>
<controls:TitleBar DockPanel.Dock="Top"></controls:TitleBar>
<StackPanel>
<Border Classes="paper" Background="{DynamicResource ThemeBrushKey}">
<TextBox></TextBox>
</Border>
</StackPanel>
</DockPanel>
</Window>
@@ -0,0 +1,22 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace System.Application.UI.Views.Windows
{
public class HideAppWindow : FluentWindow
{
public HideAppWindow() : base()
{
InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endif
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
@@ -0,0 +1,28 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="600" Height="450"
x:Class="System.Application.UI.Views.Windows.IdleAppWindow"
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
Background="Transparent"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="30"
Title="{Binding Title}"
x:DataType="vm:EditAppInfoWindowViewModel"
x:CompileBindings="True">
<DockPanel>
<controls:TitleBar DockPanel.Dock="Top"></controls:TitleBar>
<StackPanel>
<Border Classes="paper" Background="{DynamicResource ThemeBrushKey}">
<TextBox></TextBox>
</Border>
</StackPanel>
</DockPanel>
</Window>
@@ -0,0 +1,22 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace System.Application.UI.Views.Windows
{
public class IdleAppWindow : FluentWindow
{
public IdleAppWindow() : base()
{
InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endif
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
@@ -0,0 +1,71 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="600" Height="450"
x:Class="System.Application.UI.Views.Windows.EncryptionAuthWindow"
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
Background="Transparent"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="30"
Title="{Binding Title}"
x:DataType="vm:EncryptionAuthWindowViewModel"
x:CompileBindings="True">
<Panel HorizontalAlignment="Stretch">
<controls:TitleBar></controls:TitleBar>
<Border Padding="10" Margin="{StaticResource TitleBarAfterMargin}">
<StackPanel Spacing="10">
<StackPanel.Styles>
<Style Selector="TextBlock">
<Setter Property="FontSize" Value="{StaticResource FontSizeH7}"/>
<Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrushKey}" />
</Style>
<Style Selector="DockPanel > TextBlock">
<Setter Property="Margin" Value="0 0 20 0" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="(DockPanel.Dock)" Value="Left" />
</Style>
<Style Selector="DockPanel > ToggleSwitch">
<Setter Property="Margin" Value="0 0 -12 0" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="OnContent" Value="{x:Null}" />
<Setter Property="OffContent" Value="{x:Null}" />
</Style>
</StackPanel.Styles>
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_Info,Source={x:Static resx:R.Current},Mode=OneWay}" TextWrapping="WrapWithOverflow">
</TextBlock>
<DockPanel>
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_EnablePassword,Source={x:Static resx:R.Current},Mode=OneWay}"/>
<ToggleSwitch IsChecked="{Binding IsPasswordEncrypt}"/>
</DockPanel>
<StackPanel Spacing="10" IsEnabled="{Binding IsPasswordEncrypt}">
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_EnablePasswordTip,Source={x:Static resx:R.Current},Mode=OneWay}" TextWrapping="WrapWithOverflow"></TextBlock>
<TextBox Watermark="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_Password,Source={x:Static resx:R.Current},Mode=OneWay}" Text="{Binding Password}" PasswordChar="*"></TextBox>
<TextBox Watermark="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_VerifyPassword,Source={x:Static resx:R.Current},Mode=OneWay}" Text="{Binding VerifyPassword}" PasswordChar="*"></TextBox>
</StackPanel>
<Separator Classes="Separator"></Separator>
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncryptTip,Source={x:Static resx:R.Current},Mode=OneWay}" TextWrapping="WrapWithOverflow"></TextBlock>
<DockPanel>
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncrypt,Source={x:Static resx:R.Current},Mode=OneWay}"/>
<ToggleSwitch IsChecked="{Binding IsOnlyCurrentComputerEncrypt}"/>
</DockPanel>
<Button HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
Content="{ReflectionBinding Path=Res.LocalAuth_ProtectionAuth_SaveApply,Source={x:Static resx:R.Current},Mode=OneWay}"></Button>
</StackPanel>
</Border>
</Panel>
</Window>
@@ -0,0 +1,22 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace System.Application.UI.Views.Windows
{
public class EncryptionAuthWindow : FluentWindow
{
public EncryptionAuthWindow() : base()
{
InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endif
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
@@ -0,0 +1,24 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="600" Height="450"
x:Class="System.Application.UI.Views.Windows.ExportAuthWindow"
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
Background="Transparent"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="30"
Title="{Binding Title}"
x:DataType="vm:ShowAuthWindowViewModel"
x:CompileBindings="True">
<Panel HorizontalAlignment="Stretch">
<controls:TitleBar></controls:TitleBar>
</Panel>
</Window>
@@ -0,0 +1,22 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace System.Application.UI.Views.Windows
{
public class ExportAuthWindow : FluentWindow
{
public ExportAuthWindow() : base()
{
InitializeComponent();
#if DEBUG
this.AttachDevTools();
#endif
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
@@ -17,44 +17,44 @@
Title="{Binding Title}"
x:DataType="vm:ShowAuthWindowViewModel"
x:CompileBindings="True">
<Panel HorizontalAlignment="Stretch">
<controls:TitleBar></controls:TitleBar>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="0 30 0 0" Padding="10" MaxWidth="{Binding $parent.MaxWidth}">
<StackPanel>
<TextBlock Text="{ReflectionBinding Path=Res.RecoveryCode,Mode=OneWay,Source={x:Static resx:R.Current}}"
FontSize="30"
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ShowSteamAuthTip2,Mode=OneWay,Source={x:Static resx:R.Current}}"
FontSize="16" TextWrapping="WrapWithOverflow"/>
<Panel HorizontalAlignment="Stretch">
<controls:TitleBar></controls:TitleBar>
<DockPanel>
<TextBlock VerticalAlignment="Center" Text="{ReflectionBinding Path=Res.RecoveryCode,Mode=OneWay,Source={x:Static resx:R.Current},StringFormat={}{0}:}"
FontSize="20"
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="{StaticResource TitleBarAfterMargin}" Padding="10" MaxWidth="{Binding $parent.MaxWidth}">
<StackPanel>
<TextBlock Text="{ReflectionBinding Path=Res.RecoveryCode,Mode=OneWay,Source={x:Static resx:R.Current}}"
FontSize="30"
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ShowSteamAuthTip2,Mode=OneWay,Source={x:Static resx:R.Current}}"
FontSize="16" TextWrapping="WrapWithOverflow"/>
<TextBox FontSize="20" BorderThickness="0" Text="{Binding RecoveryCode,Mode=OneTime}" IsReadOnly="True"></TextBox>
</DockPanel>
<DockPanel>
<TextBlock VerticalAlignment="Center" Text="{ReflectionBinding Path=Res.RecoveryCode,Mode=OneWay,Source={x:Static resx:R.Current},StringFormat={}{0}:}"
FontSize="20"
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
<StackPanel Margin="0,12">
<Separator BorderThickness=".88" Background="{DynamicResource SystemControlHighlightBaseLowBrush}" />
</StackPanel>
<TextBox FontSize="20" BorderThickness="0" Text="{Binding RecoveryCode,Mode=OneTime}" IsReadOnly="True"></TextBox>
</DockPanel>
<StackPanel Margin="0,12">
<Separator BorderThickness=".88" Background="{DynamicResource SystemControlHighlightBaseLowBrush}" />
</StackPanel>
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ShowSteamAuthTip1,Mode=OneWay,Source={x:Static resx:R.Current}}"></TextBlock>
<DockPanel>
<TextBlock VerticalAlignment="Center" Text="{ReflectionBinding Path=Res.LocalAuth_SteamUUID,Mode=OneWay,Source={x:Static resx:R.Current}}"
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
<TextBox BorderThickness="0" Text="{Binding DeviceId,Mode=OneTime}" IsReadOnly="True"></TextBox>
</DockPanel>
<TextBlock Text="{ReflectionBinding Path=Res.LocalAuth_ShowSteamAuthTip1,Mode=OneWay,Source={x:Static resx:R.Current}}"></TextBlock>
<DockPanel>
<TextBlock VerticalAlignment="Center" Text="{ReflectionBinding Path=Res.LocalAuth_SteamUUID,Mode=OneWay,Source={x:Static resx:R.Current}}"
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
<TextBox BorderThickness="0" Text="{Binding DeviceId,Mode=OneTime}" IsReadOnly="True"></TextBox>
</DockPanel>
<StackPanel Margin="0,12">
<Separator BorderThickness=".88" Background="{DynamicResource SystemControlHighlightBaseLowBrush}" />
</StackPanel>
<TextBlock Text="SteamGuard:"></TextBlock>
<TextBox BorderThickness="0" Text="{Binding SteamData,Mode=OneTime}" IsReadOnly="True" Height="150" AcceptsReturn="True" TextWrapping="Wrap" MaxWidth="{ReflectionBinding $parent.MaxWidth}"></TextBox>
</StackPanel>
</ScrollViewer>
</Panel>
<StackPanel Margin="0,12">
<Separator BorderThickness=".88" Background="{DynamicResource SystemControlHighlightBaseLowBrush}" />
</StackPanel>
<TextBlock Text="SteamGuard:"></TextBlock>
<TextBox BorderThickness="0" Text="{Binding SteamData,Mode=OneTime}" IsReadOnly="True" Height="150" AcceptsReturn="True" TextWrapping="Wrap" MaxWidth="{ReflectionBinding $parent.MaxWidth}"></TextBox>
</StackPanel>
</ScrollViewer>
</Panel>
</Window>
@@ -58,5 +58,17 @@
<Compile Update="Application\UI\Views\Pages\GameRelatedPage.axaml.cs">
<DependentUpon>GameRelatedPage.axaml</DependentUpon>
</Compile>
<Compile Update="Application\UI\Views\Windows\GameListPage\HideAppWindow.axaml.cs">
<DependentUpon>HideAppWindow.axaml</DependentUpon>
</Compile>
<Compile Update="Application\UI\Views\Windows\GameListPage\IdleAppWindow.axaml.cs">
<DependentUpon>IdleAppWindow.axaml</DependentUpon>
</Compile>
<Compile Update="Application\UI\Views\Windows\LocalAuthPage\EncryptionAuthWindow.axaml.cs">
<DependentUpon>EncryptionAuthWindow.axaml</DependentUpon>
</Compile>
<Compile Update="Application\UI\Views\Windows\LocalAuthPage\ExportAuthWindow.axaml.cs">
<DependentUpon>ExportAuthWindow.axaml</DependentUpon>
</Compile>
</ItemGroup>
</Project>
+1
View File
@@ -10,6 +10,7 @@ namespace System.Application
AddAuth,
ShowAuth,
AuthTrade,
EncryptionAuth,
ScriptStore,
ChangeBindPhoneNumber,
UserProfile,
@@ -72,15 +72,15 @@ namespace System.Application.Services.Implementation
public void KillSteamProcess()
{
var processes = Process.GetProcesses();
foreach (var p in processes)
foreach (var p in steamProcess)
{
if (steamProcess.Contains(p.ProcessName, StringComparer.OrdinalIgnoreCase))
var process = Process.GetProcessesByName(p).FirstOrDefault();
if (process != null)
{
if (p.HasExited == false)
if (process.HasExited == false)
{
p.Kill();
p.WaitForExit();
process.Kill();
process.WaitForExit();
}
}
}
@@ -110,14 +110,9 @@ namespace System.Application.Services.Implementation
public int? GetSteamProcessPid()
{
var processes = Process.GetProcesses();
foreach (var p in processes)
{
if (string.Equals(p.ProcessName, steamProcess[0], StringComparison.OrdinalIgnoreCase))
{
return p.Id;
}
}
var processes = Process.GetProcessesByName(steamProcess[0]);
if (processes.Any_Nullable())
return processes.First().Id;
return default;
}
+81
View File
@@ -1422,6 +1422,87 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 令牌加密 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth", resourceCulture);
}
}
/// <summary>
/// 查找类似 启用自定义密码保护 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_EnablePassword {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_EnablePassword", resourceCulture);
}
}
/// <summary>
/// 查找类似 您的认证器将使用您自己的密码进行加密,您需要输入您的密码才能打开WinAuth。如果您忘记了密码,并且没有备份,您的认证器将无法访问。 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_EnablePasswordTip {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_EnablePasswordTip", resourceCulture);
}
}
/// <summary>
/// 查找类似 强烈建议使用密码保护你的认证器,否则您的数据可能会被您电脑上运行的恶意软件读取和窃取。当然,你也可以不启用任何加密,这不是强制性的,但你的令牌数据会有被盗取的风险。 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_Info {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_Info", resourceCulture);
}
}
/// <summary>
/// 查找类似 启用令牌仅在这台电脑上可解密 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncrypt {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncrypt", resourceCulture);
}
}
/// <summary>
/// 查找类似 此外,你可以使用内置的Windows账户加密来保护和加密你的数据。这将把您的认证器锁定在这台计算机或用户上,因此即使文件被复制,也无法打开它们。如果你要重新格式化你的磁盘,重新安装Windows或删除这个用户账户,你必须把这个功能关掉。 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncryptTip {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncryptTip", resourceCulture);
}
}
/// <summary>
/// 查找类似 自定义密码 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_Password {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_Password", resourceCulture);
}
}
/// <summary>
/// 查找类似 保存并应用 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_SaveApply {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_SaveApply", resourceCulture);
}
}
/// <summary>
/// 查找类似 再次输入密码 的本地化字符串。
/// </summary>
public static string LocalAuth_ProtectionAuth_VerifyPassword {
get {
return ResourceManager.GetString("LocalAuth_ProtectionAuth_VerifyPassword", resourceCulture);
}
}
/// <summary>
/// 查找类似 令牌数据加载完成 的本地化字符串。
/// </summary>
@@ -576,6 +576,33 @@
<data name="LocalAuth_OtherImport" xml:space="preserve">
<value>其它软件导入</value>
</data>
<data name="LocalAuth_ProtectionAuth" xml:space="preserve">
<value>令牌加密</value>
</data>
<data name="LocalAuth_ProtectionAuth_EnablePassword" xml:space="preserve">
<value>启用自定义密码保护</value>
</data>
<data name="LocalAuth_ProtectionAuth_EnablePasswordTip" xml:space="preserve">
<value>您的认证器将使用您自己的密码进行加密,您需要输入您的密码才能打开WinAuth。如果您忘记了密码,并且没有备份,您的认证器将无法访问。</value>
</data>
<data name="LocalAuth_ProtectionAuth_Info" xml:space="preserve">
<value>强烈建议使用密码保护你的认证器,否则您的数据可能会被您电脑上运行的恶意软件读取和窃取。当然,你也可以不启用任何加密,这不是强制性的,但你的令牌数据会有被盗取的风险。</value>
</data>
<data name="LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncrypt" xml:space="preserve">
<value>启用令牌仅在这台电脑上可解密</value>
</data>
<data name="LocalAuth_ProtectionAuth_IsOnlyCurrentComputerEncryptTip" xml:space="preserve">
<value>此外,你可以使用内置的Windows账户加密来保护和加密你的数据。这将把您的认证器锁定在这台计算机或用户上,因此即使文件被复制,也无法打开它们。如果你要重新格式化你的磁盘,重新安装Windows或删除这个用户账户,你必须把这个功能关掉。</value>
</data>
<data name="LocalAuth_ProtectionAuth_Password" xml:space="preserve">
<value>自定义密码</value>
</data>
<data name="LocalAuth_ProtectionAuth_SaveApply" xml:space="preserve">
<value>保存并应用</value>
</data>
<data name="LocalAuth_ProtectionAuth_VerifyPassword" xml:space="preserve">
<value>再次输入密码</value>
</data>
<data name="LocalAuth_RefreshAuthSuccess" xml:space="preserve">
<value>令牌数据加载完成</value>
</data>
@@ -1,4 +1,4 @@
using ReactiveUI;
using ReactiveUI;
using System.Application.Models;
using System.Application.Services;
using System.Application.UI.Resx;
@@ -23,6 +23,8 @@ namespace System.Application.UI.ViewModels
AddAuthCommand = ReactiveCommand.Create(AddAuthMenu_Click);
RefreshAuthCommand = ReactiveCommand.Create(() => AuthService.Current.Initialize(true));
EncryptionAuthCommand = ReactiveCommand.Create(ShowEncryptionAuthWindow);
MenuItems = new ObservableCollection<MenuItemViewModel>()
{
//new MenuItemViewModel(nameof(AppResources.LocalAuth_EditAuth))
@@ -31,6 +33,8 @@ namespace System.Application.UI.ViewModels
// {
new MenuItemViewModel(nameof(AppResources.Add)) { IconKey="AddDrawing",
Command= AddAuthCommand },
new MenuItemViewModel(nameof(AppResources.Encrypt)) {IconKey="LockDrawing",
Command =EncryptionAuthCommand },
//new MenuItemViewModel(nameof(AppResources.Edit)) { IconKey="EditDrawing" },
//new MenuItemViewModel(nameof(AppResources.Export)) { IconKey="ExportDrawing",
// Command= RefreshAuthCommand },
@@ -66,6 +70,9 @@ namespace System.Application.UI.ViewModels
public bool IsAuthenticatorsEmpty => !AuthService.Current.Authenticators.Items.Any_Nullable();
public ReactiveCommand<Unit, Unit> AddAuthCommand { get; }
public ReactiveCommand<Unit, Unit> EncryptionAuthCommand { get; }
public ReactiveCommand<Unit, Unit> RefreshAuthCommand { get; }
//internal async override Task Initialize()
@@ -135,5 +142,11 @@ namespace System.Application.UI.ViewModels
IShowWindowService.Instance.Show(CustomWindow.AuthTrade, new AuthTradeWindowViewModel(auth), string.Empty, ResizeModeCompat.CanResize);
}
}
public void ShowEncryptionAuthWindow()
{
IShowWindowService.Instance.Show(CustomWindow.EncryptionAuth, new EncryptionAuthWindowViewModel(), string.Empty, ResizeModeCompat.CanResize);
}
}
}
@@ -0,0 +1,19 @@
using Newtonsoft.Json.Linq;
using System.Application.Models;
using System.Application.UI.Resx;
using System.Properties;
namespace System.Application.UI.ViewModels
{
public class HideAppWindowViewModel : WindowViewModel
{
public HideAppWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.GameList_EditAppInfo;
}
}
}
@@ -0,0 +1,19 @@
using Newtonsoft.Json.Linq;
using System.Application.Models;
using System.Application.UI.Resx;
using System.Properties;
namespace System.Application.UI.ViewModels
{
public class IdleAppWindowViewModel : WindowViewModel
{
public IdleAppWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.GameList_EditAppInfo;
}
}
}
@@ -0,0 +1,47 @@
using Newtonsoft.Json.Linq;
using ReactiveUI;
using System.Application.Models;
using System.Application.UI.Resx;
using System.Properties;
namespace System.Application.UI.ViewModels
{
public class EncryptionAuthWindowViewModel : WindowViewModel
{
public EncryptionAuthWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.LocalAuth_ProtectionAuth;
}
private string? _Password;
public string? Password
{
get => _Password;
set => this.RaiseAndSetIfChanged(ref _Password, value);
}
private string? _VerifyPassword;
public string? VerifyPassword
{
get => _VerifyPassword;
set => this.RaiseAndSetIfChanged(ref _VerifyPassword, value);
}
private bool _IsPasswordEncrypt;
public bool IsPasswordEncrypt
{
get => _IsPasswordEncrypt;
set => this.RaiseAndSetIfChanged(ref _IsPasswordEncrypt, value);
}
private bool _IsOnlyCurrentComputerEncrypt;
public bool IsOnlyCurrentComputerEncrypt
{
get => _IsOnlyCurrentComputerEncrypt;
set => this.RaiseAndSetIfChanged(ref _IsOnlyCurrentComputerEncrypt, value);
}
}
}
@@ -0,0 +1,19 @@
using Newtonsoft.Json.Linq;
using ReactiveUI;
using System.Application.Models;
using System.Application.UI.Resx;
using System.Properties;
namespace System.Application.UI.ViewModels
{
public class ExportAuthWindowViewModel : WindowViewModel
{
public ExportAuthWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.LocalAuth_ProtectionAuth;
}
}
}