public override Office2007ButtonItemColorTable GetColorTable(ButtonItem button, eButtonContainer buttonCont) { Office2007ColorTable colorTable = this.ColorTable; Office2007ButtonItemColorTable buttonColorTable = null; if (button.CustomColorName != "") buttonColorTable = colorTable.ApplicationButtonColors[button.CustomColorName]; if (buttonColorTable == null) buttonColorTable = colorTable.ApplicationButtonColors[button.GetColorTableName()]; if (buttonColorTable == null && colorTable.ApplicationButtonColors.Count > 0) buttonColorTable = colorTable.ApplicationButtonColors[0]; if (buttonColorTable == null) // Return fall-back color table buttonColorTable = Office2010ColorTable.GetFallBackAppButtonColorTable(); return buttonColorTable; }
public override Office2007ButtonItemColorTable GetColorTable(ButtonItem button, eButtonContainer buttonCont) { Office2007ColorTable colorTable = this.ColorTable; Office2007ButtonItemColorTable buttonColorTable = null; if (button.CustomColorName != "") buttonColorTable = colorTable.ApplicationButtonColors[button.CustomColorName]; if (buttonColorTable == null) buttonColorTable = colorTable.ApplicationButtonColors[button.GetColorTableName()]; if (buttonColorTable == null && colorTable.ApplicationButtonColors.Count > 0) buttonColorTable = colorTable.ApplicationButtonColors[0]; if (buttonColorTable == null) // Return fall back static table buttonColorTable = DevComponents.DotNetBar.Metro.ColorTables.MetroOfficeColorTableInitializer.GetAppFallBackColorTable(); return buttonColorTable; }