aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ExceptionWindow.xaml
blob: 01f08491aecd5ccaba9d89c780f79e735aaf8ca9 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<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}" FontFamily="{StaticResource flexo}" Foreground="{StaticResource Dialog.Foreground}">
    <Grid>
        <Border BorderThickness="1" BorderBrush="DodgerBlue" Background="{StaticResource Dialog.Background}" 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="{StaticResource GrayBrush200}" IsReadOnly="True" AcceptsReturn="True"  Foreground="{StaticResource DarkGrayBrush}" 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="{StaticResource RedBrush100}" 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>