Beispiel #1
0
 private void ButtonStop_Click(object sender, RoutedEventArgs e)
 {
     TextConsole.Log("Button:  STOP clicked!");
     ButtonStop.IsEnabled  = false;
     ButtonStart.IsEnabled = true;
     DiscordBot.Stop();
 }
Beispiel #2
0
 public MainBotUI()
 {
     InitializeComponent();
     ButtonStop.IsEnabled = false;
     ConsoleBlock         = TextBlockConsole;
     ConsoleScrollViewer  = ScrollViewerConsole;
     TextConsole.Log("MainBotUi initialized");
 }
Beispiel #3
0
        private void ButtonTokenSave_Click(object sender, RoutedEventArgs e)
        {
            TabControlMain.SelectedIndex = 0;

            if (PasswordBoxToken.Password == "")
            {
                TextConsole.Log("First, fill in the Token field!");
                return;
            }

            BotConfig.SetToken(PasswordBoxToken.Password);

            ButtonTokenSave.IsEnabled = false;
        }
Beispiel #4
0
        private void ButtonStart_Click(object sender, RoutedEventArgs e)
        {
            TextConsole.Log("Button:  START clicked!");

            if (BotConfig.CheckTokenExist())
            {
                ButtonStart.IsEnabled = false;
                ButtonStop.IsEnabled  = true;
                DiscordBot.Start();
            }
            else
            {
                TextConsole.Log("Please set Token before start Bot!");
            }
        }