/// <summary> /// Starts the chosen bot program /// </summary> /// <param name="botProgram">bot program to start</param> private void RunBotProgram(Button startButton) { CollectStartParams(); RunningBot = BotRegistry.GetSelectedBot(RunParams, RunParams.BotManager); SetActiveState(startButton); RunningBot.Start(); UpdateTimer.Enabled = true; }
/// <summary> /// Logs in to for the selected bot on a rotation tab /// </summary> /// <param name="rotationList">rotation tab to use</param> /// <param name="botSelection">selected bot on the rotation tab</param> /// <param name="startButton">reference to the start button used for this tab</param> private void RotationLogIn(RunParamsList rotationList, int botSelection, Button startButton) { CollectStartParams(); if (rotationList == null || !Numerical.WithinBounds(botSelection, 0, RunParams.PhasmatysParams.Count - 1)) { return; } rotationList[botSelection].TaskComplete = new BotResponse(BotDone); RunningBot = new LogInToGame(rotationList[botSelection]); RunningBot.Start(); SetActiveState(startButton); UpdateTimer.Enabled = true; }