Esempio n. 1
0
 /// <summary>
 /// Shows a <see cref="NewProjectView"/> to
 /// create a new <see cref="Project"/>.
 /// </summary>
 public void ShowNewProjectDialog()
 {
   NewProjectView npv = new NewProjectView();
   if (npv.ShowDialog().Value)
   {
     CloseProject();
     NewProjectViewModel vm = npv.DataContext as NewProjectViewModel;
     CurrentProject = new Project(vm.ProjectName, vm.FullPath);
     CreateFolderStructure();
     CreateProjectFile();
   }
 }
 /// <summary>
 /// Cancels the dialog.
 /// </summary>
 /// <param name="view">Reference to the calling <see cref="NewProjectView"/>,
 /// used to set its DialogResult to false.
 /// </param>
 public void Cancel(NewProjectView view)
 {
   view.DialogResult = false;
   view.Close();
 }
 /// <summary>
 /// Creates the project with the given data.
 /// </summary>
 /// <param name="view">Reference to the calling <see cref="NewProjectView"/>,
 /// used to set its DialogResult to true.
 /// </param>
 public void CreateNewProject(NewProjectView view)
 {
   view.DialogResult = true;
   view.Close();
 }