예제 #1
0
파일: MainForm.cs 프로젝트: Yogr/Wizard
        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());
                }
            }
        }
예제 #2
0
파일: MainForm.cs 프로젝트: Yogr/Wizard
 private void _SetActiveProject(string name)
 {
     mCurrentProjectForm = new ProjectForm();
     mCurrentProjectForm.Text = name + " Project";
     mCurrentProjectForm.MdiParent = this;
     mCurrentProjectForm.Focus();
     mCurrentProjectForm.Show();
 }