aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml
blob: b2fa2b3e3f9e93c859eab392b98243c0d38f1157 (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
<UserControl x:Class="Tango.MachineStudio.UI.Views.ConnectionLostView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
             mc:Ignorable="d" 
             Width="559" Height="266" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:ConnectionLostViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}">
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="80"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>

            <Grid>
                <StackPanel Orientation="Horizontal" Margin="10">
                    <Grid>
                        <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant"></Image>

                        <Ellipse Fill="#FF2626" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="30" Height="30" Margin="0 0 -5 -5">
                        </Ellipse>
                        <materialDesign:PackIcon Foreground="White" Kind="LanDisconnect" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="20" Height="20" Margin="0 0 0 0" />
                    </Grid>
                    <TextBlock Text="Connection Lost" 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>
                    <StackPanel Margin="0 10 0 0" >
                        <TextBlock TextWrapping="Wrap">
                            <Run>The machine connection has entered an invalid or inactive state and will be regarded as</Run>
                            <LineBreak/>
                            <Run>disconnected.</Run>
                        </TextBlock>

                        <TextBlock Margin="0 20 0 0" FontWeight="SemiBold">Reason:</TextBlock>
                        <TextBlock Foreground="{StaticResource GrayBrush}" Margin="0 2 0 0" Text="{Binding Exception}" Height="75" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">

                        </TextBlock>
                    </StackPanel>
                </Grid>

                <Grid Grid.Row="1">
                    <Button HorizontalAlignment="Right" Width="140" Command="{Binding OKCommand}">CLOSE</Button>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</UserControl>