From a90f68785206a89a3df488858e08378250b5bfd1 Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Mon, 18 Sep 2023 23:42:54 +0300
Subject: [PATCH] Preparing Backgroundog
---
src/Library/Sucrose.Manager/Manage/Manager.cs | 2 -
.../Sucrose.Live.Aurora.csproj | 2 +
.../Sucrose.Live.CefSharp.csproj | 2 +
.../Sucrose.Live.MpvPlayer.csproj | 2 +
.../Sucrose.Live.Nebula.csproj | 2 +
.../Sucrose.Live.Vexana.csproj | 2 +
.../Sucrose.Live.WebView.csproj | 2 +
src/Portal/Sucrose.Portal/Manage/Manager.cs | 2 +
.../Pages/Setting/GeneralSettingViewModel.cs | 2 +-
.../Helper/Specification.cs | 11 +-
.../Event/Web.cs | 2 +-
.../Helper/Compatible.cs | 30 ++++-
.../Sucrose.Shared.Engine/Helper/Data.cs | 18 +--
.../Sucrose.Shared.Engine/Helper/System.cs | 103 ++++++++++++++++++
.../Sucrose.Shared.Engine/Manage/Internal.cs | 3 +
.../Sucrose.Shared.Engine/Manage/Manager.cs | 7 +-
.../Sucrose.Shared.Engine.projitems | 1 +
.../Enum/CompatibilityType.cs | 28 ++++-
.../Sucrose.Shared.Theme/Helper/Compatible.cs | 19 +++-
src/Shared/Sucrose.Shared.Theme/Helper/Zip.cs | 36 +++++-
20 files changed, 233 insertions(+), 43 deletions(-)
create mode 100644 src/Shared/Engine/Sucrose.Shared.Engine/Helper/System.cs
diff --git a/src/Library/Sucrose.Manager/Manage/Manager.cs b/src/Library/Sucrose.Manager/Manage/Manager.cs
index ed0b08797..49b2014d1 100644
--- a/src/Library/Sucrose.Manager/Manage/Manager.cs
+++ b/src/Library/Sucrose.Manager/Manage/Manager.cs
@@ -80,8 +80,6 @@ public static class Manager
public static bool Shuffle => SMMI.EngineSettingManager.GetSetting(SMC.Shuffle, true);
- public static int Port => SMMI.LauncherSettingManager.GetSettingStable(SMC.Port, 0);
-
public static string Key => SMMI.PrivateSettingManager.GetSetting(SMC.Key, SMR.Key);
public static bool Start => SMMI.EngineSettingManager.GetSetting(SMC.Start, false);
diff --git a/src/Live/Sucrose.Live.Aurora/Sucrose.Live.Aurora.csproj b/src/Live/Sucrose.Live.Aurora/Sucrose.Live.Aurora.csproj
index 559f3574c..49b2b1954 100644
--- a/src/Live/Sucrose.Live.Aurora/Sucrose.Live.Aurora.csproj
+++ b/src/Live/Sucrose.Live.Aurora/Sucrose.Live.Aurora.csproj
@@ -82,7 +82,9 @@
+
+
diff --git a/src/Live/Sucrose.Live.CefSharp/Sucrose.Live.CefSharp.csproj b/src/Live/Sucrose.Live.CefSharp/Sucrose.Live.CefSharp.csproj
index 0096630c3..8bead1c56 100644
--- a/src/Live/Sucrose.Live.CefSharp/Sucrose.Live.CefSharp.csproj
+++ b/src/Live/Sucrose.Live.CefSharp/Sucrose.Live.CefSharp.csproj
@@ -87,7 +87,9 @@
+
+
diff --git a/src/Live/Sucrose.Live.MpvPlayer/Sucrose.Live.MpvPlayer.csproj b/src/Live/Sucrose.Live.MpvPlayer/Sucrose.Live.MpvPlayer.csproj
index c3d430712..68163468a 100644
--- a/src/Live/Sucrose.Live.MpvPlayer/Sucrose.Live.MpvPlayer.csproj
+++ b/src/Live/Sucrose.Live.MpvPlayer/Sucrose.Live.MpvPlayer.csproj
@@ -88,7 +88,9 @@
+
+
diff --git a/src/Live/Sucrose.Live.Nebula/Sucrose.Live.Nebula.csproj b/src/Live/Sucrose.Live.Nebula/Sucrose.Live.Nebula.csproj
index ed94e87a9..eb8464d15 100644
--- a/src/Live/Sucrose.Live.Nebula/Sucrose.Live.Nebula.csproj
+++ b/src/Live/Sucrose.Live.Nebula/Sucrose.Live.Nebula.csproj
@@ -82,7 +82,9 @@
+
+
diff --git a/src/Live/Sucrose.Live.Vexana/Sucrose.Live.Vexana.csproj b/src/Live/Sucrose.Live.Vexana/Sucrose.Live.Vexana.csproj
index b17721502..7f7128b0b 100644
--- a/src/Live/Sucrose.Live.Vexana/Sucrose.Live.Vexana.csproj
+++ b/src/Live/Sucrose.Live.Vexana/Sucrose.Live.Vexana.csproj
@@ -82,7 +82,9 @@
+
+
diff --git a/src/Live/Sucrose.Live.WebView/Sucrose.Live.WebView.csproj b/src/Live/Sucrose.Live.WebView/Sucrose.Live.WebView.csproj
index f49997605..ba4812380 100644
--- a/src/Live/Sucrose.Live.WebView/Sucrose.Live.WebView.csproj
+++ b/src/Live/Sucrose.Live.WebView/Sucrose.Live.WebView.csproj
@@ -83,7 +83,9 @@
+
+
diff --git a/src/Portal/Sucrose.Portal/Manage/Manager.cs b/src/Portal/Sucrose.Portal/Manage/Manager.cs
index 79ea8cbdb..0343206ef 100644
--- a/src/Portal/Sucrose.Portal/Manage/Manager.cs
+++ b/src/Portal/Sucrose.Portal/Manage/Manager.cs
@@ -25,6 +25,8 @@ internal static class Manager
public static SEWTT Theme => SMMI.GeneralSettingManager.GetSetting(SMC.ThemeType, SWHWT.GetTheme());
+ public static int Port => SMMI.LauncherSettingManager.GetSettingStable(SMC.Port, 0);
+
public static WindowBackdropType DefaultBackdropType => WindowBackdropType.None;
public static Stretch DefaultBackgroundStretch => Stretch.UniformToFill;
diff --git a/src/Portal/Sucrose.Portal/ViewModels/Pages/Setting/GeneralSettingViewModel.cs b/src/Portal/Sucrose.Portal/ViewModels/Pages/Setting/GeneralSettingViewModel.cs
index d02036e65..2c3cca4b0 100644
--- a/src/Portal/Sucrose.Portal/ViewModels/Pages/Setting/GeneralSettingViewModel.cs
+++ b/src/Portal/Sucrose.Portal/ViewModels/Pages/Setting/GeneralSettingViewModel.cs
@@ -428,7 +428,7 @@ private void NotifySelected(int Index)
if (SSSHP.Work(SMR.Launcher))
{
- SGSGSS.ChannelCreate($"{SPMM.Host}", SMMM.Port);
+ SGSGSS.ChannelCreate($"{SPMM.Host}", SPMM.Port);
SGCLLC Client = new(SGSGSS.ChannelInstance);
if (State)
diff --git a/src/Project/Sucrose.Backgroundog/Helper/Specification.cs b/src/Project/Sucrose.Backgroundog/Helper/Specification.cs
index 3d0aae706..f69a16c24 100644
--- a/src/Project/Sucrose.Backgroundog/Helper/Specification.cs
+++ b/src/Project/Sucrose.Backgroundog/Helper/Specification.cs
@@ -1,9 +1,7 @@
using LibreHardwareMonitor.Hardware;
-using Newtonsoft.Json;
using Skylark.Enum;
using Skylark.Helper;
using Skylark.Standard.Extension.Storage;
-using Sucrose.Backgroundog.Extension;
using System.Management;
using SBMI = Sucrose.Backgroundog.Manage.Internal;
using SMMM = Sucrose.Manager.Manage.Manager;
@@ -193,13 +191,6 @@ public static async Task Start()
}
});
- Console.WriteLine("Cpu" + Environment.NewLine + JsonConvert.SerializeObject(Data.GetCpuInfo(), Formatting.Indented));
- Console.WriteLine("Date" + Environment.NewLine + JsonConvert.SerializeObject(Data.GetDateInfo(), Formatting.Indented));
- Console.WriteLine("Memory" + Environment.NewLine + JsonConvert.SerializeObject(Data.GetMemoryInfo(), Formatting.Indented));
- Console.WriteLine("Battery" + Environment.NewLine + JsonConvert.SerializeObject(Data.GetBatteryInfo(), Formatting.Indented));
- Console.WriteLine("Network" + Environment.NewLine + JsonConvert.SerializeObject(Data.GetNetworkInfo(), Formatting.Indented));
- Console.WriteLine("Motherboard" + Environment.NewLine + JsonConvert.SerializeObject(Data.GetMotherboardInfo(), Formatting.Indented));
-
//foreach (IHardware Hardware in SBMI.Computer.Hardware)
//{
// Console.WriteLine("Hardware: {0}", Hardware.Name);
@@ -220,7 +211,7 @@ public static async Task Start()
// }
//}
- Console.WriteLine("----------------------------------------------");
+ //Console.WriteLine("----------------------------------------------");
}
await Task.CompletedTask;
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Event/Web.cs b/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Event/Web.cs
index 9ab00e451..1663f69a5 100644
--- a/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Event/Web.cs
+++ b/src/Shared/Engine/Sucrose.Shared.Engine.WebView/Event/Web.cs
@@ -30,7 +30,7 @@ public static void WebEngineInitializationCompleted(object sender, CoreWebView2I
SSEWVMI.WebEngine.CoreWebView2.DOMContentLoaded += WebEngineDOMContentLoaded;
- //SSEWVMI.WebEngine.CoreWebView2.OpenDevToolsWindow();
+ SSEWVMI.WebEngine.CoreWebView2.OpenDevToolsWindow();
}
}
}
\ No newline at end of file
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Compatible.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Compatible.cs
index f628eb994..1d94a4f72 100644
--- a/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Compatible.cs
+++ b/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Compatible.cs
@@ -1,6 +1,7 @@
using SESMIEN = Sucrose.Shared.Engine.Manage.Internal.ExecuteNormal;
using SESMIET = Sucrose.Shared.Engine.Manage.Internal.ExecuteTask;
using SSEHD = Sucrose.Shared.Engine.Helper.Data;
+using SSEHS = Sucrose.Shared.Engine.Helper.System;
using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
namespace Sucrose.Shared.Engine.Helper
@@ -16,6 +17,16 @@ public static void ExecuteNormal(SESMIEN Function)
Function(string.Format(SSEMI.Compatible.LoopMode, SSEHD.GetLoop()));
}
+ if (!string.IsNullOrEmpty(SSEMI.Compatible.SystemCpu))
+ {
+ Function(string.Format(SSEMI.Compatible.SystemCpu, SSEHS.GetSystemCpu()));
+ }
+
+ if (!string.IsNullOrEmpty(SSEMI.Compatible.SystemDate))
+ {
+ Function(string.Format(SSEMI.Compatible.SystemDate, SSEHS.GetSystemDate()));
+ }
+
if (!string.IsNullOrEmpty(SSEMI.Compatible.VolumeLevel))
{
Function(string.Format(SSEMI.Compatible.VolumeLevel, SSEHD.GetVolume()));
@@ -31,9 +42,24 @@ public static void ExecuteNormal(SESMIEN Function)
Function(string.Format(SSEMI.Compatible.StretchMode, SSEHD.GetStretch()));
}
- if (!string.IsNullOrEmpty(SSEMI.Compatible.ComputerDate))
+ if (!string.IsNullOrEmpty(SSEMI.Compatible.SystemMemory))
+ {
+ Function(string.Format(SSEMI.Compatible.SystemMemory, SSEHS.GetSystemMemory()));
+ }
+
+ if (!string.IsNullOrEmpty(SSEMI.Compatible.SystemBattery))
+ {
+ Function(string.Format(SSEMI.Compatible.SystemBattery, SSEHS.GetSystemBattery()));
+ }
+
+ if (!string.IsNullOrEmpty(SSEMI.Compatible.SystemNetwork))
+ {
+ Function(string.Format(SSEMI.Compatible.SystemNetwork, SSEHS.GetSystemNetwork()));
+ }
+
+ if (!string.IsNullOrEmpty(SSEMI.Compatible.SystemMotherboard))
{
- Function(string.Format(SSEMI.Compatible.ComputerDate, SSEHD.GetComputerDate()));
+ Function(string.Format(SSEMI.Compatible.SystemMotherboard, SSEHS.GetSystemMotherboard()));
}
}
}
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Data.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Data.cs
index 98bd4a53a..5f0c73398 100644
--- a/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Data.cs
+++ b/src/Shared/Engine/Sucrose.Shared.Engine/Helper/Data.cs
@@ -1,5 +1,4 @@
-using Newtonsoft.Json.Linq;
-using SEDST = Skylark.Enum.DuplicateScreenType;
+using SEDST = Skylark.Enum.DuplicateScreenType;
using SEEST = Skylark.Enum.ExpandScreenType;
using SEST = Skylark.Enum.ScreenType;
using SMMM = Sucrose.Manager.Manage.Manager;
@@ -55,21 +54,6 @@ public static SSDEDT GetDisplayType()
return SSEMM.DisplayType;
}
- public static JObject GetComputerDate()
- {
- DateTime Date = DateTime.Now;
-
- return new JObject
- {
- { "Year", Date.Year },
- { "Month", Date.Month },
- { "Day", Date.Day },
- { "Hour", Date.Hour },
- { "Minute", Date.Minute },
- { "Second", Date.Second }
- };
- }
-
public static SEEST GetExpandScreenType()
{
return SSEMM.ExpandScreenType;
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Helper/System.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Helper/System.cs
new file mode 100644
index 000000000..573a9553e
--- /dev/null
+++ b/src/Shared/Engine/Sucrose.Shared.Engine/Helper/System.cs
@@ -0,0 +1,103 @@
+using SSEMM = Sucrose.Shared.Engine.Manage.Manager;
+using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
+using SGSGSS = Sucrose.Grpc.Services.GeneralServerService;
+using SGCSBCS = Sucrose.Grpc.Client.Services.BackgroundogClientService;
+using SMR = Sucrose.Memory.Readonly;
+using SSSHP = Sucrose.Shared.Space.Helper.Processor;
+using Sucrose.Grpc.Common;
+
+namespace Sucrose.Shared.Engine.Helper
+{
+ internal static class System
+ {
+ public static string GetSystemCpu()
+ {
+ if (SSSHP.Work(SMR.Backgroundog))
+ {
+ SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port);
+ SSEMI.Client = new(SGSGSS.ChannelInstance);
+
+ BackgroundogCpuResponse Response = SGCSBCS.GetCpu(SSEMI.Client);
+
+ return Response.Info;
+ }
+
+ return string.Empty;
+ }
+
+ public static string GetSystemDate()
+ {
+ if (SSSHP.Work(SMR.Backgroundog))
+ {
+ SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port);
+ SSEMI.Client = new(SGSGSS.ChannelInstance);
+
+ BackgroundogDateResponse Response = SGCSBCS.GetDate(SSEMI.Client);
+
+ return Response.Info;
+ }
+
+ return string.Empty;
+ }
+
+ public static string GetSystemMemory()
+ {
+ if (SSSHP.Work(SMR.Backgroundog))
+ {
+ SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port);
+ SSEMI.Client = new(SGSGSS.ChannelInstance);
+
+ BackgroundogMemoryResponse Response = SGCSBCS.GetMemory(SSEMI.Client);
+
+ return Response.Info;
+ }
+
+ return string.Empty;
+ }
+
+ public static string GetSystemBattery()
+ {
+ if (SSSHP.Work(SMR.Backgroundog))
+ {
+ SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port);
+ SSEMI.Client = new(SGSGSS.ChannelInstance);
+
+ BackgroundogBatteryResponse Response = SGCSBCS.GetBattery(SSEMI.Client);
+
+ return Response.Info;
+ }
+
+ return string.Empty;
+ }
+
+ public static string GetSystemNetwork()
+ {
+ if (SSSHP.Work(SMR.Backgroundog))
+ {
+ SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port);
+ SSEMI.Client = new(SGSGSS.ChannelInstance);
+
+ BackgroundogNetworkResponse Response = SGCSBCS.GetNetwork(SSEMI.Client);
+
+ return Response.Info;
+ }
+
+ return string.Empty;
+ }
+
+ public static string GetSystemMotherboard()
+ {
+ if (SSSHP.Work(SMR.Backgroundog))
+ {
+ SGSGSS.ChannelCreate($"{SSEMM.Host}", SSEMM.Port);
+ SSEMI.Client = new(SGSGSS.ChannelInstance);
+
+ BackgroundogMotherboardResponse Response = SGCSBCS.GetMotherboard(SSEMI.Client);
+
+ return Response.Info;
+ }
+
+ return string.Empty;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs
index 5ca597d65..d7ae121e7 100644
--- a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs
+++ b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Internal.cs
@@ -2,11 +2,14 @@
using SSESB = Sucrose.Shared.Engine.Setting.Browser;
using SSTHC = Sucrose.Shared.Theme.Helper.Compatible;
using SSTHP = Sucrose.Shared.Theme.Helper.Properties;
+using SGCBBC = Sucrose.Grpc.Common.Backgroundog.BackgroundogClient;
namespace Sucrose.Shared.Engine.Manage
{
internal static class Internal
{
+ public static SGCBBC Client = null;
+
public static bool Initialized = false;
public static SSTHP Properties = new();
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs
index a8ab9a71a..5c0f94375 100644
--- a/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs
+++ b/src/Shared/Engine/Sucrose.Shared.Engine/Manage/Manager.cs
@@ -1,4 +1,5 @@
-using SEDST = Skylark.Enum.DuplicateScreenType;
+using System.Net;
+using SEDST = Skylark.Enum.DuplicateScreenType;
using SEEST = Skylark.Enum.ExpandScreenType;
using SEST = Skylark.Enum.ScreenType;
using SEWTT = Skylark.Enum.WindowsThemeType;
@@ -17,6 +18,8 @@ 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 SEST ScreenType => SMMI.EngineSettingManager.GetSetting(SMC.ScreenType, SEST.DisplayBound);
public static SSDEDT DisplayType => SMMI.EngineSettingManager.GetSetting(SMC.DisplayType, SSDEDT.Screen);
@@ -25,6 +28,8 @@ internal static class Manager
public static SEWTT Theme => SMMI.GeneralSettingManager.GetSetting(SMC.ThemeType, SWHWT.GetTheme());
+ public static int Port => SMMI.BackgroundogSettingManager.GetSettingStable(SMC.Port, 0);
+
public static SSDEST DefaultStretchType => SSDEST.None;
public static Mutex Mutex => new(true, SMR.LiveMutex);
diff --git a/src/Shared/Engine/Sucrose.Shared.Engine/Sucrose.Shared.Engine.projitems b/src/Shared/Engine/Sucrose.Shared.Engine/Sucrose.Shared.Engine.projitems
index a276c018f..54452dc9e 100644
--- a/src/Shared/Engine/Sucrose.Shared.Engine/Sucrose.Shared.Engine.projitems
+++ b/src/Shared/Engine/Sucrose.Shared.Engine/Sucrose.Shared.Engine.projitems
@@ -10,6 +10,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Dependency/Enum/CompatibilityType.cs b/src/Shared/Sucrose.Shared.Dependency/Enum/CompatibilityType.cs
index e05be195f..c40ccf62c 100644
--- a/src/Shared/Sucrose.Shared.Dependency/Enum/CompatibilityType.cs
+++ b/src/Shared/Sucrose.Shared.Dependency/Enum/CompatibilityType.cs
@@ -46,6 +46,10 @@ public enum CompatibilityType
///
Thumbnail,
///
+ /// Geçersiz sistem işlemci değeri!
+ ///
+ SystemCpu,
+ ///
/// Tema bu uygulamanın daha yüksek bir sürümü için oluşturulmuş!
///
AppVersion,
@@ -54,6 +58,22 @@ public enum CompatibilityType
///
InvalidUrl,
///
+ /// Geçersiz sistem zamanı değeri!
+ ///
+ SystemDate,
+ ///
+ /// Geçersiz sistem belleği değeri!
+ ///
+ SystemMemory,
+ ///
+ /// Geçersiz sistem pil değeri!
+ ///
+ SystemBattery,
+ ///
+ /// Geçersiz sistem ağ değeri!
+ ///
+ SystemNetwork,
+ ///
/// Geçersiz tetikleme zamanı!
///
TriggerTime,
@@ -74,10 +94,6 @@ public enum CompatibilityType
///
InvalidFile,
///
- /// Geçersiz bilgisayar zamanı değeri!
- ///
- ComputerDate,
- ///
/// Geçersiz dosya uzantısı!
///
InvalidExtension,
@@ -86,6 +102,10 @@ public enum CompatibilityType
///
PropertyListener,
///
+ /// Geçersiz sistem anakart değeri!
+ ///
+ SystemMotherboard,
+ ///
/// Öngörülemeyen sonuçlar.
///
UnforeseenConsequences
diff --git a/src/Shared/Sucrose.Shared.Theme/Helper/Compatible.cs b/src/Shared/Sucrose.Shared.Theme/Helper/Compatible.cs
index e7868656c..4d25f8968 100644
--- a/src/Shared/Sucrose.Shared.Theme/Helper/Compatible.cs
+++ b/src/Shared/Sucrose.Shared.Theme/Helper/Compatible.cs
@@ -13,6 +13,12 @@ internal partial class Compatible
[JsonProperty("LoopMode", Required = Required.Default)]
public string LoopMode { get; set; }
+ [JsonProperty("SystemCpu", Required = Required.Default)]
+ public string SystemCpu { get; set; }
+
+ [JsonProperty("SystemDate", Required = Required.Default)]
+ public string SystemDate { get; set; }
+
[JsonProperty("VolumeLevel", Required = Required.Default)]
public string VolumeLevel { get; set; }
@@ -22,8 +28,17 @@ internal partial class Compatible
[JsonProperty("StretchMode", Required = Required.Default)]
public string StretchMode { get; set; }
- [JsonProperty("ComputerDate", Required = Required.Default)]
- public string ComputerDate { get; set; }
+ [JsonProperty("SystemMemory", Required = Required.Default)]
+ public string SystemMemory { get; set; }
+
+ [JsonProperty("SystemBattery", Required = Required.Default)]
+ public string SystemBattery { get; set; }
+
+ [JsonProperty("SystemNetwork", Required = Required.Default)]
+ public string SystemNetwork { get; set; }
+
+ [JsonProperty("SystemMotherboard", Required = Required.Default)]
+ public string SystemMotherboard { get; set; }
}
internal partial class Compatible
diff --git a/src/Shared/Sucrose.Shared.Theme/Helper/Zip.cs b/src/Shared/Sucrose.Shared.Theme/Helper/Zip.cs
index fd19f766a..2aabe73d7 100644
--- a/src/Shared/Sucrose.Shared.Theme/Helper/Zip.cs
+++ b/src/Shared/Sucrose.Shared.Theme/Helper/Zip.cs
@@ -172,10 +172,40 @@ public static SSDECT Check(string Archive)
return SSDECT.StretchMode;
}
- // Compatible içindeki ComputerDate değeri boş değil ve {0} içermiyor mu?
- if (!string.IsNullOrEmpty(Compatible.ComputerDate) && !Compatible.ComputerDate.Contains("{0}"))
+ // Compatible içindeki SystemCpu değeri boş değil ve {0} içermiyor mu?
+ if (!string.IsNullOrEmpty(Compatible.SystemCpu) && !Compatible.SystemCpu.Contains("{0}"))
{
- return SSDECT.ComputerDate;
+ return SSDECT.SystemCpu;
+ }
+
+ // Compatible içindeki SystemDate değeri boş değil ve {0} içermiyor mu?
+ if (!string.IsNullOrEmpty(Compatible.SystemDate) && !Compatible.SystemDate.Contains("{0}"))
+ {
+ return SSDECT.SystemDate;
+ }
+
+ // Compatible içindeki SystemMemory değeri boş değil ve {0} içermiyor mu?
+ if (!string.IsNullOrEmpty(Compatible.SystemMemory) && !Compatible.SystemMemory.Contains("{0}"))
+ {
+ return SSDECT.SystemMemory;
+ }
+
+ // Compatible içindeki SystemBattery değeri boş değil ve {0} içermiyor mu?
+ if (!string.IsNullOrEmpty(Compatible.SystemBattery) && !Compatible.SystemBattery.Contains("{0}"))
+ {
+ return SSDECT.SystemBattery;
+ }
+
+ // Compatible içindeki SystemNetwork değeri boş değil ve {0} içermiyor mu?
+ if (!string.IsNullOrEmpty(Compatible.SystemNetwork) && !Compatible.SystemNetwork.Contains("{0}"))
+ {
+ return SSDECT.SystemNetwork;
+ }
+
+ // Compatible içindeki SystemMotherboard değeri boş değil ve {0} içermiyor mu?
+ if (!string.IsNullOrEmpty(Compatible.SystemMotherboard) && !Compatible.SystemMotherboard.Contains("{0}"))
+ {
+ return SSDECT.SystemMotherboard;
}
}