using RealTimeGraphX.EventArguments; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RealTimeGraphX { /// /// Represents a graph controller. /// A graph controller is the first component in the sequence of graph components and it's role is to /// Push data points and pass them to the output . /// /// The type of the graph data series. /// public interface IGraphController : IGraphOutputComponent>, IGraphComponent where TDataSeries : IGraphDataSeries { #region Events /// /// Occurs when one of the properties was modified. /// event EventHandler RangeChanged; #endregion #region Properties /// /// Gets the graph range (limits). /// IGraphRange Range { get; } /// /// Gets the data series collection. /// ReadOnlyObservableCollection DataSeriesCollection { get; } /// /// Gets or sets a value indicating whether to pause the graph movement. /// bool IsPaused { get; set; } #endregion #region Methods /// /// Adds a new data series. /// /// The series. void AddDataSeries(TDataSeries series); /// /// Removed the specified data series /// /// The series. void RemoveDataSeries(TDataSeries series); /// /// Clears the graph data. /// void Clear(); #endregion } /// /// Represents a graph controller. /// A graph controller is the first component in the sequence of graph components and it's role is to /// Push data points and pass them to the output . /// /// The type of the graph data series. /// The type of the x-axis data point. /// The type of the y-axis data point. /// /// public interface IGraphController : IGraphController, IGraphOutputComponent> where XDataPoint : GraphDataPointBase where YDataPoint : GraphDataPointBase where TDataSeries : IGraphDataSeries { #region Events /// /// Occurs when one of the properties was modified. /// new event EventHandler> RangeChanged; /// /// Occurs when the connected has changed. /// new event EventHandler>> OutputChanged; #endregion #region Properties /// /// Gets the graph range (limits). /// new GraphRange Range { get; } /// /// Gets the connected output . /// new IGraphRenderer Output { get; } #endregion #region Methods /// /// Submits the specified x and y data points the controller. /// If the controller has more than one data series the data points will be duplicated. /// /// X data point. /// Y data point. void PushData(XDataPoint x, YDataPoint y); /// /// Submits the specified collections of x and y data points. /// If the controller has more than one data series the data points will be distributed evenly. /// /// X data point collection. /// Y data point collection. void PushData(IEnumerable xx, IEnumerable yy); /// /// Submits a matrix of x and y data points. Meaning each data series should process a single collection of x/y data points. /// /// X matrix. /// Y matrix. void PushData(IEnumerable> xxxx, IEnumerable> yyyy); #endregion } }