From 064a839e731d7d96922b468330fab5c065609a01 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 25 Jul 2018 14:03:04 +0300 Subject: Implemented graphs auto range, pause & clear in tech board module. --- .../SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs') diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs index a2060d10e..c5eaaf4af 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs @@ -169,6 +169,8 @@ namespace RealTimeGraphEx control.MinMaxChanged?.Invoke(control, new EventArgs()); })); + + /// /// Gets or sets the graph refresh rate in milliseconds (default 30, affects performance). /// @@ -375,6 +377,18 @@ namespace RealTimeGraphEx public static readonly DependencyProperty MaxPointsProperty = DependencyProperty.Register("MaxPoints", typeof(int), typeof(RealTimeGraphExBase), new PropertyMetadata(1000, new PropertyChangedCallback(CrossModelChanged))); + + /// + /// Gets or sets a value indicating whether [use automatic range]. + /// + public bool UseAutoRange + { + get { return (bool)GetValue(UseAutoRangeProperty); } + set { SetValue(UseAutoRangeProperty, value); } + } + public static readonly DependencyProperty UseAutoRangeProperty = + DependencyProperty.Register("UseAutoRange", typeof(bool), typeof(RealTimeGraphExBase), new PropertyMetadata(false, new PropertyChangedCallback(CrossModelChanged))); + #endregion #region Cross Thread Fields @@ -392,6 +406,7 @@ namespace RealTimeGraphEx protected bool _antialiased; protected bool _isPaused; protected bool _disableRendering; + protected bool _useAutoRange; #endregion #region Constructors @@ -696,6 +711,7 @@ namespace RealTimeGraphEx virtualMaximum = Maximum; virtualStart = 0; virtualEnd = gridMain.ActualWidth; + _useAutoRange = UseAutoRange; RenderOptions.SetEdgeMode(this, _antialiased ? EdgeMode.Unspecified : EdgeMode.Aliased); }, DispatcherPriority.Send); -- cgit v1.3.1