|
|
@@ -50,6 +50,8 @@ public class ServerGrid : DynamicGrid<Server>
|
|
|
private Button _channelButton;
|
|
|
|
|
|
private Button _statusButton;
|
|
|
+
|
|
|
+ private Button _recoveryButton;
|
|
|
|
|
|
private CancellationTokenSource cancel = new CancellationTokenSource();
|
|
|
|
|
|
@@ -73,8 +75,18 @@ public class ServerGrid : DynamicGrid<Server>
|
|
|
_channelButton = AddButton("", Properties.Resources.autoupdate.AsBitmapImage(), "Change Update Channel", EditUpdateChannel_Click);
|
|
|
_statusButton = AddButton("", Properties.Resources.secure.AsBitmapImage(), "Check Service Status", ShowServiceStatus);
|
|
|
|
|
|
+ if (File.Exists(Path.Combine(BaseDirectory(), "PRSRecovery", "PRSRecovery.exe")))
|
|
|
+ {
|
|
|
+ _recoveryButton = AddButton("", ImageUtils.SvgToBitmapImage("/Resources/recovery.svg"),
|
|
|
+ "Launch Recovery Utility", LaunchRecovery);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+ private static string BaseDirectory() => Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) ?? "";
|
|
|
+
|
|
|
protected override void DoReconfigure(DynamicGridOptions options)
|
|
|
{
|
|
|
base.DoReconfigure(options);
|
|
|
@@ -591,7 +603,15 @@ public class ServerGrid : DynamicGrid<Server>
|
|
|
#endregion
|
|
|
|
|
|
#region Server Configuration
|
|
|
-
|
|
|
+
|
|
|
+ private bool LaunchRecovery(Button button, CoreRow[] rows)
|
|
|
+ {
|
|
|
+ var _mobileApp = System.IO.Path.Combine(BaseDirectory(), "PRSRecovery", "PRSRecovery.exe");
|
|
|
+ var _info = new ProcessStartInfo(_mobileApp);
|
|
|
+ Process.Start(_info);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private bool EditUpdateChannel_Click(Button arg1, CoreRow[] arg2)
|
|
|
{
|
|
|
var settings = new LocalConfiguration<AutoUpdateSettings>().Load();
|