public static bool RunOverwolf() { Thread.Sleep(3000); if (!FindProcess.IsRunning("Overwolf")) { if (!RunProcess.Run("Overwolf")) { return(false); } } return(true); }
public static bool RunLeagueOfLegend() { Thread.Sleep(3000); if (!FindProcess.IsRunning("LeagueOfLegends")) { if (!RunProcess.Run("LeagueOfLegends")) { return(false); } } return(true); }
public void RunBoth() { mainForm.UpdateVisibility(); mainForm.UpdateLabel("Program Start", true); MessageAndProgressBar(Status.Check_Overwolf); if (FindProcess.IsRunning("Overwolf")) { MessageAndProgressBar(Status.Run_League_Of_Legends); Services.RunLeagueOfLegend(); MessageAndProgressBar(Status.All_program_running); } else { MessageAndProgressBar(Status.Run_Overwolf); if (RunProcess.Run("Overwolf")) { MessageAndProgressBar(Status.Waiting_Overwolf); if (FindProcess.WaitOverwolf()) { MessageAndProgressBar(Status.Overwolf_Is_running); if (FindProcess.IsRunning("Overwolf")) { MessageAndProgressBar(Status.Run_League_Of_Legends); Services.RunLeagueOfLegend(); } MessageAndProgressBar(Status.All_program_running); } else { mainForm.UpdateLabel("Error Overwolf", false); } } } }