aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
committerMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
commit00a491d93733d4625ad329b2ba8237f445364b3f (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
downloadTango-00a491d9.tar.gz
Tango-00a491d9.zip
merge
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml313
1 files changed, 42 insertions, 271 deletions
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>