void item_ctrl_CustomCommandClick(object sender, CustomItemEventArgs e)
        {
            switch (e.Type)
            {
                case CustomControlTypes.Clear:
                    this.Items.Clear();
                    break;
                case CustomControlTypes.Delete:
                    FilterTreeNode node = this.Parent as FilterTreeNode;
                    if (node != null)
                    {
                        node.Items.Remove(this);
                    }
                    break;
                case CustomControlTypes.AddOperation:
                    OperationTreeNode operationNode = new OperationTreeNode(OperationTypes.And, false, m_Properties);
                    operationNode.ApplyFilter += new EventHandler(OnApplyFilter);
                    this.Items.Add(operationNode);
                    OperandTreeNode operand1_Node = new OperandTreeNode(m_Properties);
                    operand1_Node.ApplyFilter += new EventHandler(OnApplyFilter);
                    operationNode.Items.Add(operand1_Node);
                    break;
                case CustomControlTypes.AddOperand:
                    OperandTreeNode operandNode = new OperandTreeNode(m_Properties);
                    operandNode.ApplyFilter += new EventHandler(OnApplyFilter);
                    this.Items.Add(operandNode);
                    break;

            }
        }
 void item_ctrl_CustomCommandClick(object sender, CustomItemEventArgs e)
 {
     switch (e.Type)
     {
         case CustomControlTypes.Delete:
             FilterTreeNode node = this.Parent as FilterTreeNode;
             if (node != null)
             {
                 node.Items.Remove(this);
             }
             break;
     }
 }
Example #3
0
 void item_ctrl_CustomCommandClick(object sender, CustomItemEventArgs e)
 {
     switch (e.Type)
     {
     case CustomControlTypes.Delete:
         FilterTreeNode node = this.Parent as FilterTreeNode;
         if (node != null)
         {
             node.Items.Remove(this);
         }
         break;
     }
 }