From c6a02da883d0e6c677f101eafa9d021656e9984c Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Mon, 2 Mar 2020 18:55:30 -0800 Subject: [PATCH] Add Reinstall button. --- Agent.Installer.Win/MainWindow.xaml | 18 +++++++++--------- .../ViewModels/MainWindowViewModel.cs | 8 ++++++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Agent.Installer.Win/MainWindow.xaml b/Agent.Installer.Win/MainWindow.xaml index 4e8b359c..3bd62704 100644 --- a/Agent.Installer.Win/MainWindow.xaml +++ b/Agent.Installer.Win/MainWindow.xaml @@ -69,6 +69,7 @@ Command="{Binding OpenLogsCommand}"> Logs + - + diff --git a/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs b/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs index ed1f6ead..986673fc 100644 --- a/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs +++ b/Agent.Installer.Win/ViewModels/MainWindowViewModel.cs @@ -49,6 +49,8 @@ namespace Remotely.Agent.Installer.Win.ViewModels } } + public string InstallButtonText => IsServiceMissing ? "Install" : "Reinstall"; + public ICommand InstallCommand => new Executor(async (param) => { await Install(param); }); public bool IsProgressVisible => Progress > 0; @@ -77,6 +79,7 @@ namespace Remotely.Agent.Installer.Win.ViewModels isServiceInstalled = value; FirePropertyChanged(nameof(IsServiceInstalled)); FirePropertyChanged(nameof(IsServiceMissing)); + FirePropertyChanged(nameof(InstallButtonText)); } } @@ -180,8 +183,9 @@ namespace Remotely.Agent.Installer.Win.ViewModels } else { - HeaderMessage = "Uninstall the Remotely service."; - StatusMessage = "Uninstalling the Remotely service will remove all remote acess to this device."; + HeaderMessage = "Modify the Remotely installation."; + StatusMessage = "Uninstalling the Remotely service will remove all remote acess to this device.\r\n\r\n" + + "Reinstalling will retain the current settings and install the service again."; } var installerSettings = ReadInstallerSettings();