private void Save_Click(object sender, RoutedEventArgs e) { ConfigViewModel cfg = (ConfigViewModel)DataContext; try { cfg.SaveConfig(); } catch (Exception) { MessageBox.Show(Properties.Resources.ConfigurationSaveError); } }
private void SaveExit_Click(object sender, RoutedEventArgs e) { ConfigViewModel cfg = (ConfigViewModel)DataContext; try { cfg.SaveConfig(); } catch (Exception) { MessageBox.Show(Properties.Resources.ConfigurationSaveError); return; } System.Diagnostics.Process.Start(Properties.Resources.RunGameUri); Application.Current.Shutdown(); }