update game laod action

This commit is contained in:
rmbgame
2021-05-07 23:07:47 +08:00
parent f1fd1cd42c
commit 63ac0695bb
8 changed files with 53 additions and 9 deletions
@@ -178,6 +178,9 @@
<DataTemplate DataType="vm:LocalAuthPageViewModel">
<pages:LocalAuthPage/>
</DataTemplate>
<DataTemplate DataType="vm:GameRelatedPageViewModel">
<pages:GameRelatedPage/>
</DataTemplate>
</TabControl.DataTemplates>
<TabControl.ItemTemplate>
<DataTemplate>
@@ -0,0 +1,16 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
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"
x:DataType="vm:StartPageViewModel"
x:CompileBindings="True"
x:Class="System.Application.UI.Views.Pages.GameRelatedPage">
<StackPanel HorizontalAlignment="Stretch" Margin="{StaticResource PageMargin}" Background="Transparent" Spacing="20">
<Grid ColumnDefinitions="Auto,Auto">
</Grid>
</StackPanel>
</UserControl>
@@ -0,0 +1,19 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using System.Application.UI.ViewModels;
namespace System.Application.UI.Views.Pages
{
public class GameRelatedPage : UserControl
{
public GameRelatedPage()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
@@ -53,4 +53,10 @@
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.999-cibuild0013977-beta" />
</ItemGroup>
<ItemGroup>
<Compile Update="Application\UI\Views\Pages\GameRelatedPage.axaml.cs">
<DependentUpon>GameRelatedPage.axaml</DependentUpon>
</Compile>
</ItemGroup>
</Project>
@@ -74,7 +74,7 @@ namespace System.Application.Models.Settings
/// 所有窗口位置记忆集合
/// </summary>
public static SerializableProperty<Dictionary<string, WindowSizePosition>> WindowSizePositions { get; }
= new SerializableProperty<Dictionary<string, WindowSizePosition>>(GetKey(), Providers.Local, new Dictionary<string, WindowSizePosition>()) { AutoSave = true };
= new SerializableProperty<Dictionary<string, WindowSizePosition>>(GetKey(), Providers.Local, new Dictionary<string, WindowSizePosition>()) { AutoSave = false };
private static string GetKey([CallerMemberName] string propertyName = "")
{
@@ -170,7 +170,7 @@ namespace System.Application.Services
{
IsConnectToSteam = false;
}
await Task.Delay(2000);
Thread.Sleep(2000);
}
}
catch (Exception ex)
@@ -103,7 +103,7 @@ namespace System.Application.UI.ViewModels
public void Initialize()
{
Threading.Thread.CurrentThread.IsBackground = true;
SteamConnectService.Current.Initialize();
//SteamConnectService.Current.Initialize();
ProxyService.Current.Initialize();
AuthService.Current.Initialize();
@@ -113,12 +113,12 @@ namespace System.Application.UI.ViewModels
});
}
//internal override async void Activation()
//{
// if (IsFirstActivation)
// SteamConnectService.Current.Initialize();
// base.Activation();
//}
internal override void Activation()
{
if (IsFirstActivation)
SteamConnectService.Current.Initialize();
base.Activation();
}
private bool _IsOpenFilter;
public bool IsOpenFilter