From 66c66e69217493357d03b1986b7a38933944c1c3 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 10 Apr 2018 11:35:30 +0300 Subject: Added event resolvable / requires user. Added HTML Templates.. --- .../Html/HTML Templates/Thread Break.html | 48 +++++++++++++++++++++ .../Tango.MachineStudio.UI/Html/HtmlWindow.xaml | 6 +-- .../Tango.MachineStudio.UI/Images/settings.png | Bin 0 -> 1117 bytes .../Tango.MachineStudio.UI.csproj | 6 +++ .../ViewModels/MainViewVM.cs | 13 ++++-- .../Tango.MachineStudio.UI/Views/MainView.xaml | 23 +++++++++- 6 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HTML Templates/Thread Break.html create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/settings.png (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HTML Templates/Thread Break.html b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HTML Templates/Thread Break.html new file mode 100644 index 000000000..5c620fc83 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HTML Templates/Thread Break.html @@ -0,0 +1,48 @@ + + + + + + +
Thread Break
+
    +
  1. Open the cover.
  2. +
  3. Connect the broken thread.
  4. +
  5. Close the cover.
  6. +
  7. Press 'OK' when done.
  8. +
+ + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml index 654d2d0eb..d7032cedc 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Html/HtmlWindow.xaml @@ -10,15 +10,15 @@ Title="Machine Studio" Height="500" Width="800" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" Background="Transparent"> - + - + - + + + + + + + if $(ConfigurationName) == Debug $(TargetDir)linkgen.exe -s "$(TargetPath)" -d "$(TargetDir)Utilities\Machine Studio.lnk" 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 a18d0c6c6..f9bffae29 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -575,13 +575,20 @@ namespace Tango.MachineStudio.UI.ViewModels /// The HTML page. private async void ResolveMachineEvent(MachinesEvent machineEvent) { - if (_htmlPresenter.DisplayHtml(machineEvent.EventType.HtmlPage)) + if (machineEvent.EventType.HtmlPage != null) { - if (ApplicationManager.ConnectedMachine != null) + if (_htmlPresenter.DisplayHtml(machineEvent.EventType.HtmlPage)) { - await ApplicationManager.ConnectedMachine.ResolveEvent((PMR.Diagnostics.EventType)machineEvent.Type); + if (ApplicationManager.ConnectedMachine != null && machineEvent.EventType.Resolvable) + { + await ApplicationManager.ConnectedMachine.ResolveEvent((PMR.Diagnostics.EventType)machineEvent.Type); + } } } + else + { + _notificationProvider.ShowWarning("Could not locate guidance content for the specified event."); + } } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 4ce76d6e4..030e26898 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -465,8 +465,27 @@ - -- cgit v1.3.1