CombineEntry CreateCombineEntry(Combine parentCombine, bool createCombine) { CombineEntry res = null; NewProjectDialog npdlg = new NewProjectDialog (createCombine); if (npdlg.Run () == (int) Gtk.ResponseType.Ok) { IProgressMonitor monitor = Runtime.TaskService.GetLoadProgressMonitor (); try { if (createCombine) res = parentCombine.AddEntry (npdlg.NewCombineLocation, monitor); else res = parentCombine.AddEntry (npdlg.NewProjectLocation, monitor); } catch { Runtime.MessageService.ShowError (string.Format (GettextCatalog.GetString ("The file '{0}' could not be loaded."), npdlg.NewProjectLocation)); res = null; } monitor.Dispose (); } npdlg = null; if (res != null) SaveCombine (); return res; }
protected override void Run() { NewProjectDialog pd = new NewProjectDialog (true); pd.Run (); }