コード例 #1
0
            /// <summary>
            /// Add a new anchor element to attach an arrow start or end point to in the MessageArrowStack.
            /// </summary>
            /// <returns> The new UIElement that was added to the MessageArrowStack</returns>
            public ArrowAnchor AddArrowAnchorElement(int width, int height)
            {
                // A UIElement to attach a messsage arrow to.
                var arrowAnchorElement = new ArrowAnchor(width, height);

                // Add the arrowAnchor to the MessageArrow StackPanel
                Children.Add(arrowAnchorElement);

                return(arrowAnchorElement);
            }
コード例 #2
0
ファイル: TableLink.cs プロジェクト: 15831944/Test3-1
        internal override PointF getAnchoredPt(ArrowAnchor anchor)
        {
            if (row == -1)
            {
                return(table.getAnchor(anchor));
            }

            if (anchor == ArrowAnchor.LeftCenter ||
                anchor == ArrowAnchor.TopCenter)
            {
                relativePosition.X = 0;
            }
            else
            {
                relativePosition.X = 100;
            }
            relativePosition.Y = 50;

            return(getEndPoint());
        }
コード例 #3
0
ファイル: Node.cs プロジェクト: ChrisMoreton/Test3
		internal PointF getAnchor(ArrowAnchor anchor, bool useRotation)
		{
			PointF center = getCenter();
			PointF intrs = center;

			// find intersection with node outline
			float width = Math.Abs(rect.Width);
			float height = Math.Abs(rect.Height);
			switch(anchor)
			{
				case ArrowAnchor.LeftCenter:
					intrs.X -= width + 10;
					break;
				case ArrowAnchor.TopCenter:
					intrs.Y -= height + 10;
					break;
				case ArrowAnchor.RightCenter:
					intrs.X += width + 10;
					break;
				case ArrowAnchor.BottomCenter:
					intrs.Y += height + 10;
					break;
			}

			if (rotation() != 0 && useRotation)
				intrs = Utilities.rotatePointAt(intrs, center, rotation());

			return getIntersection(intrs, center);
		}
コード例 #4
0
ファイル: Node.cs プロジェクト: ChrisMoreton/Test3
		internal PointF getAnchor(ArrowAnchor anchor)
		{
			return getAnchor(anchor, true);
		}
コード例 #5
0
ファイル: FlowChart.cs プロジェクト: ChrisMoreton/Test3
			public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
			{
				backColor = ctx.loadColor();
				behavior = (BehaviorType)reader.ReadInt32();
				arrowHead = (ArrowHead)reader.ReadInt32();
				arrowBase = (ArrowHead)reader.ReadInt32();
				arrowInterm = (ArrowHead)reader.ReadInt32();
				arrowHeadSize = (float)reader.ReadDouble();
				arrowBaseSize = (float)reader.ReadDouble();
				arrowIntermSize = (float)reader.ReadDouble();
				shadowsStyle = (ShadowsStyle)reader.ReadInt32();
				boxFillColor = ctx.loadColor();
				arrowFillColor = ctx.loadColor();
				boxFrameColor = ctx.loadColor();
				arrowColor = ctx.loadColor();
				alignToGrid = reader.ReadBoolean();
				showGrid = reader.ReadBoolean();
				gridColor = ctx.loadColor();
				gridSize = (float)reader.ReadDouble();
				boxStyle = (BoxStyle)reader.ReadInt32();
				shadowColor = ctx.loadColor();
				imagePos = (ImageAlign)reader.ReadInt32();
				textColor = ctx.loadColor();
				activeMnpColor = ctx.loadColor();
				selMnpColor = ctx.loadColor();
				disabledMnpColor = ctx.loadColor();
				arrowStyle = (ArrowStyle)reader.ReadInt32();
				arrowSegments = reader.ReadInt16();
				scrollX = (float)reader.ReadDouble();
				scrollY = (float)reader.ReadDouble();

				// zoomFactor was a short, now it is a float
				if (ctx.FileVersion < 19)
					zoomFactor = reader.ReadInt16();
				else
					zoomFactor = reader.ReadSingle();

				penDashStyle = (DashStyle)reader.ReadInt32();
				penWidth = (float)reader.ReadDouble();
				int c = reader.ReadInt32();
				defPolyShape = reader.ReadBytes(c);
				docExtents = ctx.loadRectF();
				shadowOffsetX = (float)reader.ReadDouble();
				shadowOffsetY = (float)reader.ReadDouble();
				tableFillColor = ctx.loadColor();
				tableFrameColor = ctx.loadColor();
				tableRowsCount = reader.ReadInt32();
				tableColumnsCount = reader.ReadInt32();
				tableColWidth = (float)reader.ReadDouble();
				tableRowHeight = (float)reader.ReadDouble();
				tableCaptionHeight = (float)reader.ReadDouble();
				tableCaption = reader.ReadString();
				arrowCascadeOrientation = (Orientation)reader.ReadInt32();
				tableCellBorders = (CellFrameStyle)reader.ReadInt32();
				boxIncmAnchor = (ArrowAnchor)reader.ReadInt32();
				boxOutgAnchor = (ArrowAnchor)reader.ReadInt32();
				boxesExpandable = reader.ReadBoolean();
				tablesScrollable = reader.ReadBoolean();
			}
コード例 #6
0
 internal abstract PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation);
コード例 #7
0
ファイル: Arrow.cs プロジェクト: ChrisMoreton/Test3
		internal void adjustEnds(ArrowAnchor orgnAnchor, ArrowAnchor destAnchor)
		{
			points[0] = orgnLink.getAnchoredPt(orgnAnchor, false);
			points[points.Count-1] = destLink.getAnchoredPt(destAnchor, false);

			orgnLink.saveEndRelative();
			destLink.saveEndRelative();
			updateArrowHeads();
		}
コード例 #8
0
ファイル: Link.cs プロジェクト: ChrisMoreton/Test3
		internal abstract PointF getAnchoredPt(ArrowAnchor anchor);
コード例 #9
0
ファイル: ControlHostLink.cs プロジェクト: ChrisMoreton/Test3
		internal override PointF getAnchoredPt(ArrowAnchor anchor)
		{
			return host.getAnchor(anchor);
		}
コード例 #10
0
ファイル: DummyLink.cs プロジェクト: 15831944/Test3-1
 internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation)
 {
     return(point);
 }
コード例 #11
0
ファイル: DummyLink.cs プロジェクト: 15831944/Test3-1
 internal override PointF getAnchoredPt(ArrowAnchor anchor)
 {
     return(point);
 }
コード例 #12
0
ファイル: TableLink.cs プロジェクト: ChrisMoreton/Test3
		internal override PointF getAnchoredPt(ArrowAnchor anchor)
		{
			if (row == -1)
				return table.getAnchor(anchor);

			if (anchor == ArrowAnchor.LeftCenter ||
				anchor == ArrowAnchor.TopCenter)
				relativePosition.X = 0;
			else
				relativePosition.X = 100;
			relativePosition.Y = 50;

			return getEndPoint();
		}
コード例 #13
0
ファイル: DummyLink.cs プロジェクト: ChrisMoreton/Test3
		internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation)
		{
			return point;
		}
コード例 #14
0
ファイル: DummyLink.cs プロジェクト: ChrisMoreton/Test3
		internal override PointF getAnchoredPt(ArrowAnchor anchor)
		{
			return point;
		}
コード例 #15
0
ファイル: ControlHostLink.cs プロジェクト: 15831944/Test3-1
 internal override PointF getAnchoredPt(ArrowAnchor anchor)
 {
     return(host.getAnchor(anchor));
 }
コード例 #16
0
ファイル: ControlHostLink.cs プロジェクト: 15831944/Test3-1
 internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation)
 {
     return(host.getAnchor(anchor, useRotation));
 }
コード例 #17
0
ファイル: ControlHostLink.cs プロジェクト: ChrisMoreton/Test3
		internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation)
		{
			return host.getAnchor(anchor, useRotation);
		}
コード例 #18
0
ファイル: Link.cs プロジェクト: ChrisMoreton/Test3
		internal abstract PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation);
コード例 #19
0
 internal abstract PointF getAnchoredPt(ArrowAnchor anchor);