src/TF2HUD.Editor/MainWindow.xaml.cs
/// <summary>
///     Called when a new HUD has been selected from the list.
/// </summary>
/// <param name="hud">Selected HUD object.</param>
Called when a new HUD has been selected from the list.
Called when a new HUD has been selected from the list .
public void SelectionChanged(object sender, HUD hud)
        {
            if (hud != null)
            {
                HudSelection = hud.Name;
                if (Json.SelectedHUDInstalled)
                    LblStatus.Content = string.Format(Properties.Resources.status_installed, Json.SelectedHUD.Name);
                else if (Directory.Exists(HudPath))
                    LblStatus.Content = string.Format(Properties.Resources.status_installed_not, Json.SelectedHUD.Name);
                else
                    LblStatus.Content = Properties.Resources.status_pathNotSet;
                Application.Current.MainWindow.WindowState = hud.Maximize ? WindowState.Maximized : WindowState.Normal;
                Settings.Default.hud_selected = hud.Name;
                Settings.Default.Save();
            }
            else
            {
                HudSelection = string.Empty;
                LblStatus.Content = string.Empty;
            }
            SetPageView(hud);
        }
public void SelectionChanged ( object sender , HUD hud ) { if ( hud != null ) { HudSelection = hud . Name ; if ( Json . SelectedHUDInstalled ) LblStatus . Content = string . Format ( Properties . Resources . status_installed , Json . SelectedHUD . Name ) ; else if ( Directory . Exists ( HudPath ) ) LblStatus . Content = string . Format ( Properties . Resources . status_installed_not , Json . SelectedHUD . Name ) ; else LblStatus . Content = Properties . Resources . status_pathNotSet ; Application . Current . MainWindow . WindowState = hud . Maximize ? WindowState . Maximized : WindowState . Normal ; Settings . Default . hud_selected = hud . Name ; Settings . Default . Save ( ) ; } else { HudSelection = string . Empty ; LblStatus . Content = string . Empty ; } SetPageView ( hud ) ; }
Called when a new HUD has been selected from the list.
Called when a new HUD has been selected from the list .
// Save the selected HUD.
sender
object
hud
HUD
Selected HUD object.
Selected HUD object .