private void checkThingsToStart() { if (SystemParameters.PowerLineStatus != PowerLineStatus.Online) { var confirmResult = MessageBox.Show("Your power cable isn't connected, do you still want to start?", "Confirm Start", MessageBoxButton.YesNo); if (confirmResult != MessageBoxResult.Yes) { return; } } if (!bolRunning) { var confirmResult = MessageBox.Show("Bot Of Legends is not running, do you still want to start?", "Confirm Start", MessageBoxButton.YesNo); if (confirmResult != MessageBoxResult.Yes) { return; } } if (App.settings.checkFolderSettings()) { Rotator.start(); } }
private void action(object sender, JavascriptMethodEventArgs e) { if (e.Arguments[0] == 0) { Rotator.pause(); } if (e.Arguments[0] == 1) { Rotator.stop(); } if (e.Arguments[0] == 2) { Rotator.setLimit((int)e.Arguments[1]); new Thread(() => { checkThingsToStart(); }).Start(); } if (e.Arguments[0] == 3) { Rotator.start(); } }