private IStyle ReadStyle(IRepositoryReader reader)
        {
            IStyle          result;
            MappedStyleType mappedStyleType = (MappedStyleType)reader.ReadInt32();

            switch (mappedStyleType)
            {
            case MappedStyleType.CapStyle:
                result = reader.ReadCapStyle(); break;

            case MappedStyleType.CharacterStyle:
                result = reader.ReadCharacterStyle(); break;

            case MappedStyleType.ColorStyle:
                result = reader.ReadColorStyle(); break;

            case MappedStyleType.FillStyle:
                result = reader.ReadFillStyle(); break;

            case MappedStyleType.LineStyle:
                result = reader.ReadLineStyle(); break;

            case MappedStyleType.ParagraphStyle:
                result = reader.ReadParagraphStyle(); break;

            case MappedStyleType.Unassigned:
                // Skip value - it does not matter what we read here
                reader.ReadColorStyle();                                // ToDo: Find a better solution for skipping an object id
                result = null;
                break;

            default: throw new NShapeUnsupportedValueException(mappedStyleType);
            }
            return(result);
        }
Example #2
0
		/// <override></override>
		protected override void LoadFieldsCore(IRepositoryReader reader, int version) {
			base.LoadFieldsCore(reader, version);

			// ILabel members
			this.privateCharacterStyle = reader.ReadCharacterStyle();
			this.privateParagraphStyle = reader.ReadParagraphStyle();

			string txt = reader.ReadString();
			if (caption == null) caption = new Caption(txt);
			else caption.Text = txt;
		}
 private IStyle ReadStyle(IRepositoryReader reader)
 {
     IStyle result;
     MappedStyleType mappedStyleType = (MappedStyleType)reader.ReadInt32();
     switch (mappedStyleType) {
         case MappedStyleType.CapStyle:
             result = reader.ReadCapStyle(); break;
         case MappedStyleType.CharacterStyle:
             result = reader.ReadCharacterStyle(); break;
         case MappedStyleType.ColorStyle:
             result = reader.ReadColorStyle(); break;
         case MappedStyleType.FillStyle:
             result = reader.ReadFillStyle(); break;
         case MappedStyleType.LineStyle:
             result = reader.ReadLineStyle(); break;
         case MappedStyleType.ParagraphStyle:
             result = reader.ReadParagraphStyle(); break;
         case MappedStyleType.Unassigned:
             // Skip value - it does not matter what we read here
             reader.ReadColorStyle();	// ToDo: Find a better solution for skipping an object id
             result = null;
             break;
         default: throw new NShapeUnsupportedValueException(mappedStyleType);
     }
     return result;
 }
 /// <override></override>
 protected override void LoadFieldsCore(IRepositoryReader reader, int version)
 {
     base.LoadFieldsCore(reader, version);
     ColumnBackgroundColorStyle = reader.ReadColorStyle();
     ColumnCharacterStyle = reader.ReadCharacterStyle();
     ColumnParagraphStyle = reader.ReadParagraphStyle();
     int colCnt = reader.ReadInt32();
     if (columnNames == null) columnNames = new string[colCnt];
     else Array.Resize(ref columnNames, colCnt);
 }
Example #5
0
		/// <override></override>
		protected override void LoadFieldsCore(IRepositoryReader reader, int version)
		{
			base.LoadFieldsCore(reader, 1);

			// ILabel members
			this.privateCharacterStyle = reader.ReadCharacterStyle();
			this.privateParagraphStyle = reader.ReadParagraphStyle();

			string txt = reader.ReadString();
			if (caption == null) caption = new Caption(txt);
			else caption.Text = txt;
		}
Example #6
0
		/// <override></override>
		protected override void LoadFieldsCore(IRepositoryReader reader, int version)
		{
			base.LoadFieldsCore(reader, version);
			fillStyle = reader.ReadFillStyle();
			charStyle = reader.ReadCharacterStyle();
			paragraphStyle = reader.ReadParagraphStyle();

			string txt = reader.ReadString();
			if (caption == null) caption = new Caption(txt);
			else caption.Text = txt;
			w = reader.ReadInt32();
			h = reader.ReadInt32();
		}