diff options
| author | Mirta <mirta@twine-s.com> | 2020-12-30 14:27:05 +0200 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2020-12-30 14:27:05 +0200 |
| commit | 1344a54c37f7cbba7a294674b4b733d72ee257ea (patch) | |
| tree | 4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views | |
| parent | 124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff) | |
| parent | 281610ac56799f6870c587a942495d91cd55b227 (diff) | |
| download | Tango-1344a54c.tar.gz Tango-1344a54c.zip | |
Hope it is fine
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views')
10 files changed, 145 insertions, 914 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml index 78fa17979..58c88324f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml @@ -20,116 +20,32 @@ <Border.Effect> <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> </Border.Effect> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Technician</TextBlock> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Technician Mode</TextBlock> </Border> - <touch:LightTouchScrollViewer Grid.Row="1"> - <Grid Grid.Row="1" VerticalAlignment="Top" Margin="20"> - <StackPanel Margin="30 0 30 0" DockPanel.Dock="Bottom" VerticalAlignment="Center"> + <Grid Grid.Row="1" VerticalAlignment="Top" Margin="20"> + <UniformGrid Columns="2"> + <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="LoggingView" Width="250" Height="250" Style="{StaticResource TangoHollowButton}" Padding="20"> + <DockPanel> + <TextBlock Margin="0 10 0 0" DockPanel.Dock="Bottom" HorizontalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Logging</TextBlock> + <Image Width="128" Source="../Images/logging.png" /> + </DockPanel> + </touch:TouchButton> - <StackPanel.Resources> - <Style TargetType="touch:TouchButton" x:Key="ButtonMenu"> - <Setter Property="Padding" Value="10"></Setter> - <Setter Property="HorizontalContentAlignment" Value="Left"></Setter> - <Setter Property="Height" Value="140"></Setter> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="BorderBrush" Value="{StaticResource TangoDarkForegroundBrush}"></Setter> - <Setter Property="BorderThickness" Value="1"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter> - <Setter Property="EnableDropShadow" Value="False"></Setter> - <Setter Property="CornerRadius" Value="5"></Setter> - <Setter Property="Margin" Value="0 0 0 20"></Setter> - <Setter Property="RippleBrush" Value="#4BB8B8B8"></Setter> - </Style> - </StackPanel.Resources> + <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="SystemView" Width="250" Height="250" Style="{StaticResource TangoHollowButton}" Padding="20"> + <DockPanel> + <TextBlock Margin="0 10 0 0" DockPanel.Dock="Bottom" HorizontalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">System</TextBlock> + <Image Width="128" Source="../Images/system.png" /> + </DockPanel> + </touch:TouchButton> - <TextBlock Margin="0 20 0 40" Foreground="{StaticResource TangoGrayTextBrush}">The technician module enables additional diagnostic tools.</TextBlock> - - <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="LoggingView" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/logging.png" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Logging</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - Display and investigate issues using application and embedded device logs. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="SystemView" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/system.png" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoTitleFontSize}">System</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - Display system properties, perform system actions, reset, shutdown etc... - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="DispensersView" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/dispensers.png" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Dispensers</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - Perform manual dispensers homing priming. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="PackagesView" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/packages.png" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Installed Packages</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - View the history of update packages installation. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="UpdatesView" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/sync.png" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Updates & Synchronization</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - View the current status and history of update and synchronization operations. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="RemoteConnectionsView" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/remote_connections.png" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Remote Connections</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - View the current status of remote connections to this machine. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <!--<touch:TouchButton Command="{Binding BrowserCommand}" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/browser.png" RenderOptions.BitmapScalingMode="Fant" Width="80" Height="80" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Browser</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" TextWrapping="Wrap" Width="580"> - Open the browser module and navigate the web. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton>--> - </StackPanel> - </Grid> - </touch:LightTouchScrollViewer> + <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="DispensersView" Margin="0 60 0 0" Width="250" Height="250" Style="{StaticResource TangoHollowButton}" Padding="20"> + <DockPanel> + <TextBlock Margin="0 10 0 0" DockPanel.Dock="Bottom" HorizontalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Dispensers</TextBlock> + <Image Width="128" Source="../Images/dispensers.png" /> + </DockPanel> + </touch:TouchButton> + </UniformGrid> + </Grid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml index 8393349ea..39353c286 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml @@ -34,7 +34,7 @@ <DockPanel> <DockPanel DockPanel.Dock="Top"> <StackPanel Orientation="Horizontal"> - <touch:TouchNavigationLinks x:Name="nav" Margin="20" FontSize="{StaticResource TangoNavigationLinksFontSize}"> + <touch:TouchNavigationLinks Margin="20" FontSize="{StaticResource TangoNavigationLinksFontSize}"> <sys:String>Application</sys:String> <sys:String>Embedded</sys:String> </touch:TouchNavigationLinks> @@ -47,109 +47,91 @@ <touch:TouchIcon Icon="Magnify" Foreground="{StaticResource TangoGrayBrush}" Width="16" Height="16" /> <touch:TouchTextBox Width="200" VerticalAlignment="Center" Margin="5 -10 0 0" Text="{Binding Filter,Delay=1000}"></touch:TouchTextBox> </StackPanel> - - <touch:TouchCheckBox IsChecked="{Binding ProcessDebugLogs}" Margin="20 0 0 0" Content="Debug Logs"> - <touch:TouchCheckBox.Style> - <Style TargetType="touch:TouchCheckBox" BasedOn="{StaticResource {x:Type touch:TouchCheckBox}}"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding ElementName=nav,Path=SelectedIndex}" Value="0"> - <Setter Property="Visibility" Value="Visible"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchCheckBox.Style> - </touch:TouchCheckBox> </StackPanel> </StackPanel> <touch:TouchDatePicker Visibility="Collapsed" SelectedDate="12/15/2018" Height="40" /> </DockPanel> <Grid Margin="20"> - <TabControl Padding="0" BorderThickness="0" Margin="0 10 0 0" Background="Transparent" SelectedIndex="{Binding ElementName=nav,Path=SelectedIndex,Mode=OneWay}"> - <TabItem Header="Application" Visibility="Collapsed"> - <touch:TouchSimpleDataGrid x:Name="gridApplication" Style="{StaticResource TechGrid}" ItemsSource="{Binding ApplicationLogsViewSource}" SelectedItem="{Binding SelectedLog}"> - <DataGrid.Columns> - <DataGridTemplateColumn Header="" Width="50"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <touch:TouchIcon Width="16"> - <touch:TouchIcon.Style> - <Style TargetType="touch:TouchIcon"> - <Setter Property="Icon" Value="InformationOutline"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Category}" Value="Warning"> - <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding Category}" Value="Error"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding Category}" Value="Critical"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchIcon.Style> - </touch:TouchIcon> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" /> - <DataGridTemplateColumn Header="Message" Width="1*"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - </DataGrid.Columns> - </touch:TouchSimpleDataGrid> - </TabItem> - <TabItem Header="Embedded" Visibility="Collapsed"> - <touch:TouchSimpleDataGrid x:Name="gridEmbedded" Style="{StaticResource TechGrid}" ItemsSource="{Binding EmbeddedLogsViewSource}" SelectedItem="{Binding SelectedLog}"> - <DataGrid.Columns> - <DataGridTemplateColumn Header="" Width="50"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <touch:TouchIcon Width="16"> - <touch:TouchIcon.Style> - <Style TargetType="touch:TouchIcon"> - <Setter Property="Icon" Value="InformationOutline"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Category}" Value="Warning"> - <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding Category}" Value="Error"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding Category}" Value="Critical"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchIcon.Style> - </touch:TouchIcon> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" /> - <DataGridTemplateColumn Header="Message" Width="1*"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - </DataGrid.Columns> - </touch:TouchSimpleDataGrid> - </TabItem> - </TabControl> + <touch:TouchSimpleDataGrid AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}" HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True" ItemsSource="{Binding ApplicationLogsViewSource}" SelectedItem="{Binding SelectedLog}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled"> + <DataGrid.Resources> + <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}"> + <Setter Property="Background" Value="{StaticResource TangoDarkForegroundBrush}" /> + <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}" /> + <Setter Property="Padding" Value="5"></Setter> + </Style> + </DataGrid.Resources> + <DataGrid.RowStyle> + <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> + <Style.Triggers> + <Trigger Property="IsSelected" Value="True"> + <Setter Property="Background" Value="Transparent"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> + </Trigger> + <Trigger Property="IsFocused" Value="True"> + <Setter Property="Background" Value="Transparent"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> + </Trigger> + </Style.Triggers> + </Style> + </DataGrid.RowStyle> + <DataGrid.CellStyle> + <Style TargetType="{x:Type DataGridCell}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type DataGridCell}"> + <Grid Background="{TemplateBinding Background}"> + <ContentPresenter VerticalAlignment="Center" /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <Trigger Property="IsSelected" Value="True"> + <Setter Property="Background" Value="Transparent"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> + </Trigger> + </Style.Triggers> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTemplateColumn Header="" Width="50"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <touch:TouchIcon Width="16"> + <touch:TouchIcon.Style> + <Style TargetType="touch:TouchIcon"> + <Setter Property="Icon" Value="InformationOutline"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Category}" Value="Warning"> + <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Category}" Value="Error"> + <Setter Property="Icon" Value="Alert"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Category}" Value="Critical"> + <Setter Property="Icon" Value="Alert"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchIcon.Style> + </touch:TouchIcon> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" /> + <DataGridTemplateColumn Header="Message" Width="1*"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + </DataGrid.Columns> + </touch:TouchSimpleDataGrid> </Grid> </DockPanel> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml index d4235341c..08f9a335a 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml @@ -17,9 +17,6 @@ <local:LoggingView/> <local:DispensersView/> <local:SystemView/> - <local:PackagesView/> - <local:UpdatesView/> - <local:RemoteConnectionsView/> </controls:NavigationControl> </Grid> </UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml deleted file mode 100644 index a7944497b..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml +++ /dev/null @@ -1,103 +0,0 @@ -<UserControl x:Class="Tango.PPC.Technician.Views.PackagesView" - 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.PPC.Technician.Views" - xmlns:controls="clr-namespace:Tango.PPC.Technician.Controls" - xmlns:sys="clr-namespace:System;assembly=mscorlib" - xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels" - xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:global="clr-namespace:Tango.PPC.Technician" - mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:PackagesViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.PackagesViewVM}"> - <Grid Background="{StaticResource TangoMidBackgroundBrush}"> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - - <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}"> - <Border.Effect> - <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> - </Border.Effect> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Installed Packages</TextBlock> - </Border> - - <Grid Grid.Row="1"> - <Grid Margin="20"> - <touch:TouchSimpleDataGrid Background="{StaticResource TangoPrimaryBackgroundBrush}" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}" HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True" ItemsSource="{Binding Packages}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled"> - <DataGrid.Resources> - <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}"> - <Setter Property="Background" Value="{StaticResource TangoDarkForegroundBrush}" /> - <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}" /> - <Setter Property="Padding" Value="5"></Setter> - </Style> - </DataGrid.Resources> - <DataGrid.RowStyle> - <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> - <Style.Triggers> - <Trigger Property="IsSelected" Value="True"> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> - </Trigger> - <Trigger Property="IsFocused" Value="True"> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> - </Trigger> - </Style.Triggers> - </Style> - </DataGrid.RowStyle> - <DataGrid.CellStyle> - <Style TargetType="{x:Type DataGridCell}"> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="{x:Type DataGridCell}"> - <Grid Background="{TemplateBinding Background}"> - <ContentPresenter VerticalAlignment="Center" /> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - <Style.Triggers> - <Trigger Property="IsSelected" Value="True"> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> - </Trigger> - </Style.Triggers> - </Style> - </DataGrid.CellStyle> - <DataGrid.Columns> - <DataGridTemplateColumn Header="" Width="50"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <touch:TouchIcon Width="16"> - <touch:TouchIcon.Style> - <Style TargetType="touch:TouchIcon"> - <Setter Property="Icon" Value="Pause"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding State}" Value="Failed"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding State}" Value="Installed"> - <Setter Property="Icon" Value="Check"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchIcon.Style> - </touch:TouchIcon> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTextColumn Header="Type" Width="60" Binding="{Binding Type}" /> - <DataGridTextColumn Header="Date" Width="180" Binding="{Binding InstallationDate}" /> - <DataGridTextColumn Header="Name" Width="*" Binding="{Binding PackageName}" /> - </DataGrid.Columns> - </touch:TouchSimpleDataGrid> - </Grid> - </Grid> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs deleted file mode 100644 index 52384fe73..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/PackagesView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.PPC.Technician.Views -{ - /// <summary> - /// Interaction logic for DispensersView.xaml - /// </summary> - public partial class PackagesView : UserControl - { - public PackagesView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml deleted file mode 100644 index af93a56e5..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml +++ /dev/null @@ -1,88 +0,0 @@ -<UserControl x:Class="Tango.PPC.Technician.Views.RemoteConnectionsView" - 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.PPC.Technician.ViewModels" - xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:global="clr-namespace:Tango.PPC.Technician" - xmlns:local="clr-namespace:Tango.PPC.Technician.Views" - mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:RemoteConnectionsViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.RemoteConnectionsViewVM}"> - <Grid Background="{StaticResource TangoMidBackgroundBrush}"> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - - <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}"> - <Border.Effect> - <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> - </Border.Effect> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Remote Connections</TextBlock> - </Border> - - <Grid Grid.Row="1"> - <Grid Margin="20"> - <DockPanel> - <touch:TouchButton Command="{Binding DisconnectCommand}" DockPanel.Dock="Bottom" HorizontalAlignment="Right" Style="{StaticResource TangoHollowButton}" Height="60" Width="250" Margin="0 20 0 0">DISCONNECT</touch:TouchButton> - <touch:TouchSimpleDataGrid IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedReceiver,Mode=TwoWay}" Background="{StaticResource TangoPrimaryBackgroundBrush}" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}" HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True" ItemsSource="{Binding ExternalBridgeService.ActiveReceivers}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled"> - <DataGrid.Resources> - <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}"> - <Setter Property="Background" Value="{StaticResource TangoDarkForegroundBrush}" /> - <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}" /> - <Setter Property="Padding" Value="5"></Setter> - </Style> - </DataGrid.Resources> - <DataGrid.RowStyle> - <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> - <Style.Triggers> - <Trigger Property="IsSelected" Value="True"> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> - </Trigger> - <Trigger Property="IsFocused" Value="True"> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> - </Trigger> - </Style.Triggers> - </Style> - </DataGrid.RowStyle> - <DataGrid.CellStyle> - <Style TargetType="{x:Type DataGridCell}"> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="{x:Type DataGridCell}"> - <Grid Background="{TemplateBinding Background}"> - <ContentPresenter VerticalAlignment="Center" /> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - <Style.Triggers> - <Trigger Property="IsSelected" Value="True"> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> - </Trigger> - </Style.Triggers> - </Style> - </DataGrid.CellStyle> - <DataGrid.Columns> - <DataGridTemplateColumn Header="" Width="50"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <touch:TouchIcon Width="16" Icon="Bridge" /> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTextColumn Header="App ID" Width="130" Binding="{Binding LoginInfo.AppID}" /> - <DataGridTextColumn Header="User" Width="180" Binding="{Binding LoginInfo.UserName}" /> - <DataGridTextColumn Header="Host Name" Width="180" Binding="{Binding LoginInfo.HostName}" /> - <DataGridTextColumn Header="Safety Level Permissions" Width="1*" Binding="{Binding LoginInfo.RequireSafetyLevelOperations,Converter={StaticResource BooleanToYesNoConverter}}" /> - </DataGrid.Columns> - </touch:TouchSimpleDataGrid> - </DockPanel> - </Grid> - </Grid> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs deleted file mode 100644 index 5d8e32444..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/RemoteConnectionsView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.PPC.Technician.Views -{ - /// <summary> - /// Interaction logic for RemoteConnectionsView.xaml - /// </summary> - public partial class RemoteConnectionsView : UserControl - { - public RemoteConnectionsView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml index 52abfc239..f2bfcdf7d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml @@ -8,10 +8,9 @@ xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:global="clr-namespace:Tango.PPC.Technician" mc:Ignorable="d" - d:DesignHeight="1260" d:DesignWidth="600" d:DataContext="{d:DesignInstance Type=vm:SystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.SystemViewVM}" x:Name="view"> + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:SystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.SystemViewVM}" x:Name="view"> <UserControl.Resources> <converters:ByteArrayToFileSizeConverter x:Key="ByteArrayToFileSizeConverter" /> @@ -30,283 +29,55 @@ <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">System</TextBlock> </Border> - <Grid Grid.Row="1"> + <Grid Grid.Row="1" Margin="20"> - <touch:LightTouchScrollViewer> - <DockPanel Margin="20"> - <StackPanel Margin="30 40 30 0" DockPanel.Dock="Bottom" VerticalAlignment="Center"> + <DockPanel> + <UniformGrid DockPanel.Dock="Top" Columns="3" Margin="50" TextElement.FontSize="{StaticResource TangoHeaderFontSize}"> + <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold"> + <Run>CPU:</Run> + <Run Text="{Binding CPU,Mode=OneWay,StringFormat='0'}"></Run><Run>%</Run> + </TextBlock> - <StackPanel.Resources> - <Style TargetType="touch:TouchButton" x:Key="ButtonMenu"> - <Setter Property="Padding" Value="10"></Setter> - <Setter Property="HorizontalContentAlignment" Value="Left"></Setter> - <Setter Property="Height" Value="100"></Setter> - <Setter Property="Background" Value="Transparent"></Setter> - <Setter Property="BorderBrush" Value="{StaticResource TangoDarkForegroundBrush}"></Setter> - <Setter Property="BorderThickness" Value="1"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter> - <Setter Property="EnableDropShadow" Value="False"></Setter> - <Setter Property="CornerRadius" Value="5"></Setter> - <Setter Property="Margin" Value="0 0 0 20"></Setter> - <Setter Property="RippleBrush" Value="#4BB8B8B8"></Setter> - </Style> - </StackPanel.Resources> + <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold"> + <Run>RAM:</Run> + <Run Text="{Binding RAM,Mode=OneWay,Converter={StaticResource ByteArrayToFileSizeConverter},StringFormat='0'}"></Run> + </TextBlock> - <touch:TouchButton Command="{Binding ResetDeviceCommand}" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/circuit-board.png" Width="60" Height="60" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Reset Embedded Device</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}"> - Resets the embedded device using the DFU channel. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - - <touch:TouchButton Command="{Binding RestartCommand}" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/mobile-phone.png" Width="60" Height="60" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Restart Panel PC</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}"> - Restarts the panel PC operation system. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - <touch:TouchButton Command="{Binding ShutdownCommand}" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/shutdown.png" Width="60" Height="60" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Shutdown Panel PC</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}"> - Turns off the panel PC (requires turning on from reset button). - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - <touch:TouchButton Command="{Binding FactoryResetCommand}" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/conveyor.png" Width="60" Height="60" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Factory Reset</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}"> - Removes all data associated with this machine and installs the latest version. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - <touch:TouchButton Command="{Binding ExitToExplorerCommand}" Style="{StaticResource ButtonMenu}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/exit.png" Width="60" Height="60" /> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="{StaticResource TangoButtonFontSize}">Exit To Shell</TextBlock> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}"> - Closes the PPC application and opens the windows shell. - </TextBlock> - </StackPanel> - </StackPanel> - </touch:TouchButton> - </StackPanel> - - <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled"> - <FlowDocument> - <Table CellSpacing="0" FontFamily="{StaticResource TangoFlexoFontFamily}"> - <Table.Resources> - <Style TargetType="{x:Type TableRowGroup}"> - <Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"/> - </Style> - - <Style TargetType="TableCell"> - <Setter Property="BorderThickness" Value="0 0 0 1"></Setter> - <Setter Property="BorderBrush" Value="{StaticResource TangoGrayBrush}"></Setter> - <Setter Property="Padding" Value="5"></Setter> - </Style> - </Table.Resources> - <Table.Columns> - <TableColumn Width="160" /> - <TableColumn /> - <TableColumn /> - </Table.Columns> - - <TableRowGroup> - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>Application Version:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding ApplicationManager.Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>Firmware Version:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>FPGA 1:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.FPGA1Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>FPGA 2:</TextBlock> - </Paragraph> - </TableCell> + <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold"> + <Run>TEMP:</Run> + <Run Text="{Binding Temperature,Mode=OneWay,StringFormat='0 °C'}"></Run> + </TextBlock> + </UniformGrid> - <TableCell> - <Paragraph> - <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.FPGA2Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> - </Paragraph> - </TableCell> - </TableRow> + <DockPanel> - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>FPGA 3:</TextBlock> - </Paragraph> - </TableCell> + <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center"> + <TextBlock HorizontalAlignment="Center" FontWeight="SemiBold" FontSize="{StaticResource TangoHeaderFontSize}"> + <Run>UP TIME:</Run> + <Run Text="{Binding UpTime,StringFormat=hh\\:mm\\:ss,FallbackValue='00:00:00'}"></Run> + </TextBlock> - <TableCell> - <Paragraph> - <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.FPGA3Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>CPU:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock> - <Run Text="{Binding CPU,Mode=OneWay,StringFormat='0',FallbackValue=0}"></Run> - <Run>%</Run> - </TextBlock> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>RAM:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding RAM,Mode=OneWay,FallbackValue=0,Converter={StaticResource ByteArrayToFileSizeConverter},StringFormat='0'}"></TextBlock> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>Temperature:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding Temperature,Mode=OneWay,FallbackValue=0,StringFormat='0 °C'}"></TextBlock> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>Up Time:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding UpTime,Mode=OneWay,StringFormat=hh\\:mm\\:ss,FallbackValue='00:00:00'}"></TextBlock> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>IP Address:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding IPAddress,Mode=OneWay,FallbackValue=0}"></TextBlock> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>Total Dye Time:</TextBlock> - </Paragraph> - </TableCell> - - <TableCell> - <Paragraph> - <TextBlock Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock> - </Paragraph> - </TableCell> - </TableRow> - - <TableRow> - <TableCell> - <Paragraph> - <TextBlock>Total Dye Meters:</TextBlock> - </Paragraph> - </TableCell> + <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontWeight="SemiBold" FontSize="{StaticResource TangoHeaderFontSize}"> + <Run>IP ADDRESS:</Run> + <Run Text="{Binding IPAddress}"></Run> + </TextBlock> + </StackPanel> - <TableCell> - <Paragraph> - <TextBlock Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock> - </Paragraph> - </TableCell> - </TableRow> - </TableRowGroup> - </Table> - </FlowDocument> - </FlowDocumentScrollViewer> + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="300" TextElement.FontSize="{StaticResource TangoTitleFontSize}"> + <touch:TouchButton Command="{Binding ResetDeviceCommand}" Height="60" Content="Reset Machine"> + <touch:TouchButton.Style> + <Style TargetType="touch:TouchButton" BasedOn="{StaticResource {x:Type touch:TouchButton}}"> + <Setter Property="Background" Value="{StaticResource TangoErrorBrush}"></Setter> + </Style> + </touch:TouchButton.Style> + </touch:TouchButton> + <touch:TouchButton Command="{Binding RestartCommand}" Height="60" Background="{StaticResource TangoErrorBrush}" Margin="0 20 0 0">Restart Device</touch:TouchButton> + <touch:TouchButton Command="{Binding ShutdownCommand}" Height="60" Background="{StaticResource TangoErrorBrush}" Margin="0 20 0 0">Shutdown Device</touch:TouchButton> + <touch:TouchButton Command="{Binding FactoryResetCommand}" Height="60" Background="{StaticResource TangoErrorBrush}" Margin="0 20 0 0">Factory Reset</touch:TouchButton> + <touch:TouchButton Command="{Binding ExitToExplorerCommand}" Height="60" Background="{StaticResource TangoErrorBrush}" Margin="0 20 0 0">Exit To Shell</touch:TouchButton> + </StackPanel> </DockPanel> - </touch:LightTouchScrollViewer> + </DockPanel> </Grid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml deleted file mode 100644 index 501632bfa..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml +++ /dev/null @@ -1,160 +0,0 @@ -<UserControl x:Class="Tango.PPC.Technician.Views.UpdatesView" - 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.PPC.Technician.Views" - xmlns:sys="clr-namespace:System;assembly=mscorlib" - xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels" - xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:converters="clr-namespace:Tango.PPC.Technician.Converters" - xmlns:global="clr-namespace:Tango.PPC.Technician" - mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:UpdatesViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.UpdatesViewVM}"> - - <UserControl.Resources> - <converters:LogItemMessageToOneLineConverter x:Key="LogItemMessageToOneLineConverter" /> - </UserControl.Resources> - - <Grid Background="{StaticResource TangoMidBackgroundBrush}"> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - - <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}"> - <Border.Effect> - <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> - </Border.Effect> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Updates & Synchronization</TextBlock> - </Border> - - <Grid Grid.Row="1" Margin="15"> - - <DockPanel> - <touch:TouchNavigationLinks x:Name="nav" DockPanel.Dock="Top" FontSize="{StaticResource TangoTitleFontSize}"> - <sys:String>Updates</sys:String> - <sys:String>Synchronization</sys:String> - </touch:TouchNavigationLinks> - <TabControl Padding="0" BorderThickness="0" Margin="0 10 0 0" Background="Transparent" SelectedIndex="{Binding ElementName=nav,Path=SelectedIndex,Mode=OneWay}"> - <TabItem Visibility="Collapsed" Header="Software Updates"> - <touch:TouchSimpleDataGrid Style="{StaticResource TechGrid}" ItemsSource="{Binding Updates}" SelectedItem="{Binding SelectedUpdate}"> - <DataGrid.Columns> - <DataGridTemplateColumn Header="" Width="50"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <touch:TouchIcon Width="16"> - <touch:TouchIcon.Style> - <Style TargetType="touch:TouchIcon"> - <Setter Property="Icon" Value="Pause"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding IsSetup}" Value="True"> - <Setter Property="Icon" Value="Settings"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsUpdate}" Value="True"> - <Setter Property="Icon" Value="CloudDownload"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsDataBase}" Value="True"> - <Setter Property="Icon" Value="Database"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsSynchronization}" Value="True"> - <Setter Property="Icon" Value="Sync"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsOfflineUpdate}" Value="True"> - <Setter Property="Icon" Value="Sd"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsOfflineFirmwareUpgrade}" Value="True"> - <Setter Property="Icon" Value="Chip"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsStarted}" Value="True"> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsCompleted}" Value="True"> - <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding IsFailed}" Value="True"> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchIcon.Style> - </touch:TouchIcon> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTextColumn Header="Date" Width="120" Binding="{Binding StartDate,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" /> - <DataGridTextColumn Header="Application" Width="120" Binding="{Binding ApplicationVersion}" /> - <DataGridTextColumn Header="Firmware" Width="120" Binding="{Binding FirmwareVersion}" /> - <DataGridTemplateColumn Header="Message" Width="1*"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock Text="{Binding UpdateStatus,Converter={StaticResource EnumToDescriptionConverter}}"/> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - </DataGrid.Columns> - </touch:TouchSimpleDataGrid> - </TabItem> - <TabItem Visibility="Collapsed" Header="Synchronization"> - <DockPanel> - <DockPanel DockPanel.Dock="Bottom"> - <DockPanel Margin="20"> - <touch:TouchButton IsEnabled="{Binding MachineDataSynchronizer.IsEnabled}" DockPanel.Dock="Right" Padding="50 20" CornerRadius="30" Command="{Binding SynchronizeCommand}">Synchronize Now</touch:TouchButton> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" VerticalAlignment="Center" TextWrapping="Wrap" Margin="0 0 20 0">Synchronization occurres automatically in the background. You can choose to synchronize now.</TextBlock> - </DockPanel> - </DockPanel> - - <Grid> - <touch:TouchSimpleDataGrid Style="{StaticResource TechGrid}" ItemsSource="{Binding MachineDataSynchronizer.StatusHistory}" SelectedItem="{Binding SelectedSynchronization}"> - <DataGrid.Columns> - <DataGridTemplateColumn Header="" Width="50"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <touch:TouchIcon Width="16"> - <touch:TouchIcon.Style> - <Style TargetType="touch:TouchIcon"> - <Setter Property="Icon" Value="Pause"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding State}" Value="Pending"> - <Setter Property="Icon" Value="Pause"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding State}" Value="Synchronizing"> - <Setter Property="Icon" Value="CloudSync"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding State}" Value="Failed"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding State}" Value="Completed"> - <Setter Property="Icon" Value="Check"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoGreenBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchIcon.Style> - </touch:TouchIcon> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - <DataGridTextColumn Header="Start Time" Width="120" Binding="{Binding StartDateTime,StringFormat=t}" /> - <DataGridTextColumn Header="Status" Width="120" Binding="{Binding State,Converter={StaticResource EnumToDescriptionConverter}}" /> - <DataGridTextColumn Header="Duration" Width="120" Binding="{Binding Duration,StringFormat='hh\\:mm\\:ss'}" /> - <DataGridTemplateColumn Header="Message" Width="1*"> - <DataGridTemplateColumn.CellTemplate> - <DataTemplate> - <TextBlock Text="{Binding Message,Converter={StaticResource StringEllipsisConverter},ConverterParameter='70',Mode=OneWay}"/> - </DataTemplate> - </DataGridTemplateColumn.CellTemplate> - </DataGridTemplateColumn> - </DataGrid.Columns> - </touch:TouchSimpleDataGrid> - </Grid> - </DockPanel> - </TabItem> - </TabControl> - </DockPanel> - </Grid> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs deleted file mode 100644 index cdac5cbbb..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.PPC.Technician.Views -{ - /// <summary> - /// Interaction logic for UpdatesView.xaml - /// </summary> - public partial class UpdatesView : UserControl - { - public UpdatesView() - { - InitializeComponent(); - } - } -} |
