Example #1
0
 private void OnGameExited(object sender, GameExitEventArgs e)
 {
     if (e.ExitCode != 0)
     {
         SetLauncherMode (ELauncherMode.Repair, false);
     }
     else
     {
         SetLauncherMode (ELauncherMode.Launch, false);
     }
 }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Launchpad_Launcher.GameHandler"/> class.
        /// </summary>
        public GameHandler()
        {
            ProgressArgs = new FileDownloadProgressChangedEventArgs ();
            DownloadFinishedArgs = new GameDownloadFinishedEventArgs ();
            UpdateFinishedArgs = new GameUpdateFinishedEventArgs ();
            RepairFinishedArgs = new GameRepairFinishedEventArgs ();

            DownloadFailedArgs = new GameDownloadFailedEventArgs ();
            UpdateFailedArgs = new GameUpdateFailedEventArgs ();
            RepairFailedArgs = new GameRepairFailedEventArgs ();
            LaunchFailedArgs = new GameLaunchFailedEventArgs ();

            GameExitArgs = new GameExitEventArgs ();
        }
Example #3
0
        private void OnGameExited(object sender, GameExitEventArgs e)
        {
            if (e.ExitCode != 0)
            {
                MessageDialog crashDialog = new MessageDialog (
                    this,
                    DialogFlags.Modal,
                    MessageType.Question,
                    ButtonsType.YesNo,
                    String.Format (Mono.Unix.Catalog.GetString (
                        "Whoops! The game appears to have crashed.\n" +
                        "Would you like the launcher to verify the installation?"
                    )));

                if (crashDialog.Run() == (int)ResponseType.Yes)
                {
                    SetLauncherMode (ELauncherMode.Repair, false);
                }
                else
                {
                    SetLauncherMode (ELauncherMode.Launch, false);
                }
            }
            else
            {
                SetLauncherMode (ELauncherMode.Launch, false);
            }
        }