diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-04-11 11:20:26 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-04-11 11:20:26 +0300 |
| commit | 588f2ed42de677c7e22b1c34c61568fe10098282 (patch) | |
| tree | 043587200f23c861b8430ab903dfaf8176320a6c /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | f4a6e8584e0e863515398ddb57fcfc545e425c87 (diff) | |
| parent | f052b13f288eec8f403536d40ed4cb4a4a38f5f9 (diff) | |
| download | Tango-588f2ed42de677c7e22b1c34c61568fe10098282.tar.gz Tango-588f2ed42de677c7e22b1c34c61568fe10098282.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
6 files changed, 88 insertions, 8 deletions
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 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <style> + html { + overflow: hidden; + padding: 0; + margin: 0; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + } + + body { + padding: 0; + margin: 0; + /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#eeeeee+0,eeeeee+100;Grey+Flat */ + background: rgb(238,238,238); /* Old browsers */ + background: -moz-linear-gradient(top, rgba(238,238,238,1) 0%, rgba(238,238,238,1) 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(top, rgba(238,238,238,1) 0%,rgba(238,238,238,1) 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to bottom, rgba(238,238,238,1) 0%,rgba(238,238,238,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */ + } + + .header { + font-size: 25pt; + background: #414141; + color: white; + padding: 15px; + } + + li { + margin:30px 10px; + padding:10px; + background:#C3C3C3; + max-width:500px; + border-radius:5px; + } + </style> +</head> +<body> + <div class="header">Thread Break</div> + <ol> + <li>Open the cover.</li> + <li>Connect the broken thread.</li> + <li>Close the cover.</li> + <li>Press 'OK' when done.</li> + </ol> +</body> +</html>
\ 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"> <Grid> <Grid> - <Border Background="White" Padding="10" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> + <Border Background="White" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> <Border.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="10"></DropShadowEffect> </Border.Effect> <Grid> - <DockPanel Margin="10"> + <DockPanel> <Grid DockPanel.Dock="Bottom"> - <Button Margin="10 10 0 0" Width="140" HorizontalAlignment="Right" Click="OKClicked">OK</Button> + <Button Margin="10" Width="140" HorizontalAlignment="Right" Click="OKClicked">OK</Button> </Grid> <WebBrowser x:Name="webBrowser" OverridesDefaultStyle="False" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/settings.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/settings.png Binary files differnew file mode 100644 index 000000000..2cfba56f9 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/settings.png diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 4befd2f5c..c13970674 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -439,6 +439,12 @@ <ItemGroup> <Resource Include="Images\warning.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\settings.png" /> + </ItemGroup> + <ItemGroup> + <Content Include="Html\HTML Templates\Thread Break.html" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PostBuildEvent>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 /// <param name="machineEvent">The HTML page.</param> 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 @@ <DataTrigger Binding="{Binding EventType.RequiresUserIntervention}" Value="True"> <Setter Property="Content"> <Setter.Value> - <Button Style="{StaticResource emptyButton}" Cursor="Hand" Margin="5" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ResolveMachineEventCommand}" CommandParameter="{Binding}"> - <materialDesign:PackIcon Kind="TelevisionGuide" Width="24" Height="24" /> + <Button ToolTip="Resolve issue" Style="{StaticResource emptyButton}" Cursor="Hand" Margin="5" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ResolveMachineEventCommand}" CommandParameter="{Binding}"> + <Image Source="/Images/settings.png" Width="24"> + <Image.Style> + <Style TargetType="Image"> + <Style.Triggers> + <EventTrigger RoutedEvent="Loaded"> + <EventTrigger.Actions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever"> + <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" /> + <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" /> + </DoubleAnimationUsingKeyFrames> + </Storyboard> + </BeginStoryboard> + </EventTrigger.Actions> + </EventTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> </Button> </Setter.Value> </Setter> |
