Example #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Window1.textEventArgs E1 = new Window1.textEventArgs(textBox1.Text.Trim());
            IconSelect            E2 = new IconSelect((LVData)listView1.SelectedItem);

            if (creattitle != null)
            {
                creattitle(this, E1, E2);
            }
            this.Close();
        }
        private void createnewtitle(object sender, Window1.textEventArgs e1, IconSelect e2)
        {
            Nodeetype        nodelve = Nodeetype.subject;
            PropertyNodeItem item    = this.tree2.SelectedItem as PropertyNodeItem;

            if (item.node_lev == Nodeetype.one)
            {
                nodelve = Nodeetype.subject;
            }
            else
            {
                nodelve = Nodeetype.Directory;
            }
            PropertyNodeItem node_item = new PropertyNodeItem()
            {
                DisplayName = e1.textbox,
                Name        = e1.textbox,
                Icon        = e2.newtitle.Pic,
                parent      = item,
                node_lev    = nodelve
            };

            item.Children.Insert(0, node_item);
        }