diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index c6433b6a..f377ff86 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -1,4 +1,3 @@ -using System.Collections.Specialized; using System.Security.Principal; using CliWrap; using CliWrap.Buffered; diff --git a/v2rayN/ServiceLib/Events/EventChannel.cs b/v2rayN/ServiceLib/Events/EventChannel.cs index 4e234fc6..35e90b0e 100644 --- a/v2rayN/ServiceLib/Events/EventChannel.cs +++ b/v2rayN/ServiceLib/Events/EventChannel.cs @@ -5,6 +5,7 @@ public sealed class EventChannel private readonly Signal _signal = new(); private readonly Lock _gate = new(); private readonly IObservable _observable; + public EventChannel() { _observable = _signal.Synchronize(_gate); diff --git a/v2rayN/ServiceLib/Handler/Fmt/BaseFmt.cs b/v2rayN/ServiceLib/Handler/Fmt/BaseFmt.cs index 4b6fee41..94a4d25a 100644 --- a/v2rayN/ServiceLib/Handler/Fmt/BaseFmt.cs +++ b/v2rayN/ServiceLib/Handler/Fmt/BaseFmt.cs @@ -1,5 +1,3 @@ -using System.Collections.Specialized; - namespace ServiceLib.Handler.Fmt; public class BaseFmt diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs index f2777d65..4d7e7bb6 100644 --- a/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs @@ -3,7 +3,7 @@ namespace ServiceLib.ViewModels; public partial class ProfilesSelectViewModel : MyReactiveObject, ICloseable { public event EventHandler? RequestClose; - + public Interaction ProfilesFocusInteraction { get; } = new(); #region private prop diff --git a/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs b/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs index da97e748..821110a3 100644 --- a/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs @@ -9,6 +9,7 @@ public partial class SubEditViewModel : MyReactiveObject, ICloseable [Reactive] public partial string CustomCoreType { get; set; } + [Reactive] public partial string PrevProfile { get; set; } diff --git a/v2rayN/v2rayN.Desktop/Common/MacAppUtils.cs b/v2rayN/v2rayN.Desktop/Common/MacAppUtils.cs index 3273feaf..fe172e04 100644 --- a/v2rayN/v2rayN.Desktop/Common/MacAppUtils.cs +++ b/v2rayN/v2rayN.Desktop/Common/MacAppUtils.cs @@ -16,7 +16,7 @@ internal static class MacAppUtils public static bool IsWindowMiniaturized(Window window) => window.TryGetPlatformHandle() is IMacOSTopLevelPlatformHandle { NSWindow: not 0 } handle && objc_msgSend_bool(handle.NSWindow, sel_registerName("isMiniaturized")); - + [DllImport(LibObjC)] private static extern nint objc_getClass(string name); @@ -29,7 +29,7 @@ internal static class MacAppUtils [DllImport(LibObjC, EntryPoint = "objc_msgSend")] [return: MarshalAs(UnmanagedType.I1)] private static extern bool objc_msgSend_bool(nint receiver, nint selector); - + [DllImport(LibObjC, EntryPoint = "objc_msgSend")] private static extern void objc_msgSend(nint receiver, nint selector, nint argument); } diff --git a/v2rayN/v2rayN.Desktop/DesignData/DesignData.cs b/v2rayN/v2rayN.Desktop/DesignData/DesignData.cs index 3b6f2afa..807d1af5 100644 --- a/v2rayN/v2rayN.Desktop/DesignData/DesignData.cs +++ b/v2rayN/v2rayN.Desktop/DesignData/DesignData.cs @@ -1,4 +1,3 @@ -using ServiceLib.Models.Entities; using System.Diagnostics; using v2rayN.Desktop.Manager; using v2rayN.Desktop.ViewModels; diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs index a1d5b22d..305bdbb1 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs @@ -1,5 +1,4 @@ using v2rayN.Desktop.Base; -using v2rayN.Desktop.Common; namespace v2rayN.Desktop.Views;