aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-15 15:10:08 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-15 15:10:08 +0300
commitb90acacb7dbef7d088d57a200cc4d71148bffd1e (patch)
treeca3ae211da23ac1352d1aaa4d43b7947eddee916 /Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
parentde5700549a5fe01862f71d452f2abe4a74996605 (diff)
downloadTango-b90acacb7dbef7d088d57a200cc4d71148bffd1e.tar.gz
Tango-b90acacb7dbef7d088d57a200cc4d71148bffd1e.zip
Implemented custom min max on single and multiple graphs on tech board.
Diffstat (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs')
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
index f0c612608..a2060d10e 100644
--- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
@@ -71,6 +71,11 @@ namespace RealTimeGraphEx
/// </summary>
public new event MouseEventHandler MouseLeave;
+ /// <summary>
+ /// Occurs when [minimum maximum changed].
+ /// </summary>
+ public event EventHandler MinMaxChanged;
+
#endregion
#region Protected Fields
@@ -141,7 +146,12 @@ namespace RealTimeGraphEx
set { SetValue(MaximumProperty, value); }
}
public static readonly DependencyProperty MaximumProperty =
- DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(255.0, new PropertyChangedCallback(CrossModelChanged)));
+ DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(255.0, (d, e) =>
+ {
+ var control = d as RealTimeGraphExBase;
+ CrossModelChanged(d, e);
+ control.MinMaxChanged?.Invoke(control, new EventArgs());
+ }));
/// <summary>
/// Gets or sets the minimum expected value to be plotted on the graph (default 0).
@@ -152,7 +162,12 @@ namespace RealTimeGraphEx
set { SetValue(MinimumProperty, value); }
}
public static readonly DependencyProperty MinimumProperty =
- DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(0.0, new PropertyChangedCallback(CrossModelChanged)));
+ DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphExBase), new PropertyMetadata(0.0, (d, e) =>
+ {
+ var control = d as RealTimeGraphExBase;
+ CrossModelChanged(d, e);
+ control.MinMaxChanged?.Invoke(control, new EventArgs());
+ }));
/// <summary>
/// Gets or sets the graph refresh rate in milliseconds (default 30, affects performance).