Beispiel #1
0
 private void StartStopButton_Click(object sender, EventArgs e)
 {
     if (!_isStarted)
     {
         Logger.Debug("Started");
         MainLogic.Setup(CurrentPreset).ConfigureAwait(false);
     }
     else
     {
         MainLogic.Stop();
     }
 }
Beispiel #2
0
        private void loadPresetButton_Click(object sender, EventArgs e)
        {
            Logger.Debug($"Loading preset {((Preset)presetsComboBox.SelectedItem).Name}.");
            CurrentPreset.LoadPreset((Preset)presetsComboBox.SelectedItem);

            LoadFromCurrentPreset();

            Logger.Debug("Preset loaded!");
            if (_isStarted)
            {
                Logger.Debug("Restarting the bot...");
                MainLogic.Stop();
                MainLogic.Setup(CurrentPreset).ConfigureAwait(false);
            }
        }