protected virtual Shape CreateElement(ShapeCreateMode mode, PointF location, FlowchartStencilType type)
        {
            Shape shape = null;

            if (mode == ShapeCreateMode.Shape)
            {
                shape = Runtime.CreateShape(location, new Size());
            }
            if (mode == ShapeCreateMode.Table)
            {
                shape = Runtime.CreateTable(location, new Size());
            }
            if (mode == ShapeCreateMode.ComplexShape)
            {
                shape = Runtime.CreateComplexShape(location, new Size());
            }

            shape.Location = location;
            FlowchartStencil stencil = (FlowchartStencil)Component.Instance.GetStencil(typeof(FlowchartStencil));

            shape.StencilItem = stencil[type];

            //Add ports if required
            AddPorts(shape);

            return(shape);
        }
        public Flowchart(Flowchart prototype) : base(prototype)
        {
            Suspend();

            Spacing           = prototype.Spacing;
            Orientation       = prototype.Orientation;
            mFlowchartStencil = prototype.Stencil;
            LineMode          = prototype.LineMode;
            ShapeMode         = prototype.ShapeMode;

            Resume();
        }
		public Flowchart(Flowchart prototype): base(prototype)
		{
			Suspend();
			
			Spacing = prototype.Spacing;
			Orientation = prototype.Orientation;
			mFlowchartStencil = prototype.Stencil;
			LineMode = prototype.LineMode;
			ShapeMode = prototype.ShapeMode;

			Resume();			
		}
        //Working variables

        #region Interface

        //Constructors
        public Flowchart()
        {
            Suspend();

            Spacing           = new SizeF(40, 40);
            Orientation       = FlowchartOrientation.Vertical;
            mFlowchartStencil = new FlowchartStencil();
            LineMode          = LineCreateMode.Line;
            ShapeMode         = ShapeCreateMode.Shape;

            Resume();
        }
		//Working variables

		#region Interface

		//Constructors
		public Flowchart()
		{
			Suspend();
			
			Spacing = new SizeF(40, 40);
			Orientation = FlowchartOrientation.Vertical;
			mFlowchartStencil = new FlowchartStencil();
			LineMode = LineCreateMode.Line;
			ShapeMode = ShapeCreateMode.Shape;

			Resume();
		}