Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }