public void Load(RSFileReader br) { byte b; while ((b = br.ReadByte()) != 0) { switch (b) { case 10: Name = MNFontName.IntToString(br.ReadInt32()); break; case 11: Size = br.ReadFloat(); break; case 13: Italic = br.ReadBool(); break; case 14: Bold = br.ReadBool(); break; case 15: Underline = br.ReadBool(); break; case 16: Name = br.ReadString(); break; } } }
public override void Load(RSFileReader br) { byte tag; while ((tag = br.ReadByte()) != 0) { switch (tag) { case 11: Name = br.ReadString(); break; case 12: Font.Name = MNFontName.IntToString(br.ReadInt32()); Font.Size = br.ReadFloat(); Font.Style = (System.Drawing.FontStyle)br.ReadInt32(); break; case 13: NormalState.BackColor = br.ReadColor(); break; case 14: NormalState.ForeColor = br.ReadColor(); break; case 15: NormalState.BorderStyle = (SMBorderStyle)br.ReadInt32(); break; case 16: NormalState.BorderWidth = br.ReadInt32() / 100f; break; case 17: NormalState.BorderColor = br.ReadColor(); break; case 19: HighlightState.BackColor = br.ReadColor(); break; case 20: HighlightState.ForeColor = br.ReadColor(); break; case 21: HighlightState.BorderColor = br.ReadColor(); break; case 22: HighlightState.BorderStyle = (SMBorderStyle)br.ReadInt32(); break; case 23: HighlightState.BorderWidth = br.ReadInt32() / 100f; break; case 24: ContentPadding.Left = br.ReadInt32(); ContentPadding.Top = br.ReadInt32(); ContentPadding.Right = br.ReadInt32(); ContentPadding.Bottom = br.ReadInt32(); break; case 28: NormalState.CornerRadius = br.ReadInt32(); break; case 29: Paragraph.SizeToFit = br.ReadBool(); break; case 30: Paragraph.Align = (SMHorizontalAlign)br.ReadInt32(); break; case 31: Paragraph.VertAlign = (SMVerticalAlign)br.ReadInt32(); break; case 32: Paragraph.LineSpacing = br.ReadFloat(); break; case 33: HighlightState.CornerRadius = br.ReadInt32(); NormalState.CornerRadius = HighlightState.CornerRadius; break; case 35: ContentPadding.Load(br); break; case 36: NormalState.Load(br); break; case 37: HighlightState.Load(br); break; case 38: Paragraph.Load(br); break; case 39: Font.Load(br); break; default: break; } } }
public void Load(RSFileReader br) { if (!br.ReadHeader(p_fileHeader)) { throw new Exception("Invalid header for book file"); } Version = 1; byte b; while ((b = br.ReadByte()) != 0) { switch (b) { case 5: sizeOfInt = br.ReadByte(); break; case 10: BookTitle = br.ReadString(); break; case 11: BookCode = br.ReadString(); break; case 12: BookAuthor = br.ReadString(); break; case 13: BookPublisher = br.ReadString(); break; case 14: BookCopyright = br.ReadString(); break; case 15: BookCollection = br.ReadString(); break; case 16: BookColor = br.ReadColor(); break; case 17: StartPage = br.ReadString(); break; case 18: BookImageRef = new MNReferencedImage(); BookImageRef.Load(br); break; case 19: Evaluation = (MNEvaluationType)br.ReadInt32(); break; case 20: LastTimeSave = br.ReadString(); break; case 21: WorkTime.SetTotalWorkTime(br.ReadInt64()); break; case 22: BookPriority = br.ReadInt32(); break; case 23: HomePage = br.ReadString(); break; case 24: Version = br.ReadInt32(); break; case 25: DefaultFontSize = br.ReadInt32(); break; case 26: DefaultFontName = MNFontName.IntToString(br.ReadInt32()); break; case 27: DefaultFontName = br.ReadString(); break; } } }