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 | 29 |
1 files changed, 25 insertions, 4 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 d0bddf3f2..df1ea5f7e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -554,8 +554,8 @@ namespace Tango.MachineStudio.UI.ViewModels } catch (Exception ex) { - LogManager.Log(ex, "Error upload hardware configuration."); - NotificationProvider.ShowError("Error upload hardware configuration." + Environment.NewLine + ex.Message); + LogManager.Log(ex, "Error uploading hardware configuration."); + NotificationProvider.ShowError("Error uploading hardware configuration." + Environment.NewLine + ex.Message); } } } @@ -564,7 +564,7 @@ namespace Tango.MachineStudio.UI.ViewModels { if (NotificationProvider.ShowQuestion("This will reset the embedded device. Are you sure?")) { - using (NotificationProvider.PushTaskItem("Uploading hardware configuration...")) + using (NotificationProvider.PushTaskItem("Resetting the embedded device...")) { try { @@ -579,6 +579,25 @@ namespace Tango.MachineStudio.UI.ViewModels } } } + else if (x.Result == ConnectedMachineViewVM.ConnectedMachineVMResult.TurnOffHeaters) + { + if (NotificationProvider.ShowQuestion("This will reset the process parameters. Are you sure?")) + { + using (NotificationProvider.PushTaskItem("Resetting process parameters...")) + { + try + { + await ApplicationManager.ConnectedMachine.UploadProcessParameters(new ProcessParametersTable()); + NotificationProvider.ShowInfo("Heaters are turned off."); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error resetting process parameters."); + NotificationProvider.ShowError("Error resetting process parameters." + Environment.NewLine + ex.Message); + } + } + } + } }); } @@ -744,7 +763,9 @@ namespace Tango.MachineStudio.UI.ViewModels private void ReportIssue() { - _notificationProvider.ShowModalDialog<ReportIssueViewVM, ReportIssueView>(new ReportIssueViewVM(TFSClient.Project, TFSClient.CreateBug()), async (vm) => + var bug = TFSClient.CreateBug(); + + _notificationProvider.ShowModalDialog<ReportIssueViewVM, ReportIssueView>(new ReportIssueViewVM(TFSClient.Project, bug), async (vm) => { using (_notificationProvider.PushTaskItem("Uploading bug report...")) { |
