/// <summary> /// Called when SplitButton or it's submenus are clicked. /// </summary> /// <param name="control"></param> public void OnHighlightAction(Office.IRibbonControl control) { if (!string.IsNullOrEmpty(control.Tag)) _defaultLang = ColorCode.Languages.FindById(control.Tag); _host.Highlight(new Parser(_defaultLang)); this.ribbon.Invalidate(); }
/// <summary> /// Called when SplitButton or it's submenus are clicked. /// </summary> /// <param name="control"></param> public void OnHighlightAction(Office.IRibbonControl control) { if (!string.IsNullOrEmpty(control.Tag)) { _defaultLang = ColorCode.Languages.FindById(control.Tag); } _host.Highlight(new Parser(_defaultLang)); this.ribbon.Invalidate(); }
public Ribbon(IHighlighterHost host) { _host = host; _langs = ColorCode.Languages.All.OrderBy(lang => lang.Name).ToArray(); _defaultLang = _langs[0]; }