diff --git a/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml b/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml index 2beaec94..1e0def17 100644 --- a/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml +++ b/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml @@ -10,90 +10,80 @@ d:DesignWidth="800" x:DataType="vms:CheckUpdateViewModel" mc:Ignorable="d"> - \ No newline at end of file diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml index 4eb4bd2d..65f2017a 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml @@ -90,11 +90,7 @@ - - - - - + diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 4e9f9197..74ca8739 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -20,6 +20,7 @@ namespace v2rayN.Desktop.Views { private static Config _config; private WindowNotificationManager? _manager; + private CheckUpdateView? _checkUpdateView; private BackupAndRestoreView? _backupAndRestoreView; public MainWindow() @@ -36,6 +37,7 @@ namespace v2rayN.Desktop.Views menuSettingsSetUWP.Click += menuSettingsSetUWP_Click; menuPromotion.Click += menuPromotion_Click; menuClose.Click += menuClose_Click; + menuCheckUpdate.Click += MenuCheckUpdate_Click; menuBackupAndRestore.Click += MenuBackupAndRestore_Click; var IsAdministrator = true;//WindowsUtils.IsAdministrator(); @@ -156,7 +158,6 @@ namespace v2rayN.Desktop.Views tabClashConnections2.Content ??= new ClashConnectionsView(); } conTheme.Content ??= new ThemeSettingView(); - conCheckUpdate.Content ??= new CheckUpdateView(); RestoreUI(); AddHelpMenuItem(); @@ -368,7 +369,13 @@ namespace v2rayN.Desktop.Views //ViewModel?.ScanScreenTaskAsync(result); } - private void MenuBackupAndRestore_Click(object sender, RoutedEventArgs e) + private void MenuCheckUpdate_Click(object? sender, RoutedEventArgs e) + { + _checkUpdateView ??= new CheckUpdateView(); + DialogHost.Show(_checkUpdateView); + } + + private void MenuBackupAndRestore_Click(object? sender, RoutedEventArgs e) { _backupAndRestoreView ??= new BackupAndRestoreView(this); DialogHost.Show(_backupAndRestoreView);