示例#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);
 }