aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
blob: 147b40892b4297f43e3715cd8f3db7d770ac5d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
<Window x:Class="Tango.MachineStudio.UI.Windows.ExceptionWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        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" 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>
                <DropShadowEffect ShadowDepth="0" BlurRadius="10" />
            </Border.Effect>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="1*"/>
                </Grid.RowDefinitions>

                <Grid>
                    <StackPanel Orientation="Horizontal" Margin="10">
                        <Image Source="/Images/exception.png" RenderOptions.BitmapScalingMode="Fant"></Image>
                        <TextBlock Text="Machine Studio Error" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20"></TextBlock>
                    </StackPanel>
                </Grid>

                <Grid Grid.Row="1" Margin="10 0 10 10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="50"/>
                    </Grid.RowDefinitions>

                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="223*"/>
                        </Grid.RowDefinitions>

                        <Grid>
                            <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Margin="0 0 0 0">
                            <Run>Machine Studio encountered an unexpected error. It is recommended to restart the application in order to resolve the issue.</Run>
                            </TextBlock>
                        </Grid>

                        <Grid Grid.Row="1" Margin="0 10 0 0">
                            <TextBox Style="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" BorderBrush="#515151" IsReadOnly="True" AcceptsReturn="True" Foreground="#202020" Padding="2" TextWrapping="Wrap" Text="{Binding Exception}"></TextBox>
                        </Grid>
                    </Grid>

                    <Grid Grid.Row="1">
                        <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>
                    </Grid>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</Window>