public bool LoadProject(string fileName) { if (mProject != null && !CloseProject(false)) { return(false); } Type projType = FindProjectLoader(fileName); if (projType == null) { throw new ApplicationException("Couldn't find loader for project: " + fileName); } mProject = (Project)Activator.CreateInstance(projType, new object[] { this, fileName }); if (mProject.VCSType == "") { if (MessageBoxEx.Show(MainWindow, "Source control has not been configured for this project. Would you like to configure it now?", "Source control configuration", new string [] { "Yes", "No" }, MessageBoxIcon.Question, "Yes") == "Yes") { SourceControlWindow window = new SourceControlWindow(this); window.ShowDialog(MainWindow); } } try { // Plugins might fail here OnProjectOpened(); OnPropertyChange(this, "Project", null, mProject); } catch (System.Exception e) { DestroyProject(); throw e; } return(true); }
public bool LoadProject(string fileName) { if (mProject != null && !CloseProject(false)) return false; Type projType = FindProjectLoader(fileName); if (projType == null) throw new ApplicationException("Couldn't find loader for project: " + fileName); mProject = (Project)Activator.CreateInstance(projType, new object[] { this, fileName }); if(mProject.VCSType == "") { if(MessageBoxEx.Show(MainWindow, "Source control has not been configured for this project. Would you like to configure it now?", "Source control configuration", new string [] {"Yes", "No"}, MessageBoxIcon.Question, "Yes" ) == "Yes") { SourceControlWindow window = new SourceControlWindow(this); window.ShowDialog(MainWindow); } } try { // Plugins might fail here OnProjectOpened(); OnPropertyChange(this, "Project", null, mProject); } catch (System.Exception e) { DestroyProject(); throw e; } return true; }
private void sourceControlToolStripMenuItem_Click(object sender, EventArgs e) { SourceControlWindow window = new SourceControlWindow(Manager); window.ShowDialog(this); }