diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-06-20 16:40:58 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-06-20 16:40:58 +0300 |
| commit | a5de87ea9863c6e7053e09ed1c2eabf58285af48 (patch) | |
| tree | f39ec628a4857a1e3e103cc47c91bbadaa67bcd2 /Software/Visual_Studio/PPC/Tango.PPC.UI/Views | |
| parent | a495866908071d2204c8eab85dc0163308c5e53e (diff) | |
| download | Tango-a5de87ea9863c6e7053e09ed1c2eabf58285af48.tar.gz Tango-a5de87ea9863c6e7053e09ed1c2eabf58285af48.zip | |
PPC. Added Real Time Graph
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 64 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs | 10 |
2 files changed, 74 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 1445337ad..9e766fffc 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -12,6 +12,7 @@ xmlns:localConverters="clr-namespace:Tango.PPC.UI.Converters" xmlns:global="clr-namespace:Tango.PPC.UI" xmlns:models="clr-namespace:Tango.PPC.UI.Models" + xmlns:graphs="clr-namespace:Tango.PPC.UI.Graphs" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="932" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}"> @@ -25,6 +26,7 @@ <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter"/> <localConverters:MidTankLevelToElementRectConverter x:Key="MidTankLevelToElementRectConverter"/> <localConverters:ProgressUnitSpoolConverter x:Key="ProgressUnitSpoolConverter"/> + <localConverters:StatisticTabToVisibilityConverter x:Key="StatisticTabToVisibilityConverter"/> <Style x:Key="LinkRoundButtonStyle" TargetType="{x:Type touch:TouchButton}"> <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter> @@ -346,6 +348,10 @@ </Border> </DataTemplate> + <Style x:Key="DynamicResolutionGraph" TargetType="graphs:RealTimeGraph" BasedOn="{StaticResource {x:Type graphs:RealTimeGraph}}"> + <Setter Property="VerticalTicks" Value="5"></Setter> + </Style> + </UserControl.Resources> <Grid Width="998" Height="1123"> <Grid > @@ -1203,6 +1209,64 @@ </StackPanel> <Border VerticalAlignment="Bottom" Height="2" Background="{StaticResource TangoLightBorderBrush}" Margin="0 0 0 0" CornerRadius="2"></Border> </Grid> + <Grid Grid.Row="3" x:Name="StatRealGraph" Margin="0 8 0 0"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="186"></ColumnDefinition> + <ColumnDefinition Width="32"></ColumnDefinition> + <ColumnDefinition Width="1*"></ColumnDefinition> + </Grid.ColumnDefinitions> + + <touch:TouchNavigationLinks BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0" x:Name="navigationSTLinks" HorizontalContentAlignment="Left" + SelectedIndex="{Binding SelectedStatisticTabIndex,Mode=TwoWay}" VerticalAlignment="Bottom" Margin="0,10,0,20" Padding="0 0 0 0" + FontSize="{StaticResource TangoNavigationLinksFontSize}" LineThickness="0" PreviewTouchDown="NavigationSTLinks_PreviewTouchDown" PreviewMouseDown="NavigationSTLinks_PreviewMouseDown"> + + <DockPanel HorizontalAlignment="Stretch"> + <Image DockPanel.Dock="Left" Source="../Images/Overview Icons/pr_data.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock HorizontalAlignment="Left" Margin="12 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center">Production Data</TextBlock> + </DockPanel> + <DockPanel HorizontalAlignment="Stretch" IsEnabled="False" Margin="0 12 0 0"> + <Image DockPanel.Dock="Left" Source="../Images/Overview Icons/temperature.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock HorizontalAlignment="Left" Margin="12 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" Foreground="{StaticResource TangoDisabledForegroundBrush}">Temperature</TextBlock> + </DockPanel> + <DockPanel HorizontalAlignment="Stretch" IsEnabled="False"> + <Image DockPanel.Dock="Left" Source="../Images/Overview Icons/pressure.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock HorizontalAlignment="Left" Margin="12 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" Foreground="{StaticResource TangoDisabledForegroundBrush}">Pressure</TextBlock> + </DockPanel> + <DockPanel HorizontalAlignment="Stretch" IsEnabled="False" > + <Image DockPanel.Dock="Left" Source="../Images/Overview Icons/motor.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock HorizontalAlignment="Left" Margin="12 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" Foreground="{StaticResource TangoDisabledForegroundBrush}">Motor</TextBlock> + </DockPanel> + <touch:TouchNavigationLinks.Style> + <Style TargetType="{x:Type touch:TouchNavigationLinks}"> + <Setter Property="ItemsPanel"> + <Setter.Value> + <ItemsPanelTemplate> + <UniformGrid Rows="4" /> + </ItemsPanelTemplate> + </Setter.Value> + </Setter> + </Style> + </touch:TouchNavigationLinks.Style> + + </touch:TouchNavigationLinks> + <Grid Grid.Column="1" Margin="0 40 0 0"> + <Rectangle Width="20" Height="2" Fill="{StaticResource TangoBlackInkBrush}" VerticalAlignment="Top" Margin="0 0 0 0" ></Rectangle> + <!--<Rectangle Width="2" Height="138" Margin="20 0 0 0" Fill="{StaticResource TangoBlackInkBrush}" VerticalAlignment="Top" ></Rectangle>--> + <Rectangle Margin="20 0 0 0" VerticalAlignment="Top" Fill="{StaticResource TangoBlackInkBrush}" Height="2" Width="138" HorizontalAlignment="Stretch"> + <Rectangle.LayoutTransform> + <TransformGroup> + <RotateTransform Angle="90"/> + </TransformGroup> + </Rectangle.LayoutTransform> + </Rectangle> + </Grid> + <Grid Grid.Column="2" x:Name="StatGrid" Margin="0,0,0.4,0"> + <Grid Visibility="{Binding SelectedStatisticTab,Converter={StaticResource StatisticTabToVisibilityConverter},ConverterParameter='Productiondata'}"> + <graphs:RealTimeGraph Style="{StaticResource PPC_RealTimeGraph_Flat}" Controller="{Binding JobController}" Background="Transparent" StringFormat="0" GridLinesBrush="red" BorderBrush="Transparent" + VerticalAxisVisibility="Visible" HorizontalAxisVisibility="Visible" VerticalTicks =" 5"/> + </Grid> + </Grid> + </Grid> </Grid> </Grid> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs index 2ee98bc2b..e49e062b7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs @@ -57,5 +57,15 @@ namespace Tango.PPC.UI.Views { _timer.Stop(); } + + private void NavigationSTLinks_PreviewTouchDown(object sender, TouchEventArgs e) + { + e.Handled = true; + } + + private void NavigationSTLinks_PreviewMouseDown(object sender, MouseButtonEventArgs e) + { + e.Handled = true; + } } } |
