aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml
blob:
@set PATH=%PATH%;C:\Program Files (x86)\ZBar\bin
@echo This is the zbarcam output window.
@echo Hold a bar code in front of the camera (make sure it's in focus!)
@echo and decoded results will appear below.
@echo.
@echo Initializing camera, please wait...
@echo.
@zbarcam.exe --prescale=640x480
@if errorlevel 1 pause
ref='#n193'>193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
<UserControl x:Class="Tango.PPC.Technician.Views.SystemView"
             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: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">

    <UserControl.Resources>
        <converters:ByteArrayToFileSizeConverter x:Key="ByteArrayToFileSizeConverter" />
    </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">System</TextBlock>
        </Border>

        <Grid Grid.Row="1">

            <touch:LightTouchScrollViewer>
                <DockPanel Margin="20">
                    <StackPanel Margin="30 40 30 0" DockPanel.Dock="Bottom" VerticalAlignment="Center">

                        <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>

                        <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>Environment:</TextBlock>
                                            </Paragraph>
                                        </TableCell>

                                        <TableCell>
                                            <Paragraph>
                                                <TextBlock Text="{Binding Settings.DeploymentSlot,Converter={StaticResource EnumToDescriptionConverter},Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
                                            </Paragraph>
                                        </TableCell>
                                    </TableRow>

                                    <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>

                                        <TableCell>
                                            <Paragraph>
                                                <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.FPGA2Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
                                            </Paragraph>
                                        </TableCell>
                                    </TableRow>

                                    <TableRow>
                                        <TableCell>
                                            <Paragraph>
                                                <TextBlock>FPGA 3:</TextBlock>
                                            </Paragraph>
                                        </TableCell>

                                        <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>

                                        <TableCell>
                                            <Paragraph>
                                                <TextBlock Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock>
                                            </Paragraph>
                                        </TableCell>
                                    </TableRow>
                                </TableRowGroup>
                            </Table>
                        </FlowDocument>
                    </FlowDocumentScrollViewer>
                </DockPanel>
            </touch:LightTouchScrollViewer>
        </Grid>
    </Grid>
</UserControl>