diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-25 14:03:04 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-25 14:03:04 +0300 |
| commit | 064a839e731d7d96922b468330fab5c065609a01 (patch) | |
| tree | 6682a9c7323868651864f0dde0b1e3f6fbb7f8fb /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls | |
| parent | 8f83b5cedf2a0af57836e2db227d88b50e612cb1 (diff) | |
| download | Tango-064a839e731d7d96922b468330fab5c065609a01.tar.gz Tango-064a839e731d7d96922b468330fab5c065609a01.zip | |
Implemented graphs auto range, pause & clear in tech board module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls')
4 files changed, 24 insertions, 2 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 fc36b28d3..f12a433df 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml @@ -63,7 +63,7 @@ </StackPanel> </Border> <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="5 0 0 0"> - <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}"> + <graphEx:RealTimeGraphExLineErase 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" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}"> <graphEx:RealTimeGraphExLineErase.Components> <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" /> <components:GridLines Rows="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs index dd9aa1414..2341c21c1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs @@ -82,6 +82,16 @@ namespace Tango.MachineStudio.Common.Controls + public bool UseAutoRange + { + get { return (bool)GetValue(UseAutoRangeProperty); } + set { SetValue(UseAutoRangeProperty, value); } + } + public static readonly DependencyProperty UseAutoRangeProperty = + DependencyProperty.Register("UseAutoRange", typeof(bool), typeof(RealTimeGraphControl), new PropertyMetadata(false)); + + + public void InvalidateGraph() { InnerGraph.Clear(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml index 657cc2683..1e1a5b123 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml @@ -63,7 +63,7 @@ </StackPanel> </Border> <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="5 0 0 0"> - <graphEx:RealTimeGraphExMultiLineErase x:Name="Graph" x:FieldModifier="public" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}" Stroke="DodgerBlue"> + <graphEx:RealTimeGraphExMultiLineErase 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" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}" Stroke="DodgerBlue"> <graphEx:RealTimeGraphExMultiLineErase.Components> <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" /> <components:GridLines Rows="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs index 8e3b6b6e3..21054d94e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml.cs @@ -68,6 +68,18 @@ namespace Tango.MachineStudio.Common.Controls public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphMultiControl), new PropertyMetadata(100.0)); + + + public bool UseAutoRange + { + get { return (bool)GetValue(UseAutoRangeProperty); } + set { SetValue(UseAutoRangeProperty, value); } + } + public static readonly DependencyProperty UseAutoRangeProperty = + DependencyProperty.Register("UseAutoRange", typeof(bool), typeof(RealTimeGraphMultiControl), new PropertyMetadata(false)); + + + public void InvalidateGraph() { InnerGraph.Clear(); |
