Beispiel #1
0
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            if (textBox2.Text == "")
            {
                this.textBox2.BorderBrush = (Brush)System.ComponentModel.TypeDescriptor.GetConverter(typeof(Brush)).ConvertFromInvariantString("Red");
            }
            else
            {
                string tag = (textBox1.Text == "") ? System.IO.Path.GetFileName(textBox2.Text.Trim()) : textBox1.Text;
                // if (textBox1.Text == "")
                // {
                //     tag = System.IO.Path.GetFileNameWithoutExtension(textBox2.Text.Trim());
                // }
                // else
                //    tag = textBox1.Text;
                Window5.textEventArgs E1 = new Window5.textEventArgs(tag);
                Window5.textEventArgs E2 = new Window5.textEventArgs(textBox2.Text);
                if (getdata != null)
                {
                    getdata(this, E1, E2);
                }
                this.Close();
            }

            //this.Close();
        }
        private void m_window5_outline_add(object sender, Window5.textEventArgs e)
        {
            //获取事件传递过来的数据
            newname = e.textbox;
            outline_Data add_section = new outline_Data();
            outline      sel         = (outline)tree6.SelectedItem;

            add_section.outline_node_add(sel, newname);
        }
        private void m_window5_outline_modify(object sender, Window5.textEventArgs e)
        {
            newname = e.textbox.Replace(" ", "");
            //tree6_sel.Name1 = newname;
            // this.tree6.ItemsSource = outline_Data.Instance.TreeViewItems1;
            outline_Data modify_outline = new outline_Data();

            modify_outline.outline_node_modify(tree6_sel, newname);
            // select_tree5.outline_node_modify
            this.tree6.ItemsSource = modify_outline.TreeViewItems1;
        }
        private void m_window5_outline_addchapter(object sender, Window5.textEventArgs e)
        {
            //获取事件传递过来的数据
            newname = e.textbox;
            outline_Data add_section = new outline_Data();
            outline      sel         = (outline)tree6.SelectedItem;
            int          c           = getindex(sel);
            //outline_Data.Instance.TreeViewItems1.Insert(c,);
            outline aa = add_section.outline_chapter_add(sel, newname);
            //outline_Data.Instance.TreeViewItems1.Insert(c, aa);
            ObservableCollection <outline> cc = tree6.ItemsSource as ObservableCollection <outline>;

            cc.Insert(c, aa);
        }
Beispiel #5
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     Window5.textEventArgs E = new Window5.textEventArgs(textBox1.Text.Trim());
     getdata(this, E);
     this.Close();
 }