From 8637b18fd2d580205bf1a7218ca6f1182107fa23 Mon Sep 17 00:00:00 2001 From: Space Time Date: Sun, 15 Dec 2024 19:24:01 +0800 Subject: [PATCH] =?UTF-8?q?1.1.3=20->=201.1.4=20=E7=AC=AC64=E6=AC=A1?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Proces/BrowserProc.cs | 2 +- Proces/MihomoProc.cs | 2 +- Proces/NginxProc.cs | 4 ++-- Props/AssemblyInfo.cs | 10 ---------- Sheas-Cealer.csproj | 2 +- Utils/{NginxStoppedCleaner.cs => NginxCleaner.cs} | 2 +- Wins/AboutWin.xaml.cs | 2 +- Wins/MainWin.xaml.cs | 12 ++++++------ 8 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 Props/AssemblyInfo.cs rename Utils/{NginxStoppedCleaner.cs => NginxCleaner.cs} (97%) diff --git a/Proces/BrowserProc.cs b/Proces/BrowserProc.cs index 4beaac6..4afb75a 100644 --- a/Proces/BrowserProc.cs +++ b/Proces/BrowserProc.cs @@ -1,6 +1,6 @@ using System; using System.Windows; -using SheasCore; +using Sheas_Core; namespace Sheas_Cealer.Proces; diff --git a/Proces/MihomoProc.cs b/Proces/MihomoProc.cs index 5a6fa5f..ce05700 100644 --- a/Proces/MihomoProc.cs +++ b/Proces/MihomoProc.cs @@ -1,5 +1,5 @@ using Sheas_Cealer.Consts; -using SheasCore; +using Sheas_Core; namespace Sheas_Cealer.Proces; diff --git a/Proces/NginxProc.cs b/Proces/NginxProc.cs index c127cc3..f3a91ca 100644 --- a/Proces/NginxProc.cs +++ b/Proces/NginxProc.cs @@ -1,7 +1,7 @@ using System; using Sheas_Cealer.Consts; using Sheas_Cealer.Utils; -using SheasCore; +using Sheas_Core; namespace Sheas_Cealer.Proces; @@ -9,5 +9,5 @@ internal class NginxProc : Proc { internal NginxProc() : base(MainConst.NginxPath) { } - public override void Process_Exited(object sender, EventArgs e) => NginxStoppedCleaner.Clean(); + public override void Process_Exited(object sender, EventArgs e) => NginxCleaner.Clean(); } \ No newline at end of file diff --git a/Props/AssemblyInfo.cs b/Props/AssemblyInfo.cs deleted file mode 100644 index 4f943de..0000000 --- a/Props/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows; - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] \ No newline at end of file diff --git a/Sheas-Cealer.csproj b/Sheas-Cealer.csproj index 3c764da..3ebab87 100644 --- a/Sheas-Cealer.csproj +++ b/Sheas-Cealer.csproj @@ -75,7 +75,7 @@ ..\Ona-Core\bin\Release\net8.0-windows10.0.26100.0\Ona-Core.dll - ..\Sheas-Core\bin\Release\Sheas-Core.dll + ..\Sheas-Core\bin\Release\net8.0-windows10.0.26100.0\Sheas-Core.dll diff --git a/Utils/NginxStoppedCleaner.cs b/Utils/NginxCleaner.cs similarity index 97% rename from Utils/NginxStoppedCleaner.cs rename to Utils/NginxCleaner.cs index 6d57802..bb65d32 100644 --- a/Utils/NginxStoppedCleaner.cs +++ b/Utils/NginxCleaner.cs @@ -5,7 +5,7 @@ using Sheas_Cealer.Consts; namespace Sheas_Cealer.Utils { - internal static class NginxStoppedCleaner + internal static class NginxCleaner { private static readonly object IsCleaningLock = new(); diff --git a/Wins/AboutWin.xaml.cs b/Wins/AboutWin.xaml.cs index 4d29f1d..9782bc7 100644 --- a/Wins/AboutWin.xaml.cs +++ b/Wins/AboutWin.xaml.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Input; -using OnaCore; +using Ona_Core; using Sheas_Cealer.Consts; using Sheas_Cealer.Preses; using Sheas_Cealer.Utils; diff --git a/Wins/MainWin.xaml.cs b/Wins/MainWin.xaml.cs index 626dc3a..c2252b6 100644 --- a/Wins/MainWin.xaml.cs +++ b/Wins/MainWin.xaml.cs @@ -20,7 +20,7 @@ using System.Windows.Threading; using MaterialDesignThemes.Wpf; using Microsoft.Win32; using NginxConfigParser; -using OnaCore; +using Ona_Core; using Sheas_Cealer.Consts; using Sheas_Cealer.Preses; using Sheas_Cealer.Proces; @@ -83,7 +83,7 @@ public partial class MainWin : Window MihomoConfWatcher_Changed(null!, null!); if (!MainPres.IsNginxRunning) - NginxStoppedCleaner.Clean(); + NginxCleaner.Clean(); UpdateUpstreamHostButton_Click(null!, null!); }); @@ -172,7 +172,7 @@ public partial class MainWin : Window await Task.Run(() => { - new BrowserProc(MainPres.BrowserPath, sender == null).ShellRun(Path.GetDirectoryName(MainPres.BrowserPath), ($"{CealArgs} {MainPres.ExtraArgs.Trim()}")); + new BrowserProc(MainPres.BrowserPath, sender == null).Run(Path.GetDirectoryName(MainPres.BrowserPath), ($"{CealArgs} {MainPres.ExtraArgs.Trim()}")); }); } private void NginxButton_Click(object sender, RoutedEventArgs e) @@ -266,7 +266,7 @@ public partial class MainWin : Window await Task.Run(() => { - new NginxProc().ShellRun(Path.GetDirectoryName(MainConst.NginxPath), @$"-c ""{Path.GetRelativePath(Path.GetDirectoryName(MainConst.NginxPath)!, MainConst.NginxConfPath)}"""); + new NginxProc().Run(Path.GetDirectoryName(MainConst.NginxPath), @$"-c ""{Path.GetRelativePath(Path.GetDirectoryName(MainConst.NginxPath)!, MainConst.NginxConfPath)}"""); }); while (true) @@ -304,7 +304,7 @@ public partial class MainWin : Window await nginxProcess.WaitForExitAsync(); } - NginxStoppedCleaner.Clean(); + NginxCleaner.Clean(); } } private void MihomoButton_Click(object sender, RoutedEventArgs e) @@ -338,7 +338,7 @@ public partial class MainWin : Window await Task.Run(() => { - new MihomoProc().ShellRun(Path.GetDirectoryName(MainConst.MihomoPath), @$"-d ""{Path.GetDirectoryName(MainConst.MihomoConfPath)}"""); + new MihomoProc().Run(Path.GetDirectoryName(MainConst.MihomoPath), @$"-d ""{Path.GetDirectoryName(MainConst.MihomoConfPath)}"""); }); while (true)