示例#1
0
        internal ErrorItem ToErrorItem()
        {
            ErrorItem ei = new ErrorItem();
            ei.Val = this.Val;
            if (this.Unused != null) ei.Unused = this.Unused.Value;
            if (this.Calculated != null) ei.Calculated = this.Calculated.Value;
            if (this.Caption != null && this.Caption.Length > 0) ei.Caption = this.Caption;
            if (this.PropertyCount != null) ei.PropertyCount = this.PropertyCount.Value;
            if (this.FormatIndex != null) ei.FormatIndex = this.FormatIndex.Value;
            if (this.BackgroundColor != null && this.BackgroundColor.Length > 0) ei.BackgroundColor = new HexBinaryValue(this.BackgroundColor);
            if (this.ForegroundColor != null && this.ForegroundColor.Length > 0) ei.ForegroundColor = new HexBinaryValue(this.ForegroundColor);
            if (this.Italic != false) ei.Italic = this.Italic;
            if (this.Underline != false) ei.Underline = this.Underline;
            if (this.Strikethrough != false) ei.Strikethrough = this.Strikethrough;
            if (this.Bold != false) ei.Bold = this.Bold;

            foreach (SLTuplesType tt in this.Tuples)
            {
                ei.Append(tt.ToTuples());
            }

            foreach (int i in this.MemberPropertyIndexes)
            {
                if (i != 0) ei.Append(new MemberPropertyIndex() { Val = i });
                else ei.Append(new MemberPropertyIndex());
            }

            return ei;
        }
        internal ErrorItem ToErrorItem()
        {
            ErrorItem ei = new ErrorItem();

            ei.Val = this.Val;
            if (this.Unused != null)
            {
                ei.Unused = this.Unused.Value;
            }
            if (this.Calculated != null)
            {
                ei.Calculated = this.Calculated.Value;
            }
            if (this.Caption != null && this.Caption.Length > 0)
            {
                ei.Caption = this.Caption;
            }
            if (this.PropertyCount != null)
            {
                ei.PropertyCount = this.PropertyCount.Value;
            }
            if (this.FormatIndex != null)
            {
                ei.FormatIndex = this.FormatIndex.Value;
            }
            if (this.BackgroundColor != null && this.BackgroundColor.Length > 0)
            {
                ei.BackgroundColor = new HexBinaryValue(this.BackgroundColor);
            }
            if (this.ForegroundColor != null && this.ForegroundColor.Length > 0)
            {
                ei.ForegroundColor = new HexBinaryValue(this.ForegroundColor);
            }
            if (this.Italic != false)
            {
                ei.Italic = this.Italic;
            }
            if (this.Underline != false)
            {
                ei.Underline = this.Underline;
            }
            if (this.Strikethrough != false)
            {
                ei.Strikethrough = this.Strikethrough;
            }
            if (this.Bold != false)
            {
                ei.Bold = this.Bold;
            }

            foreach (SLTuplesType tt in this.Tuples)
            {
                ei.Append(tt.ToTuples());
            }

            foreach (int i in this.MemberPropertyIndexes)
            {
                if (i != 0)
                {
                    ei.Append(new MemberPropertyIndex()
                    {
                        Val = i
                    });
                }
                else
                {
                    ei.Append(new MemberPropertyIndex());
                }
            }

            return(ei);
        }
        internal ErrorItem ToErrorItem()
        {
            var ei = new ErrorItem();

            ei.Val = Val;
            if (Unused != null)
            {
                ei.Unused = Unused.Value;
            }
            if (Calculated != null)
            {
                ei.Calculated = Calculated.Value;
            }
            if ((Caption != null) && (Caption.Length > 0))
            {
                ei.Caption = Caption;
            }
            if (PropertyCount != null)
            {
                ei.PropertyCount = PropertyCount.Value;
            }
            if (FormatIndex != null)
            {
                ei.FormatIndex = FormatIndex.Value;
            }
            if ((BackgroundColor != null) && (BackgroundColor.Length > 0))
            {
                ei.BackgroundColor = new HexBinaryValue(BackgroundColor);
            }
            if ((ForegroundColor != null) && (ForegroundColor.Length > 0))
            {
                ei.ForegroundColor = new HexBinaryValue(ForegroundColor);
            }
            if (Italic)
            {
                ei.Italic = Italic;
            }
            if (Underline)
            {
                ei.Underline = Underline;
            }
            if (Strikethrough)
            {
                ei.Strikethrough = Strikethrough;
            }
            if (Bold)
            {
                ei.Bold = Bold;
            }

            foreach (var tt in Tuples)
            {
                ei.Append(tt.ToTuples());
            }

            foreach (var i in MemberPropertyIndexes)
            {
                if (i != 0)
                {
                    ei.Append(new MemberPropertyIndex {
                        Val = i
                    });
                }
                else
                {
                    ei.Append(new MemberPropertyIndex());
                }
            }

            return(ei);
        }