aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-10-10 16:55:44 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-10-10 16:55:44 +0300
commit79eb19cbd10785a7dbc972bc0b26817932237419 (patch)
treee36176fc94ce6f26efc89b006d7e6faf7e4398cb /Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs
parentdf9197240ba5a643ce1599f36b7e3dd34aad6a60 (diff)
downloadTango-79eb19cbd10785a7dbc972bc0b26817932237419.tar.gz
Tango-79eb19cbd10785a7dbc972bc0b26817932237419.zip
Sign-out works !
Fixed issue where color conversion was busy while not in research module but research module in job view. Added new RealTimeGraphX !
Diffstat (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs')
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs135
1 files changed, 135 insertions, 0 deletions
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs
new file mode 100644
index 000000000..f737f8b54
--- /dev/null
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphRange.cs
@@ -0,0 +1,135 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace RealTimeGraphX
+{
+ /// <summary>
+ /// Represents a graph X/Y range boundaries.
+ /// </summary>
+ public interface IGraphRange : IGraphComponent
+ {
+ /// <summary>
+ /// Gets or sets the maximum x value.
+ /// </summary>
+ IGraphDataPoint MaximumX { get; set; }
+
+ /// <summary>
+ /// Gets or sets the minimum x value.
+ /// </summary>
+ IGraphDataPoint MinimumY { get; set; }
+
+ /// <summary>
+ /// Gets or sets the maximum y value.
+ /// </summary>
+ IGraphDataPoint MaximumY { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to automatically adjust the graph <see cref="MaximumY"/> and <see cref="MinimumY"/> according to the current visible data points.
+ /// </summary>
+ bool AutoY { get; set; }
+ }
+
+ /// <summary>
+ /// Represents a graph X/Y range boundaries.
+ /// </summary>
+ /// <typeparam name="XDataPoint">Type of x-axis data point.</typeparam>
+ /// <typeparam name="YDataPoint">Type of y-axis data point.</typeparam>
+ /// <seealso cref="RealTimeGraphX.GraphObject" />
+ public class GraphRange<XDataPoint, YDataPoint> : GraphObject, IGraphRange where XDataPoint : GraphDataPointBase where YDataPoint : GraphDataPointBase
+ {
+ private XDataPoint _maximumX;
+ /// <summary>
+ /// Gets or sets the maximum x value.
+ /// </summary>
+ public XDataPoint MaximumX
+ {
+ get { return _maximumX; }
+ set { _maximumX = value; RaisePropertyChangedAuto(); }
+ }
+
+ private YDataPoint _minimumY;
+ /// <summary>
+ /// Gets or sets the minimum x value.
+ /// </summary>
+ public YDataPoint MinimumY
+ {
+ get { return _minimumY; }
+ set { _minimumY = value; RaisePropertyChangedAuto(); }
+ }
+
+ private YDataPoint _maximumY;
+ /// <summary>
+ /// Gets or sets the maximum y value.
+ /// </summary>
+ public YDataPoint MaximumY
+ {
+ get { return _maximumY; }
+ set { _maximumY = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _autoY;
+ /// <summary>
+ /// Gets or sets a value indicating whether to automatically adjust the graph <see cref="MaximumY"/> and <see cref="MinimumY"/> according to the current visible data points.
+ /// </summary>
+ public bool AutoY
+ {
+ get { return _autoY; }
+ set { _autoY = value; RaisePropertyChangedAuto(); }
+ }
+
+ public GraphRange()
+ {
+ MinimumY = GraphDataPointHelper.Init<YDataPoint>();
+ MaximumX = GraphDataPointHelper.Init<XDataPoint>();
+ MaximumY = GraphDataPointHelper.Init<YDataPoint>();
+ }
+
+ /// <summary>
+ /// Gets or sets the maximum x value.
+ /// </summary>
+ IGraphDataPoint IGraphRange.MaximumX
+ {
+ get
+ {
+ return MaximumX;
+ }
+ set
+ {
+ MaximumX = (XDataPoint)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the minimum x value.
+ /// </summary>
+ IGraphDataPoint IGraphRange.MinimumY
+ {
+ get
+ {
+ return MinimumY;
+ }
+ set
+ {
+ MinimumY = (YDataPoint)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the maximum y value.
+ /// </summary>
+ IGraphDataPoint IGraphRange.MaximumY
+ {
+ get
+ {
+ return MaximumY;
+ }
+ set
+ {
+ MaximumY = (YDataPoint)value;
+ }
+ }
+ }
+}