/// <summary> /// Raises the <see cref="GameLaunched"/> event. /// </summary> /// <param name="e">A <see cref="GameLaunchEventArgs"/> describing the event arguments.</param> /// <seealso cref="OnGameLaunched(bool, string)"/> protected virtual void OnGameLaunched(GameLaunchEventArgs e) { GameLaunched(this, e); }
/// <summary> /// Handles the <see cref="IGameLauncher.GameLaunched"/> event of the game launcher. /// </summary> /// <remarks>This displays any message resulting from the game launch. If the launch was successful, the /// form is closed.</remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="GameLaunchEventArgs"/> describing the event arguments.</param> private void GameLauncher_GameLaunched(object sender, GameLaunchEventArgs e) { if (!e.Launched) MessageBox.Show(this, e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); else if (ViewModel.EnvironmentInfo.Settings.CloseModManagerAfterGameLaunch) Close(); }