Esempio n. 1
0
 private void menuItemWorkGroupNew_Click(object sender, EventArgs e)
 {
     if (this._selectedNode != null)
     {
         this.treeViewWorkGroup.SelectedNode = this._selectedNode;
         if (!this._selectedNode.IsEditing)
         {
             if (((WorkGroupControl.SimpleWorkGroupTreeNode) this._selectedNode).Conditions.Count > 0)
             {
                 if (!Utility.InputYesNoFromWarning(LocalizeText.Get(380)))
                 {
                     return;
                 }
                 foreach (object obj in ((WorkGroupControl.SimpleWorkGroupTreeNode) this._selectedNode).Conditions)
                 {
                     WorkGroupCondition condition = (WorkGroupCondition)obj;
                     this.DecreaseConditionCountWorkGroup(condition);
                 }
                 ((WorkGroupControl.SimpleWorkGroupTreeNode) this._selectedNode).ClearCondition();
             }
             WorkGroupControl.SimpleWorkGroupTreeNode simpleWorkGroupTreeNode = new WorkGroupControl.SimpleWorkGroupTreeNode("", ((WorkGroupControl.SimpleWorkGroupTreeNode) this._selectedNode).Authority);
             this._selectedNode.Nodes.Add(simpleWorkGroupTreeNode);
             this._selectedNode.Expand();
             this.treeViewWorkGroup.SelectedNode = simpleWorkGroupTreeNode;
             this._modified = true;
             simpleWorkGroupTreeNode.BeginEdit();
         }
     }
 }
Esempio n. 2
0
 private void menuItemWorkGroupNewRoot_Click(object sender, EventArgs e)
 {
     WorkGroupControl.SimpleWorkGroupTreeNode simpleWorkGroupTreeNode = new WorkGroupControl.SimpleWorkGroupTreeNode("", Authority.Supervisor);
     this.treeViewWorkGroup.Nodes.Add(simpleWorkGroupTreeNode);
     this.treeViewWorkGroup.SelectedNode = simpleWorkGroupTreeNode;
     this._modified = true;
     simpleWorkGroupTreeNode.BeginEdit();
 }