diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-10 16:55:44 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-10 16:55:44 +0300 |
| commit | 79eb19cbd10785a7dbc972bc0b26817932237419 (patch) | |
| tree | e36176fc94ce6f26efc89b006d7e6faf7e4398cb /Software/Visual_Studio/SideChains/RealTimeGraphX/GraphOutputComponentBase.cs | |
| parent | df9197240ba5a643ce1599f36b7e3dd34aad6a60 (diff) | |
| download | Tango-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/GraphOutputComponentBase.cs')
| -rw-r--r-- | Software/Visual_Studio/SideChains/RealTimeGraphX/GraphOutputComponentBase.cs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphOutputComponentBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphOutputComponentBase.cs new file mode 100644 index 000000000..2d0cae959 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX/GraphOutputComponentBase.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RealTimeGraphX.EventArguments; + +namespace RealTimeGraphX +{ + /// <summary> + /// Represents an <see cref="IGraphOutputComponent{TOut}"/> base class. + /// </summary> + /// <typeparam name="TOut">The type of the out.</typeparam> + /// <seealso cref="RealTimeGraphX.GraphObject" /> + /// <seealso cref="RealTimeGraphX.IGraphOutputComponent{TOut}" /> + public abstract class GraphOutputComponentBase<TOut> : GraphObject, IGraphOutputComponent<TOut> where TOut : IGraphComponent + { + /// <summary> + /// Occurs when the <see cref="P:RealTimeGraphX.IGraphOutputComponent`1.Output" /> property has changed. + /// </summary> + public event EventHandler<OutputChangedEventArgs<TOut>> OutputChanged; + + private TOut _output; + /// <summary> + /// Gets the connected output <see cref="T:RealTimeGraphX.IGraphComponent" />. + /// </summary> + public TOut Output + { + get { return _output; } + set + { + _output = value; + RaisePropertyChangedAuto(); + OnOutputChanged(_output); + } + } + + /// <summary> + /// Raises the <see cref="OutputChanged"/> event. + /// </summary> + /// <param name="output">The output.</param> + protected virtual void OnOutputChanged(TOut output) + { + OutputChanged?.Invoke(this, new OutputChangedEventArgs<TOut>(output)); + } + + /// <summary> + /// Connects this component to another <see cref="T:RealTimeGraphX.IGraphComponent" />. + /// </summary> + /// <param name="output">The output component.</param> + /// <param name="fromOutput">Specifies whether this call was made from a <see cref="TOut" /> component.</param> + public abstract void ConnectOutput(TOut output, bool fromOutput = false); + + /// <summary> + /// Disconnects this component from the connected <see cref="P:RealTimeGraphX.IGraphOutputComponent`1.Output" /><see cref="T:RealTimeGraphX.IGraphComponent" />. + /// </summary> + /// <param name="fromOutput">Specifies whether this call was made from a <see cref="TOut" /> component.</param> + public abstract void DisconnectOutput(bool fromOutput = false); + } +} |
