Inheritance: RectangleElement, IControllable
示例#1
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;
        }
示例#2
0
        protected virtual BaseElement CreateElementInstance(Rectangle rectangle)
        {
            BaseElement el;

            switch (Document.ElementType)
            {
            case ElementType.Rectangle:
                el = new RectangleElement(rectangle);
                break;

            case ElementType.RectangleNode:
                el = new RectangleNode(rectangle);
                break;

            case ElementType.Elipse:
                el = new ElipseElement(rectangle);
                break;

            case ElementType.ElipseNode:
                el = new ElipseNode(rectangle);
                break;

            case ElementType.CommentBox:
                el = new CommentBoxElement(rectangle);
                break;

            case ElementType.CommentBoxNode:
                el = new CommentBoxNode(rectangle);
                break;

            default:
                el = new RectangleNode(rectangle);
                break;
            }
            return(el);
        }
示例#3
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;	
		}
示例#4
0
		public ElipseNode(int top, int left, int width, int height): base(top, left, width, height)
		{
			elipse = new ElipseElement(top, left, width, height);
			SyncContructors();
		}
示例#5
0
 public ElipseNode(int top, int left, int width, int height) : base(top, left, width, height)
 {
     elipse = new ElipseElement(top, left, width, height);
     SyncContructors();
 }