/// <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;
                m_booAcceptedPath     = e.InstalledOnSuitableFileSystem;
                lblPath.Text          = e.InstallationPath;

                if (e.InstalledOnSuitableFileSystem)
                {
                    SetVisiblePanel(pnlCandidate);
                }
                else
                {
                    pnlFileSystemError.Size = new Size(pnlFileSystemError.Width, 66);
                    SetVisiblePanel(pnlFileSystemError);
                }
            }
        }
Пример #2
0
 /// <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.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);
     }
 }
Пример #4
0
 /// <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;
 }