diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml | 105 |
1 files changed, 42 insertions, 63 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml index bf2e41afa..b5e809a3e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml @@ -5,6 +5,8 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:graphEx="clr-namespace:RealTimeGraphEx.FastGraphs;assembly=RealTimeGraphEx" + xmlns:graphX="clr-namespace:RealTimeGraphX.WPF.Surfaces;assembly=RealTimeGraphX.WPF" + xmlns:componentsX="clr-namespace:RealTimeGraphX.WPF.Components;assembly=RealTimeGraphX.WPF" xmlns:components="clr-namespace:RealTimeGraphEx.Components;assembly=RealTimeGraphEx" xmlns:converters="clr-namespace:Tango.MachineStudio.Common.Converters" xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls" @@ -14,73 +16,50 @@ <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> - <!--RealTimeGraphEx--> - <ResourceDictionary Source="pack://application:,,,/RealTimeGraphEx;component/Resources/Resources.xaml"></ResourceDictionary> <ResourceDictionary Source="../Resources/MaterialDesign.xaml"></ResourceDictionary> - - <ResourceDictionary> - <Style TargetType="ContentControl" x:Key="graphContent"> - <Style.Setters> - <Setter Property="ContentTemplate"> - <Setter.Value> - <DataTemplate> - <Grid MouseEnter="Graph_MouseEnter" MouseLeave="Graph_MouseLeave" ClipToBounds="True"> - <ContentControl Content="{Binding}"></ContentControl> - <Grid Opacity="0.8" HorizontalAlignment="Stretch" VerticalAlignment="Top" ClipToBounds="True" Height="35" Margin="0 -35 0 0"> - <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Top"> - <Button Margin="0 0 5 0" Click="OnGraphFullScreen" ToolTip="Full Screen" Width="24" Height="24" BorderBrush="Transparent" Background="{StaticResource AccentColorBrush}" Style="{StaticResource MaterialDesignFloatingActionAccentButton}" > - <materialDesign:PackIcon Kind="Fullscreen" HorizontalAlignment="Right" Width="20" Height="20" Foreground="{StaticResource WhiteBrush}" /> - </Button> - <Button Click="OnGraphRemove" ToolTip="Remove" Width="24" Height="24" BorderBrush="Transparent" Background="#FF7777" Style="{StaticResource MaterialDesignFloatingActionAccentButton}" > - <materialDesign:PackIcon Kind="CloseCircle" HorizontalAlignment="Right" Width="20" Height="20" Foreground="{StaticResource WhiteBrush}" /> - </Button> - </StackPanel> - </Grid> - </Grid> - </DataTemplate> - </Setter.Value> - </Setter> - </Style.Setters> - </Style> - </ResourceDictionary> - </ResourceDictionary.MergedDictionaries> + </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources> - <Grid> - <!--Temperature--> - <ContentControl Style="{StaticResource graphContent}" Margin="0 0 0 0" MinHeight="5"> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40"/> - <ColumnDefinition Width="438*"/> - </Grid.ColumnDefinitions> + <Grid > + <Border Background="{DynamicResource graphBackground}" Padding="20" CornerRadius="5" BorderThickness="1" BorderBrush="DodgerBlue"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="41*"/> + <RowDefinition Height="30"/> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="55"/> + <ColumnDefinition Width="438*"/> + </Grid.ColumnDefinitions> + + <Border BorderBrush="{StaticResource AccentColorBrush}" Margin="0 1 0 2"> + <componentsX:GraphAxisControl Foreground="DodgerBlue" Orientation="Vertical" FontSize="10" Surface="{Binding ElementName=Graph}" StringFormat="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=StringFormat}" /> + </Border> + <Border Grid.Column="1" BorderThickness="1" BorderBrush="#43A0E7FF" Margin="1 0 0 0"> + <Grid> + + <componentsX:GraphGridLines Foreground="#9B545454" /> + + <graphX:WpfGraphSurface x:Name="Graph" x:FieldModifier="public"> + + </graphX:WpfGraphSurface> + + <Grid> + <Label Style="{StaticResource graphLabel}"> + <StackPanel Orientation="Horizontal"> + <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayName,FallbackValue='Dispenser Motor'}"></TextBlock> + <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DisplayUnits,FallbackValue='(hz)'}"></TextBlock> + </StackPanel> + </Label> + </Grid> + </Grid> + </Border> - <Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1" Background="#E1151515"> - <StackPanel Orientation="Horizontal"> - <components:YAxisScroll x:Name="yAxis" Interval="6" Graph="{Binding ElementName=Graph}" Width="35" Foreground="Gainsboro" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll> - <components:YAxisTicks x:Name="yAxisTicks" SmallTickTemplate="{StaticResource graphTicksTemplate}" Width="5" SmallTicks="6" Foreground="{StaticResource MaterialDesignLightForeground}" BigTicks="10" Graph="{Binding ElementName=Graph}"></components:YAxisTicks> - </StackPanel> - </Border> - <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="1 0 0 0"> - <graphEx:RealTimeGraphExLineScroll x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum,Mode=TwoWay}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum,Mode=TwoWay}"> - <graphEx:RealTimeGraphExLineScroll.Components> - <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" /> - <components:GridLines Rows="6" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines> - </graphEx:RealTimeGraphExLineScroll.Components> - <graphEx:RealTimeGraphExLineScroll.InnerContent> - <Grid> - <Label Style="{StaticResource graphLabel}"> - <StackPanel Orientation="Horizontal"> - <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorName,FallbackValue='Dispenser Motor'}"></TextBlock> - <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl,AncestorLevel=2},Path=SensorUnits,FallbackValue='(hz)'}"></TextBlock> - </StackPanel> - </Label> - </Grid> - </graphEx:RealTimeGraphExLineScroll.InnerContent> - </graphEx:RealTimeGraphExLineScroll> - </Border> - </Grid> - </ContentControl> + <Border BorderBrush="{StaticResource AccentColorBrush}" Grid.Row="1" Grid.Column="1" Margin="3 0 2 0"> + <componentsX:GraphAxisControl Foreground="DodgerBlue" Orientation="Horizontal" FontSize="10" Surface="{Binding ElementName=Graph}" StringFormat="hh\:mm\:ss" /> + </Border> + </Grid> + </Border> </Grid> </UserControl> |
