mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-16 09:24:59 +03:00
Code clean
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
using System.Collections.Specialized;
|
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using CliWrap;
|
using CliWrap;
|
||||||
using CliWrap.Buffered;
|
using CliWrap.Buffered;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ public sealed class EventChannel<T>
|
|||||||
private readonly Signal<T> _signal = new();
|
private readonly Signal<T> _signal = new();
|
||||||
private readonly Lock _gate = new();
|
private readonly Lock _gate = new();
|
||||||
private readonly IObservable<T> _observable;
|
private readonly IObservable<T> _observable;
|
||||||
|
|
||||||
public EventChannel()
|
public EventChannel()
|
||||||
{
|
{
|
||||||
_observable = _signal.Synchronize(_gate);
|
_observable = _signal.Synchronize(_gate);
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using System.Collections.Specialized;
|
|
||||||
|
|
||||||
namespace ServiceLib.Handler.Fmt;
|
namespace ServiceLib.Handler.Fmt;
|
||||||
|
|
||||||
public class BaseFmt
|
public class BaseFmt
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ namespace ServiceLib.ViewModels;
|
|||||||
public partial class ProfilesSelectViewModel : MyReactiveObject, ICloseable
|
public partial class ProfilesSelectViewModel : MyReactiveObject, ICloseable
|
||||||
{
|
{
|
||||||
public event EventHandler? RequestClose;
|
public event EventHandler? RequestClose;
|
||||||
|
|
||||||
public Interaction<RxVoid, RxVoid> ProfilesFocusInteraction { get; } = new();
|
public Interaction<RxVoid, RxVoid> ProfilesFocusInteraction { get; } = new();
|
||||||
|
|
||||||
#region private prop
|
#region private prop
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public partial class SubEditViewModel : MyReactiveObject, ICloseable
|
|||||||
|
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public partial string CustomCoreType { get; set; }
|
public partial string CustomCoreType { get; set; }
|
||||||
|
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public partial string PrevProfile { get; set; }
|
public partial string PrevProfile { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ internal static class MacAppUtils
|
|||||||
public static bool IsWindowMiniaturized(Window window)
|
public static bool IsWindowMiniaturized(Window window)
|
||||||
=> window.TryGetPlatformHandle() is IMacOSTopLevelPlatformHandle { NSWindow: not 0 } handle
|
=> window.TryGetPlatformHandle() is IMacOSTopLevelPlatformHandle { NSWindow: not 0 } handle
|
||||||
&& objc_msgSend_bool(handle.NSWindow, sel_registerName("isMiniaturized"));
|
&& objc_msgSend_bool(handle.NSWindow, sel_registerName("isMiniaturized"));
|
||||||
|
|
||||||
[DllImport(LibObjC)]
|
[DllImport(LibObjC)]
|
||||||
private static extern nint objc_getClass(string name);
|
private static extern nint objc_getClass(string name);
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ internal static class MacAppUtils
|
|||||||
[DllImport(LibObjC, EntryPoint = "objc_msgSend")]
|
[DllImport(LibObjC, EntryPoint = "objc_msgSend")]
|
||||||
[return: MarshalAs(UnmanagedType.I1)]
|
[return: MarshalAs(UnmanagedType.I1)]
|
||||||
private static extern bool objc_msgSend_bool(nint receiver, nint selector);
|
private static extern bool objc_msgSend_bool(nint receiver, nint selector);
|
||||||
|
|
||||||
[DllImport(LibObjC, EntryPoint = "objc_msgSend")]
|
[DllImport(LibObjC, EntryPoint = "objc_msgSend")]
|
||||||
private static extern void objc_msgSend(nint receiver, nint selector, nint argument);
|
private static extern void objc_msgSend(nint receiver, nint selector, nint argument);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using ServiceLib.Models.Entities;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using v2rayN.Desktop.Manager;
|
using v2rayN.Desktop.Manager;
|
||||||
using v2rayN.Desktop.ViewModels;
|
using v2rayN.Desktop.ViewModels;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using v2rayN.Desktop.Base;
|
using v2rayN.Desktop.Base;
|
||||||
using v2rayN.Desktop.Common;
|
|
||||||
|
|
||||||
namespace v2rayN.Desktop.Views;
|
namespace v2rayN.Desktop.Views;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user