Beispiel #1
0
        public override void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            base.saveTo(writer, ctx);

            ctx.saveImage(_image);
            writer.Write((int)_wrapMode);
        }
Beispiel #2
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);

            _image    = ctx.loadImage();
            _wrapMode = (WrapMode)reader.ReadInt32();
        }
Beispiel #3
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();
        }
Beispiel #4
0
        public override void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            base.saveTo(writer, ctx);

            if (_blend != null)
            {
                writer.Write((int)1);
                ctx.saveFloatArray(_blend.Factors);
                ctx.saveFloatArray(_blend.Positions);
            }
            else
            {
                writer.Write((int)0);
            }

            ctx.saveColor(_linearColors[0]);
            ctx.saveColor(_linearColors[1]);

            if (_interpolationColors != null)
            {
                writer.Write((int)1);
                ctx.saveColorArray(_interpolationColors.Colors);
                ctx.saveFloatArray(_interpolationColors.Positions);
            }
            else
            {
                writer.Write((int)0);
            }

            writer.Write((double)_angle);
        }
Beispiel #5
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();
                    }
                }
            }
        }
Beispiel #6
0
        public void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            writer.Write(x);
            writer.Write(y);
            writer.Write(allowIncoming);
            writer.Write(allowOutgoing);
            writer.Write((int)markStyle);
            ctx.saveColor(color);

            // new in file format 6
            writer.Write(col);

            // new in file format 7
            bool tagSerializable = false;

            if (tag != null)
            {
                tagSerializable = tag.GetType().IsSerializable;
            }
            writer.Write(tagSerializable);

            if (tagSerializable)
            {
                ctx.saveTag(tag);
            }

            // new in file format 23
            writer.Write(toolTip);
        }
Beispiel #7
0
        public override void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            base.saveTo(writer, ctx);

            writer.Write((int)_hatchStyle);
            ctx.saveColor(_foreColor);
            ctx.saveColor(_backColor);
        }
Beispiel #8
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);

            _hatchStyle = (HatchStyle)reader.ReadInt32();
            _foreColor  = ctx.loadColor();
            _backColor  = ctx.loadColor();
        }
Beispiel #9
0
 public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
 {
     writer.Write(List.Count);
     for (int i = 0; i < List.Count; ++i)
     {
         ctx.saveReference(this, (ChartObject)List[i], i);
     }
 }
Beispiel #10
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);
            float x = (float)reader.ReadDouble();
            float y = (float)reader.ReadDouble();

            point = new PointF(x, y);
        }
Beispiel #11
0
 internal static void StoreBrushes(BinaryWriter writer, PersistContext ctx)
 {
     writer.Write(_brushes.Count);
     foreach (Brush br in _brushes)
     {
         ctx.saveObject(br);
     }
 }
Beispiel #12
0
        public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            ctx.saveReference(this, node, 1);
            writer.Write((int)type);
            writer.Write(attData);

            // in format revision 28 'percents' changed from Rectangle to RectangleF
            ctx.saveRect(percents);
        }
Beispiel #13
0
        public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            ctx.saveReference(this, arrow, 1);
            writer.Write(incoming);

            // in format revision 22 these become float:
            writer.Write(relativePosition.X);
            writer.Write(relativePosition.Y);
        }
Beispiel #14
0
		public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			ctx.saveReference(this, node, 1);
			writer.Write((int)type);
			writer.Write(attData);

			// in format revision 28 'percents' changed from Rectangle to RectangleF
			ctx.saveRect(percents);
		}
Beispiel #15
0
 public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
 {
     writer.Write(List.Count);
     for (int i = 0; i < List.Count; ++i)
     {
         writer.Write((double)this[i].X);
         writer.Write((double)this[i].Y);
     }
 }
Beispiel #16
0
        public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            int count = reader.ReadInt32();

            InnerList.Capacity = count;
            for (int i = 0; i < count; ++i)
            {
                InnerList.Add(null);
                ctx.loadReference(this);
            }
        }
Beispiel #17
0
        internal static void RestoreBrushes(IPersistObjFactory objFactory,
                                            BinaryReader reader, PersistContext ctx)
        {
            Brush brush;
            int   count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                brush = (Brush)ctx.loadObject();
                _brushes.Add(brush);
            }
        }
Beispiel #18
0
        public void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            // new in save format 17
            writer.Write((int)moveDirection);
            writer.Write(minWidth);
            writer.Write(minHeight);
            writer.Write(maxWidth);
            writer.Write(maxHeight);

            // new in file format 29
            writer.Write(boolValues);
        }
Beispiel #19
0
 public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
 {
     ctx.saveReference(this, _brush, 1);
     ctx.saveColor(_color);
     ctx.saveFloatArray(_compoundArray);
     writer.Write((int)_dashStyle);
     ctx.saveFloatArray(_dashPattern);
     writer.Write((double)_dashOffset);
     writer.Write((double)_width);
     writer.Write((int)_lineJoin);
     writer.Write((double)_miterLimit);
 }
Beispiel #20
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();
 }
Beispiel #21
0
        public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            int count = reader.ReadInt32();

            InnerList.Capacity = count;
            for (int i = 0; i < count; ++i)
            {
                float x, y;
                x = (float)reader.ReadDouble();
                y = (float)reader.ReadDouble();
                InnerList.Add(new PointF(x, y));
            }
        }
Beispiel #22
0
        public override void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            base.saveTo(writer, ctx);
            ctx.saveReference(this, selectedItems, 1);
            ctx.saveReference(this, selectedBoxes, 2);
            ctx.saveReference(this, selectedTables, 3);
            ctx.saveReference(this, selectedArrows, 4);

            writer.Write((int)style);

            // new in file format 12
            ctx.saveReference(this, selectedHosts, 5);
        }
Beispiel #23
0
        public void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            // new in save format 17
            moveDirection = (DirectionConstraint)reader.ReadInt32();
            minWidth      = reader.ReadSingle();
            minHeight     = reader.ReadSingle();
            maxWidth      = reader.ReadSingle();
            maxHeight     = reader.ReadSingle();

            if (ctx.FileVersion > 28)
            {
                // new in file format 29
                boolValues = reader.ReadUInt16();
            }
        }
Beispiel #24
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);
            ctx.loadReference(this);
            ctx.loadReference(this);
            ctx.loadReference(this);
            ctx.loadReference(this);
            style = (SelectionStyle)reader.ReadInt32();

            if (ctx.FileVersion >= 12)
            {
                // new in file format 12
                ctx.loadReference(this);                        // selectedHosts
            }
        }
Beispiel #25
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();
                    }
                }
            }
        }
Beispiel #26
0
        public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            ctx.loadReference(this);
            type    = (AttachTo)reader.ReadInt32();
            attData = reader.ReadInt32();

            // in format revision 28 'percents' changed from Rectangle to RectangleF
            if (ctx.FileVersion < 28)
            {
                Rectangle r = ctx.loadRect();
                percents = RectangleF.FromLTRB(r.Left, r.Top, r.Right, r.Bottom);
            }
            else
            {
                percents = ctx.loadRectF();
            }
        }
Beispiel #27
0
		public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			ctx.loadReference(this);
			type = (AttachTo)reader.ReadInt32();
			attData = reader.ReadInt32();

			// in format revision 28 'percents' changed from Rectangle to RectangleF
			if (ctx.FileVersion < 28)
			{
				Rectangle r = ctx.loadRect();
				percents = RectangleF.FromLTRB(r.Left, r.Top, r.Right, r.Bottom);
			}
			else
			{
				percents = ctx.loadRectF();
			}
		}
Beispiel #28
0
        public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            ctx.saveRect(rect);
            writer.Write(constructed);
            writer.Write(locked);
            writer.Write(zIndex);
            writer.Write((int)penDashStyle);
            writer.Write((double)penWidth);
            writer.Write((double)shadowOffsetX);
            writer.Write((double)shadowOffsetY);
            writer.Write(invisible);
            writer.Write(selected);

            bool tagSerializable = false;

            if (tag != null)
            {
                tagSerializable = tag.GetType().IsSerializable;
            }
            writer.Write(tagSerializable);

            if (tagSerializable)
            {
                ctx.saveTag(tag);
            }

            ctx.saveFont(Font);
            writer.Write(toolTip);

            ctx.saveReference(this, subordinateGroup, 100);
            ctx.saveReference(this, masterGroup, 101);

            // new in file format 10
            ctx.saveColor(shadowColor);
            writer.Write(ignoreLayout);

            // new in file format 15
            writer.Write(printable);

            // new in file format 16
            writer.Write(weight);
        }
Beispiel #29
0
        public override void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            base.loadFrom(reader, ctx);
            ctx.loadReference(this);
            row = reader.ReadInt32();

            if (ctx.FileVersion < 6)
            {
                // fix the mess from old versions
                if (relativePosition.X == -1)
                {
                    relativePosition.X = 0;
                }
                if (relativePosition.X == 1)
                {
                    relativePosition.X = 100;
                }
                relativePosition.Y = 50;
            }
        }
Beispiel #30
0
        public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            ctx.loadReference(this);
            prevRect = ctx.loadRectF();
            int c = reader.ReadInt32();

            for (int i = 0; i < c; ++i)
            {
                Attachment atch = (Attachment)ctx.loadObject();
                attachments.Add(atch);
            }
            ctx.loadReference(this);
            visible = reader.ReadBoolean();

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

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

            if (ctx.FileVersion > 16)
            {
                // new in save format 17
                autoDeleteItems = reader.ReadBoolean();

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

                    if (ctx.FileVersion > 21)
                    {
                        // new in save format 22
                        followMasterRotation = reader.ReadBoolean();
                    }
                }
            }
        }
Beispiel #31
0
        public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
        {
            ctx.saveReference(this, prevPoints, 1);
            ctx.saveRect(prevRect);
            writer.Write(attachments.Count);
            for (int i = 0; i < attachments.Count; ++i)
            {
                Attachment atch = (Attachment)attachments[i];
                ctx.saveObject(atch);
            }
            ctx.saveReference(this, mainObj, 2);

            writer.Write(visible);

            bool tagSerializable = false;

            if (tag != null)
            {
                tagSerializable = tag.GetType().IsSerializable;
            }
            writer.Write(tagSerializable);

            if (tagSerializable)
            {
                ctx.saveTag(tag);
            }

            // new in save format 17
            writer.Write(autoDeleteItems);

            // new in save format 21
            writer.Write(expandable);

            // new in save format 22
            writer.Write(followMasterRotation);
        }
Beispiel #32
0
        public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
        {
            ctx.loadReference(this);

            if (ctx.FileVersion <= 21)
            {
                // not used any more
                float x  = (float)reader.ReadDouble();
                float y  = (float)reader.ReadDouble();
                int   rx = reader.ReadInt32();
                int   ry = reader.ReadInt32();
                relativePosition = new PointF(rx, ry);
            }

            incoming = reader.ReadBoolean();

            if (ctx.FileVersion > 21)
            {
                // in format revision 22 these become float:
                float rx = reader.ReadSingle();
                float ry = reader.ReadSingle();
                relativePosition = new PointF(rx, ry);
            }
        }
Beispiel #33
0
			public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
			{
				ctx.loadReference(this);
				width = (float)reader.ReadDouble();
				columnStyle = (ColumnStyle)reader.ReadInt32();
			}
Beispiel #34
0
			public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
			{
				ctx.saveReference(this, table, 1);
				writer.Write((double)width);
				writer.Write((int)columnStyle);
			}
Beispiel #35
0
		public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			writer.Write(List.Count);
			for (int i = 0; i < List.Count; ++i)
			{
				ctx.saveReference(this, (ChartObject)List[i], i);
			}
		}
Beispiel #36
0
		public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			int count = reader.ReadInt32();
			InnerList.Capacity = count;
			for (int i = 0; i < count; ++i)
			{
				float x, y;
				x = (float)reader.ReadDouble();
				y = (float)reader.ReadDouble();
				InnerList.Add(new PointF(x, y));
			}
		}
Beispiel #37
0
		public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			writer.Write(List.Count);
			for (int i = 0; i < List.Count; ++i)
			{
				writer.Write((double)this[i].X);
				writer.Write((double)this[i].Y);
			}
		}
Beispiel #38
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			_image = ctx.loadImage();
			_wrapMode = (WrapMode)reader.ReadInt32();
		}
Beispiel #39
0
		internal static void StoreBrushes(BinaryWriter writer, PersistContext ctx)
		{
			writer.Write(_brushes.Count);
			foreach(Brush br in _brushes)
				ctx.saveObject(br);
		}
Beispiel #40
0
			public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
			{
				writer.Write((double)height);
				ctx.saveReference(this, table, 1);
				ctx.saveReference(this, incomingArrows, 2);
				ctx.saveReference(this, outgoingArrows, 3);
				ctx.saveReference(this, relatedOneToMany, 4);
				ctx.saveReference(this, relatedManyToOne, 5);

				// new in save format 6
				ctx.saveAnchorPattern(anchorPattern);

				// new in save format 22
				writer.Write(header);
				writer.Write(expanded);
			}
Beispiel #41
0
			public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
			{
				writer.Write(InnerList.Count);
				for (int i = 0; i < InnerList.Count; ++i)
				{
					ctx.saveReference(this, (Cell)InnerList[i], i);
				}
			}
Beispiel #42
0
			public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
			{
				writer.Write(text);
				ctx.saveStringFormat(textFormat);
				ctx.saveReference(this, table, 1);

				// new in save format 6
				writer.Write((int)picturePos);
				ctx.saveImage(picture);

				// new in save format 14
				ctx.saveColor(textColor);
				ctx.saveReference(this, brush, 2);

				// new in save format 18
				writer.Write(toolTip);

				// new in save format 19
				writer.Write(hyperLink);

				// new in save format 22
				writer.Write(columnSpan);
				writer.Write(rowSpan);

				bool tagSerializable = false;
				if (tag != null)
					tagSerializable = tag.GetType().IsSerializable;
				writer.Write(tagSerializable);

				if (tagSerializable)
					ctx.saveTag(tag);
			}
Beispiel #43
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);
			ctx.saveReference(this, selectedItems, 1);
			ctx.saveReference(this, selectedBoxes, 2);
			ctx.saveReference(this, selectedTables, 3);
			ctx.saveReference(this, selectedArrows, 4);

			writer.Write((int)style);

			// new in file format 12
			ctx.saveReference(this, selectedHosts, 5);
		}
Beispiel #44
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);

			writer.Write((int)_hatchStyle);
			ctx.saveColor(_foreColor);
			ctx.saveColor(_backColor);
		}
Beispiel #45
0
		internal static void RestoreBrushes(IPersistObjFactory objFactory,
			BinaryReader reader, PersistContext ctx)
		{
			Brush brush;
			int count = reader.ReadInt32();

			for(int i = 0; i < count; i++)
			{
				brush = (Brush)ctx.loadObject();
				_brushes.Add(brush);
			}
		}
Beispiel #46
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);

			ctx.saveReference(this, cells, 1);
			ctx.saveReference(this, rowsList, 2);
			ctx.saveReference(this, colsList, 3);
			writer.Write(currScrollRow);
			writer.Write(scrollable);
			ctx.saveColor(fillColor);
			ctx.saveColor(frameColor);
			writer.Write(caption);
			ctx.saveColor(captionColor);
			ctx.saveStringFormat(captionFormat);

			writer.Write((double)captionHeight);
			writer.Write((int)cellBorders);
			writer.Write(rowsCount);
			writer.Write((double)rowHeight);
			writer.Write(columnsCount);
			writer.Write((double)columnWidth);
			ctx.saveColor(textColor);
			writer.Write((int)picturePos);

			ctx.saveImage(picture);

			ctx.saveObject(pen);
			ctx.saveReference(this, brush, 4);

			writer.Write((int)selStyle);

			// new in save format 6
			ctx.saveAnchorPattern(rowAnchorPattern);
			writer.Write((long)enabledHandles);
			writer.Write((int)Style);

			// new in file format 8
			writer.Write((int)linkStyle);

			// new in file format 9
			ctx.saveAnchorPattern(anchorPattern);

			ctx.saveReference(this, incomingArrows, 5);
			ctx.saveReference(this, outgoingArrows, 6);

			// new in save format 14
			writer.Write(Expanded);
			writer.Write(Expandable);
			writer.Write(useStyledText);

			// new in save format 19
			writer.Write((int)customDraw);
			writer.Write((int)cellCustomDraw);

			// new in save format 22
			writer.Write(offsetHeaderRows);

			// new in save format 25
			ctx.saveReference(this, captionBackBrush, 7);
		}
Beispiel #47
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();
		}
Beispiel #48
0
		public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			ctx.loadReference(this);

			if (ctx.FileVersion <= 21)
			{
				// not used any more
				float x = (float)reader.ReadDouble();
				float y = (float)reader.ReadDouble();
				int rx = reader.ReadInt32();
				int ry = reader.ReadInt32();
				relativePosition = new PointF(rx, ry);
			}

			incoming = reader.ReadBoolean();

			if (ctx.FileVersion > 21)
			{
				// in format revision 22 these become float:
				float rx = reader.ReadSingle();
				float ry = reader.ReadSingle();
				relativePosition = new PointF(rx, ry);
			}
		}
Beispiel #49
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();
			}
Beispiel #50
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();
		}
Beispiel #51
0
			public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
			{
				int count = reader.ReadInt32();
				InnerList.Capacity = count;
				for (int i = 0; i < count; ++i)
				{
					InnerList.Add(null);
					ctx.loadReference(this);
				}
			}
Beispiel #52
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);

			ctx.saveColor(_color);
		}
Beispiel #53
0
			public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
			{
				height = (float)reader.ReadDouble();
				ctx.loadReference(this);
				ctx.loadReference(this);
				ctx.loadReference(this);
				ctx.loadReference(this);
				ctx.loadReference(this);

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

					if (ctx.FileVersion > 21)
					{
						// new in save format 22
						header = reader.ReadBoolean();
						expanded = reader.ReadBoolean();
					}
				}
			}
Beispiel #54
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			_color = ctx.loadColor();
		}
Beispiel #55
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);

			_hatchStyle = (HatchStyle)reader.ReadInt32();
			_foreColor = ctx.loadColor();
			_backColor = ctx.loadColor();
		}
Beispiel #56
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);

			ctx.saveImage(_image);
			writer.Write((int)_wrapMode);
		}
Beispiel #57
0
		public override void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			base.loadFrom(reader, ctx);
			ctx.loadReference(this);
			ctx.loadReference(this);
			ctx.loadReference(this);
			ctx.loadReference(this);
			style = (SelectionStyle)reader.ReadInt32();

			if (ctx.FileVersion >= 12)
			{
				// new in file format 12
				ctx.loadReference(this);	// selectedHosts
			}
		}
Beispiel #58
0
		public override void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			base.saveTo(writer, ctx);

			if(_blend != null)
			{
				writer.Write((int)1);
				ctx.saveFloatArray(_blend.Factors);
				ctx.saveFloatArray(_blend.Positions);
			}
			else
			{
				writer.Write((int)0);
			}

			ctx.saveColor(_linearColors[0]);
			ctx.saveColor(_linearColors[1]);
			
			if(_interpolationColors != null)
			{
				writer.Write((int)1);
				ctx.saveColorArray(_interpolationColors.Colors);
				ctx.saveFloatArray(_interpolationColors.Positions);
			}
			else
			{
				writer.Write((int)0);
			}

			writer.Write((double)_angle);
		}
Beispiel #59
0
		public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
		{
			ctx.saveReference(this, arrow, 1);
			writer.Write(incoming);

			// in format revision 22 these become float:
			writer.Write(relativePosition.X);
			writer.Write(relativePosition.Y);
		}
Beispiel #60
0
		public virtual void loadFrom(BinaryReader reader, PersistContext ctx)
		{
			reader.ReadInt32();
			_refCount = 0;
		}