/******************************* * download is completed we download everything * /********************************/ public void UpdateCompleted() { Repair repair = new Repair(); myState.changeButtonState(LauncherState.Repair, this); thread = new Thread(() => { repair.PerformRepair(this); }); thread.Start(); }
/******************************* * Repair the game * /********************************/ public void PerformRepair() { if (myState.getLauncherState() != LauncherState.Downloading) { Repair repair = new Repair(); myState.changeButtonState(LauncherState.Repair, this); thread = new Thread(() => { repair.PerformRepair(this); }); thread.Start(); } }
/******************************* * verification if there us or not an update for the game * /********************************/ private void CheckForGameUpdate() { if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) { Repair repair = new Repair(); myState.changeButtonState(LauncherState.Repair, this); thread = new Thread(() => { repair.PerformRepair(this); }); thread.Start(); } else { MessageBox.Show("Be smart, you need a valid internet connection."); Application.Exit(); } }