private void tlvPluginList_Expanding(object sender, TreeBranchExpandingEventArgs e)
 {
     if (ModifierKeys == Keys.Control)
     {
         if (TlvControl.CanExpand(e))
         {
             RecursiveExpand(TlvControl.GetChildren(e));
         }
     }
 }
Exemple #2
0
        public void CommonItemActivation(object sender, EventArgs eventArgs)
        {
            var o = Tree.SelectedObject;

            if (o == null)
            {
                return;
            }

            if (UserSettings.DoubleClickToExpand)
            {
                if (Tree.CanExpand(o) && !Tree.IsExpanded(o))
                {
                    Tree.Expand(o);
                    return;
                }
                if (Tree.IsExpanded(o))
                {
                    Tree.Collapse(o);
                    return;
                }
            }

            var cmd = new ExecuteCommandActivate(_activator, o);

            if (!cmd.IsImpossible)
            {
                cmd.Execute();
            }
        }