Пример #1
0
        public DebugScope ()
        {
            UpdatePeriod = AddPort ("UpdatePeriod", Units.Time, 5);

            timer = new Timer (Timer_Tick, null, 234, PeriodMillis);

            UpdatePeriod.ValueChanged += UpdatePeriod_ValueChanged;
        }
Пример #2
0
 /// <summary>
 /// Disconnect this port from another port.
 /// </summary>
 /// <param name="other"></param>
 public void DisconnectFrom (Port other)
 {
     if (other == null)
         return;
     if (this == other)
         return;
     connectedPorts.Remove (other);
     other.connectedPorts.Remove (this);
 }
Пример #3
0
		/// <summary>
		/// Connect this port to another port. When this port's value
		/// changes, it will set the value of all connected ports.
		/// </summary>
		/// <param name="other">The other port to connect to</param>
		public void ConnectTo (Port other)
		{
			if (other == null)
				return;
			if (this == other)
				return;
			if (connectedPorts.Contains (other))
				return;
			connectedPorts.Add (other);
			other.connectedPorts.Add (this);

            // Propagate
            other.Value = this.Value;
		}
Пример #4
0
 public void ConnectTo (Port port)
 {
     connectedPorts.Add (port);
 }
Пример #5
0
 public Connection (Port fromPort, Port toPort)
 {
     From = fromPort;
     To = toPort;
 }
Пример #6
0
 public void ConnectTo(Port port)
 {
     connectedPorts.Add(port);
 }