diff --git a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/Settings/Settings_Steam.axaml b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/Settings/Settings_Steam.axaml index 901cd20a1..27455246d 100644 --- a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/Settings/Settings_Steam.axaml +++ b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/Settings/Settings_Steam.axaml @@ -7,57 +7,62 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="System.Application.UI.Views.Pages.Settings_Steam"> - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + + + + - - - - + - - - + + + + + + + + diff --git a/src/ST.Client.Desktop/Models/Settings2/SteamSettings.cs b/src/ST.Client.Desktop/Models/Settings2/SteamSettings.cs index 3110cbdd8..48d4efea8 100644 --- a/src/ST.Client.Desktop/Models/Settings2/SteamSettings.cs +++ b/src/ST.Client.Desktop/Models/Settings2/SteamSettings.cs @@ -57,9 +57,9 @@ namespace System.Application.Models.Settings = GetProperty(defaultValue: false, autoSave: true); /// - /// 检测到Steam启动时弹出消息通知 + /// 检测到Steam登录时弹出消息通知 /// public static SerializableProperty IsEnableSteamLaunchNotification { get; } - = GetProperty(defaultValue: false, autoSave: true); + = GetProperty(defaultValue: true, autoSave: true); } } \ No newline at end of file diff --git a/src/ST.Client.Desktop/Services/Mvvm/SteamConnectService.cs b/src/ST.Client.Desktop/Services/Mvvm/SteamConnectService.cs index 002475bcb..853c89168 100644 --- a/src/ST.Client.Desktop/Services/Mvvm/SteamConnectService.cs +++ b/src/ST.Client.Desktop/Services/Mvvm/SteamConnectService.cs @@ -199,9 +199,18 @@ namespace System.Application.Services IsSteamChinaLauncher = ApiService.IsSteamChinaLauncher(); #region 初始化需要steam启动才能使用的功能 - if (GameLibrarySettings.IsAutoAFKApps.Value) - RunAFKApps(); + if (SteamSettings.IsEnableSteamLaunchNotification.Value) + { + INotificationService.Instance.Notify($"{AppResources.Steam_CheckStarted}({(IsSteamChinaLauncher ? AppResources.Steam_SteamChina : AppResources.Steam_SteamWorld)}){Environment.NewLine}{Environment.NewLine}{AppResources.Steam_CurrentUser}{CurrentSteamUser.SteamNickName}{Environment.NewLine}{AppResources.Steam_CurrentIPCountry}{CurrentSteamUser.IPCountry}", NotificationType.Announcement); + } + + if (GameLibrarySettings.IsAutoAFKApps.Value) + { + RunAFKApps(); + } + + //仅在有游戏数据情况下加载登录用户的游戏 if (SteamApps.Items.Any()) { LoadGames(ApiService.OwnsApps(await ISteamService.Instance.GetAppInfos())); diff --git a/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs b/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs index ff594a63d..35858fc88 100644 --- a/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs +++ b/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs @@ -3222,6 +3222,15 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 当Steam客户端登录时通知我 的本地化字符串。 + /// + public static string Settings_Steam_CheckSteamRuningNotification { + get { + return ResourceManager.GetString("Settings_Steam_CheckSteamRuningNotification", resourceCulture); + } + } + /// /// 查找类似 Steam启动时不检查更新 的本地化字符串。 /// @@ -3339,6 +3348,33 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 检测到启动: 的本地化字符串。 + /// + public static string Steam_CheckStarted { + get { + return ResourceManager.GetString("Steam_CheckStarted", resourceCulture); + } + } + + /// + /// 查找类似 Steam客户端登录区域: 的本地化字符串。 + /// + public static string Steam_CurrentIPCountry { + get { + return ResourceManager.GetString("Steam_CurrentIPCountry", resourceCulture); + } + } + + /// + /// 查找类似 Steam登录用户: 的本地化字符串。 + /// + public static string Steam_CurrentUser { + get { + return ResourceManager.GetString("Steam_CurrentUser", resourceCulture); + } + } + /// /// 查找类似 输入图中验证码 的本地化字符串。 /// @@ -3357,6 +3393,24 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 Steam国服 的本地化字符串。 + /// + public static string Steam_SteamChina { + get { + return ResourceManager.GetString("Steam_SteamChina", resourceCulture); + } + } + + /// + /// 查找类似 Steam国际服 的本地化字符串。 + /// + public static string Steam_SteamWorld { + get { + return ResourceManager.GetString("Steam_SteamWorld", resourceCulture); + } + } + /// /// 查找类似 Steam用户名 的本地化字符串。 /// diff --git a/src/ST.Client.Desktop/UI/Resx/AppResources.resx b/src/ST.Client.Desktop/UI/Resx/AppResources.resx index 4d954454f..f1d6fe52c 100644 --- a/src/ST.Client.Desktop/UI/Resx/AppResources.resx +++ b/src/ST.Client.Desktop/UI/Resx/AppResources.resx @@ -1519,4 +1519,22 @@ 启用开机自启动失败,原因: {0} + + 当Steam客户端登录时通知我 + + + 检测到启动: + + + Steam客户端登录区域: + + + Steam登录用户: + + + Steam国服 + + + Steam国际服 + \ No newline at end of file diff --git a/src/ST.Client.Desktop/UI/ViewModels/Pages/DebugPageViewModel.cs b/src/ST.Client.Desktop/UI/ViewModels/Pages/DebugPageViewModel.cs index 9cbd0b527..9c2638489 100644 --- a/src/ST.Client.Desktop/UI/ViewModels/Pages/DebugPageViewModel.cs +++ b/src/ST.Client.Desktop/UI/ViewModels/Pages/DebugPageViewModel.cs @@ -278,7 +278,7 @@ namespace System.Application.UI.ViewModels // } //#endif INotificationService.Instance.Notify("测试Test🎆🎇→→", NotificationType.Announcement); - //ShowDialogButton_Click1(); + ShowDialogButton_Click1(); } #if DEBUG