예제 #1
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcNode">Specifies the origin node.</param>
		/// <param name="destTable">Specifies the destination table.</param>
		/// <param name="destRow">Specifies the destination row.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Node srcNode, Table destTable, int destRow)
		{
			if (srcNode == null || destTable == null) return null;

			if (!destTable.canHaveArrows(false) && destRow != -1) return null;

			if (destRow < -1 || destRow >= destTable.RowCount)	return null;

			// create the arrow object and store it in the collection
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcNode.createLink(newArrow, srcNode.getCenter(), false),
				destTable.createLink(newArrow, true, destRow));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}
예제 #2
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcTable">Specifies the origin table.</param>
		/// <param name="srcRow">Specifies the origin row.</param>
		/// <param name="dstNode">Specifies the destination node.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Table srcTable, int srcRow, Node dstNode)
		{
			if (srcTable == null || dstNode == null) return null;

			if (!srcTable.canHaveArrows(true) && srcRow != -1) return null;

			if (srcRow < -1 || srcRow >= srcTable.RowCount) return null;

			// create the arrow object and store it in the item array
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcTable.createLink(newArrow, false, srcRow),
				dstNode.createLink(newArrow, dstNode.getCenter(), true));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}
예제 #3
0
		/// <summary>
		/// Creates a new Arrow instance and adds it to the flowchart.
		/// </summary>
		/// <param name="srcNode">Specifies the arrow origin.</param>
		/// <param name="dstNode">Specifies the arrow destination.</param>
		/// <returns>A reference to the new arrow.</returns>
		public Arrow CreateArrow(Node srcNode, Node dstNode)
		{
			if (srcNode == null || dstNode == null) return null;

			// create the arrow object and store it in the collection
			Arrow newArrow = new Arrow(this);
			newArrow.setOrgAndDest(
				srcNode.createLink(newArrow, srcNode.getCenter(), false),
				dstNode.createLink(newArrow, dstNode.getCenter(), true));

			Add(newArrow, SelectAfterCreate);

			return newArrow;
		}
예제 #4
0
파일: Arrow.cs 프로젝트: ChrisMoreton/Test3
		public Arrow(Arrow prototype, Node src, Node dest) : base(prototype)
		{
			penColor = prototype.penColor;
			headPen = (Pen)prototype.headPen.Clone();

			style = prototype.style;
			setSegments(prototype.segmentCount);
			selStyle = prototype.selStyle;

			text = prototype.text;
			textStyle = prototype.textStyle;
			textColor = prototype.textColor;
			updateText();

			reflexive = prototype.reflexive;

			dynamic = prototype.dynamic;
			snapToNodeBorder = prototype.snapToNodeBorder;
			retainForm = prototype.retainForm;
			cascadeOrientation = prototype.cascadeOrientation;
			cascadeStartHorizontal = prototype.cascadeStartHorizontal;

			orgnLink = null;
			destLink = null;
			objNewDest = null;

			headSize = 5;

			arrowHead = prototype.arrowHead;
			arrowBase = prototype.arrowBase;
			arrowInterm = prototype.arrowInterm;

			headSize = prototype.headSize;
			baseSize = prototype.baseSize;
			intermSize = prototype.intermSize;

			ahHead = new ArrowHeadShape(headSize);
			ahBase = new ArrowHeadShape(baseSize);
			ahInterm = new ArrowHeadShape(intermSize);

			headTemplates[(int)arrowHead].initArrowHead(ahHead);
			headTemplates[(int)arrowBase].initArrowHead(ahBase);
			headTemplates[(int)arrowInterm].initArrowHead(ahInterm);

			textSize = prototype.textSize;

			allowMoveStart = prototype.allowMoveStart;
			allowMoveEnd = prototype.allowMoveEnd;

			orgnAnchor = prototype.orgnAnchor;
			destAnchor = prototype.destAnchor;

			autoRoute = false;
			setOrgAndDest(
				src.createLink(this, src.getCenter(), false),
				dest.createLink(this, dest.getCenter(), true));

			for (int i = 0; i < points.Count; ++i)
				points[i] = prototype.points[i];

			OrgnIndex = prototype.OrgnIndex;
			DestIndex = prototype.DestIndex;
			OrgnAnchor = prototype.OrgnAnchor;
			DestAnchor = prototype.DestAnchor;

			int l = points.Count - 1;
			if (Origin is DummyNode)
				points[0] = prototype.points[0];
			if (Destination is DummyNode)
				points[l] = prototype.points[l];

			customDraw = prototype.customDraw;

			autoRoute = prototype.autoRoute;
			savedSegments = null;
		}
예제 #5
0
파일: Arrow.cs 프로젝트: ChrisMoreton/Test3
		public Arrow(FlowChart parent, PointF src, Node dest) : this(parent)
		{
			setOrgAndDest(
				new DummyLink(this, false, src),
				dest.createLink(this, dest.getCenter(), true));
		}
예제 #6
0
파일: Arrow.cs 프로젝트: ChrisMoreton/Test3
		public Arrow(FlowChart parent, Node src, PointF dest) : this(parent)
		{
			setOrgAndDest(
				src.createLink(this, src.getCenter(), false),
				new DummyLink(this, true, dest));
		}
예제 #7
0
파일: Arrow.cs 프로젝트: ChrisMoreton/Test3
		public Arrow(FlowChart parent, Node src, Node dest) : this(parent)
		{
			setOrgAndDest(
				src.createLink(this, src.getCenter(), false),
				dest.createLink(this, dest.getCenter(), true));
		}