internal StringItem ToStringItem() { StringItem si = new StringItem(); si.Val = this.Val; if (this.Unused != null) si.Unused = this.Unused.Value; if (this.Calculated != null) si.Calculated = this.Calculated.Value; if (this.Caption != null && this.Caption.Length > 0) si.Caption = this.Caption; if (this.PropertyCount != null) si.PropertyCount = this.PropertyCount.Value; if (this.FormatIndex != null) si.FormatIndex = this.FormatIndex.Value; if (this.BackgroundColor != null && this.BackgroundColor.Length > 0) si.BackgroundColor = new HexBinaryValue(this.BackgroundColor); if (this.ForegroundColor != null && this.ForegroundColor.Length > 0) si.ForegroundColor = new HexBinaryValue(this.ForegroundColor); if (this.Italic != false) si.Italic = this.Italic; if (this.Underline != false) si.Underline = this.Underline; if (this.Strikethrough != false) si.Strikethrough = this.Strikethrough; if (this.Bold != false) si.Bold = this.Bold; foreach (SLTuplesType tt in this.Tuples) { si.Append(tt.ToTuples()); } foreach (int i in this.MemberPropertyIndexes) { if (i != 0) si.Append(new MemberPropertyIndex() { Val = i }); else si.Append(new MemberPropertyIndex()); } return si; }
internal StringItem ToStringItem() { var si = new StringItem(); si.Val = Val; if (Unused != null) { si.Unused = Unused.Value; } if (Calculated != null) { si.Calculated = Calculated.Value; } if ((Caption != null) && (Caption.Length > 0)) { si.Caption = Caption; } if (PropertyCount != null) { si.PropertyCount = PropertyCount.Value; } if (FormatIndex != null) { si.FormatIndex = FormatIndex.Value; } if ((BackgroundColor != null) && (BackgroundColor.Length > 0)) { si.BackgroundColor = new HexBinaryValue(BackgroundColor); } if ((ForegroundColor != null) && (ForegroundColor.Length > 0)) { si.ForegroundColor = new HexBinaryValue(ForegroundColor); } if (Italic) { si.Italic = Italic; } if (Underline) { si.Underline = Underline; } if (Strikethrough) { si.Strikethrough = Strikethrough; } if (Bold) { si.Bold = Bold; } foreach (var tt in Tuples) { si.Append(tt.ToTuples()); } foreach (var i in MemberPropertyIndexes) { if (i != 0) { si.Append(new MemberPropertyIndex { Val = i }); } else { si.Append(new MemberPropertyIndex()); } } return(si); }