From 79eb19cbd10785a7dbc972bc0b26817932237419 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 10 Oct 2018 16:55:44 +0300 Subject: Sign-out works ! Fixed issue where color conversion was busy while not in research module but research module in job view. Added new RealTimeGraphX ! --- .../RealTimeGraphX/GraphInputComponentBase.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX/GraphInputComponentBase.cs (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphX/GraphInputComponentBase.cs') diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphInputComponentBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphInputComponentBase.cs new file mode 100644 index 000000000..4f1c52f12 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphInputComponentBase.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RealTimeGraphX.EventArguments; + +namespace RealTimeGraphX +{ + /// + /// Represents an base class. + /// + /// The type of the in. + /// + public abstract class GraphInputComponentBase : GraphObject, IGraphInputComponent where TIn : IGraphComponent + { + /// + /// Occurs when the property has changed. + /// + public event EventHandler> InputChanged; + + private TIn _input; + /// + /// Gets the connected input . + /// + public TIn Input + { + get { return _input; } + private set + { + _input = value; + RaisePropertyChangedAuto(); + OnInputChanged(_input); + } + } + + /// + /// Raises the event. + /// + /// The input. + protected virtual void OnInputChanged(TIn input) + { + InputChanged?.Invoke(this, new InputChangedEventArgs(input)); + } + + /// + /// Connects the specified component output to this component input. + /// + /// The component. + /// Specifies whether this call was made from a component. + public abstract void ConnectInput(TIn component, bool fromInput = false); + + /// + /// Disconnects this component input from the current connected . + /// + /// Specifies whether this call was made from a component. + public abstract void DisconnectInput(bool fromInput = false); + } +} -- cgit v1.3.1