blob: a3bb0ec231dc09950f36c662122aa82b032dbf60 (
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
|
<mahApps:MetroWindow x:Class="Tango.FirmwarePackageGenerator.MainWindow"
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:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:pmr="clr-namespace:Tango.PMR.FirmwareUpgrade;assembly=Tango.PMR"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Tango.FirmwarePackageGenerator"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
mc:Ignorable="d"
Title="Tango - Firmware Package Generator" Height="700" Width="378.772" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type={x:Type local:MainWindowVM},IsDesignTimeCreatable=False}" EnableDWMDropShadow="True">
<Window.Resources>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
</Window.Resources>
<Grid>
<DockPanel Margin="10">
<Grid DockPanel.Dock="Bottom">
<Button Command="{Binding GenerateCommand}" Height="60" Style="{StaticResource AccentedSquareButtonStyle}" mahApps:ButtonHelper.PreserveTextCase="True" BorderThickness="0">GENERATE</Button>
</Grid>
<StackPanel DockPanel.Dock="Top">
<Image Source="/Images/firmware_upgrade.png" Height="150" RenderOptions.BitmapScalingMode="Fant" />
<TextBlock HorizontalAlignment="Center" Margin="0 10 0 0">
<Run>Fill the grid below to add firmware version files.</Run>
</TextBlock>
</StackPanel>
<Grid>
<DataGrid x:Name="grid" Margin="0 20" SelectionMode="Single" SelectionUnit="FullRow" HorizontalScrollBarVisibility="Disabled" AutoGenerateColumns="False" ItemsSource="{Binding VersionFiles}" CanUserAddRows="True" CanUserReorderColumns="False" CanUserDeleteRows="True" CanUserSortColumns="False" AddingNewItem="DataGrid_AddingNewItem" PreviewMouseDoubleClick="DataGrid_MouseDoubleClick">
<DataGrid.Columns>
<DataGridTextColumn Width="1*" Header="File Name" Binding="{Binding FileName,Mode=OneWay}" />
<DataGridComboBoxColumn Width="100" Header="DESTINATION" ItemsSource="{Binding Source={x:Type pmr:VersionFileDestination},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValueBinding="{Binding Destination}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" />
<DataGridTextColumn Width="70" Header="VERSION" Binding="{Binding Version}" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</DockPanel>
</Grid>
</mahApps:MetroWindow>
|