Beispiel #1
0
 private void ListViewUnboundProcess_ItemDrag(object sender, ItemDragEventArgs e)
 {
     this._draggingConditionItem = false;
     WorkGroupControl.ConditionItem[] array = new WorkGroupControl.ConditionItem[this.listViewUnbound.SelectedItems.Count];
     this.listViewUnbound.SelectedItems.CopyTo(array, 0);
     base.DoDragDrop(array, DragDropEffects.Move);
 }
Beispiel #2
0
        private void RemoveUnbound(WorkGroupCondition condition)
        {
            int i   = 0;
            int num = this.listViewUnbound.Items.Count;

            while (i < num)
            {
                int num2 = (i + num) / 2;
                WorkGroupControl.ConditionItem conditionItem = (WorkGroupControl.ConditionItem) this.listViewUnbound.Items[num2];
                int num3 = condition.CompareTo(conditionItem.Condition);
                if (num3 < 0)
                {
                    num = num2;
                }
                else
                {
                    if (num3 <= 0)
                    {
                        this.listViewUnbound.Items.RemoveAt(num2);
                        return;
                    }
                    i = num2 + 1;
                }
            }
        }
Beispiel #3
0
        private void AddUnbound(WorkGroupCondition condition)
        {
            int i   = 0;
            int num = this.listViewUnbound.Items.Count;

            while (i < num)
            {
                int num2 = (i + num) / 2;
                WorkGroupControl.ConditionItem conditionItem = (WorkGroupControl.ConditionItem) this.listViewUnbound.Items[num2];
                int num3 = condition.CompareTo(conditionItem.Condition);
                if (num3 < 0)
                {
                    num = num2;
                }
                else
                {
                    if (num3 <= 0)
                    {
                        return;
                    }
                    i = num2 + 1;
                }
            }
            this.listViewUnbound.Items.Insert(i, new WorkGroupControl.ConditionItem(condition));
        }
Beispiel #4
0
 private void menuItemClientProcessRemove_Click(object sender, EventArgs e)
 {
     if (this._selectedNode != null)
     {
         foreach (object obj in this.listViewBound.SelectedItems)
         {
             WorkGroupControl.ConditionItem conditionItem = (WorkGroupControl.ConditionItem)obj;
             ((WorkGroupControl.SimpleWorkGroupTreeNode) this._selectedNode).RemoveCondition(conditionItem.Condition);
             this.DecreaseConditionCountWorkGroup(conditionItem.Condition);
         }
         this._modified = true;
         this.TreeViewWorkGroup_AfterSelect(sender, new TreeViewEventArgs(this._selectedNode));
     }
 }