mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-11 06:54:58 +03:00
Code clean (#9482)
This commit is contained in:
@@ -18,7 +18,7 @@ public partial class AddServer2Window : WindowBase<AddServer2ViewModel>
|
||||
btnCancel.Click += (s, e) => Close();
|
||||
ViewModel = new AddServer2ViewModel(profileItem, UpdateViewHandler);
|
||||
|
||||
cmbCoreType.ItemsSource = Utils.GetEnumNames<ECoreType>().Where(t => t != ECoreType.v2rayN.ToString()).ToList().AppendEmpty();
|
||||
cmbCoreType.ItemsSource = Utils.GetEnumNames<ECoreType>().Where(t => t != nameof(ECoreType.v2rayN)).ToList().AppendEmpty();
|
||||
|
||||
this.WhenActivated(disposables =>
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ public partial class ClashConnectionsView : ReactiveUserControl<ClashConnections
|
||||
{
|
||||
try
|
||||
{
|
||||
List<ColumnItem> lvColumnItem = new();
|
||||
List<ColumnItem> lvColumnItem = [];
|
||||
foreach (var item2 in lstConnections.Columns)
|
||||
{
|
||||
if (item2.Tag == null)
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace v2rayN.Desktop.Views;
|
||||
|
||||
public partial class GlobalHotkeySettingWindow : WindowBase<GlobalHotkeySettingViewModel>
|
||||
{
|
||||
private readonly List<object> _textBoxKeyEventItem = new();
|
||||
private readonly List<object> _textBoxKeyEventItem = [];
|
||||
|
||||
public GlobalHotkeySettingWindow()
|
||||
{
|
||||
|
||||
@@ -144,13 +144,13 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
|
||||
AppEvents.ShutdownRequested
|
||||
.AsObservable()
|
||||
.ObserveOn(RxSchedulers.MainThreadScheduler)
|
||||
.Subscribe(content => Shutdown(content))
|
||||
.Subscribe(Shutdown)
|
||||
.DisposeWith(disposables);
|
||||
|
||||
AppEvents.ShowHideWindowRequested
|
||||
.AsObservable()
|
||||
.ObserveOn(RxSchedulers.MainThreadScheduler)
|
||||
.Subscribe(blShow => ShowHideWindow(blShow))
|
||||
.Subscribe(ShowHideWindow)
|
||||
.DisposeWith(disposables);
|
||||
});
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||
{
|
||||
try
|
||||
{
|
||||
List<ColumnItem> lvColumnItem = new();
|
||||
List<ColumnItem> lvColumnItem = [];
|
||||
foreach (var item2 in lstProfiles.Columns)
|
||||
{
|
||||
if (item2.Tag == null)
|
||||
|
||||
@@ -47,10 +47,7 @@ public partial class StatusBarView : ReactiveUserControl<StatusBarViewModel>
|
||||
switch (action)
|
||||
{
|
||||
case EViewAction.DispatcherRefreshIcon:
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
RefreshIcon();
|
||||
},
|
||||
Dispatcher.UIThread.Post(RefreshIcon,
|
||||
DispatcherPriority.Default);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user