private void CreateNewProject()
        {
            NewProjectVM curNPVM = new NewProjectVM();

            new NewProject(curNPVM).ShowDialog();
            if (curNPVM.Close == true)
            {
                OpenProject newProj = OpenProjectSerializer.AddOpenProject(curNPVM.ProjectName, string.Format(@"{0}\{1}", curNPVM.SelectedPath, curNPVM.ProjectName));
                if (newProj == null)
                {
                    Errorhandler.RaiseMessage("Could not create new Project!", "Error!", Errorhandler.MessageType.Error);
                    return;
                }
                loadProject(newProj);
            }
        }
示例#2
0
        private async void CreateNewProject()
        {
            NewProjectVM curNPVM = new NewProjectVM();

            await new NewProject(curNPVM).ShowDialogWithParent <MainWindow>();
            if (curNPVM.Close == true)
            {
                OpenProject newProj = OpenProjectSerializer.AddOpenProject(curNPVM.ProjectName, string.Format(@"{0}/{1}", curNPVM.SelectedPath, curNPVM.ProjectName));
                if (newProj == null)
                {
                    await Errorhandler.RaiseMessage(_("Could not create new Project!"), _("Error!"), Errorhandler.MessageType.Error);

                    return;
                }
                LoadProject(newProj);
            }
        }
示例#3
0
 public NewProject(NewProjectVM npvm)
 {
     DataContext = npvm;
     InitializeComponent();
     npvm.PropertyChanged += Npvm_PropertyChanged;
 }