public void OnUpdate(CommandUpdateEventArgs e) { if (_control == null) { _control = e.GetService <SvnInfoGridControl>(); if (_control == null) { e.Enabled = false; return; } } PropertySort sort = _control.Grid.PropertySort; bool categorized = (PropertySort.NoSort != (sort & PropertySort.Categorized)); if (e.Command == AnkhCommand.SvnInfoAlphabetical) { e.Checked = !categorized; } else { e.Checked = categorized; } }
public SccInfoToolWindow() { Caption = Resources.SccInfoToolWindowTitle; Control = new SvnInfoGridControl(); AnkhToolWindow = AnkhToolWindow.SvnInfo; ToolBarId = AnkhToolBar.SvnInfoCombo; ExtraToolBarId = AnkhToolBar.SvnInfo; ToolBarLocation = (int)VSTWT_LOCATION.VSTWT_TOP; }
public virtual void OnUpdate(CommandUpdateEventArgs e) { if (_control == null) { _control = e.GetService <SvnInfoGridControl>(); if (_control == null) { e.Enabled = false; return; } } GC.KeepAlive(GetNames(e)); }