aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml88
1 files changed, 88 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
new file mode 100644
index 000000000..b69ad6a5b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml
@@ -0,0 +1,88 @@
+<UserControl x:Class="Tango.MachineStudio.UI.Views.FirmwareUpgradeView"
+ 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:local="clr-namespace:Tango.MachineStudio.UI.Views"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="300" Width="800" Height="400" Background="White" d:DataContext="{d:DesignInstance Type=vm:FirmwareUpgradeViewVM, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <Grid Margin="10">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="121"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Grid>
+ <StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <Image Source="/Images/firmware_upgrade.png" Height="100" />
+ <TextBlock VerticalAlignment="Center" FontSize="30" FontWeight="SemiBold" Margin="20 0 0 0">FIRMWARE UPGRADE</TextBlock>
+ </StackPanel>
+ <Rectangle Stroke="Gainsboro" StrokeDashArray="5 5 5 5" Margin="20 10" />
+ </StackPanel>
+ </Grid>
+
+ <Grid Grid.Row="1">
+ <controls:NavigationControl TransitionType="Zoom" SelectedIndex="{Binding CurrentPage}" TransitionDuration="00:00:0.3">
+
+ <Grid>
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="174*"/>
+ <RowDefinition Height="85*"/>
+ </Grid.RowDefinitions>
+ <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
+ <TextBlock TextAlignment="Center">
+ <Run>The upgrade wizard will help you upgrade the connected machine firmware version.</Run>
+ <LineBreak/>
+ <Run>Press 'SELECT' to browse for a .tfp file (Tango Firmware Package).</Run>
+ </TextBlock>
+ <DockPanel Margin="0 30 0 0" Width="600" HorizontalAlignment="Left">
+ <Button DockPanel.Dock="Right" Margin="10 0 0 0" Command="{Binding SelectCommand}">SELECT</Button>
+ <TextBox Style="{x:Null}" VerticalContentAlignment="Center" BorderBrush="{StaticResource AccentColorBrush}" Padding="5 0" Foreground="DimGray" IsReadOnly="True" Text="{Binding SelectedFile,Mode=OneWay}"></TextBox>
+ </DockPanel>
+ </StackPanel>
+
+ <Grid Height="60" Grid.Row="1">
+ <Button Height="50" Width="200" VerticalAlignment="Top" Command="{Binding UpgradeCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Flash" Width="32" Height="32" />
+ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0">UPGRADE</TextBlock>
+ </StackPanel>
+ </Button>
+ </Grid>
+ </Grid>
+ </Grid>
+
+ <Grid>
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <TextBlock HorizontalAlignment="Center" FontSize="18" FontWeight="SemiBold">Upgrading Machine Firmware</TextBlock>
+ <TextBlock Margin="0 40 0 0" HorizontalAlignment="Center" Foreground="Gray" Text="{Binding Handler.Status,Converter={StaticResource EnumToDescriptionConverter},Mode=OneWay}"></TextBlock>
+ <ProgressBar Height="15" Width="600" Margin="0 5 0 0" Maximum="{Binding Handler.Total,Mode=OneWay}" Value="{Binding Handler.Current,Mode=OneWay}" ></ProgressBar>
+ <Button Width="150" Background="#FF5151" BorderBrush="#FF5151" Margin="0 40 0 0" Height="35" Command="{Binding AbortCommand}">ABORT</Button>
+ </StackPanel>
+ </Grid>
+
+ <Grid>
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <TextBlock HorizontalAlignment="Center" FontSize="18" FontWeight="SemiBold">Firmware Upgrade Completed</TextBlock>
+ <materialDesign:PackIcon HorizontalAlignment="Center" Width="100" Margin="0 10 0 0" Height="100" Kind="Check" Foreground="#2DCB2D" />
+ <Button Width="150" Margin="0 10 0 0" Height="35" Command="{Binding CloseCommand}">CLOSE</Button>
+ </StackPanel>
+ </Grid>
+ </controls:NavigationControl>
+ </Grid>
+
+ </Grid>
+ </Grid>
+</UserControl>