Exemple #1
0
 void CreateProjectForm()
 {
     projectForm              = new ProjectForm();
     projectForm.Shown       += (s, e) => projectToolStripMenuItem.Checked = true;
     projectForm.FormClosing += (s, e) =>
     {
         e.Cancel = true;
         projectForm.Hide();
         projectToolStripMenuItem.Checked = false;
     };
 }
Exemple #2
0
        private void projectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (projectForm.Visible)
            {
                projectForm.Hide();
            }
            else
            {
                projectForm.Show();
            }

            projectToolStripMenuItem.Checked = projectForm.Visible;
        }
 void CreateProjectForm()
 {
     projectForm = new ProjectForm();
     projectForm.Shown += (s, e) => projectToolStripMenuItem.Checked = true;
     projectForm.FormClosing += (s, e) =>
     {
         e.Cancel = true;
         projectForm.Hide();
         projectToolStripMenuItem.Checked = false;
     };
 }