diff --git a/v2rayN/ServiceLib/Common/FileManager.cs b/v2rayN/ServiceLib/Common/FileManager.cs index ee0eaa98..95a17adb 100644 --- a/v2rayN/ServiceLib/Common/FileManager.cs +++ b/v2rayN/ServiceLib/Common/FileManager.cs @@ -115,6 +115,5 @@ namespace ServiceLib.Common } return true; } - } } \ No newline at end of file diff --git a/v2rayN/ServiceLib/Enums/EViewAction.cs b/v2rayN/ServiceLib/Enums/EViewAction.cs index acacbd6a..d62943c6 100644 --- a/v2rayN/ServiceLib/Enums/EViewAction.cs +++ b/v2rayN/ServiceLib/Enums/EViewAction.cs @@ -39,7 +39,7 @@ DispatcherRefreshServersBiz, DispatcherRefreshIcon, DispatcherCheckUpdate, - DispatcherCheckUpdateFinished, + DispatcherCheckUpdateFinished, DispatcherShowMsg, } } \ No newline at end of file diff --git a/v2rayN/ServiceLib/Handler/LazyConfig.cs b/v2rayN/ServiceLib/Handler/LazyConfig.cs index 2fba1116..55b7be88 100644 --- a/v2rayN/ServiceLib/Handler/LazyConfig.cs +++ b/v2rayN/ServiceLib/Handler/LazyConfig.cs @@ -1,6 +1,4 @@ -using System.Runtime.InteropServices; - -namespace ServiceLib.Handler +namespace ServiceLib.Handler { public sealed class LazyConfig { diff --git a/v2rayN/ServiceLib/Models/CheckUpdateItem.cs b/v2rayN/ServiceLib/Models/CheckUpdateItem.cs index d3886d41..9d21e20e 100644 --- a/v2rayN/ServiceLib/Models/CheckUpdateItem.cs +++ b/v2rayN/ServiceLib/Models/CheckUpdateItem.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ServiceLib.Models +namespace ServiceLib.Models { public class CheckUpdateItem { @@ -14,4 +8,4 @@ namespace ServiceLib.Models public string? fileName { get; set; } public bool? isFinished { get; set; } } -} +} \ No newline at end of file diff --git a/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs index 46f604b1..f2911c9a 100644 --- a/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs @@ -9,6 +9,7 @@ namespace ServiceLib.ViewModels { [Reactive] public ProfileItem SelectedSource { get; set; } + [Reactive] public string? CoreType { get; set; } diff --git a/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs b/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs index 53e6c438..e6384106 100644 --- a/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs @@ -2,7 +2,6 @@ using ReactiveUI.Fody.Helpers; using Splat; using System.Collections.Concurrent; -using System.Diagnostics; using System.Text.RegularExpressions; namespace ServiceLib.ViewModels diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index a14c92e8..c35b7979 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -279,6 +279,7 @@ namespace v2rayN.Desktop.Views var clipboardData = await AvaUtils.GetClipboardData(this); ViewModel?.AddServerViaClipboardAsync(clipboardData); break; + case EViewAction.AdjustMainLvColWidth: Dispatcher.UIThread.Post(() => Locator.Current.GetService()?.AutofitColumnWidthAsync(), diff --git a/v2rayN/v2rayN/App.xaml b/v2rayN/v2rayN/App.xaml index 04a602cb..3b7aefee 100644 --- a/v2rayN/v2rayN/App.xaml +++ b/v2rayN/v2rayN/App.xaml @@ -1,9 +1,9 @@  diff --git a/v2rayN/v2rayN/Views/CheckUpdateView.xaml b/v2rayN/v2rayN/Views/CheckUpdateView.xaml index e20138a3..fcd11a52 100644 --- a/v2rayN/v2rayN/Views/CheckUpdateView.xaml +++ b/v2rayN/v2rayN/Views/CheckUpdateView.xaml @@ -56,7 +56,6 @@ IsCancel="True" IsDefault="True" Style="{StaticResource MaterialDesignFlatButton}" /> - @@ -106,7 +105,6 @@ - \ No newline at end of file diff --git a/v2rayN/v2rayN/Views/CheckUpdateView.xaml.cs b/v2rayN/v2rayN/Views/CheckUpdateView.xaml.cs index 9f9b4fd2..def6e53f 100644 --- a/v2rayN/v2rayN/Views/CheckUpdateView.xaml.cs +++ b/v2rayN/v2rayN/Views/CheckUpdateView.xaml.cs @@ -34,6 +34,7 @@ namespace v2rayN.Views ViewModel?.UpdateViewResult((CheckUpdateItem)obj); }), DispatcherPriority.Normal); break; + case EViewAction.DispatcherCheckUpdateFinished: if (obj is null) return false; Application.Current?.Dispatcher.Invoke((() => @@ -41,7 +42,6 @@ namespace v2rayN.Views ViewModel?.UpdateFinishedResult((bool)obj); }), DispatcherPriority.Normal); break; - } return await Task.FromResult(true); diff --git a/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs b/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs index e776c7ae..df654738 100644 --- a/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs @@ -15,7 +15,6 @@ namespace v2rayN.Views { InitializeComponent(); - this.Owner = Application.Current.MainWindow; _config = LazyConfig.Instance.Config; _config.globalHotkeys ??= new List(); diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 8d826d92..041f7f2e 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -15,7 +15,7 @@ namespace v2rayN.Views { public partial class MainWindow { - private static Config _config; + private static Config _config; private CheckUpdateView? _checkUpdateView; public MainWindow() @@ -296,7 +296,7 @@ namespace v2rayN.Views Application.Current?.Dispatcher.Invoke((() => { Application.Current.Shutdown(); - }), DispatcherPriority.Normal); + }), DispatcherPriority.Normal); break; case EViewAction.ScanScreenTask: diff --git a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml index c63fa71a..1292f714 100644 --- a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml +++ b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml @@ -1,14 +1,14 @@