Esempio n. 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window5 w = new Window5();

            w.Show();
            Close();
        }
        }                                                             //增加章节

        private void modify_outline(object sender, RoutedEventArgs e) //修改outline提名
        {
            string[] ss = tree6_sel.Name1.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            Window5  w5 = new Window5();

            w5.getname(ss[1], (int)tree6_sel.type);
            w5.getdata += new Window5.myevent(m_window5_outline_modify);
            w5.Show();
        }
        }  //outline 操作菜单

        private void add_child(object sender, RoutedEventArgs e)
        {
            // cc = treeView1.SelectedItem as outline;
            Window5 w5 = new Window5();

            w5.getname(newname, 5);
            w5.getdata += new Window5.myevent(m_window5_outline_add);
            w5.Show();
            // tree6_sel.children.Add(newone);
        }  //增加小节
        }  //增加小节

        private void add_charpt(object sender, RoutedEventArgs e)
        {
            /*int c = getindex(tree6_sel);
             * outline cs = new outline()
             * {
             *  Name1 = "3 发生啊gf我的",
             *  toollip = "3 发生啊师傅打法",
             *  parent = null,
             *  type = outlinetype.Chapter
             * };
             *
             * // cd.TreeViewItems1.Insert(c,cs);
             * //cd.TreeViewItems1[0].children.Insert(c, cs);
             * Data.Instance.TreeViewItems1.Insert(c, cs);
             * //this.treeView1.ItemsSource = cd.TreeViewItems1;
             * // label2.Content = cd.TreeViewItems1[0].children.Count.ToString();
             * */
            Window5 w5 = new Window5();

            w5.getname(newname, 4);
            w5.getdata += new Window5.myevent(m_window5_outline_addchapter);
            w5.Show();
        }                                                             //增加章节