src/TF2HUD.Editor/MainWindow.xaml.cs
/// <summary>
///     Reset user settings for the selected HUD to default.
/// </summary>
Reset user settings for the selected HUD to default.
Reset user settings for the selected HUD to default .
private void BtnReset_OnClick(object sender, RoutedEventArgs e)
        {
            if (_notifier.ShowMessageBox(MessageBoxImage.Question, Properties.Resources.info_hud_reset, MessageBoxButton.YesNo) != MessageBoxResult.Yes) return;
            Logger.Info("Start resetting settings.");
            var selection = Json.SelectedHUD;
            selection.ResetAll();
            selection.Settings.SaveSettings();
            selection.ApplyCustomizations();
            selection.DirtyControls.Clear();
            LblStatus.Content = string.Format(Properties.Resources.status_reset, selection.Name, DateTime.Now);
            Logger.Info("Done resetting settings.");
        }
private void BtnReset_OnClick ( object sender , RoutedEventArgs e ) { if ( _notifier . ShowMessageBox ( MessageBoxImage . Question , Properties . Resources . info_hud_reset , MessageBoxButton . YesNo ) != MessageBoxResult . Yes ) return ; Logger . Info ( " " ) ; var selection = Json . SelectedHUD ; selection . ResetAll ( ) ; selection . Settings . SaveSettings ( ) ; selection . ApplyCustomizations ( ) ; selection . DirtyControls . Clear ( ) ; LblStatus . Content = string . Format ( Properties . Resources . status_reset , selection . Name , DateTime . Now ) ; Logger . Info ( " " ) ; }
Reset user settings for the selected HUD to default.
Reset user settings for the selected HUD to default .
// Ask the user if they want to reset before doing so.
sender
object
e
RoutedEventArgs