Exemplo n.º 1
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            GetItRight_AddStudent ModifyStudent = new GetItRight_AddStudent(this.StudentHandler[e.Node.Index]);

            ModifyStudent.ShowDialog();
            UpdateTreeView(); // again it's ugly
        }
Exemplo n.º 2
0
        private void loadToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.StudentHandler.AddStudent();
            GetItRight_AddStudent AddStudent =
                new GetItRight_AddStudent(this.StudentHandler[this.StudentHandler.Lenght - 1]); //I can use "Length - 1" without other verification
                                                                                                //because I allways adds a student before so Lenght is >= 1
            DialogResult result = AddStudent.ShowDialog();

            if (result != DialogResult.Cancel)
            {
                UpdateTreeView();
            }
            else
            {
                this.StudentHandler.PopLast();
                this.StudentHandler.UpdateLengthMinus();
            }
        }