Ejemplo n.º 1
0
		public SolutionItem CreateProject (SolutionFolder parentFolder)
		{
			string basePath = parentFolder != null ? parentFolder.BaseDirectory : null;
			NewProjectDialog npdlg = new NewProjectDialog (parentFolder, false, basePath);
			if (MessageService.ShowCustomDialog (npdlg) == (int)Gtk.ResponseType.Ok) {
				var item = npdlg.NewItem as SolutionItem;
				if ((item is Project) && ProjectCreated != null)
					ProjectCreated (this, new ProjectCreatedEventArgs (item as Project));
				return item;
			}
			return null;
		}
Ejemplo n.º 2
0
		public WorkspaceItem AddNewWorkspaceItem (Workspace parentWorkspace, string defaultItemId)
		{
			NewProjectDialog npdlg = new NewProjectDialog (null, false, parentWorkspace.BaseDirectory);
			npdlg.SelectTemplate (defaultItemId);
			try {
				if (MessageService.RunCustomDialog (npdlg) == (int) Gtk.ResponseType.Ok && npdlg.NewItem != null) {
					parentWorkspace.Items.Add ((WorkspaceItem) npdlg.NewItem);
					Save (parentWorkspace);
					return (WorkspaceItem) npdlg.NewItem;
				}
			} finally {
				npdlg.Destroy ();
			}
			return null;
		}
Ejemplo n.º 3
0
		public SolutionItem CreateProject (SolutionFolder parentFolder)
		{
			string basePath = parentFolder != null ? parentFolder.BaseDirectory : null;
			NewProjectDialog npdlg = new NewProjectDialog (parentFolder, false, basePath);
			if (MessageService.ShowCustomDialog (npdlg) == (int)Gtk.ResponseType.Ok)
				return npdlg.NewItem as SolutionItem;
			return null;
		}
Ejemplo n.º 4
0
		public void NewSolution (string defaultTemplate)
		{
			NewProjectDialog pd = new NewProjectDialog (null, true, null);
			if (defaultTemplate != null)
				pd.SelectTemplate (defaultTemplate);
			MessageService.ShowCustomDialog (pd);
		}
Ejemplo n.º 5
0
		public SolutionItem CreateProject (SolutionFolder parentFolder)
		{
			SolutionItem res = null;
			string basePath = parentFolder != null ? parentFolder.BaseDirectory : null;
			NewProjectDialog npdlg = new NewProjectDialog (parentFolder, false, basePath);
			MessageService.ShowCustomDialog (npdlg);
			return res;
		}