Пример #1
0
 /// <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();
 }
Пример #2
0
 /// <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();
 }
Пример #3
0
 public Ribbon(IHighlighterHost host)
 {
     _host = host;
     _langs = ColorCode.Languages.All.OrderBy(lang => lang.Name).ToArray();
     _defaultLang = _langs[0];
 }
Пример #4
0
 public Ribbon(IHighlighterHost host)
 {
     _host        = host;
     _langs       = ColorCode.Languages.All.OrderBy(lang => lang.Name).ToArray();
     _defaultLang = _langs[0];
 }