/// <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 ribbonButtonStyle_DropDownItemClicked(object sender, RibbonItemEventArgs e) { _orbStyleName = e.Item.Text; switch (_orbStyleName) { case "Office 2007": { _orbStyle = RibbonOrbStyle.Office_2007; _orbStyleIndex = 0; break; } case "Office 2010": { _orbStyle = RibbonOrbStyle.Office_2010; _orbStyleIndex = 1; break; } default: { _orbStyle = RibbonOrbStyle.Office_2013; _orbStyleIndex = 2; break; } } ribbonMain.OrbStyle = _orbStyle; }
/// <summary> /// /// </summary> /// <param name="style"></param> private void ChangeStyle(RibbonOrbStyle style = RibbonOrbStyle.Office_2010) { ribbonMain.OrbStyle = style; 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); } }
private void EnsureCustomThemeCreated(RibbonOrbStyle orbStyle, RibbonTheme theme) { if (_theme == null && Theme.StandardThemeIsGlobal == false && UseAlwaysStandardTheme == false) { _theme = new Theme(orbStyle, theme); } }
public Theme(RibbonOrbStyle style, RibbonProfesionalRendererColorTable colorTable) : this(style) { RendererColorTable = colorTable; }
public Theme(RibbonOrbStyle style, RibbonTheme theme) : this(style) { RibbonTheme = theme; }
public Theme(RibbonOrbStyle style) { Style = style; }