From 2060ac18fdaf1222868509ecb8343473cdec2664 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 17 Aug 2025 16:52:51 +0800 Subject: [PATCH] Add Manager folder --- v2rayN/ServiceLib/GlobalUsings.cs | 1 + v2rayN/ServiceLib/Handler/ConfigHandler.cs | 2 +- v2rayN/ServiceLib/Handler/ConnectionHandler.cs | 9 +++------ v2rayN/ServiceLib/Handler/CoreConfigHandler.cs | 2 +- v2rayN/ServiceLib/Handler/SubscriptionHandler.cs | 2 +- v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs | 2 +- v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs | 2 +- .../ServiceLib/Handler/SysProxy/ProxySettingWindows.cs | 2 +- v2rayN/ServiceLib/{Handler => Manager}/AppHandler.cs | 4 ++-- .../ServiceLib/{Handler => Manager}/ClashApiHandler.cs | 2 +- .../ServiceLib/{Handler => Manager}/CoreAdminHandler.cs | 2 +- v2rayN/ServiceLib/{Handler => Manager}/CoreHandler.cs | 2 +- .../ServiceLib/{Handler => Manager}/CoreInfoHandler.cs | 2 +- v2rayN/ServiceLib/{Handler => Manager}/NoticeHandler.cs | 2 +- v2rayN/ServiceLib/{Handler => Manager}/PacHandler.cs | 2 +- .../ServiceLib/{Handler => Manager}/ProfileExHandler.cs | 0 .../ServiceLib/{Handler => Manager}/StatisticsHandler.cs | 6 +++--- v2rayN/ServiceLib/{Handler => Manager}/TaskHandler.cs | 6 +++--- v2rayN/ServiceLib/{Handler => Manager}/WebDavHandler.cs | 2 +- v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs | 2 +- v2rayN/v2rayN.Desktop/App.axaml.cs | 1 + v2rayN/v2rayN.Desktop/Base/WindowBase.cs | 1 + v2rayN/v2rayN.Desktop/Program.cs | 1 + .../v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs | 1 + v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs | 1 + v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs | 1 + .../Views/FullConfigTemplateWindow.axaml.cs | 1 + v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs | 1 + v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs | 1 + v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs | 1 + v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs | 1 + .../v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs | 1 + v2rayN/v2rayN/App.xaml.cs | 1 + v2rayN/v2rayN/Base/WindowBase.cs | 1 + v2rayN/v2rayN/Converters/MaterialDesignFonts.cs | 1 + v2rayN/v2rayN/Handler/HotkeyHandler.cs | 1 + v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs | 1 + v2rayN/v2rayN/Views/AddServer2Window.xaml.cs | 1 + v2rayN/v2rayN/Views/AddServerWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/FullConfigTemplateWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/MainWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/ProfilesView.xaml.cs | 1 + v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/StatusBarView.xaml.cs | 1 + v2rayN/v2rayN/Views/SubEditWindow.xaml.cs | 1 + v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs | 1 + 51 files changed, 57 insertions(+), 28 deletions(-) rename v2rayN/ServiceLib/{Handler => Manager}/AppHandler.cs (98%) rename v2rayN/ServiceLib/{Handler => Manager}/ClashApiHandler.cs (99%) rename v2rayN/ServiceLib/{Handler => Manager}/CoreAdminHandler.cs (99%) rename v2rayN/ServiceLib/{Handler => Manager}/CoreHandler.cs (99%) rename v2rayN/ServiceLib/{Handler => Manager}/CoreInfoHandler.cs (99%) rename v2rayN/ServiceLib/{Handler => Manager}/NoticeHandler.cs (97%) rename v2rayN/ServiceLib/{Handler => Manager}/PacHandler.cs (99%) rename v2rayN/ServiceLib/{Handler => Manager}/ProfileExHandler.cs (100%) rename v2rayN/ServiceLib/{Handler => Manager}/StatisticsHandler.cs (97%) rename v2rayN/ServiceLib/{Handler => Manager}/TaskHandler.cs (95%) rename v2rayN/ServiceLib/{Handler => Manager}/WebDavHandler.cs (99%) diff --git a/v2rayN/ServiceLib/GlobalUsings.cs b/v2rayN/ServiceLib/GlobalUsings.cs index 7feb4705..9a78c73b 100644 --- a/v2rayN/ServiceLib/GlobalUsings.cs +++ b/v2rayN/ServiceLib/GlobalUsings.cs @@ -3,6 +3,7 @@ global using ServiceLib.Common; global using ServiceLib.Enums; global using ServiceLib.Handler; global using ServiceLib.Helper; +global using ServiceLib.Manager; global using ServiceLib.Handler.Fmt; global using ServiceLib.Services; global using ServiceLib.Services.Statistics; diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index 0b655427..156c9d30 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -3,7 +3,7 @@ using System.Text.RegularExpressions; namespace ServiceLib.Handler; -public class ConfigHandler +public static class ConfigHandler { private static readonly string _configRes = Global.ConfigFileName; private static readonly string _tag = "ConfigHandler"; diff --git a/v2rayN/ServiceLib/Handler/ConnectionHandler.cs b/v2rayN/ServiceLib/Handler/ConnectionHandler.cs index 3cfc6020..a0db6a2b 100644 --- a/v2rayN/ServiceLib/Handler/ConnectionHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConnectionHandler.cs @@ -1,11 +1,8 @@ namespace ServiceLib.Handler; -public class ConnectionHandler +public static class ConnectionHandler { - private static readonly Lazy _instance = new(() => new()); - public static ConnectionHandler Instance => _instance.Value; - - public async Task RunAvailabilityCheck() + public static async Task RunAvailabilityCheck() { var downloadHandle = new DownloadService(); var time = await downloadHandle.RunAvailabilityCheck(null); @@ -14,7 +11,7 @@ public class ConnectionHandler return string.Format(ResUI.TestMeOutput, time, ip); } - private async Task GetIPInfo(DownloadService downloadHandle) + private static async Task GetIPInfo(DownloadService downloadHandle) { var url = AppHandler.Instance.Config.SpeedTestItem.IPAPIUrl; if (url.IsNullOrEmpty()) diff --git a/v2rayN/ServiceLib/Handler/CoreConfigHandler.cs b/v2rayN/ServiceLib/Handler/CoreConfigHandler.cs index 40c5eacf..a057d4b4 100644 --- a/v2rayN/ServiceLib/Handler/CoreConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/CoreConfigHandler.cs @@ -3,7 +3,7 @@ namespace ServiceLib.Handler; /// /// Core configuration file processing class /// -public class CoreConfigHandler +public static class CoreConfigHandler { private static readonly string _tag = "CoreConfigHandler"; diff --git a/v2rayN/ServiceLib/Handler/SubscriptionHandler.cs b/v2rayN/ServiceLib/Handler/SubscriptionHandler.cs index f93eb2fa..2916a07f 100644 --- a/v2rayN/ServiceLib/Handler/SubscriptionHandler.cs +++ b/v2rayN/ServiceLib/Handler/SubscriptionHandler.cs @@ -1,6 +1,6 @@ namespace ServiceLib.Handler; -public class SubscriptionHandler +public static class SubscriptionHandler { public static async Task UpdateProcess(Config config, string subId, bool blProxy, Action updateFunc) { diff --git a/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs b/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs index 9c2be056..828c2102 100644 --- a/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs +++ b/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingLinux.cs @@ -1,6 +1,6 @@ namespace ServiceLib.Handler.SysProxy; -public class ProxySettingLinux +public static class ProxySettingLinux { private static readonly string _proxySetFileName = $"{Global.ProxySetLinuxShellFileName.Replace(Global.NamespaceSample, "")}.sh"; diff --git a/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs b/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs index 9d15839b..85d9b821 100644 --- a/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs +++ b/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingOSX.cs @@ -1,6 +1,6 @@ namespace ServiceLib.Handler.SysProxy; -public class ProxySettingOSX +public static class ProxySettingOSX { private static readonly string _proxySetFileName = $"{Global.ProxySetOSXShellFileName.Replace(Global.NamespaceSample, "")}.sh"; diff --git a/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingWindows.cs b/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingWindows.cs index 79b860b0..44b7e046 100644 --- a/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingWindows.cs +++ b/v2rayN/ServiceLib/Handler/SysProxy/ProxySettingWindows.cs @@ -3,7 +3,7 @@ using static ServiceLib.Handler.SysProxy.ProxySettingWindows.InternetConnectionO namespace ServiceLib.Handler.SysProxy; -public class ProxySettingWindows +public static class ProxySettingWindows { private const string _regPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings"; diff --git a/v2rayN/ServiceLib/Handler/AppHandler.cs b/v2rayN/ServiceLib/Manager/AppHandler.cs similarity index 98% rename from v2rayN/ServiceLib/Handler/AppHandler.cs rename to v2rayN/ServiceLib/Manager/AppHandler.cs index 18ba19b8..25c849b9 100644 --- a/v2rayN/ServiceLib/Handler/AppHandler.cs +++ b/v2rayN/ServiceLib/Manager/AppHandler.cs @@ -1,4 +1,4 @@ -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public sealed class AppHandler { @@ -97,7 +97,7 @@ public sealed class AppHandler return localPort + (int)protocol; } - public void AddProcess(IntPtr processHandle) + public void AddProcess(nint processHandle) { if (Utils.IsWindows()) { diff --git a/v2rayN/ServiceLib/Handler/ClashApiHandler.cs b/v2rayN/ServiceLib/Manager/ClashApiHandler.cs similarity index 99% rename from v2rayN/ServiceLib/Handler/ClashApiHandler.cs rename to v2rayN/ServiceLib/Manager/ClashApiHandler.cs index af5b0c57..33b0355a 100644 --- a/v2rayN/ServiceLib/Handler/ClashApiHandler.cs +++ b/v2rayN/ServiceLib/Manager/ClashApiHandler.cs @@ -1,6 +1,6 @@ using static ServiceLib.Models.ClashProxies; -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public sealed class ClashApiHandler { diff --git a/v2rayN/ServiceLib/Handler/CoreAdminHandler.cs b/v2rayN/ServiceLib/Manager/CoreAdminHandler.cs similarity index 99% rename from v2rayN/ServiceLib/Handler/CoreAdminHandler.cs rename to v2rayN/ServiceLib/Manager/CoreAdminHandler.cs index ec99b26b..e5db01ba 100644 --- a/v2rayN/ServiceLib/Handler/CoreAdminHandler.cs +++ b/v2rayN/ServiceLib/Manager/CoreAdminHandler.cs @@ -3,7 +3,7 @@ using System.Text; using CliWrap; using CliWrap.Buffered; -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public class CoreAdminHandler { diff --git a/v2rayN/ServiceLib/Handler/CoreHandler.cs b/v2rayN/ServiceLib/Manager/CoreHandler.cs similarity index 99% rename from v2rayN/ServiceLib/Handler/CoreHandler.cs rename to v2rayN/ServiceLib/Manager/CoreHandler.cs index f7ad2285..b12c7321 100644 --- a/v2rayN/ServiceLib/Handler/CoreHandler.cs +++ b/v2rayN/ServiceLib/Manager/CoreHandler.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.Text; -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; /// /// Core process processing class diff --git a/v2rayN/ServiceLib/Handler/CoreInfoHandler.cs b/v2rayN/ServiceLib/Manager/CoreInfoHandler.cs similarity index 99% rename from v2rayN/ServiceLib/Handler/CoreInfoHandler.cs rename to v2rayN/ServiceLib/Manager/CoreInfoHandler.cs index 6b7e1df2..d734c04e 100644 --- a/v2rayN/ServiceLib/Handler/CoreInfoHandler.cs +++ b/v2rayN/ServiceLib/Manager/CoreInfoHandler.cs @@ -1,4 +1,4 @@ -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public sealed class CoreInfoHandler { diff --git a/v2rayN/ServiceLib/Handler/NoticeHandler.cs b/v2rayN/ServiceLib/Manager/NoticeHandler.cs similarity index 97% rename from v2rayN/ServiceLib/Handler/NoticeHandler.cs rename to v2rayN/ServiceLib/Manager/NoticeHandler.cs index 31cb2204..177fd445 100644 --- a/v2rayN/ServiceLib/Handler/NoticeHandler.cs +++ b/v2rayN/ServiceLib/Manager/NoticeHandler.cs @@ -1,6 +1,6 @@ using ReactiveUI; -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public class NoticeHandler { diff --git a/v2rayN/ServiceLib/Handler/PacHandler.cs b/v2rayN/ServiceLib/Manager/PacHandler.cs similarity index 99% rename from v2rayN/ServiceLib/Handler/PacHandler.cs rename to v2rayN/ServiceLib/Manager/PacHandler.cs index 51febada..7f2534e1 100644 --- a/v2rayN/ServiceLib/Handler/PacHandler.cs +++ b/v2rayN/ServiceLib/Manager/PacHandler.cs @@ -1,7 +1,7 @@ using System.Net.Sockets; using System.Text; -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public class PacHandler { diff --git a/v2rayN/ServiceLib/Handler/ProfileExHandler.cs b/v2rayN/ServiceLib/Manager/ProfileExHandler.cs similarity index 100% rename from v2rayN/ServiceLib/Handler/ProfileExHandler.cs rename to v2rayN/ServiceLib/Manager/ProfileExHandler.cs diff --git a/v2rayN/ServiceLib/Handler/StatisticsHandler.cs b/v2rayN/ServiceLib/Manager/StatisticsHandler.cs similarity index 97% rename from v2rayN/ServiceLib/Handler/StatisticsHandler.cs rename to v2rayN/ServiceLib/Manager/StatisticsHandler.cs index 890c047d..2c683aeb 100644 --- a/v2rayN/ServiceLib/Handler/StatisticsHandler.cs +++ b/v2rayN/ServiceLib/Manager/StatisticsHandler.cs @@ -1,4 +1,4 @@ -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public class StatisticsHandler { @@ -91,7 +91,7 @@ public class StatisticsHandler { await SQLiteHelper.Instance.ExecuteAsync($"delete from ServerStatItem where indexId not in ( select indexId from ProfileItem )"); - long ticks = DateTime.Now.Date.Ticks; + var ticks = DateTime.Now.Date.Ticks; await SQLiteHelper.Instance.ExecuteAsync($"update ServerStatItem set todayUp = 0,todayDown=0,dateNow={ticks} where dateNow<>{ticks}"); _lstServerStat = await SQLiteHelper.Instance.TableAsync().ToListAsync(); @@ -128,7 +128,7 @@ public class StatisticsHandler private async Task GetServerStatItem(string indexId) { - long ticks = DateTime.Now.Date.Ticks; + var ticks = DateTime.Now.Date.Ticks; if (_serverStatItem != null && _serverStatItem.IndexId != indexId) { _serverStatItem = null; diff --git a/v2rayN/ServiceLib/Handler/TaskHandler.cs b/v2rayN/ServiceLib/Manager/TaskHandler.cs similarity index 95% rename from v2rayN/ServiceLib/Handler/TaskHandler.cs rename to v2rayN/ServiceLib/Manager/TaskHandler.cs index b49570be..0dab6d2e 100644 --- a/v2rayN/ServiceLib/Handler/TaskHandler.cs +++ b/v2rayN/ServiceLib/Manager/TaskHandler.cs @@ -1,4 +1,4 @@ -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public class TaskHandler { @@ -66,7 +66,7 @@ public class TaskHandler foreach (var item in lstSubs) { - await SubscriptionHandler.UpdateProcess(config, item.Id, true, (bool success, string msg) => + await SubscriptionHandler.UpdateProcess(config, item.Id, true, (success, msg) => { updateFunc?.Invoke(success, msg); if (success) @@ -87,7 +87,7 @@ public class TaskHandler Logging.SaveLog("Execute update geo files"); var updateHandle = new UpdateService(); - await updateHandle.UpdateGeoFileAll(config, (bool success, string msg) => + await updateHandle.UpdateGeoFileAll(config, (success, msg) => { updateFunc?.Invoke(false, msg); }); diff --git a/v2rayN/ServiceLib/Handler/WebDavHandler.cs b/v2rayN/ServiceLib/Manager/WebDavHandler.cs similarity index 99% rename from v2rayN/ServiceLib/Handler/WebDavHandler.cs rename to v2rayN/ServiceLib/Manager/WebDavHandler.cs index 865f4588..cf91cc7d 100644 --- a/v2rayN/ServiceLib/Handler/WebDavHandler.cs +++ b/v2rayN/ServiceLib/Manager/WebDavHandler.cs @@ -1,7 +1,7 @@ using System.Net; using WebDav; -namespace ServiceLib.Handler; +namespace ServiceLib.Manager; public sealed class WebDavHandler { diff --git a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs index 211317a6..f9c4e6d7 100644 --- a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs @@ -334,7 +334,7 @@ public class StatusBarViewModel : MyReactiveObject _updateView?.Invoke(EViewAction.DispatcherServerAvailability, ResUI.Speedtesting); - var msg = await Task.Run(ConnectionHandler.Instance.RunAvailabilityCheck); + var msg = await Task.Run(ConnectionHandler.RunAvailabilityCheck); NoticeHandler.Instance.SendMessageEx(msg); _updateView?.Invoke(EViewAction.DispatcherServerAvailability, msg); diff --git a/v2rayN/v2rayN.Desktop/App.axaml.cs b/v2rayN/v2rayN.Desktop/App.axaml.cs index ebd5c29a..cfd4210b 100644 --- a/v2rayN/v2rayN.Desktop/App.axaml.cs +++ b/v2rayN/v2rayN.Desktop/App.axaml.cs @@ -1,6 +1,7 @@ using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; +using ServiceLib.Manager; using Splat; using v2rayN.Desktop.Common; using v2rayN.Desktop.Views; diff --git a/v2rayN/v2rayN.Desktop/Base/WindowBase.cs b/v2rayN/v2rayN.Desktop/Base/WindowBase.cs index a84fc86c..99395add 100644 --- a/v2rayN/v2rayN.Desktop/Base/WindowBase.cs +++ b/v2rayN/v2rayN.Desktop/Base/WindowBase.cs @@ -1,6 +1,7 @@ using Avalonia; using Avalonia.Interactivity; using Avalonia.ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Desktop.Base; diff --git a/v2rayN/v2rayN.Desktop/Program.cs b/v2rayN/v2rayN.Desktop/Program.cs index 52fdbf92..f15276c3 100644 --- a/v2rayN/v2rayN.Desktop/Program.cs +++ b/v2rayN/v2rayN.Desktop/Program.cs @@ -1,5 +1,6 @@ using Avalonia; using Avalonia.ReactiveUI; +using ServiceLib.Manager; using v2rayN.Desktop.Common; namespace v2rayN.Desktop; diff --git a/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs b/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs index 877a3b4f..0347f330 100644 --- a/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs +++ b/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs @@ -8,6 +8,7 @@ using Avalonia.Styling; using ReactiveUI; using ReactiveUI.Fody.Helpers; using Semi.Avalonia; +using ServiceLib.Manager; namespace v2rayN.Desktop.ViewModels; diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs index 9d24175f..c46c6ea4 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs @@ -2,6 +2,7 @@ using System.Reactive.Disposables; using Avalonia.Controls; using Avalonia.Interactivity; using ReactiveUI; +using ServiceLib.Manager; using v2rayN.Desktop.Base; namespace v2rayN.Desktop.Views; diff --git a/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs index 7b239ff4..294a1eba 100644 --- a/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml.cs @@ -2,6 +2,7 @@ using System.Reactive.Disposables; using Avalonia.Controls; using Avalonia.Interactivity; using ReactiveUI; +using ServiceLib.Manager; using v2rayN.Desktop.Base; namespace v2rayN.Desktop.Views; diff --git a/v2rayN/v2rayN.Desktop/Views/FullConfigTemplateWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/FullConfigTemplateWindow.axaml.cs index 502fef36..6b432e9d 100644 --- a/v2rayN/v2rayN.Desktop/Views/FullConfigTemplateWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/FullConfigTemplateWindow.axaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using Avalonia.Interactivity; using ReactiveUI; +using ServiceLib.Manager; using v2rayN.Desktop.Base; namespace v2rayN.Desktop.Views; diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 581e0a35..08a3bb81 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -9,6 +9,7 @@ using Avalonia.Threading; using DialogHostAvalonia; using MsBox.Avalonia.Enums; using ReactiveUI; +using ServiceLib.Manager; using Splat; using v2rayN.Desktop.Base; using v2rayN.Desktop.Common; diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs index a7529369..50aefe98 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using Avalonia.Controls; using ReactiveUI; +using ServiceLib.Manager; using v2rayN.Desktop.Base; namespace v2rayN.Desktop.Views; diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs index f72c1f51..7ca7cd53 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml.cs @@ -7,6 +7,7 @@ using Avalonia.Threading; using DialogHostAvalonia; using MsBox.Avalonia.Enums; using ReactiveUI; +using ServiceLib.Manager; using Splat; using v2rayN.Desktop.Common; diff --git a/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs index 92472c50..570b58fd 100644 --- a/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs @@ -6,6 +6,7 @@ using Avalonia.ReactiveUI; using Avalonia.Threading; using DialogHostAvalonia; using ReactiveUI; +using ServiceLib.Manager; using Splat; using v2rayN.Desktop.Common; diff --git a/v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs index 9a5e908f..87a95cbc 100644 --- a/v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs @@ -2,6 +2,7 @@ using Avalonia.Controls; using Avalonia.Threading; using CliWrap.Buffered; using DialogHostAvalonia; +using ServiceLib.Manager; namespace v2rayN.Desktop.Views; diff --git a/v2rayN/v2rayN/App.xaml.cs b/v2rayN/v2rayN/App.xaml.cs index 0a282733..ba61bd52 100644 --- a/v2rayN/v2rayN/App.xaml.cs +++ b/v2rayN/v2rayN/App.xaml.cs @@ -1,6 +1,7 @@ using System.Diagnostics; using System.Windows; using System.Windows.Threading; +using ServiceLib.Manager; namespace v2rayN; diff --git a/v2rayN/v2rayN/Base/WindowBase.cs b/v2rayN/v2rayN/Base/WindowBase.cs index f73d2b69..14c12cb3 100644 --- a/v2rayN/v2rayN/Base/WindowBase.cs +++ b/v2rayN/v2rayN/Base/WindowBase.cs @@ -1,5 +1,6 @@ using System.Windows; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Base; diff --git a/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs b/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs index 1cc021c7..84827c75 100644 --- a/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs +++ b/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs @@ -1,4 +1,5 @@ using System.Windows.Media; +using ServiceLib.Manager; namespace v2rayN.Converters; diff --git a/v2rayN/v2rayN/Handler/HotkeyHandler.cs b/v2rayN/v2rayN/Handler/HotkeyHandler.cs index 5f261463..d07a9401 100644 --- a/v2rayN/v2rayN/Handler/HotkeyHandler.cs +++ b/v2rayN/v2rayN/Handler/HotkeyHandler.cs @@ -4,6 +4,7 @@ using System.Text; using System.Windows; using System.Windows.Input; using System.Windows.Interop; +using ServiceLib.Manager; namespace v2rayN.Handler; diff --git a/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs b/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs index 37d3b654..18d3f578 100644 --- a/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs +++ b/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs @@ -9,6 +9,7 @@ using MaterialDesignColors.ColorManipulation; using MaterialDesignThemes.Wpf; using ReactiveUI; using ReactiveUI.Fody.Helpers; +using ServiceLib.Manager; namespace v2rayN.ViewModels; diff --git a/v2rayN/v2rayN/Views/AddServer2Window.xaml.cs b/v2rayN/v2rayN/Views/AddServer2Window.xaml.cs index 87a476f6..2fb3e2a1 100644 --- a/v2rayN/v2rayN/Views/AddServer2Window.xaml.cs +++ b/v2rayN/v2rayN/Views/AddServer2Window.xaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using System.Windows; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs index b06002a9..0e96e236 100644 --- a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs @@ -2,6 +2,7 @@ using System.Reactive.Disposables; using System.Windows; using System.Windows.Controls; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs index cb6b44a8..9105b920 100644 --- a/v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using System.Windows; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/FullConfigTemplateWindow.xaml.cs b/v2rayN/v2rayN/Views/FullConfigTemplateWindow.xaml.cs index 3e38bf12..b3ee400d 100644 --- a/v2rayN/v2rayN/Views/FullConfigTemplateWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/FullConfigTemplateWindow.xaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using System.Windows; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs b/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs index ce6aeb72..8c87595f 100644 --- a/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs @@ -4,6 +4,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Input; using ReactiveUI; +using ServiceLib.Manager; using v2rayN.Handler; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 99f3fc03..6f2838ff 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -8,6 +8,7 @@ using System.Windows.Media; using System.Windows.Threading; using MaterialDesignThemes.Wpf; using ReactiveUI; +using ServiceLib.Manager; using Splat; using v2rayN.Handler; diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs index dea7302b..fbdf8e6e 100644 --- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs @@ -4,6 +4,7 @@ using System.Reactive.Disposables; using System.Windows; using System.Windows.Media; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs index 3501747e..0f2fe4a3 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -7,6 +7,7 @@ using System.Windows.Media; using System.Windows.Threading; using MaterialDesignThemes.Wpf; using ReactiveUI; +using ServiceLib.Manager; using Splat; using v2rayN.Base; using Point = System.Windows.Point; diff --git a/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs b/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs index 9db3fb83..5381a23c 100644 --- a/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using System.Windows; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs index bec5d1f7..e5e2bf71 100644 --- a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs @@ -2,6 +2,7 @@ using System.Reactive.Disposables; using System.Windows; using System.Windows.Input; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs index a1782c38..e9469a97 100644 --- a/v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs @@ -2,6 +2,7 @@ using System.Reactive.Disposables; using System.Windows; using System.Windows.Input; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/StatusBarView.xaml.cs b/v2rayN/v2rayN/Views/StatusBarView.xaml.cs index a5217f42..2a89cca1 100644 --- a/v2rayN/v2rayN/Views/StatusBarView.xaml.cs +++ b/v2rayN/v2rayN/Views/StatusBarView.xaml.cs @@ -3,6 +3,7 @@ using System.Windows; using System.Windows.Input; using System.Windows.Threading; using ReactiveUI; +using ServiceLib.Manager; using Splat; using v2rayN.Handler; diff --git a/v2rayN/v2rayN/Views/SubEditWindow.xaml.cs b/v2rayN/v2rayN/Views/SubEditWindow.xaml.cs index c9ab564b..d7eb71c2 100644 --- a/v2rayN/v2rayN/Views/SubEditWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/SubEditWindow.xaml.cs @@ -1,6 +1,7 @@ using System.Reactive.Disposables; using System.Windows; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views; diff --git a/v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs index 9da5ed2f..19d98c70 100644 --- a/v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs @@ -4,6 +4,7 @@ using System.Windows; using System.Windows.Input; using MaterialDesignThemes.Wpf; using ReactiveUI; +using ServiceLib.Manager; namespace v2rayN.Views;