private void View_NewProject(object sender, EventArgs e) { if (IsProjectLoaded()) { MessageBox.Show("Bitte schließen Sie zunächst das geöffnete Projekt."); return; } SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "FieldTool-Projekt|*.ftproj"; DialogResult dr = dialog.ShowDialog(); if (dr != DialogResult.OK) { return; } Project = new FtProject(dialog.FileName); Project.Save(); ProjectionManager.SetSourceProjection(Project.EPSGSourceProjection); ProjectionManager.SetTargetProjection(Project.EPSGTargetProjection); InvokeProjectStateChanged(new ProjectStateArgs(Project.ProjectFilePath, Project.ProjectName, true)); }
private bool OpenProject(String fullFilePath) { if (!File.Exists(fullFilePath)) { return(false); } Project = FtProject.Open(fullFilePath); ProjectionManager.SetSourceProjection(Project.EPSGSourceProjection); ProjectionManager.SetTargetProjection(Project.EPSGTargetProjection); InvokeMapChanged(new MapChangedArgs(Map, true)); InvokeProjectStateChanged(new ProjectStateArgs(Project.ProjectFilePath, Project.ProjectName, true)); return(true); }