public void SelectSavePath() { var dir = SavePath; var path = SavePath.GetSuffix(); if (path != string.Empty) { dir = dir.Replace(path, ""); } var dialog = new SaveFileDialog(); dialog.InitialDirectory = dir; dialog.FileName = path; dialog.Filter = "NPK|*.npk"; if (dialog.ShowDialog() == DialogResult.OK) { SavePath = dialog.FileName; OnSaveChanged(); } }