From 2ce6afb909f34af7d78c20cfeb9f2d8311e91336 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 3 Oct 2025 01:55:11 +0300 Subject: Changed RealTimeGraphX to .NET 4.6.1 --- .../RealTimeGraphXNet/RealTimeGraphX/GraphRange.cs | 138 +++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphXNet/RealTimeGraphX/GraphRange.cs (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphXNet/RealTimeGraphX/GraphRange.cs') diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphXNet/RealTimeGraphX/GraphRange.cs b/Software/Visual_Studio/SideChains/RealTimeGraphXNet/RealTimeGraphX/GraphRange.cs new file mode 100644 index 000000000..521f9f0b6 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphXNet/RealTimeGraphX/GraphRange.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph x/y data points boundaries. + /// + public interface IGraphRange : IGraphComponent + { + /// + /// Gets or sets the maximum x value. + /// + GraphDataPoint MaximumX { get; set; } + + /// + /// Gets or sets the minimum x value. + /// + GraphDataPoint MinimumY { get; set; } + + /// + /// Gets or sets the maximum y value. + /// + GraphDataPoint MaximumY { get; set; } + + /// + /// Gets or sets a value indicating whether to automatically adjust the graph and according to the current effective data points. + /// + bool AutoY { get; set; } + } + + /// + /// Represents a graph X/Y range boundaries. + /// + /// Type of x-axis data point. + /// Type of y-axis data point. + /// + public class GraphRange : GraphObject, IGraphRange where XDataPoint : GraphDataPoint where YDataPoint : GraphDataPoint + { + private XDataPoint _maximumX; + /// + /// Gets or sets the maximum x value. + /// + public XDataPoint MaximumX + { + get { return _maximumX; } + set { _maximumX = value; RaisePropertyChangedAuto(); } + } + + private YDataPoint _minimumY; + /// + /// Gets or sets the minimum x value. + /// + public YDataPoint MinimumY + { + get { return _minimumY; } + set { _minimumY = value; RaisePropertyChangedAuto(); } + } + + private YDataPoint _maximumY; + /// + /// Gets or sets the maximum y value. + /// + public YDataPoint MaximumY + { + get { return _maximumY; } + set { _maximumY = value; RaisePropertyChangedAuto(); } + } + + private bool _autoY; + /// + /// Gets or sets a value indicating whether to automatically adjust the graph and according to the current visible data points. + /// + public bool AutoY + { + get { return _autoY; } + set { _autoY = value; RaisePropertyChangedAuto(); } + } + + /// + /// Initializes a new instance of the class. + /// + public GraphRange() + { + MinimumY = GraphDataPointHelper.Init(); + MaximumX = GraphDataPointHelper.Init(); + MaximumY = GraphDataPointHelper.Init(); + } + + /// + /// Gets or sets the maximum x value. + /// + GraphDataPoint IGraphRange.MaximumX + { + get + { + return MaximumX; + } + set + { + MaximumX = (XDataPoint)value; + } + } + + /// + /// Gets or sets the minimum x value. + /// + GraphDataPoint IGraphRange.MinimumY + { + get + { + return MinimumY; + } + set + { + MinimumY = (YDataPoint)value; + } + } + + /// + /// Gets or sets the maximum y value. + /// + GraphDataPoint IGraphRange.MaximumY + { + get + { + return MaximumY; + } + set + { + MaximumY = (YDataPoint)value; + } + } + } +} -- cgit v1.3.1