aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-01 14:44:53 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-01 14:44:53 +0300
commit47fad304ebc8f056f1c5ffcde037c66029fc80c9 (patch)
tree1e321a7099a3988785485f16e677cd3eb0803a73 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows
parent52a09ecb4ae9577f6f1bb124d246ec1c3858ec23 (diff)
downloadTango-47fad304ebc8f056f1c5ffcde037c66029fc80c9.tar.gz
Tango-47fad304ebc8f056f1c5ffcde037c66029fc80c9.zip
Added device information for ConnectResponse.
Fixed issue with razor parser. Added report issue option to application crash. Added DeviceInformation to MachineOperator. Added LastHardwareConfiguration to machine operator.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionResolutions.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml12
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml.cs7
3 files changed, 18 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionResolutions.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionResolutions.cs
index 2e7327559..e27a84c3b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionResolutions.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionResolutions.cs
@@ -10,6 +10,7 @@ namespace Tango.MachineStudio.UI.Windows
{
Shutdown,
Restart,
- Ignore
+ Ignore,
+ Report
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
index 892e4944f..147b40892 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Windows"
mc:Ignorable="d"
- WindowStyle="None" ResizeMode="NoResize" Topmost="True" AllowsTransparency="True" WindowStartupLocation="CenterScreen" d:DesignHeight="300" d:DesignWidth="300" Width="610" Height="410" Background="Transparent" d:DataContext="{d:DesignInstance Type=local:ExceptionWindow, IsDesignTimeCreatable=False}">
+ WindowStyle="None" ResizeMode="NoResize" Topmost="True" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Width="800" Height="600" Background="Transparent" d:DataContext="{d:DesignInstance Type=local:ExceptionWindow, IsDesignTimeCreatable=False}">
<Grid>
<Border BorderThickness="1" BorderBrush="DodgerBlue" Background="White" Margin="10" CornerRadius="10">
<Border.Effect>
@@ -48,8 +48,16 @@
</Grid>
<Grid Grid.Row="1">
- <Button HorizontalAlignment="Left" Width="140" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Ignore}">Ignore</Button>
+ <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
+ <Button Width="140" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Ignore}">Ignore</Button>
+ </StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+ <Button x:Name="btnReport" Style="{StaticResource MaterialDesignFlatButton}" Width="150" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Report}">
+ <StackPanel Orientation="Horizontal">
+ <Image Source="/Images/bug.png" RenderOptions.BitmapScalingMode="Fant"></Image>
+ <TextBlock Foreground="#FF5C5C" Margin="10 0 0 0" VerticalAlignment="Center">Report Issue</TextBlock>
+ </StackPanel>
+ </Button>
<Button Margin="5 0 0 0" Width="140" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Shutdown}">Shutdown</Button>
<Button Margin="5 0 0 0" Width="140" Command="{Binding ResolveCommand}" CommandParameter="{x:Static local:ExceptionResolutions.Restart}">Restart</Button>
</StackPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml.cs
index 0f74fee17..0a6f2de39 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml.cs
@@ -33,10 +33,15 @@ namespace Tango.MachineStudio.UI.Windows
DataContext = this;
}
- public ExceptionWindow(Exception ex) : this()
+ public ExceptionWindow(Exception ex, bool canReport) : this()
{
Exception = ex.FlattenException();
ResolveCommand = new RelayCommand<ExceptionResolutions>(Resolve);
+
+ if (!canReport)
+ {
+ btnReport.Visibility = Visibility.Collapsed;
+ }
}
private void Resolve(ExceptionResolutions resolution)