/// <summary>
        ///     Get settings from the Settings XML
        /// </summary>
        private void LoadSettings()
        {
            // Determine whether we need to migrate the settings
            if (Settings.Default.UpgradeRequired)
            {
                Settings.Default.Upgrade();
                Settings.Default.UpgradeRequired = false;
            }

            // Load Orb Style
            _orbStyle      = Settings.Default.OfficeStyle;
            _orbStyleIndex = Settings.Default.OfficeStyleIndex - 1;

            ribbonMain.OrbStyle = _orbStyle;
            //ribbonButtonStyle.DropDownItems[_orbStyleIndex].Checked = false;

            _orbTheme      = Settings.Default.ThemeColour;
            _orbThemeIndex = Settings.Default.ThemeIndex;

            Theme.ThemeColor = _orbTheme;
            ribbonMain.Refresh();
            ribbonButtonTheme.DropDownItems[_orbThemeIndex].Checked = true;

            _settings = Settings.Default;
        }
        private void ribbonButtonTheme_DropDownItemClicked(object sender, RibbonItemEventArgs e)
        {
            _orbThemeName = e.Item.Text;
            switch (_orbThemeName)
            {
            case "Normal":
            {
                _orbTheme      = RibbonTheme.Normal;
                _orbThemeIndex = 0;
                break;
            }

            case "Blue":
            {
                _orbTheme      = RibbonTheme.Blue;
                _orbThemeIndex = 1;
                break;
            }

            case "Black":
            {
                _orbTheme      = RibbonTheme.Black;
                _orbThemeIndex = 2;
                break;
            }

            case "Green":
            {
                _orbTheme      = RibbonTheme.Green;
                _orbThemeIndex = 3;
                break;
            }

            case "Purple":
            {
                _orbTheme      = RibbonTheme.Purple;
                _orbThemeIndex = 4;
                break;
            }

            case "JellyBelly":
            {
                _orbTheme      = RibbonTheme.JellyBelly;
                _orbThemeIndex = 5;
                break;
            }

            default:
            {
                _orbTheme      = RibbonTheme.Halloween;
                _orbThemeIndex = 6;
                break;
            }
            }
            Theme.ThemeColor = _orbTheme;
            ribbonMain.Refresh();
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="theme"></param>
        private void ChangeTheme(RibbonTheme theme = RibbonTheme.Normal)
        {
            switch (theme)
            {
            case RibbonTheme.Black:
                Theme.ColorTable = new RibbonProfesionalRendererColorTableBlack();
                break;

            case RibbonTheme.Green:
                Theme.ColorTable = new RibbonProfesionalRendererColorTableGreen();
                break;

            case RibbonTheme.Halloween:
                Theme.ColorTable = new RibbonProfesionalRendererColorTableHalloween();
                break;

            case RibbonTheme.JellyBelly:
                Theme.ColorTable = new RibbonProfesionalRendererColorTableJellyBelly();
                break;

            case RibbonTheme.Purple:
                Theme.ColorTable = new RibbonProfesionalRendererColorTablePurple();
                break;

            case RibbonTheme.Blue:
                Theme.ColorTable = new RibbonProfesionalRendererColorTableBlue();
                break;

            case RibbonTheme.Normal:
                Theme.ColorTable = new RibbonProfesionalRendererColorTable();
                break;

            default:
                Theme.ColorTable = new RibbonProfesionalRendererColorTable();
                break;
            }

            if (ribbonMain.OrbStyle == RibbonOrbStyle.Office_2007)
            {
                status.BackColor = Theme.ColorTable.GetColor(RibbonColorPart.RibbonBackground);
                status.ForeColor = Theme.ColorTable.GetColor(RibbonColorPart.Text);
            }
            else if (ribbonMain.OrbStyle == RibbonOrbStyle.Office_2010)
            {
                status.BackColor = Theme.ColorTable.GetColor(RibbonColorPart.RibbonBackground);
                status.ForeColor = Theme.ColorTable.GetColor(RibbonColorPart.Text);
            }
            else if (ribbonMain.OrbStyle == RibbonOrbStyle.Office_2013)
            {
                status.BackColor = Theme.ColorTable.GetColor(RibbonColorPart.RibbonBackground_2013);
                status.ForeColor = Theme.ColorTable.GetColor(RibbonColorPart.RibbonItemText_2013);
            }
            Theme.ThemeColor = theme;
        }
		private void EnsureCustomThemeCreated(RibbonOrbStyle orbStyle, RibbonTheme theme)
		{
			if (_theme == null && Theme.StandardThemeIsGlobal == false && UseAlwaysStandardTheme == false)
			{
				_theme = new Theme(orbStyle, theme);
			}
		}
Exemplo n.º 5
0
 public Theme(RibbonOrbStyle style, RibbonTheme theme)
     : this(style)
 {
     RibbonTheme = theme;
 }
 public Theme(RibbonOrbStyle style, RibbonTheme theme)
    : this(style)
 {
    RibbonTheme = theme;
 }