Inheritance: BaseElement, IControllable
Ejemplo n.º 1
0
 public LineController(LineElement element)
 {
     el = element;
 }
Ejemplo n.º 2
0
		public LineController(LineElement element)
		{
			el = element;
		}
		private void InitConnectors(ConnectorElement conn1, ConnectorElement conn2)
		{
			conn1Dir = conn1.GetDirection();
			conn2Dir = conn2.GetDirection();

			if ((conn1Dir == CardinalDirection.North) || (conn1Dir == CardinalDirection.South))
				orientation = Orientation.Vertical;
			else
				orientation = Orientation.Horizontal;

			if (
				(
				((conn1Dir == CardinalDirection.North) || (conn1Dir == CardinalDirection.South))
				&& ((conn2Dir == CardinalDirection.East) || (conn2Dir == CardinalDirection.West)))
				||
				(
				((conn1Dir == CardinalDirection.East) || (conn1Dir == CardinalDirection.West))
				&& ((conn2Dir == CardinalDirection.North) || (conn2Dir == CardinalDirection.South)))
				)
			{
				lines = new LineElement[2];
				lines[0] = new LineElement(0, 0, 0, 0);
				lines[1] = new LineElement(0, 0, 0, 0);
			}
			else	
			{
				lines = new LineElement[3];
				lines[0] = new LineElement(0, 0, 0, 0);
				lines[1] = new LineElement(0, 0, 0, 0);
				lines[2] = new LineElement(0, 0, 0, 0);
			}
			
			CalcLinkFirtTime();
			CalcLink();
			RestartProps();
		}