aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeView.xaml
blob: 4da59bb98b3bd91ba4e70b7bd9d7ba01c8b6695a (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<UserControl x:Class="Tango.FSE.Upgrade.Views.ApplicationUpgradeView"
             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:global="clr-namespace:Tango.FSE.Upgrade"
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:vm="clr-namespace:Tango.FSE.Upgrade.ViewModels"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:local="clr-namespace:Tango.FSE.Upgrade.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:ApplicationUpgradeViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.ApplicationUpgradeViewVM}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
    <Grid IsEnabled="{Binding IsFree}" Background="Transparent">
        <Grid.Style>
            <Style TargetType="Grid">
                <Setter Property="Cursor" Value="Arrow"></Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsFree}" Value="False">
                        <Setter Property="Cursor" Value="AppStarting"></Setter>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </Grid.Style>
        <StackPanel>
            <TextBlock FontSize="{StaticResource FSE_LargeFontSize}">Full Upgrade</TextBlock>

            <TextBlock Margin="0 10 0 0" Foreground="{StaticResource FSE_GrayBrush}" LineHeight="20" Visibility="{Binding ResolutionService.IsHighResolution,Converter={StaticResource BooleanToVisibilityConverter}}">
                <Run>You chose to perform a machine application and firmware upgrade.</Run>
                <LineBreak/>
                <Run>The upgrade is done by downloading the specified Tango system version below and composing a .tup file (Tango Update Package).</Run>
                <LineBreak/>
                <Run>This .tup file will contains all the relevant information required to update the selected machine.</Run>
                <LineBreak/>
                <Run>.tup files encapsulates update information relevant to a machine at the moment of generation.</Run>
                <LineBreak/>
                <Run FontWeight="SemiBold">Too much time between generation and update can result in irrelevant information.</Run>
            </TextBlock>

            <TextBlock Margin="0 20 0 0" Foreground="{StaticResource FSE_GrayBrush}" LineHeight="20">
                <Run>Once the .tup file has been generated, you will be able to store that file on a removable storage which can be later inserted into a machine.</Run>
                <LineBreak/>
                <Run>In case you chose to upgrade the currently connected machine, you will be able to perform the upgrade remotely.</Run>
            </TextBlock>

            <StackPanel Margin="0 20 0 0" Orientation="Horizontal">
                <StackPanel Width="360" HorizontalAlignment="Left">
                    <TextBlock>Select the desired Tango system software version</TextBlock>

                    <ComboBox Margin="0 5 0 0" Height="45" HorizontalContentAlignment="Stretch" FontSize="{StaticResource FSE_SmallFontSize}" material:ComboBoxAssist.ClassicMode="True" material:ComboBoxAssist.ShowSelectedItem="False" ItemsSource="{Binding TangoVersions}" SelectedItem="{Binding SelectedVersion}" Foreground="{StaticResource FSE_PrimaryAccentBrush}">
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <DockPanel>
                                    <TextBlock DockPanel.Dock="Right" VerticalAlignment="Center" Margin="10 1 0 0" Foreground="{StaticResource FSE_GrayBrush}" FontSize="{StaticResource FSE_SmallFontSize}">
                                    <Run>(</Run><Run Text="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></Run><Run>)</Run>
                                    </TextBlock>
                                    <StackPanel>
                                        <TextBlock>
                                        <Run Foreground="{StaticResource FSE_GrayBrush}">Application:</Run>
                                        <Run>v</Run><Run Text="{Binding VersionAndTag,Mode=OneWay}"></Run>
                                        </TextBlock>
                                        <TextBlock Margin="0 5 0 0">
                                        <Run Foreground="{StaticResource FSE_GrayBrush}">Firmware:</Run>
                                        <Run>v</Run><Run Text="{Binding FirmwareVersion}"></Run>
                                        </TextBlock>
                                    </StackPanel>
                                </DockPanel>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                </StackPanel>

                <Image Source="{StaticResource FSE_Arrow_Right}" Height="40" Margin="30 30 30 0" VerticalAlignment="Center" />
                <ContentControl Margin="0 30 0 0" Content="{Binding SelectedMachine}" ContentTemplate="{StaticResource FSE_Machine_ItemTemplate_Horizontal}"/>
            </StackPanel>
        </StackPanel>

        <StackPanel HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="1000">
            <DockPanel>
                <Button material:ButtonAssist.CornerRadius="25" Command="{Binding GeneratePackageCommand}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50">
                    <StackPanel Orientation="Horizontal">
                        <material:PackIcon Width="32" Height="28" Kind="PackageDown" />
                        <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">GENERATE PACKAGE</TextBlock>
                    </StackPanel>
                </Button>

                <StackPanel VerticalAlignment="Bottom" Margin="0 0 40 0">
                    <TextBlock Text="{Binding Handler.Progress.Message}" ToolTip="{Binding Handler.Progress.Message}" TextTrimming="CharacterEllipsis" Style="{StaticResource FSE_HandlerStatusTextBlock}"></TextBlock>
                    <ProgressBar Margin="0 5 0 0" Minimum="0" Maximum="{Binding Handler.Progress.Maximum}" Value="{Binding Handler.Progress.Value}" IsIndeterminate="{Binding Handler.Progress.IsIndeterminate}"></ProgressBar>
                </StackPanel>
            </DockPanel>

            <Rectangle StrokeThickness="1" Stroke="{StaticResource FSE_GrayBrush}" StrokeDashArray="4" Margin="0 10 0 0"></Rectangle>
        </StackPanel>
    </Grid>
</UserControl>