public void SetMod(FontStyles style, FontModification mod) { InitFonts(false); fontMods[style] = mod; SettingsChanged(); if (Form1.Form.CurrentOpenFile != null && Form1.Form.CurrentOpenFile.OpenFile != null) { Form1.Form.CurrentOpenFile.OpenFile.Editor.Restyle(); } }
private void CBEPickFontContext_SelectedIndexChanged(object sender, EventArgs e) { SelectingFontContext = true; FontModification mod = Options.Editor.GetMod((Options.FontStyles)CBEPickFontContext.SelectedIndex); CBEBoldFond.Checked = (mod.Style & FontStyle.Bold) != 0; CBEItalicsFont.Checked = (mod.Style & FontStyle.Italic) != 0; CBEFontUnderline.Checked = (mod.Style & FontStyle.Underline) != 0; CBEFontStrikeout.Checked = (mod.Style & FontStyle.Strikeout) != 0; currentFontColor = mod.Color; SelectingFontContext = false; }