internal string CreateNewProject(NavigationService navigationService) { var dlg = new SaveFileDialog { AddExtension = true, DefaultExt = Persistor.ProjectFileExtension, Filter = $"Project files (*.{Persistor.ProjectFileExtension})|*.{Persistor.ProjectFileExtension}" }; if (dlg.ShowDialog() == true) { var name = Path.GetFileNameWithoutExtension(dlg.FileName); var project = new Project { Name = name, Path = dlg.FileName }; persistor.SaveProject(project); navigationService.Navigate(new ProjectPage(project)); return(project.Path); } return(null); }
private void Save() { persistor.SaveProject(Project); }