An event arguments class that indicates a possible installation path of a game mode has been found.
Наследование: System.EventArgs
Пример #1
0
 /// <summary>
 /// Raises the <see cref="PathFound"/> event.
 /// </summary>
 /// <param name="e">An <see cref="GameModeDiscoveredEventArgs"/> describing the task that was started.</param>
 protected virtual void OnDisableButOk(GameModeDiscoveredEventArgs e)
 {
     DisableButOk(this, e);
 }
Пример #2
0
 /// <summary>
 /// Raises the <see cref="GameResolved"/> event.
 /// </summary>
 /// <param name="e">An <see cref="GameModeDiscoveredEventArgs"/> describing the task that was started.</param>
 protected virtual void OnGameResolved(GameModeDiscoveredEventArgs e)
 {
     GameResolved(this, e);
 }
Пример #3
0
		/// <summary>
		/// Raises the <see cref="GameResolved"/> event.
		/// </summary>
		/// <param name="e">An <see cref="GameModeDiscoveredEventArgs"/> describing the task that was started.</param>
		protected virtual void OnGameResolved(GameModeDiscoveredEventArgs e)
		{
			GameResolved(this, e);
		}
Пример #4
0
 /// <summary>
 /// Raises the <see cref="PathFound"/> event.
 /// </summary>
 /// <param name="e">An <see cref="GameModeDiscoveredEventArgs"/> describing the task that was started.</param>
 protected virtual void OnPathFound(GameModeDiscoveredEventArgs e)
 {
     PathFound(this, e);
 }
Пример #5
0
		/// <summary>
		/// Raises the <see cref="PathFound"/> event.
		/// </summary>
		/// <param name="e">An <see cref="GameModeDiscoveredEventArgs"/> describing the task that was started.</param>
		protected virtual void OnDisableButOk(GameModeDiscoveredEventArgs e)
		{
			DisableButOk(this, e);
		}
Пример #6
0
		/// <summary>
		/// Raises the <see cref="PathFound"/> event.
		/// </summary>
		/// <param name="e">An <see cref="GameModeDiscoveredEventArgs"/> describing the task that was started.</param>
		protected virtual void OnPathFound(GameModeDiscoveredEventArgs e)
		{
			PathFound(this, e);
		}
		/// <summary>
		/// Handles the <see cref="GameDiscoverer.PathFound"/> event of the game discoverer.
		/// </summary>
		/// <remarks>
		/// This displays the path that was found.
		/// </remarks>
		/// <param name="sender">The object that raised the event.</param>
		/// <param name="e">A <see cref="GameModeDiscoveredEventArgs"/> describing the event arguments.</param>
		private void Detector_PathFound(object sender, GameModeDiscoveredEventArgs e)
		{
			if (InvokeRequired)
			{
				Invoke((Action<object, GameModeDiscoveredEventArgs>)Detector_PathFound, sender, e);
				return;
			}
			if (e.GameMode.ModeId.Equals(GameMode.ModeId))
			{
				m_booGamePathDetected = true;
				lblPath.Text = e.InstallationPath;
				SetVisiblePanel(pnlCandidate);
			}
		}
		/// <summary>
		/// Handles the <see cref="GameDiscoverer.GameResolved"/> event of the game discoverer.
		/// </summary>
		/// <remarks>
		/// Enables the OK button.
		/// </remarks>
		/// <param name="sender">The object that raised the event.</param>
		/// <param name="e">A <see cref="TaskEndedEventArgs"/> describing the event arguments.</param>
		private void GameDetector_GameResolved(object sender, GameModeDiscoveredEventArgs e)
		{
			if (butOK.InvokeRequired)
			{
				butOK.Invoke((Action<object, GameModeDiscoveredEventArgs>)GameDetector_GameResolved, sender, e);
				return;
			}
			if (ViewModel.GameDetector.ResolvedGameModes.Count() == ViewModel.SupportedGameModes.RegisteredGameModes.Count())
				butOK.Enabled = true;
		}
		/// <summary>
		/// Handles the <see cref="GameDiscoverer.DisableButOk"/> event of the game discoverer.
		/// </summary>
		/// <remarks>
		/// Disable the OK button.
		/// </remarks>
		/// <param name="sender">The object that raised the event.</param>
		/// <param name="e">A <see cref="TaskEndedEventArgs"/> describing the event arguments.</param>
		private void GameDetector_DisableButOk(object sender, GameModeDiscoveredEventArgs e)
		{
			butOK.Enabled = false;
		}