internal SLConditionalFormatAutoMinMaxValues TranslateToAutoMinMaxValues(ConditionalFormatValueObjectValues Type) { SLConditionalFormatAutoMinMaxValues result = SLConditionalFormatAutoMinMaxValues.Percentile; switch (Type) { case ConditionalFormatValueObjectValues.Formula: result = SLConditionalFormatAutoMinMaxValues.Formula; break; case ConditionalFormatValueObjectValues.Max: result = SLConditionalFormatAutoMinMaxValues.Value; break; case ConditionalFormatValueObjectValues.Min: result = SLConditionalFormatAutoMinMaxValues.Value; break; case ConditionalFormatValueObjectValues.Number: result = SLConditionalFormatAutoMinMaxValues.Number; break; case ConditionalFormatValueObjectValues.Percent: result = SLConditionalFormatAutoMinMaxValues.Percent; break; case ConditionalFormatValueObjectValues.Percentile: result = SLConditionalFormatAutoMinMaxValues.Percentile; break; } return(result); }
private void InitialiseDataBarOptions(SLConditionalFormatDataBarValues DataBar, bool Is2010Default) { this.Is2010 = Is2010Default; this.FillColor = new SLColor(new List <System.Drawing.Color>(), new List <System.Drawing.Color>()); this.BorderColor = new SLColor(new List <System.Drawing.Color>(), new List <System.Drawing.Color>()); this.NegativeFillColor = new SLColor(new List <System.Drawing.Color>(), new List <System.Drawing.Color>()); this.NegativeBorderColor = new SLColor(new List <System.Drawing.Color>(), new List <System.Drawing.Color>()); this.AxisColor = new SLColor(new List <System.Drawing.Color>(), new List <System.Drawing.Color>()); switch (DataBar) { case SLConditionalFormatDataBarValues.Blue: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0x8E, 0xC6); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0x8E, 0xC6); break; case SLConditionalFormatDataBarValues.Green: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0xC3, 0x84); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0xC3, 0x84); break; case SLConditionalFormatDataBarValues.Red: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x55, 0x5A); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x55, 0x5A); break; case SLConditionalFormatDataBarValues.Orange: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0xB6, 0x28); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0xB6, 0x28); break; case SLConditionalFormatDataBarValues.LightBlue: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x8A, 0xEF); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x8A, 0xEF); break; case SLConditionalFormatDataBarValues.Purple: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xD6, 0x00, 0x7B); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xD6, 0x00, 0x7B); break; } this.NegativeFillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x00, 0x00); this.NegativeBorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x00, 0x00); this.AxisColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x00, 0x00); if (Is2010Default) { this.vMinimumType = SLConditionalFormatAutoMinMaxValues.Automatic; this.MinimumValue = string.Empty; this.vMaximumType = SLConditionalFormatAutoMinMaxValues.Automatic; this.MaximumValue = string.Empty; this.MinLength = 0; this.MaxLength = 100; } else { this.vMinimumType = SLConditionalFormatAutoMinMaxValues.Value; this.MinimumValue = string.Empty; this.vMaximumType = SLConditionalFormatAutoMinMaxValues.Value; this.MaximumValue = string.Empty; this.MinLength = 10; this.MaxLength = 90; } this.ShowBarOnly = false; this.bBorder = false; this.bGradient = false; this.vDirection = X14.DataBarDirectionValues.Context; this.bNegativeBarColorSameAsPositive = false; this.bNegativeBarBorderColorSameAsPositive = true; this.vAxisPosition = X14.DataBarAxisPositionValues.Automatic; }
private void InitialiseDataBarOptions(SLConditionalFormatDataBarValues DataBar, bool Is2010Default) { this.Is2010 = Is2010Default; this.FillColor = new SLColor(new List<System.Drawing.Color>(), new List<System.Drawing.Color>()); this.BorderColor = new SLColor(new List<System.Drawing.Color>(), new List<System.Drawing.Color>()); this.NegativeFillColor = new SLColor(new List<System.Drawing.Color>(), new List<System.Drawing.Color>()); this.NegativeBorderColor = new SLColor(new List<System.Drawing.Color>(), new List<System.Drawing.Color>()); this.AxisColor = new SLColor(new List<System.Drawing.Color>(), new List<System.Drawing.Color>()); switch (DataBar) { case SLConditionalFormatDataBarValues.Blue: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0x8E, 0xC6); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0x8E, 0xC6); break; case SLConditionalFormatDataBarValues.Green: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0xC3, 0x84); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x63, 0xC3, 0x84); break; case SLConditionalFormatDataBarValues.Red: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x55, 0x5A); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x55, 0x5A); break; case SLConditionalFormatDataBarValues.Orange: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0xB6, 0x28); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0xB6, 0x28); break; case SLConditionalFormatDataBarValues.LightBlue: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x8A, 0xEF); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x8A, 0xEF); break; case SLConditionalFormatDataBarValues.Purple: this.FillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xD6, 0x00, 0x7B); this.BorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xD6, 0x00, 0x7B); break; } this.NegativeFillColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x00, 0x00); this.NegativeBorderColor.Color = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0x00, 0x00); this.AxisColor.Color = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x00, 0x00); if (Is2010Default) { this.vMinimumType = SLConditionalFormatAutoMinMaxValues.Automatic; this.MinimumValue = string.Empty; this.vMaximumType = SLConditionalFormatAutoMinMaxValues.Automatic; this.MaximumValue = string.Empty; this.MinLength = 0; this.MaxLength = 100; } else { this.vMinimumType = SLConditionalFormatAutoMinMaxValues.Value; this.MinimumValue = string.Empty; this.vMaximumType = SLConditionalFormatAutoMinMaxValues.Value; this.MaximumValue = string.Empty; this.MinLength = 10; this.MaxLength = 90; } this.ShowBarOnly = false; this.bBorder = false; this.bGradient = false; this.vDirection = X14.DataBarDirectionValues.Context; this.bNegativeBarColorSameAsPositive = false; this.bNegativeBarBorderColorSameAsPositive = true; this.vAxisPosition = X14.DataBarAxisPositionValues.Automatic; }