Esempio n. 1
0
        private void FileLoad_menuitem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.CheckPathExists = true;
            ofd.Filter = "XML Files (*.xml)|*.xml";

            DialogResult result = ofd.ShowDialog();

            if (DialogResult.OK == result) // Load file
            {
                if (null != mCurrentProjectForm)
                {
                    mCurrentProjectForm.Close();
                    mCurrentProjectForm = null;
                }

                if(ProjectManager.GetInstance().LoadProject(ofd.FileName))
                {
                    _SetActiveProject(ProjectManager.GetInstance().GetActiveProject());
                }
            }
        }
Esempio n. 2
0
 private void _SetActiveProject(string name)
 {
     mCurrentProjectForm = new ProjectForm();
     mCurrentProjectForm.Text = name + " Project";
     mCurrentProjectForm.MdiParent = this;
     mCurrentProjectForm.Focus();
     mCurrentProjectForm.Show();
 }