Example #1
0
        /// <summary>
        /// Handles a drop event
        /// </summary>
        /// <param name="SourceNode"></param>
        public override void AcceptDrop(BaseTreeNode SourceNode)
        {
            if (SourceNode is ActionTreeNode)
            {
                if (MessageBox.Show("Are you sure you want to move the corresponding action ?", "Move action", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    ActionTreeNode actionTreeNode = (ActionTreeNode)SourceNode;

                    DataDictionary.Rules.Action action = actionTreeNode.Item;
                    actionTreeNode.Delete();
                    AddAction(action);
                }
            }
        }
        /// <summary>
        ///     Handles a drop event
        /// </summary>
        /// <param name="sourceNode"></param>
        public override void AcceptDrop(BaseTreeNode sourceNode)
        {
            ActionTreeNode actionTreeNode = sourceNode as ActionTreeNode;

            if (actionTreeNode != null)
            {
                if (
                    MessageBox.Show("Are you sure you want to move the corresponding action ?", "Move action",
                                    MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    Action action = actionTreeNode.Item;
                    actionTreeNode.Delete();
                    Item.appendActions(action);
                    Item.setVerified(false);
                }
            }
        }