/// <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; }
/// <override></override> public virtual void HideCaptionText(int index) { if (index != 0) { throw new IndexOutOfRangeException(); } if (caption == null) { caption = new Caption(); } caption.IsVisible = false; Invalidate(); }
/// <override></override> public override void CopyFrom(Shape source) { base.CopyFrom(source); if (source is ICaptionedShape) { ICaptionedShape src = (ICaptionedShape)source; // Copy first caption ICharacterStyle charStyle = src.GetCaptionCharacterStyle(0); privateCharacterStyle = (Template != null && charStyle == ((ICaptionedShape)Template.Shape).GetCaptionCharacterStyle(0)) ? null : charStyle; IParagraphStyle paragraphStyle = src.GetCaptionParagraphStyle(0); privateParagraphStyle = (Template != null && paragraphStyle == ((ICaptionedShape)Template.Shape).GetCaptionParagraphStyle(0)) ? null : paragraphStyle; string txt = src.GetCaptionText(0); if (!string.IsNullOrEmpty(txt)) { if (caption == null) { caption = new Caption(txt); } else { caption.Text = txt; } } else { caption = null; } // Copy remaining captions int cnt = Math.Min(CaptionCount, src.CaptionCount); for (int i = 1; i < cnt; ++i) { SetCaptionCharacterStyle(i, src.GetCaptionCharacterStyle(i)); SetCaptionParagraphStyle(i, GetCaptionParagraphStyle(i)); SetCaptionText(i, GetCaptionText(i)); } } }
/// <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; }
/// <override></override> public override void CopyFrom(Shape source) { base.CopyFrom(source); if (source is ICaptionedShape) { ICaptionedShape src = (ICaptionedShape) source; // Copy first caption ICharacterStyle charStyle = src.GetCaptionCharacterStyle(0); privateCharacterStyle = (Template != null && charStyle == ((ICaptionedShape) Template.Shape).GetCaptionCharacterStyle(0)) ? null : charStyle; IParagraphStyle paragraphStyle = src.GetCaptionParagraphStyle(0); privateParagraphStyle = (Template != null && paragraphStyle == ((ICaptionedShape) Template.Shape).GetCaptionParagraphStyle(0)) ? null : paragraphStyle; string txt = src.GetCaptionText(0); if (!string.IsNullOrEmpty(txt)) { if (caption == null) caption = new Caption(txt); else caption.Text = txt; } else caption = null; // Copy remaining captions int cnt = Math.Min(CaptionCount, src.CaptionCount); for (int i = 1; i < cnt; ++i) { SetCaptionCharacterStyle(i, src.GetCaptionCharacterStyle(i)); SetCaptionParagraphStyle(i, GetCaptionParagraphStyle(i)); SetCaptionText(i, GetCaptionText(i)); } } }
/// <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(); }