Ejemplo n.º 1
0
 private void ButtonStop_Click(object sender, RoutedEventArgs e)
 {
     TextConsole.Log("Button:  STOP clicked!");
     ButtonStop.IsEnabled  = false;
     ButtonStart.IsEnabled = true;
     DiscordBot.Stop();
 }
Ejemplo n.º 2
0
 public MainBotUI()
 {
     InitializeComponent();
     ButtonStop.IsEnabled = false;
     ConsoleBlock         = TextBlockConsole;
     ConsoleScrollViewer  = ScrollViewerConsole;
     TextConsole.Log("MainBotUi initialized");
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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!");
            }
        }