public override bool this[ProbeSignal Signal] { get { return this._Source[Signal]; } }
/// <summary> /// Gets the current value of a signal produced by the probe. /// </summary> public abstract bool this[ProbeSignal Signal] { get; }
/// <summary> /// Updates the value of a signal for the probe. /// </summary> public void UpdateSignal(ProbeSignal Signal, bool Value) { this._Primary = Value; if (this._SignalChange != null) { this._SignalChange(Signal, Value); } }
public override bool this[ProbeSignal Signal] { get { return this._Primary; } }
/// <summary> /// Calls the probe signal change handler on the input context and returns wether the event was handled. /// </summary> /// <param name="Probe">The probe in the parent input context whose signal was changed.</param> public bool ProbeSignalChange(Probe Probe, ProbeSignal Signal, bool Value) { bool handled = false; if (this._ProbeSignalChange != null) { this._ProbeSignalChange(new _NodeProbe(this._Node, Probe), Signal, Value, ref handled); } return handled; }
/// <summary> /// Handles a probe signal change over the node. /// </summary> /// <param name="Offset">The offset of the probe from the top-left corner of the node.</param> public void ProbeSignalChange(World World, Probe Probe, Point Offset, ProbeSignal Signal, bool Value) { // See if the event can be handled by the content of the node if (this._InputContext.ProbeSignalChange(Probe, Signal, Value)) return; // Start dragging if possible if (this._DragState == null && Signal == ProbeSignal.Primary && Value == true) { this._DragState = new DragState { Offset = Offset, Probe = Probe, ReleaseProbe = Probe.Lock() }; } }
/// <summary> /// Handles a probe signal change event from the input context. /// </summary> private void _ProbeSignalChange(Probe Probe, ProbeSignal Signal, bool Value, ref bool Handled) { Point pos = Probe.Position; Node node = this.NodeAtPoint(pos); if (node != null) { Handled = true; node.ProbeSignalChange(this, Probe, pos - node.Position, Signal, Value); } }