SIL.FieldWorks.FieldWorks.CreateNewProject C# (CSharp) Метод

CreateNewProject() статический приватный Метод

Lets the user create a new project
static private CreateNewProject ( Form dialogOwner, FwApp app, IHelpTopicProvider helpTopicProvider ) : SIL.FieldWorks.ProjectId
dialogOwner System.Windows.Forms.Form The owner of the dialog (and any message boxes shown)
app SIL.FieldWorks.Common.Framework.FwApp This is needed for opening an existing project.
helpTopicProvider IHelpTopicProvider The help topic provider.
Результат SIL.FieldWorks.ProjectId
		internal static ProjectId CreateNewProject(Form dialogOwner, FwApp app, IHelpTopicProvider helpTopicProvider)
		{
			using (var dlg = new FwNewLangProject())
			{
				dlg.SetDialogProperties(helpTopicProvider);
				switch (dlg.DisplayDialog(dialogOwner))
				{
					case DialogResult.OK:
						if (dlg.IsProjectNew)
							return new ProjectId(dlg.GetDatabaseFile(), null);
						else
						{
							// The user tried to create a new project which already exists and
							// then choose to open the project. Therefore open the project and return
							// null for the ProjectId so the caller of this method does not try to
							// create a new project.
							ProjectId projectId = new ProjectId(dlg.GetDatabaseFile(), null);
							OpenExistingProject(projectId, app, dialogOwner);
							return null;
						}
					case DialogResult.Abort:
						// If we get an Abort it means that we got an exception in the dialog (e.g.
						// in the OnLoad method). We can't just catch that exception here (probably
						// because of the extra message loop the dialog has), so we close the dialog
						// and return Abort.
						MessageBox.Show(dialogOwner,
							ResourceHelper.GetResourceString("kstidNewProjError"),
							ResourceHelper.GetResourceString("kstidMiscError"));
						break;
				}
			}
			return null;
		}
FieldWorks