diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index a7762a5e6..278926de9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -545,6 +545,25 @@ namespace Tango.MachineStudio.UI.ViewModels } } } + else if (x.Result == ConnectedMachineViewVM.ConnectedMachineVMResult.Reset) + { + if (NotificationProvider.ShowQuestion("This will reset the embedded device. Are you sure?")) + { + using (NotificationProvider.PushTaskItem("Uploading hardware configuration...")) + { + try + { + await ApplicationManager.ConnectedMachine.Reset(); + NotificationProvider.ShowInfo("Embedded device has been restarted."); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error resetting embedded device."); + NotificationProvider.ShowError("Error resetting embedded device." + Environment.NewLine + ex.Message); + } + } + } + } }); } |
