Esempio n. 1
0
        // Method to edit class
        private void EditClass()
        {
            try
                {
                    if (treeViewClasses.SelectedNode == null)
                    {
                        MessageBox.Show("Please select a class", "No Class Selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }

                    if (treeViewClasses.SelectedNode.Tag == null)
                        return;

                    ClassForm classForm = new ClassForm(treeViewClasses.SelectedNode.Tag);
                    classForm.ShowDialog();
                    if (classForm.saveClose)
                    {
                        AddToTree(classForm.ClassPass.ToString(), classForm.ClassPass.ToString(), (ClassTree)classForm.ClassPass);
                    }
                }
                catch
                {

                }
        }
Esempio n. 2
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ClassForm classForm = new ClassForm();
            classForm.ShowDialog();
            if (classForm.saveClose)
            {

                AddToTree(classForm.ClassPass.ToString(), classForm.ClassPass.ToString(), (ClassTree)classForm.ClassPass);
            }
        }