private void _menuItemSaveAs_Click(object sender, RoutedEventArgs e) { if (!_validateState()) { return; } try { string file = PathRequest.SaveFileMapcache("filter", "Dat Files (*.dat)|*.dat", "fileName", Path.GetFileName(_cache.LoadedPath ?? "map_cache.dat")); if (file != null) { _cache.Save(file); _cache.LoadedPath = file; _cache.Commands.SaveCommandIndex(); _fakeProgress(0); } } catch (Exception err) { ErrorHandler.HandleException(err); } }