Ejemplo n.º 1
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);
		}
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
		/// <summary>
		/// Saves the flowchart document into a stream
		/// </summary>
		public void SaveToStream(Stream stream, bool clearDirty)
		{
			PersistContext ctx = new PersistContext(stream, this);
			ctx.writeHeader();

			// write properties
			DocInfoVer1 docInfo1 = new DocInfoVer1(this);
			DocInfoVer2 docInfo2 = new DocInfoVer2(this);
			ctx.saveObject(docInfo1);
			ctx.saveObject(docInfo2);

			ctx.saveStringFormat(textFormat);
			ctx.saveFont(Font);
			ctx.saveImage(BackgroundImage);

			// write collections
			ctx.saveObject(zOrder);
			ctx.saveObject(groups);
			ctx.saveObject(selection);

			ctx.saveReference(this, activeObject, 1);

			ctx.saveObject(shapeTemplate);

			Brush.StoreBrushes(new BinaryWriter(stream), ctx);
			ctx.saveObject(boxPen);
			ctx.saveObject(arrowPen);
			ctx.saveObject(tablePen);
			ctx.saveReference(this, boxBrush, 2);
			ctx.saveReference(this, arrowBrush, 3);
			ctx.saveReference(this, tableBrush, 4);

			ctx.writer.Write((int)boxSelStyle);
			ctx.writer.Write((int)tableSelStyle);

			// new in save format 5
			ctx.writer.Write(allowLinksRepeat);

			// new in save format 6
			ctx.writer.Write(PolyTextLayout);
			ctx.writer.Write(ShapeOrientation);

			// new in save format 8
			ctx.writer.Write(routeArrows);
			ctx.writer.Write(arrowsRetainForm);
			ctx.writer.Write((int)arrowTextStyle);
			ctx.writer.Write((int)tableLinkStyle);

			// new in save format 12
			ctx.writer.Write((int)measureUnit);
			ctx.saveRect(docExtentsMin);

			// new in save format 14
			ctx.writer.Write((int)expandBtnPos);

			ctx.writer.Write((int)Orientation.Auto);	// not used anymore
			ctx.writer.Write((int)Orientation.Auto); // not used anymore

			ctx.writer.Write(enableStyledText);
			ctx.writer.Write(usePolyTextLt);
			ctx.saveReference(this, brush, 5);

			// new in save format 17
			ctx.writer.Write(arrowText);
			ctx.writer.Write(boxText);
			ctx.writer.Write((int)arrowCrossings);
			ctx.writer.Write((int)gridStyle);
			ctx.writer.Write(crossRadius);

			// new in save format 20
			ctx.saveReference(this, exteriorBrush, 6);
			ctx.writer.Write(arrowsSnapToBorders);
			ctx.writer.Write((int)arrowSelStyle);

			// new in save format 21
			bool tagSerializable = false;
			if (Tag != null)
				tagSerializable = Tag.GetType().IsSerializable;
			ctx.writer.Write(tagSerializable);

			if (tagSerializable)
				ctx.saveTag(Tag);

			// new in save format 27
			ctx.writer.Write(roundedArrows);
			ctx.writer.Write(roundedArrowsRadius);

			// write the chart objects
			ctx.writeReferencedObjects();

			if (clearDirty)
				Dirty = false;
		}
Ejemplo n.º 6
0
			public virtual void saveTo(BinaryWriter writer, PersistContext ctx)
			{
				ctx.saveColor(backColor);
				writer.Write((int)behavior);
				writer.Write((int)arrowHead);
				writer.Write((int)arrowBase);
				writer.Write((int)arrowInterm);
				writer.Write((double)arrowHeadSize);
				writer.Write((double)arrowBaseSize);
				writer.Write((double)arrowIntermSize);
				writer.Write((int)shadowsStyle);
				ctx.saveColor(boxFillColor);
				ctx.saveColor(arrowFillColor);
				ctx.saveColor(boxFrameColor);
				ctx.saveColor(arrowColor);
				writer.Write(alignToGrid);
				writer.Write(showGrid);
				ctx.saveColor(gridColor);
				writer.Write((double)gridSize);
				writer.Write((int)boxStyle);
				ctx.saveColor(shadowColor);

				writer.Write((int)imagePos);
				ctx.saveColor(textColor);
				ctx.saveColor(activeMnpColor);
				ctx.saveColor(selMnpColor);
				ctx.saveColor(disabledMnpColor);
				writer.Write((int)arrowStyle);
				writer.Write(arrowSegments);
				writer.Write((double)scrollX);
				writer.Write((double)scrollY);
				writer.Write(zoomFactor);
				writer.Write((int)penDashStyle);
				writer.Write((double)penWidth);
				writer.Write(defPolyShape.GetLength(0));
				writer.Write(defPolyShape);
				ctx.saveRect(docExtents);
				writer.Write((double)shadowOffsetX);
				writer.Write((double)shadowOffsetY);
				ctx.saveColor(tableFillColor);
				ctx.saveColor(tableFrameColor);
				writer.Write(tableRowsCount);
				writer.Write(tableColumnsCount);
				writer.Write((double)tableColWidth);
				writer.Write((double)tableRowHeight);
				writer.Write((double)tableCaptionHeight);
				writer.Write(tableCaption);
				writer.Write((int)arrowCascadeOrientation);
				writer.Write((int)tableCellBorders);
				writer.Write((int)boxIncmAnchor);
				writer.Write((int)boxOutgAnchor);
				writer.Write(boxesExpandable);
				writer.Write(tablesScrollable);
			}
Ejemplo n.º 7
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);
		}
Ejemplo n.º 8
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);
		}