mirror of https://github.com/2dust/v2rayN
Improve
parent
f76b1a5363
commit
57d9d8ddb9
|
@ -259,8 +259,6 @@ namespace v2rayN.ViewModels
|
|||
Locator.CurrentMutable.RegisterLazySingleton(() => new NoticeHandler(snackbarMessageQueue), typeof(NoticeHandler));
|
||||
_noticeHandler = Locator.Current.GetService<NoticeHandler>();
|
||||
_config = LazyConfig.Instance.GetConfig();
|
||||
//ThreadPool.RegisterWaitForSingleObject(App.ProgramStarted, OnProgramStarted, null, -1, false);
|
||||
Init();
|
||||
|
||||
SelectedProfile = new();
|
||||
SelectedSub = new();
|
||||
|
@ -273,9 +271,11 @@ namespace v2rayN.ViewModels
|
|||
}
|
||||
_subId = _config.subIndexId;
|
||||
|
||||
InitSubscriptionView();
|
||||
RefreshRoutingsMenu();
|
||||
RefreshServers();
|
||||
Init();
|
||||
BindingUI();
|
||||
RestoreUI();
|
||||
|
||||
#region WhenAnyValue && ReactiveCommand
|
||||
|
||||
var canEditRemove = this.WhenAnyValue(
|
||||
x => x.SelectedProfile,
|
||||
|
@ -316,10 +316,6 @@ namespace v2rayN.ViewModels
|
|||
y => y == true)
|
||||
.Subscribe(c => DoEnableTun(c));
|
||||
|
||||
BindingUI();
|
||||
RestoreUI();
|
||||
AutoHideStartup();
|
||||
|
||||
//servers
|
||||
AddVmessServerCmd = ReactiveCommand.Create(() =>
|
||||
{
|
||||
|
@ -573,6 +569,10 @@ namespace v2rayN.ViewModels
|
|||
SetListenerType(ESysProxyType.Pac);
|
||||
});
|
||||
|
||||
#endregion WhenAnyValue && ReactiveCommand
|
||||
|
||||
AutoHideStartup();
|
||||
|
||||
Global.ShowInTaskbar = true;
|
||||
}
|
||||
|
||||
|
@ -591,6 +591,10 @@ namespace v2rayN.ViewModels
|
|||
MainFormHandler.Instance.UpdateTask(_config, UpdateTaskHandler);
|
||||
MainFormHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, UpdateTaskHandler);
|
||||
|
||||
InitSubscriptionView();
|
||||
RefreshRoutingsMenu();
|
||||
RefreshServers();
|
||||
|
||||
Reload();
|
||||
ChangeSystemProxyStatus(_config.sysProxyType, true);
|
||||
}
|
||||
|
@ -1864,7 +1868,7 @@ namespace v2rayN.ViewModels
|
|||
if (_config.uiItem.autoHideStartup)
|
||||
{
|
||||
Observable.Range(1, 1)
|
||||
.Delay(TimeSpan.FromSeconds(0.5))
|
||||
.Delay(TimeSpan.FromSeconds(1))
|
||||
.Subscribe(x =>
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
|
|
|
@ -193,7 +193,6 @@
|
|||
x:Name="btnBrowse"
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
Width="100"
|
||||
Margin="2,0,8,0"
|
||||
Click="btnBrowse_Click"
|
||||
Content="{x:Static resx:ResUI.TbBrowse}"
|
||||
|
|
Loading…
Reference in New Issue