diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-01 18:46:05 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-01 18:46:05 +0300 |
| commit | 44728b1223a0e90785fe67f4e5782bee0683ed09 (patch) | |
| tree | 4c17718eecd87d407b6f9eb4b81d29895301aa8c /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | |
| parent | d5adb83c9487cd7198500a1e46933ca27a3411af (diff) | |
| download | Tango-44728b1223a0e90785fe67f4e5782bee0683ed09.tar.gz Tango-44728b1223a0e90785fe67f4e5782bee0683ed09.zip | |
Implemented default report issue settings on machine studio.
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...")) { |
