修复成就解锁窗口不显示的问题

This commit is contained in:
rmbgame
2021-05-05 03:57:33 +08:00
parent 171705992b
commit da7d5ec814
16 changed files with 225 additions and 195 deletions
@@ -150,15 +150,6 @@ namespace System.Application.UI
#if StartupTrace
StartupTrace.Restart("SettingsHost.Init");
#endif
#if !UI_DEMO
if (GeneralSettings.IsStartupAppMinimized.Value)
{
Program.IsMinimize = true;
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = null;
}
#endif
Theme = (AppTheme)UISettings.Theme.Value;
#if StartupTrace
StartupTrace.Restart("Theme");
@@ -185,6 +176,14 @@ namespace System.Application.UI
compositeDisposable.Add(SteamConnectService.Current.Dispose);
#endregion
#if !UI_DEMO
if (GeneralSettings.IsStartupAppMinimized.Value)
{
Program.IsMinimize = true;
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = null;
}
#endif
MainWindow = new MainWindow
{
DataContext = windowService.MainWindow,
@@ -1,103 +1,103 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--<DefineConstants>StartupTrace;$(DefineConstants)</DefineConstants>-->
<TargetFramework>net6.0</TargetFramework>
<SignAssembly>false</SignAssembly>
<!--(SignAssembly)对此程序集进行签名会导致编译失败(CompileAvaloniaXamlTask)-->
<RootNamespace>System.Application.UI</RootNamespace>
<AssemblyName>Steam++</AssemblyName>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--<DefineConstants>StartupTrace;$(DefineConstants)</DefineConstants>-->
<TargetFramework>net6.0</TargetFramework>
<SignAssembly>false</SignAssembly>
<!--(SignAssembly)对此程序集进行签名会导致编译失败(CompileAvaloniaXamlTask)-->
<RootNamespace>System.Application.UI</RootNamespace>
<AssemblyName>Steam++</AssemblyName>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition=" $(DefineConstants.Contains(`StartupTrace`)) ">
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" $(DefineConstants.Contains(`StartupTrace`)) ">
<OutputType>Exe</OutputType>
</PropertyGroup>
<!--<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!--<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<AllowedReferenceRelatedFileExtensions>
-->
<!-- Prevent default XML and PDB files copied to output in RELEASE.
<!-- Prevent default XML and PDB files copied to output in RELEASE.
Only *.allowedextension files will be included, which doesn't exist in my case.
-->
<!--
<!--
.allowedextension
</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>-->
<PropertyGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) Or ('$(OS)' == 'Windows_NT' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<DefineConstants>WINDOWS;$(DefineConstants)</DefineConstants>
<ApplicationIcon>..\ST.Client.Desktop.Avalonia\Application\UI\Assets\Icon.ico</ApplicationIcon>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
<!--<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<PropertyGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) Or ('$(OS)' == 'Windows_NT' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<DefineConstants>WINDOWS;$(DefineConstants)</DefineConstants>
<ApplicationIcon>..\ST.Client.Desktop.Avalonia\Application\UI\Assets\Icon.ico</ApplicationIcon>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
<!--<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>-->
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<!--<UseWindowsForms>false</UseWindowsForms>-->
<!--<UseWPF>false</UseWPF>-->
</PropertyGroup>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<!--<UseWindowsForms>false</UseWindowsForms>-->
<!--<UseWPF>false</UseWPF>-->
</PropertyGroup>
<PropertyGroup Condition=" $(RuntimeIdentifier.Contains(`osx`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<DefineConstants>MAC;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(RuntimeIdentifier.Contains(`osx`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<DefineConstants>MAC;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" $(DefineConstants.Contains(`PUBLISH`)) ">
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
<!--目前裁剪存在问题,禁用-->
<PublishTrimmed>false</PublishTrimmed>
<TrimMode>link</TrimMode>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
<!--剪裁框架库功能 https://docs.microsoft.com/zh-cn/dotnet/core/deploying/trimming-options#trimming-framework-library-features -->
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
<EventSourceSupport>false</EventSourceSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition=" $(DefineConstants.Contains(`PUBLISH`)) ">
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
<!--目前裁剪存在问题,禁用-->
<PublishTrimmed>false</PublishTrimmed>
<TrimMode>link</TrimMode>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
<!--剪裁框架库功能 https://docs.microsoft.com/zh-cn/dotnet/core/deploying/trimming-options#trimming-framework-library-features -->
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
<EventSourceSupport>false</EventSourceSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
<!--<ItemGroup>
<!--<ItemGroup>
<TrimmerRootAssembly Include="CefNet"/>
<TrimmerRootAssembly Include="CefNet.Avalonia"/>
</ItemGroup>-->
<ItemGroup>
<Compile Include="..\Startup2.cs"/>
<Compile Include="..\Common.CoreLib\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Startup2.cs"/>
<Compile Include="..\Common.CoreLib\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ST.Client.Desktop.Avalonia\ST.Client.Desktop.Avalonia.csproj"/>
<ProjectReference Include="..\ST.Client.Desktop\ST.Client.Desktop.csproj"/>
<ProjectReference Include="..\Common.CoreLib\Common.CoreLib.csproj"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ST.Client.Desktop.Avalonia\ST.Client.Desktop.Avalonia.csproj"/>
<ProjectReference Include="..\ST.Client.Desktop\ST.Client.Desktop.csproj"/>
<ProjectReference Include="..\Common.CoreLib\Common.CoreLib.csproj"/>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) Or ('$(OS)' == 'Windows_NT' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<ProjectReference Include="..\ST.Client.Desktop.Windows\ST.Client.Desktop.Windows.csproj"/>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) Or ('$(OS)' == 'Windows_NT' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<ProjectReference Include="..\ST.Client.Desktop.Windows\ST.Client.Desktop.Windows.csproj"/>
</ItemGroup>
<!--<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) And $(DefineConstants.Contains(`PUBLISH`)) ">
<!--<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) And $(DefineConstants.Contains(`PUBLISH`)) ">
<PackageReference Include="System.Reactive" Version="5.0.0.1-exclude-winforms"/>
</ItemGroup>-->
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`osx`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<ProjectReference Include="..\ST.Client.Desktop.Mac\ST.Client.Desktop.Mac.csproj"/>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`osx`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<ProjectReference Include="..\ST.Client.Desktop.Mac\ST.Client.Desktop.Mac.csproj"/>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`linux`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<ProjectReference Include="..\ST.Client.Desktop.Linux\ST.Client.Desktop.Linux.csproj"/>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`linux`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<ProjectReference Include="..\ST.Client.Desktop.Linux\ST.Client.Desktop.Linux.csproj"/>
</ItemGroup>
<!--<ItemGroup Condition=" '$(OS)' == 'Windows_NT' And $(RuntimeIdentifier.Contains(`osx`)) And $(DefineConstants.Contains(`PUBLISH`)) ">
<!--<ItemGroup Condition=" '$(OS)' == 'Windows_NT' And $(RuntimeIdentifier.Contains(`osx`)) And $(DefineConstants.Contains(`PUBLISH`)) ">
<Reference Include="Xamarin.Mac">
<HintPath>$(MSBuildExtensionsPath)\..\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll</HintPath>
</Reference>
@@ -105,55 +105,55 @@
<ItemGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' And (($(RuntimeIdentifier.Contains(`osx`)) And $(DefineConstants.Contains(`PUBLISH`))) Or !$(DefineConstants.Contains(`PUBLISH`))) ">
-->
<!--<Reference Include="Xamarin.Mac">
<!--<Reference Include="Xamarin.Mac">
<HintPath>$(MSBuildExtensionsPath)/???/Xamarin.Mac.dll</HintPath>
</Reference>-->
<!--
<!--
</ItemGroup>-->
<ItemGroup>
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<AvaloniaResource Include="**\*.xaml">
<SubType>Designer</SubType>
</AvaloniaResource>
<AvaloniaResource Include="Assets\**"/>
</ItemGroup>
<ItemGroup>
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<AvaloniaResource Include="**\*.xaml">
<SubType>Designer</SubType>
</AvaloniaResource>
<AvaloniaResource Include="Assets\**"/>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) Or ('$(OS)' == 'Windows_NT' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<!--Win8.1/10的开始菜单磁贴配置-->
<None Include="..\..\Resources\AppIcon\visualelementsmanifest.xml">
<Link>steam++.visualelementsmanifest.xml</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\Resources\AppIcon\VisualElements_150.png">
<Link>Assets\VisualElements_150.png</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\Resources\AppIcon\VisualElements_70.png">
<Link>Assets\VisualElements_70.png</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup Condition=" $(RuntimeIdentifier.Contains(`win`)) Or ('$(OS)' == 'Windows_NT' And !$(DefineConstants.Contains(`PUBLISH`))) ">
<!--Win8.1/10的开始菜单磁贴配置-->
<None Include="..\..\Resources\AppIcon\visualelementsmanifest.xml">
<Link>steam++.visualelementsmanifest.xml</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\Resources\AppIcon\VisualElements_150.png">
<Link>Assets\VisualElements_150.png</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\Resources\AppIcon\VisualElements_70.png">
<Link>Assets\VisualElements_70.png</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\..\..\aes-key.pfx')">
<EmbeddedResource Include="..\..\aes-key.pfx" Link="Resources\3A613E8D"/>
</ItemGroup>
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\..\..\aes-key.pfx')">
<EmbeddedResource Include="..\..\aes-key.pfx" Link="Resources\3A613E8D"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-debug.pfx')">
<EmbeddedResource Include="..\..\app-id-debug.pfx" Link="Resources\0093BF84"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-debug.pfx')">
<EmbeddedResource Include="..\..\app-id-debug.pfx" Link="Resources\0093BF84"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-debug.pfx')">
<EmbeddedResource Include="..\..\rsa-public-key-debug.pfx" Link="Resources\6D72ED26"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-debug.pfx')">
<EmbeddedResource Include="..\..\rsa-public-key-debug.pfx" Link="Resources\6D72ED26"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-release.pfx')">
<EmbeddedResource Include="..\..\app-id-release.pfx" Link="Resources\F1D827AB"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-release.pfx')">
<EmbeddedResource Include="..\..\app-id-release.pfx" Link="Resources\F1D827AB"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-release.pfx')">
<EmbeddedResource Include="..\..\rsa-public-key-release.pfx" Link="Resources\E88CA4F9"/>
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-release.pfx')">
<EmbeddedResource Include="..\..\rsa-public-key-release.pfx" Link="Resources\E88CA4F9"/>
</ItemGroup>
</Project>
@@ -89,8 +89,8 @@
<StackPanel HorizontalAlignment="Right">
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_ProxyMode,Mode=OneWay,Source={x:Static resx:R.Current}}" Margin="0 5"
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_Hosts,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=!Value, Mode=TwoWay}"></RadioButton>
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystem,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=Value, Mode=TwoWay}"></RadioButton>
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_Hosts,Mode=OneWay,Source={x:Static resx:R.Current}}" ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_HostsTip,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=!Value, Mode=TwoWay}"></RadioButton>
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystem,Mode=OneWay,Source={x:Static resx:R.Current}}" ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystemTip,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=Value, Mode=TwoWay}"></RadioButton>
</StackPanel>
</WrapPanel>
</Border>
@@ -22,58 +22,58 @@
x:DataType="vm:LoginOrRegisterWindowViewModel"
x:CompileBindings="True"
Title="{Binding Title}">
<Panel>
<controls:TitleBar />
<Panel>
<controls:TitleBar />
<Panel>
<controls:ProgressRing IsIndeterminate="True" HorizontalAlignment="Stretch" Height="100" Width="100" IsVisible="{Binding IsLoading}" />
<Grid RowDefinitions="*,Auto" IsVisible="{Binding !IsLoading}">
<StackPanel VerticalAlignment="Center" Spacing="8" IsVisible="{Binding !IsLoading}" Margin="60 0">
<Image Source="/Application/UI/Assets/Icon.ico" Height="128" Width="128" HorizontalAlignment="Center" Margin="0 0 0 25">
<!--<Image.Clip>
<controls:ProgressRing IsIndeterminate="True" HorizontalAlignment="Stretch" Height="100" Width="100" IsVisible="{Binding IsLoading}" />
<Grid RowDefinitions="*,Auto" IsVisible="{Binding !IsLoading}">
<StackPanel VerticalAlignment="Center" Spacing="8" IsVisible="{Binding !IsLoading}" Margin="60 0">
<Image Source="/Application/UI/Assets/Icon.ico" Height="128" Width="128" HorizontalAlignment="Center" Margin="0 0 0 25">
<!--<Image.Clip>
<EllipseGeometry Rect="0,0,128,128"/>
</Image.Clip>-->
</Image>
<TextBox
x:Name="TbPhoneNumber"
Watermark="{ReflectionBinding Path=Res.User_Phone,Mode=OneWay,Source={x:Static resx:R.Current}}"
Text="{Binding PhoneNumber}"
MaxLength="{ReflectionBinding Path=PhoneNumber,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}" />
<Panel>
<TextBox
x:Name="TbSmsCode"
Watermark="{ReflectionBinding Path=Res.User_SMSCode,Mode=OneWay,Source={x:Static resx:R.Current}}"
Text="{Binding SmsCode}"
MaxLength="{ReflectionBinding Path=SMS_CAPTCHA,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}" />
<Border HorizontalAlignment="Right" Cursor="Hand">
<Button Classes="CodeButton"
Content="{Binding BtnSendSmsCodeText}"
HorizontalAlignment="Right"
Command="{ReflectionBinding SendSms}"
IsEnabled="{Binding !IsUnTimeLimit}" />
</Border>
</Panel>
</Image>
<TextBox
x:Name="TbPhoneNumber"
Watermark="{ReflectionBinding Path=Res.User_Phone,Mode=OneWay,Source={x:Static resx:R.Current}}"
Text="{Binding PhoneNumber}"
MaxLength="{ReflectionBinding Path=PhoneNumber,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}" />
<Panel>
<TextBox
x:Name="TbSmsCode"
Watermark="{ReflectionBinding Path=Res.User_SMSCode,Mode=OneWay,Source={x:Static resx:R.Current}}"
Text="{Binding SmsCode}"
MaxLength="{ReflectionBinding Path=SMS_CAPTCHA,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}" />
<Border HorizontalAlignment="Right" Cursor="Hand">
<Button Classes="CodeButton"
Content="{Binding BtnSendSmsCodeText}"
HorizontalAlignment="Right"
Command="{ReflectionBinding SendSms}"
IsEnabled="{Binding !IsUnTimeLimit}" />
</Border>
</Panel>
<!--<Panel Margin="2 0 6 0">
<!--<Panel Margin="2 0 6 0">
<CheckBox Content="{ReflectionBinding Path=Res.User_Rememberme,Mode=OneWay,Source={x:Static resx:R.Current}}"></CheckBox>
<Button Classes="Hyperlink" Content="{ReflectionBinding Path=Res.User_LoginTroubleshoot,Mode=OneWay,Source={x:Static resx:R.Current}}" HorizontalAlignment="Right"></Button>
</Panel>-->
<Button Classes="action"
Content="{ReflectionBinding Path=Res.LoginAndRegister,Mode=OneWay,Source={x:Static resx:R.Current}}"
Command="{ReflectionBinding Submit}"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center">
</Button>
<Button Classes="action"
Content="{ReflectionBinding Path=Res.LoginAndRegister,Mode=OneWay,Source={x:Static resx:R.Current}}"
Command="{ReflectionBinding Submit}"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center">
</Button>
<WrapPanel HorizontalAlignment="Center" Margin="2 0 6 0">
<TextBlock Text="{ReflectionBinding Path=Res.User_RegisterAgreed,Mode=OneWay,Source={x:Static resx:R.Current}}" FontSize="12"/>
<Button FontSize="12" Classes="Hyperlink" Margin="5,0" Content="{ReflectionBinding Path=Res.User_Agreement,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{ReflectionBinding OpenHyperlink}" CommandParameter="https://steampp.net/AgreementBox"/>
<TextBlock FontSize="12" Text="{ReflectionBinding Path=Res.And,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
<Button FontSize="12" Classes="Hyperlink" Margin="5,0" Content="{ReflectionBinding Path=Res.User_Privacy,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{ReflectionBinding OpenHyperlink}" CommandParameter="https://steampp.net/PrivacyBox"/>
</WrapPanel>
</StackPanel>
<!--<StackPanel Grid.Row="1" Margin="0 0 0 10">
<WrapPanel HorizontalAlignment="Center" Margin="2 0 6 0">
<TextBlock Text="{ReflectionBinding Path=Res.User_RegisterAgreed,Mode=OneWay,Source={x:Static resx:R.Current}}" FontSize="12"/>
<Button FontSize="12" Classes="Hyperlink" Margin="5,0" Content="{ReflectionBinding Path=Res.User_Agreement,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{ReflectionBinding OpenHyperlink}" CommandParameter="https://steampp.net/AgreementBox"/>
<TextBlock FontSize="12" Text="{ReflectionBinding Path=Res.And,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
<Button FontSize="12" Classes="Hyperlink" Margin="5,0" Content="{ReflectionBinding Path=Res.User_Privacy,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{ReflectionBinding OpenHyperlink}" CommandParameter="https://steampp.net/PrivacyBox"/>
</WrapPanel>
</StackPanel>
<!--<StackPanel Grid.Row="1" Margin="0 0 0 10">
<Button
HorizontalAlignment="Center" HorizontalContentAlignment="Center" Background="Transparent" BorderThickness="0" Cursor="Hand" Command="{Binding SteamFastLogin}">
<StackPanel Orientation="Horizontal" Spacing="10">
@@ -82,9 +82,9 @@
</StackPanel>
</Button>
</StackPanel>-->
</Grid>
</Panel>
<!--Toast-->
<controls:ToastMessage />
</Grid>
</Panel>
<!--Toast-->
<controls:ToastMessage />
</Panel>
</Window>
@@ -1,4 +1,4 @@
using ReactiveUI;
using ReactiveUI;
using System;
using System.Application.Mvvm;
using System.Application.UI.ViewModels;
@@ -26,15 +26,22 @@ namespace System.Application.Services.Implementation
public void Init()
{
if (appidUnlockAchievement.HasValue)
try
{
achievementWindow = new AchievementWindowViewModel(appidUnlockAchievement.Value);
MainWindow = achievementWindow;
if (appidUnlockAchievement.HasValue)
{
achievementWindow = new AchievementWindowViewModel(appidUnlockAchievement.Value);
MainWindow = achievementWindow;
}
else
{
mainWindow = new MainWindowViewModel();
MainWindow = mainWindow;
}
}
else
catch (Exception ex)
{
mainWindow = new MainWindowViewModel();
MainWindow = mainWindow;
Log.Error("WindowService", ex, "Init WindowViewModel");
}
}
+19 -1
View File
@@ -558,7 +558,7 @@ namespace System.Application.UI.Resx {
}
/// <summary>
/// 查找类似 Hosts代理模式 的本地化字符串。
/// 查找类似 Hosts代理模式(推荐) 的本地化字符串。
/// </summary>
public static string CommunityFix_ProxyMode_Hosts {
get {
@@ -566,6 +566,15 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 修改Hosts文件来监听本机请求实现代理,此方式速度更快且只会影响加速的网站,效果最好。 的本地化字符串。
/// </summary>
public static string CommunityFix_ProxyMode_HostsTip {
get {
return ResourceManager.GetString("CommunityFix_ProxyMode_HostsTip", resourceCulture);
}
}
/// <summary>
/// 查找类似 Windows系统代理模式 的本地化字符串。
/// </summary>
@@ -575,6 +584,15 @@ namespace System.Application.UI.Resx {
}
}
/// <summary>
/// 查找类似 设置Windows系统代理来监听请求,此方式会全局代理本机所有流量,如果你使用Hosts方式没有问题,那就不需要使用此模式。 的本地化字符串。
/// </summary>
public static string CommunityFix_ProxyMode_WinSystemTip {
get {
return ResourceManager.GetString("CommunityFix_ProxyMode_WinSystemTip", resourceCulture);
}
}
/// <summary>
/// 查找类似 加速模式: 的本地化字符串。
/// </summary>
@@ -289,11 +289,17 @@
<value>加速模式:</value>
</data>
<data name="CommunityFix_ProxyMode_Hosts" xml:space="preserve">
<value>Hosts代理模式</value>
<value>Hosts代理模式(推荐)</value>
</data>
<data name="CommunityFix_ProxyMode_HostsTip" xml:space="preserve">
<value>修改Hosts文件来监听本机请求实现代理,此方式速度更快且只会影响加速的网站,效果最好。</value>
</data>
<data name="CommunityFix_ProxyMode_WinSystem" xml:space="preserve">
<value>Windows系统代理模式</value>
</data>
<data name="CommunityFix_ProxyMode_WinSystemTip" xml:space="preserve">
<value>设置Windows系统代理来监听请求,此方式会全局代理本机所有流量,如果你使用Hosts方式没有问题,那就不需要使用此模式。</value>
</data>
<data name="CommunityFix_ScriptManage" xml:space="preserve">
<value>管理脚本</value>
</data>
@@ -13,7 +13,7 @@ namespace System.Application.UI.ViewModels
public class ChangeBindPhoneNumberWindowViewModel : WindowViewModel
{
readonly IReadOnlyDictionary<Step, SendSmsUIHelper.IViewModel> sendSmsUIViewModels;
public ChangeBindPhoneNumberWindowViewModel()
public ChangeBindPhoneNumberWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.User_ChangePhoneNum;
sendSmsUIViewModels = new Dictionary<Step, SendSmsUIHelper.IViewModel>
@@ -86,7 +86,7 @@ namespace System.Application.UI.ViewModels
};
}
public AchievementWindowViewModel(int appid)
public AchievementWindowViewModel(int appid) : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.AchievementManage;
@@ -160,12 +160,12 @@ namespace System.Application.UI.ViewModels
ToastService.Current.Notify(AppResources.Achievement_LoadSucces.Format(_AchievementsSourceList.Count, _StatisticsSourceList.Count));
});
Task.Run(async () =>
Task.Run(() =>
{
while (true)
{
ISteamworksLocalApiService.Instance.RunCallbacks(false);
await Task.Delay(2000);
Threading.Thread.Sleep(2000);
}
}).Forget();
@@ -9,7 +9,7 @@ namespace System.Application.UI.ViewModels
{
private readonly SteamApp? _App;
public EditAppInfoWindowViewModel()
public EditAppInfoWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.GameList_EditAppInfo;
}
@@ -1,4 +1,4 @@
using ReactiveUI;
using ReactiveUI;
using System.Application.Models;
using System.Application.Services;
using System.Application.UI.Resx;
@@ -14,7 +14,7 @@ namespace System.Application.UI.ViewModels
{
readonly IHttpService httpService = DI.Get<IHttpService>();
public AddAuthWindowViewModel()
public AddAuthWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.LocalAuth_AddAuth;
}
@@ -21,7 +21,7 @@ namespace System.Application.UI.ViewModels
private readonly MyAuthenticator MyAuthenticator;
private readonly GAPAuthenticatorValueDTO.SteamAuthenticator _Authenticator;
public AuthTradeWindowViewModel()
public AuthTradeWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.LocalAuth_SteamAuthTrade;
_ConfirmationsSourceList = new SourceList<WinAuthSteamClient.Confirmation>();
@@ -1,4 +1,4 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Linq;
using System.Application.Models;
using System.Application.UI.Resx;
using System.Properties;
@@ -9,7 +9,7 @@ namespace System.Application.UI.ViewModels
{
private readonly GAPAuthenticatorValueDTO.SteamAuthenticator? _Authenticator;
public ShowAuthWindowViewModel()
public ShowAuthWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.LocalAuth_AuthData;
}
@@ -14,7 +14,7 @@ namespace System.Application.UI.ViewModels
{
public class LoginOrRegisterWindowViewModel : WindowViewModel, SendSmsUIHelper.IViewModel
{
public LoginOrRegisterWindowViewModel()
public LoginOrRegisterWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.LoginAndRegister;
}
@@ -1,4 +1,4 @@
using DynamicData;
using DynamicData;
using DynamicData.Binding;
using Newtonsoft.Json.Linq;
using ReactiveUI;
@@ -13,8 +13,8 @@ namespace System.Application.UI.ViewModels
{
public class ScriptStoreWindowViewModel : WindowViewModel
{
public ScriptStoreWindowViewModel()
{
public ScriptStoreWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.ScriptStore;
_ScriptsSourceList = new SourceList<ScriptDTO>();
@@ -15,7 +15,7 @@ namespace System.Application.UI.ViewModels
byte[]? userInfoValue;
UserInfoDTO? userInfoSource;
readonly IUserManager userManager;
public UserProfileWindowViewModel()
public UserProfileWindowViewModel() : base()
{
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.UserProfile;
userManager = DI.Get<IUserManager>();