/** * Method for show the save dialog and the techtree * Status: OK */ private void Save(TreeSaver treesaver) { var dlg = new SaveFileDialog { DefaultExt = ".cfg", Filter = "Tech Tree Config Files|*.cfg", Title = "Select where to save...", AddExtension = true, }; var result = dlg.ShowDialog(); if (result == true) { try { treesaver.Save(_treeData, dlg.FileName); _treeData.WorkspaceViewModel.StatusBarText = "saving to file... done"; } catch (Exception) { _treeData.WorkspaceViewModel.StatusBarText = "Failed saving to file.."; } } }
/** * Method for show the save dialog and the techtree * Status: OK */ private void Save(TreeSaver treesaver) { var dlg = new SaveFileDialog { DefaultExt = ".cfg", Filter = "Tech Tree Config Files|*.cfg", Title = "Select where to save...", AddExtension = true, }; var result = dlg.ShowDialog(); if (result==true) { try { treesaver.Save(_treeData, dlg.FileName); _treeData.WorkspaceViewModel.StatusBarText = "saving to file... done"; } catch (Exception) { _treeData.WorkspaceViewModel.StatusBarText = "Failed saving to file.."; } } }