protected override void NotifyFormatChanged(BaseFormattingObject oldFormat) { base.NotifyFormatChanged(oldFormat); BaseFormattingObject formattingObject = this.FormattingObject; if (formattingObject != null && formattingObject.ApplyToRow) { if (formattingObject.IsValueSet("RowBackColor")) { this.DrawFill = true; this.GradientStyle = GradientStyles.Solid; this.BackColor = formattingObject.RowBackColor; } else { int num1 = (int)this.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); int num2 = (int)this.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local); int num3 = (int)this.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local); } if (formattingObject.IsValueSet("RowFont")) { this.Font = formattingObject.RowFont; } else { int num = (int)this.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local); } } else { if (oldFormat == null) { return; } int num1 = (int)this.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); int num2 = (int)this.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local); int num3 = (int)this.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local); int num4 = (int)this.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local); this.ResetAlternatingRowColor(); } }
protected virtual void SetFormattingObjectProperties( BaseFormattingObject source, BaseFormattingObject target) { if (source == null || target == null) { return; } target.Enabled = source.Enabled; target.ApplyToRow = source.ApplyToRow; target.ApplyOnSelectedRows = source.ApplyOnSelectedRows; if (source.IsValueSet("CellBackColor")) { target.cellBackColor = source.CellBackColor; } if (source.IsValueSet("CellForeColor")) { target.cellForeColor = source.CellForeColor; } if (source.IsValueSet("TextAlignment")) { target.textAlignment = source.TextAlignment; } if (source.IsValueSet("RowBackColor")) { target.rowBackColor = source.RowBackColor; } if (source.IsValueSet("RowForeColor")) { target.rowForeColor = source.RowForeColor; } if (source.IsValueSet("RowTextAlignment")) { target.rowTextAlignment = source.RowTextAlignment; } if (source.IsValueSet("CellFont")) { target.cellFont = source.CellFont; } if (!source.IsValueSet("RowFont")) { return; } target.rowFont = source.RowFont; }
protected virtual void UnsetFormattingObjectProperties( BaseFormattingObject source, BaseFormattingObject target) { if (source == null || target == null) { return; } if (source.IsValueSet("CellBackColor")) { target.cellBackColor = Color.Empty; } if (source.IsValueSet("CellForeColor")) { target.cellForeColor = Color.Empty; } if (source.IsValueSet("TextAlignment")) { target.textAlignment = ContentAlignment.MiddleLeft; } if (source.IsValueSet("RowBackColor")) { target.rowBackColor = Color.Empty; } if (source.IsValueSet("RowForeColor")) { target.rowForeColor = Color.Empty; } if (source.IsValueSet("RowTextAlignment")) { target.rowTextAlignment = ContentAlignment.MiddleLeft; } if (source.IsValueSet("CellFont")) { target.CellFont = (Font)null; } if (!source.IsValueSet("RowFont")) { return; } target.rowFont = (Font)null; }
protected override void NotifyFormatChanged(BaseFormattingObject oldFormat) { base.NotifyFormatChanged(oldFormat); BaseFormattingObject formattingObject = this.FormattingObject; if (formattingObject != null) { if (formattingObject.IsValueSet("CellBackColor")) { this.DrawFill = true; this.GradientStyle = GradientStyles.Solid; this.BackColor = formattingObject.CellBackColor; } else { int num1 = (int)this.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); int num2 = (int)this.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local); int num3 = (int)this.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local); } if (formattingObject.IsValueSet("CellForeColor")) { this.ForeColor = formattingObject.CellForeColor; } else if (this.parentFormattingObject == null || !this.parentFormattingObject.IsValueSet("RowForeColor")) { int num4 = (int)this.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local); } if (formattingObject.IsValueSet("TextAlignment")) { this.TextAlignment = formattingObject.TextAlignment; } else if (this.parentFormattingObject == null || !this.parentFormattingObject.IsValueSet("RowTextAlignment")) { int num5 = (int)this.ResetValue(LightVisualElement.TextAlignmentProperty, ValueResetFlags.Local); } if (formattingObject.IsValueSet("CellFont")) { this.Font = formattingObject.CellFont; } else { if (this.parentFormattingObject != null && this.parentFormattingObject.IsValueSet("RowFont")) { return; } int num1 = (int)this.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local); } } else { if (oldFormat == null) { return; } int num1 = (int)this.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); int num2 = (int)this.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local); int num3 = (int)this.ResetValue(VisualElement.BackColorProperty, ValueResetFlags.Local); int num4 = (int)this.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local); int num5 = (int)this.ResetValue(LightVisualElement.TextAlignmentProperty, ValueResetFlags.Local); int num6 = (int)this.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local); } }