Skip to content

Commit

Permalink
Preparing About Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Oct 19, 2023
1 parent 3dbdca6 commit ba0c574
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/Library/Sucrose.Manager/Manage/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions src/Library/Sucrose.Memory/Constant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
8 changes: 1 addition & 7 deletions src/Portal/Sucrose.Portal/Manage/Manager.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 0 additions & 4 deletions src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/Update/Sucrose.Update/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ protected async void Configure()
{
SSSHS.Apply();

SMMI.UpdateSettingManager.SetSetting(SMC.UpdateTime, DateTime.Now);

List<SSIIR> Releases = SSHG.ReleasesList(SMR.Owner, SMR.Repository, SMMM.UserAgent, SMMM.Key);

if (Releases.Any())
Expand Down

0 comments on commit ba0c574

Please sign in to comment.