Пример #1
0
 public MainWindow()
 {
     using (BotStartForm bsf = new BotStartForm())
     {
         if (bsf.ShowDialog() != System.Windows.Forms.DialogResult.OK)
         {
             Environment.Exit(0);
             return;
         }
         _bot = bsf.Bot;
     }
     InitializeComponent();
     _bot.OnMessageRead += _bot_OnMessageRead;
     _bot.OnDisconnect  += _bot_OnDisconnect;
     _bot.OnConnect     += _bot_OnConnect;
     _bot.Start();
 }
Пример #2
0
 public MainWindow()
 {
     using(BotStartForm bsf = new BotStartForm())
     {
         if(bsf.ShowDialog() != System.Windows.Forms.DialogResult.OK)
         {
             Environment.Exit(0);
             return;
         }
         _bot = bsf.Bot;
     }
     InitializeComponent();
     _bot.OnMessageRead += _bot_OnMessageRead;
     _bot.OnDisconnect += _bot_OnDisconnect;
     _bot.OnConnect += _bot_OnConnect;
     _bot.Start();
 }