Example #1
0
 //Add custom draw to list view to draw all subitems in a single column.
 private void btnAddMember_Click(object sender, EventArgs e)
 {
     if (txtMemberName.Text != String.Empty &&
         !lstvwClassMembers.Items.ContainsKey(txtMemberName.Text))
     {
         MemberInfo info = new MemberInfo();
         info.Text = info.Name = txtMemberName.Text;
         foreach (TreeNode node in trParsedURL.Nodes)
             GetCheckedNodes(ref info.Nodes, node);
         info.UpdateSubInfo();
         lstvwClassMembers.Items.Add(info);
         txtMemberName.Text = "";
         foreach (TreeNode node in info.Nodes)
             node.Checked = false;
     }
 }
Example #2
0
        public MemberForm(ref MemberInfo info, List<TreeNode> nodes)
        {
            memberInfo = info;
            InitializeComponent();
            foreach(TreeNode node in nodes)
                this.trParentFamily.Nodes.Add((TreeNode)node.Clone());
            this.cmbType.Items.AddRange(new object[] { "Int16",
                                                       "Int32",
                                                       "Int64",
                                                       "UInt16",
                                                       "UInt32",
                                                       "UInt64",
                                                       "Double",
                                                       "String",
                                                       "List<T>",
                                                       "Dictionary<K, T>",
                                                       "HtmlTag"});

            this.cmbSource.Items.Add("Dummy Source");
        }
Example #3
0
        //Add custom draw to list view to draw all subitems in a single column.
        private void btnAddMember_Click(object sender, EventArgs e)
        {
            List<TreeNode> nodeList = new List<TreeNode>();
            parent.GetCheckedNodes(ref nodeList);
            if (nodeList.Count == 0)
            {
                MessageBox.Show("Please select a node from the Parsed URL tree");
                return;
            }
            MemberInfo info = new MemberInfo();
            MemberForm memberForm = new MemberForm(ref info, nodeList);

            if (memberForm.ShowDialog() == DialogResult.OK)
            {
                lstvwClassMembers.Items.Add(info);
                foreach (TreeNode node in nodeList)
                    info.Nodes.Add(node);
                info.UpdateSubInfo();
            }

            parent.UncheckAll();
        }