Inheritance: BaseElement, IControllable, ILabelElement
Exemplo n.º 1
0
        public RoundRectangleNode(int top, int left, int width, int height)
            : base(top, left, width, height)
		{
			rectangle = new RectangleElement(top, left, width, height);
			SyncContructors();
            Radius = 10;
		}
		public RectangleController(BaseElement element)
		{
			el = element;

			//Create corners
			for(int i = 0; i < selectionCorner.Length; i++)
			{
				selectionCorner[i] = new RectangleElement(0, 0, selCornerSize * 2, selCornerSize * 2);
				selectionCorner[i].BorderColor = Color.Black;
				selectionCorner[i].FillColor1 = Color.White;
				selectionCorner[i].FillColor2 = Color.Empty;
			}
		}
		public RightAngleLinkController(RightAngleLinkElement element)
		{
			el = element;
			
			//Create corners
			if (el.lines.Length == 3)
			{
				selectionCorner = new RectangleElement[1];
				selectionCorner[0] = new RectangleElement(0, 0, selCornerSize * 2, selCornerSize * 2);
				selectionCorner[0].BorderColor = Color.Black;
				selectionCorner[0].FillColor1 = Color.White;
				selectionCorner[0].FillColor2 = Color.Empty;
			}
			else
			{
				selectionCorner = new RectangleElement[0];
			}
		}
Exemplo n.º 4
0
		private void EndAddElement(Rectangle selectionRectangle)
		{
			BaseElement el;
			switch (document.ElementType)
			{
				case ElementType.Rectangle:
					el = new RectangleElement(selectionRectangle);
					break;
				case ElementType.RectangleNode:
					el = new RectangleNode(selectionRectangle);
					break;
				case ElementType.Elipse:
					el = new ElipseElement(selectionRectangle);
					break;
				case ElementType.ElipseNode:
					el = new ElipseNode(selectionRectangle);
					break;
				case ElementType.CommentBox:
					el = new CommentBoxElement(selectionRectangle);
					break;
				default:
					el = new RectangleNode(selectionRectangle);
					break;
			}
			
			document.AddElement(el);
			
			document.Action = DesignerAction.Select;	
		}
Exemplo n.º 5
0
 public RectangleNode(int top, int left, int width, int height) : base(top, left, width, height)
 {
     rectangle = new RectangleElement(top, left, width, height);
     SyncContructors();
 }