示例#1
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);

            int b = reader.ReadInt32();

            if (b == 1)
            {
                _blend           = new Blend();
                _blend.Factors   = ctx.loadFloatArray();
                _blend.Positions = ctx.loadFloatArray();
            }
            else
            {
                _blend = null;
            }

            _linearColors[0] = ctx.loadColor();
            _linearColors[1] = ctx.loadColor();

            b = reader.ReadInt32();
            if (b == 1)
            {
                _interpolationColors           = new ColorBlend();
                _interpolationColors.Colors    = ctx.loadColorArray();
                _interpolationColors.Positions = ctx.loadFloatArray();
            }
            else
            {
                _interpolationColors = null;
            }

            _angle = (float)reader.ReadDouble();
        }
示例#2
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);

            _hatchStyle = (HatchStyle)reader.ReadInt32();
            _foreColor  = ctx.loadColor();
            _backColor  = ctx.loadColor();
        }
示例#3
0
        public void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            x             = reader.ReadInt16();
            y             = reader.ReadInt16();
            allowIncoming = reader.ReadBoolean();
            allowOutgoing = reader.ReadBoolean();
            markStyle     = (MarkStyle)reader.ReadInt32();
            color         = ctx.loadColor();

            if (ctx.FileVersion > 5)
            {
                // new in file format 6
                col = reader.ReadInt32();

                if (ctx.FileVersion > 6)
                {
                    // new in file format 7
                    tag = null;
                    bool tagAvailable = reader.ReadBoolean();
                    if (tagAvailable)
                    {
                        tag = ctx.loadTag();
                    }

                    if (ctx.FileVersion > 22)
                    {
                        // new in file format 23
                        toolTip = reader.ReadString();
                    }
                }
            }
        }
示例#4
0
 public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
 {
     ctx.loadReference(this);
     _color         = ctx.loadColor();
     _compoundArray = ctx.loadFloatArray();
     _dashStyle     = (DashStyle)reader.ReadInt32();
     _dashPattern   = ctx.loadFloatArray();
     _dashOffset    = (float)reader.ReadDouble();
     _width         = (float)reader.ReadDouble();
     _lineJoin      = (LineJoin)reader.ReadInt32();
     _miterLimit    = (float)reader.ReadDouble();
 }
示例#5
0
        public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            rect          = ctx.loadRectF();
            constructed   = reader.ReadBoolean();
            locked        = reader.ReadBoolean();
            zIndex        = reader.ReadInt32();
            penDashStyle  = (DashStyle)reader.ReadInt32();
            penWidth      = (float)reader.ReadDouble();
            shadowOffsetX = (float)reader.ReadDouble();
            shadowOffsetY = (float)reader.ReadDouble();
            invisible     = reader.ReadBoolean();
            selected      = reader.ReadBoolean();

            tag = null;
            bool tagAvailable = reader.ReadBoolean();

            if (tagAvailable)
            {
                tag = ctx.loadTag();
            }

            manipulators = new ArrayList();

            font    = ctx.loadFont();
            toolTip = reader.ReadString();

            ctx.loadReference(this);
            ctx.loadReference(this);

            if (ctx.FileVersion > 9)
            {
                // new in file format 10
                shadowColor  = ctx.loadColor();
                ignoreLayout = reader.ReadBoolean();

                if (ctx.FileVersion > 14)
                {
                    // new in file format 15
                    printable = reader.ReadBoolean();

                    if (ctx.FileVersion > 15)
                    {
                        // new in file format 16
                        weight = reader.ReadSingle();
                    }
                }
            }
        }
示例#6
0
文件: GDI.cs 项目: ChrisMoreton/Test3
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			_color = ctx.loadColor();
		}
示例#7
0
文件: GDI.cs 项目: ChrisMoreton/Test3
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			int b = reader.ReadInt32();
			if(b == 1)
			{
				_blend = new Blend();
				_blend.Factors = ctx.loadFloatArray();
				_blend.Positions = ctx.loadFloatArray();
			}
			else
			{
				_blend = null;
			}

			_linearColors[0] = ctx.loadColor();
			_linearColors[1] = ctx.loadColor();

			b = reader.ReadInt32();
			if(b == 1)
			{
				_interpolationColors = new ColorBlend();
				_interpolationColors.Colors = ctx.loadColorArray();
				_interpolationColors.Positions = ctx.loadFloatArray();
			}
			else
			{
				_interpolationColors = null;
			}

			_angle = (float)reader.ReadDouble();
		}
示例#8
0
文件: GDI.cs 项目: ChrisMoreton/Test3
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			_hatchStyle = (HatchStyle)reader.ReadInt32();
			_foreColor = ctx.loadColor();
			_backColor = ctx.loadColor();
		}
示例#9
0
文件: GDI.cs 项目: ChrisMoreton/Test3
		public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			ctx.loadReference(this);
			_color = ctx.loadColor();
			_compoundArray = ctx.loadFloatArray();
			_dashStyle = (DashStyle)reader.ReadInt32();
			_dashPattern = ctx.loadFloatArray();
			_dashOffset = (float)reader.ReadDouble();
			_width = (float)reader.ReadDouble();
			_lineJoin = (LineJoin)reader.ReadInt32();
			_miterLimit = (float)reader.ReadDouble();
		}
示例#10
0
			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();
			}
示例#11
0
		public void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			x = reader.ReadInt16();
			y = reader.ReadInt16();
			allowIncoming = reader.ReadBoolean();
			allowOutgoing = reader.ReadBoolean();
			markStyle = (MarkStyle)reader.ReadInt32();
			color = ctx.loadColor();

			if (ctx.FileVersion > 5)
			{
				// new in file format 6
				col = reader.ReadInt32();

				if (ctx.FileVersion > 6)
				{
					// new in file format 7
					tag = null;
					bool tagAvailable = reader.ReadBoolean();
					if (tagAvailable)
						tag = ctx.loadTag();

					if (ctx.FileVersion > 22)
					{
						// new in file format 23
						toolTip = reader.ReadString();
					}
				}
			}
		}
示例#12
0
文件: Box.cs 项目: ChrisMoreton/Test3
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			int intStyle = 0;
			ShapeTemplate polyShape = null;

			setExpanded(reader.ReadBoolean());
			setExpandable(reader.ReadBoolean());
			enabledHandles = (Handles)reader.ReadInt64();
			intStyle = reader.ReadInt32();
			if (intStyle == 4) // Polygon
				style = BoxStyle.Shape;
			else
				style = (BoxStyle)intStyle;
			fillColor = ctx.loadColor();
			frameColor = ctx.loadColor();
			picturePos = (ImageAlign)reader.ReadInt32();
			text = reader.ReadString();
			textColor = ctx.loadColor();
			textFormat = ctx.loadStringFormat();
			transparent = reader.ReadBoolean();

			// this was used with the now obsolete bsPolygon boxes
			if (ctx.FileVersion < 22)
			{
				ctx.loadPtfArray();
				int c = reader.ReadInt32();
				byte[] b = reader.ReadBytes(c);

				if (intStyle == 4) // Polygon
					polyShape = new ShapeTemplate(b);
			}

			ctx.loadReference(this);
			ctx.loadReference(this);
			ArrowAnchor anchorIncoming =(ArrowAnchor)reader.ReadInt32();
			ArrowAnchor anchorOutgoing= (ArrowAnchor)reader.ReadInt32();
			customDraw = (CustomDraw)reader.ReadInt32();

			image = ctx.loadImage();

			pen.Width = PenWidth;
			pen.Color = frameColor;
			pen.DashStyle = PenDashStyle;
			brush.Release();
			brush = new SolidBrush(fillColor);
			brush.AddRef();

			if (ctx.FileVersion > 2)
			{
				if (ctx.FileVersion < 6)
				{
					shapeTemplate = (ShapeTemplate)ctx.loadObject();
					shapeData = (ShapeTemplate.PathData)ctx.loadObject();
				}

				if (ctx.FileVersion > 3)
				{
					pen = (Pen)ctx.loadObject();
					ctx.loadReference(this);

					selStyle = (HandlesStyle)reader.ReadInt32();

					if (ctx.FileVersion > 4)
					{
						// new in save format 5
						anchorPattern = ctx.loadAnchorPattern();

						if (ctx.FileVersion > 5)
						{
							// new in save format 6
							PolyTextLayout = reader.ReadBoolean();
							ShapeOrientation = (float)reader.ReadDouble();

							int hasShape = reader.ReadInt32();
							if (hasShape != -1)
							{
								string shpId = reader.ReadString();
								if (shpId == "")
								{
									shapeTemplate = (ShapeTemplate)ctx.loadObject();
									shapeData = (ShapeTemplate.PathData)ctx.loadObject();
								}
								else
								{
									ShapeTemplate stvalue = ShapeTemplate.FromId(shpId);
									ShapeTemplate newVal = flowChart.DefaultShape;
									if (stvalue != null)
										newVal = stvalue;
									if (newVal.Id == "")
										shapeTemplate = (ShapeTemplate)newVal.Clone();
									else
										shapeTemplate = newVal;
									shapeData = null;
								}
								updateShapePoints();
							}

							if (intStyle == 4) // Polygon
							{
								shapeTemplate = polyShape;
								shapeData = null;

								updateShapePoints();
							}

							if (ctx.FileVersion > 12)
							{
								// new in save format 13
								// now loaded in Node::loadFrom
								if (ctx.FileVersion < 15)
									hyperLink = reader.ReadString();

								if (ctx.FileVersion > 13)
								{
									// new in save format 14
									useStyledText = reader.ReadBoolean();

									if (ctx.FileVersion > 21)
									{
										// new in save format 22
										rotationAngle = reader.ReadSingle();
										rotateContents = reader.ReadBoolean();
									}
								}
							}
						}
					}
				}
			}

			updateText();
			layoutText();
		}
示例#13
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			style = (ArrowStyle)reader.ReadInt32();
			penColor = ctx.loadColor();
			ctx.loadReference(this);
			ctx.loadReference(this);
			segmentCount = reader.ReadInt16();
			text = reader.ReadString();
			textColor = ctx.loadColor();
			arrowHead = (ArrowHead)reader.ReadInt32();
			arrowBase = (ArrowHead)reader.ReadInt32();
			arrowInterm = (ArrowHead)reader.ReadInt32();
			headSize = (float)reader.ReadDouble();
			baseSize = (float)reader.ReadDouble();
			intermSize = (float)reader.ReadDouble();
			fillColor = ctx.loadColor();
			dynamic = reader.ReadBoolean();
			cascadeOrientation = (Orientation)reader.ReadInt32();
			cascadeStartHorizontal = reader.ReadBoolean();
			reflexive = reader.ReadBoolean();
			ctx.loadReference(this);
			ctx.loadReference(this);

			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);

			pen.Width = PenWidth;
			pen.Color = frameColor;
			pen.DashStyle = PenDashStyle;
			brush.Release();
			brush = new SolidBrush(fillColor);
			brush.AddRef();
			headPen.Width = PenWidth;
			headPen.Color = frameColor;
			headPen.DashStyle = PenDashStyle;

			if (ctx.FileVersion > 3)
			{
				pen = (Pen)ctx.loadObject();
				ctx.loadReference(this);

				if (ctx.FileVersion > 4)
				{
					// new in file format 5
					allowMoveStart = reader.ReadBoolean();
					allowMoveEnd = reader.ReadBoolean();
					orgnAnchor = reader.ReadInt32();
					destAnchor = reader.ReadInt32();

					if (ctx.FileVersion > 7)
					{
						// new in file format 8
						autoRoute = reader.ReadBoolean();
						retainForm = reader.ReadBoolean();
						textStyle = (ArrowTextStyle)reader.ReadInt32();

						if (ctx.FileVersion > 9)
						{
							// new in file format 10
							headPen = (Pen)ctx.loadObject();

							if (ctx.FileVersion > 16)
							{
								// new in file format 17
								customDraw = (CustomDraw)reader.ReadInt32();

								if (ctx.FileVersion > 19)
								{
									// new in file format 20
									snapToNodeBorder = reader.ReadBoolean();
									selStyle = (HandlesStyle)ctx.reader.ReadInt32();

									if (ctx.FileVersion > 25)
									{
										// new in file format 26
										hyperLink = reader.ReadString();

										if (ctx.FileVersion > 28)
										{
											// new in file format 29
											drawCrossings = reader.ReadBoolean();
										}
									}
								}
							}
						}
					}
				}
			}

			updateText();
		}
示例#14
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);

            _color = ctx.loadColor();
        }
示例#15
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);
			hasHeaderRows = false;

			hasSpanningCells = false;
			ctx.loadReference(this);	// load cells
			ctx.loadReference(this);	// load rows
			ctx.loadReference(this);	// load columns
			currScrollRow = reader.ReadInt32();
			scrollable = reader.ReadBoolean();
			setScrollable(scrollable);
			fillColor = ctx.loadColor();
			frameColor = ctx.loadColor();
			caption = reader.ReadString();
			captionColor = ctx.loadColor();
			captionFormat = ctx.loadStringFormat();

			captionHeight = (float)reader.ReadDouble();
			cellBorders = (CellFrameStyle)reader.ReadInt32();
			rowsCount = reader.ReadInt32();
			rowHeight = (float)reader.ReadDouble();
			columnsCount = reader.ReadInt32();
			columnWidth = (float)reader.ReadDouble();
			textColor = ctx.loadColor();
			picturePos = (ImageAlign)reader.ReadInt32();

			picture = ctx.loadImage();

			pen.Width = PenWidth;
			pen.Color = frameColor;
			pen.DashStyle = PenDashStyle;
			brush.Release();
			brush = new SolidBrush(fillColor);
			brush.AddRef();

			if (ctx.FileVersion > 3)
			{
				pen = (Pen)ctx.loadObject();
				ctx.loadReference(this);

				selStyle = (HandlesStyle)reader.ReadInt32();

				if (ctx.FileVersion > 5)
				{
					// new in save format 6
					rowAnchorPattern = ctx.loadAnchorPattern();
					enabledHandles = (Handles)reader.ReadInt64();
					style = (TableStyle)reader.ReadInt32();

					if (ctx.FileVersion > 7)
					{
						// new in file format 8
						linkStyle = (TableLinkStyle)reader.ReadInt32();

						if (ctx.FileVersion > 8)
						{
							// new in save format 9
							anchorPattern = ctx.loadAnchorPattern();

							// Load table arrows
							ctx.loadReference(this);
							ctx.loadReference(this);

							if (ctx.FileVersion > 13)
							{
								// new in save format 14
								setExpanded(reader.ReadBoolean());
								setExpandable(reader.ReadBoolean());
								useStyledText = reader.ReadBoolean();

								if (ctx.FileVersion > 18)
								{
									// new in save format 19
									customDraw = (CustomDraw)reader.ReadInt32();
									cellCustomDraw = (CustomDraw)reader.ReadInt32();

									if (ctx.FileVersion > 21)
									{
										// new in save format 22
										offsetHeaderRows = reader.ReadBoolean();

										if (ctx.FileVersion > 24)
										{
											// new in save format 25
											ctx.loadReference(this);	// captionBackBrush
										}
									}
								}
							}
						}
					}
				}
			}

			resetCoveredCells();
			updateText();
			layoutText();
		}
示例#16
0
			public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
			{
				toolTip = "";
				hyperLink = "";

				text = reader.ReadString();
				textFormat = ctx.loadStringFormat();
				ctx.loadReference(this);

				if (ctx.FileVersion > 5)
				{
					// new in save format 6
					picturePos = (ImageAlign)reader.ReadInt32();
					picture = ctx.loadImage();

					if (ctx.FileVersion > 13)
					{
						// new in save format 14
						textColor = ctx.loadColor();
						ctx.loadReference(this);	// brush

						if (ctx.FileVersion > 17)
						{
							// new in save format 18
							toolTip = reader.ReadString();

							if (ctx.FileVersion > 18)
							{
								// new in save format 19
								hyperLink = reader.ReadString();

								if (ctx.FileVersion > 21)
								{
									// new in save format 22
									columnSpan = reader.ReadInt32();
									rowSpan = reader.ReadInt32();

									tag = null;
									bool tagAvailable = reader.ReadBoolean();
									if (tagAvailable)
										tag = ctx.loadTag();
								}
							}
						}
					}
				}

				txOptions = new Text.LayoutOptions();
				txLayout = new Text.Layout();
			}
示例#17
0
		public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			rect = ctx.loadRectF();
			constructed = reader.ReadBoolean();
			locked = reader.ReadBoolean();
			zIndex = reader.ReadInt32();
			penDashStyle = (DashStyle)reader.ReadInt32();
			penWidth = (float)reader.ReadDouble();
			shadowOffsetX = (float)reader.ReadDouble();
			shadowOffsetY = (float)reader.ReadDouble();
			invisible = reader.ReadBoolean();
			selected = reader.ReadBoolean();

			tag = null;
			bool tagAvailable = reader.ReadBoolean();
			if (tagAvailable)
				tag = ctx.loadTag();

			manipulators = new ArrayList();

			font = ctx.loadFont();
			toolTip = reader.ReadString();

			ctx.loadReference(this);
			ctx.loadReference(this);

			if (ctx.FileVersion > 9)
			{
				// new in file format 10
				shadowColor = ctx.loadColor();
				ignoreLayout = reader.ReadBoolean();

				if (ctx.FileVersion > 14)
				{
					// new in file format 15
					printable = reader.ReadBoolean();

					if (ctx.FileVersion > 15)
					{
						// new in file format 16
						weight = reader.ReadSingle();
					}
				}
			}
		}