diff --git a/src/Library/Sucrose.Manager/Manage/Manager.cs b/src/Library/Sucrose.Manager/Manage/Manager.cs index a1962e1c1..bb9de7b8b 100644 --- a/src/Library/Sucrose.Manager/Manage/Manager.cs +++ b/src/Library/Sucrose.Manager/Manage/Manager.cs @@ -87,6 +87,8 @@ public static class Manager public static bool SignalRequired => SMMI.BackgroundogSettingManager.GetSetting(SMC.SignalRequired, false); + public static DateTime UpdateTime => SMMI.UpdateSettingManager.GetSetting(SMC.UpdateTime, new DateTime()); + public static string UpdatePercentage => SMMI.UpdateSettingManager.GetSetting(SMC.UpdatePercentage, "0%"); public static bool StorePreviewHide => SMMI.PortalSettingManager.GetSetting(SMC.StorePreviewHide, false); diff --git a/src/Library/Sucrose.Memory/Constant.cs b/src/Library/Sucrose.Memory/Constant.cs index 4b2f1c8dc..15a22bb13 100644 --- a/src/Library/Sucrose.Memory/Constant.cs +++ b/src/Library/Sucrose.Memory/Constant.cs @@ -8,10 +8,6 @@ public static class Constant public const string Exit = "Exit"; - public const string Host = "Host"; - - public const string Port = "Port"; - public const string Loop = "Loop"; public const string AApp = "AApp"; @@ -60,6 +56,8 @@ public static class Constant public const string UpdateType = "UpdateType"; + public const string UpdateTime = "UpdateTime"; + public const string ChannelType = "ChannelType"; public const string MemoryUsage = "MemoryUsage"; diff --git a/src/Portal/Sucrose.Portal/Manage/Manager.cs b/src/Portal/Sucrose.Portal/Manage/Manager.cs index 03fa144e1..896c9cddc 100644 --- a/src/Portal/Sucrose.Portal/Manage/Manager.cs +++ b/src/Portal/Sucrose.Portal/Manage/Manager.cs @@ -1,11 +1,9 @@ -using System.Net; -using System.Windows.Media; +using System.Windows.Media; using Wpf.Ui.Controls; using SEDST = Skylark.Enum.DuplicateScreenType; using SEEST = Skylark.Enum.ExpandScreenType; using SEST = Skylark.Enum.ScreenType; using SEWTT = Skylark.Enum.WindowsThemeType; -using SHS = Skylark.Helper.Skymath; using SMC = Sucrose.Memory.Constant; using SMMI = Sucrose.Manager.Manage.Internal; using SSCECT = Sucrose.Shared.Core.Enum.ChannelType; @@ -45,16 +43,12 @@ internal static class Manager public static SEEST ExpandScreenType => SMMI.EngineSettingManager.GetSetting(SMC.ExpandScreenType, SEEST.Default); - public static IPAddress Host => SMMI.LauncherSettingManager.GetSettingAddress(SMC.Host, IPAddress.Loopback); - public static SSCEUT UpdateType => SMMI.UpdateSettingManager.GetSetting(SMC.UpdateType, SSCEUT.Compressed); public static SSCECT ChannelType => SMMI.UpdateSettingManager.GetSetting(SMC.ChannelType, SSCECT.Release); public static SEST ScreenType => SMMI.EngineSettingManager.GetSetting(SMC.ScreenType, SEST.DisplayBound); - public static int Port => SHS.Clamp(SMMI.LauncherSettingManager.GetSettingStable(SMC.Port, 0), 0, 65535); - public static SSDEDT DisplayType => SMMI.EngineSettingManager.GetSetting(SMC.DisplayType, SSDEDT.Screen); public static SEWTT ThemeType => SMMI.GeneralSettingManager.GetSetting(SMC.ThemeType, SWHWT.GetTheme()); diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs index 9116aea6e..12e4be60d 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs @@ -18,10 +18,6 @@ internal static class Manager public static SEEST ExpandScreenType => SMMI.EngineSettingManager.GetSetting(SMC.ExpandScreenType, SEEST.Default); - public static IPAddress Host => SMMI.BackgroundogSettingManager.GetSettingAddress(SMC.Host, IPAddress.Loopback); - - public static int Port => SHS.Clamp(SMMI.BackgroundogSettingManager.GetSettingStable(SMC.Port, 0), 0, 65535); - public static SEST ScreenType => SMMI.EngineSettingManager.GetSetting(SMC.ScreenType, SEST.DisplayBound); public static SSDEDT DisplayType => SMMI.EngineSettingManager.GetSetting(SMC.DisplayType, SSDEDT.Screen); diff --git a/src/Update/Sucrose.Update/App.xaml.cs b/src/Update/Sucrose.Update/App.xaml.cs index 1ea39eb37..01252ddec 100644 --- a/src/Update/Sucrose.Update/App.xaml.cs +++ b/src/Update/Sucrose.Update/App.xaml.cs @@ -214,6 +214,8 @@ protected async void Configure() { SSSHS.Apply(); + SMMI.UpdateSettingManager.SetSetting(SMC.UpdateTime, DateTime.Now); + List Releases = SSHG.ReleasesList(SMR.Owner, SMR.Repository, SMMM.UserAgent, SMMM.Key); if (Releases.Any())