Exemple #1
0
        internal void ShowDialog(IWin32Window owner, MatchFieldNode matchFieldNode)
        {
            _isNew = false;
            this.comboBoxJoinType.Text = matchFieldNode.JoinOperator.ToString();

            this.ShowDialog(owner);
        }
Exemple #2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            MatchFieldNode currentNode = GetCurrentFieldNode();

            if (currentNode == null)
            {
                MessageBox.Show("please select the join node which you want to add criterias. ", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FConfigCriteria frm = new FConfigCriteria();

            frm.SaveCriteria += new SaveCondidtionEventHandler(EditCriteria);

            frm.ShowDialog(this);
        }
Exemple #3
0
        private void SaveMatchFieldNode(MatchFieldNode parentMFNode, TreeNode node)
        {
            MatchField mf = node.Tag as MatchField;

            if (null != mf)
            {
                parentMFNode.MatchFields.Add(mf);
                return;
            }

            MatchFieldNode mfNode    = new MatchFieldNode();
            MatchFieldNode mfNodeOld = node.Tag as MatchFieldNode;

            mfNode.JoinOperator = mfNodeOld.JoinOperator;

            foreach (TreeNode childNode in node.Nodes)
            {
                SaveMatchFieldNode(mfNode, childNode);
            }

            parentMFNode.ChildNodes.Add(mfNode);
        }
Exemple #4
0
        private TreeNode InitCriteriaNode(MatchFieldNode criteriaNode)
        {
            TreeNode treeNode = new TreeNode();

            treeNode.Text = criteriaNode.ToString();
            treeNode.Tag  = criteriaNode;

            TreeNode fieldNode = null;

            foreach (MatchField field in criteriaNode.MatchFields)
            {
                fieldNode      = new TreeNode();
                fieldNode.Text = field.ToString();
                fieldNode.Tag  = field;
                treeNode.Nodes.Add(fieldNode);
            }
            foreach (MatchFieldNode node in criteriaNode.ChildNodes)
            {
                treeNode.Nodes.Add(InitCriteriaNode(node));
            }

            return(treeNode);
        }