Exemple #1
0
 public Main()
 {
     InitializeComponent();
     notifyIcon.Visible = false;
     btnStop.Enabled = false;
     _bot = new GuidBot();
     _bot.MessageReceived += (sender, args) => txtLog.AppendText(string.Format("{0} : {1}{2}", args.UserName, args.Text, Environment.NewLine));
     this.Resize += Main_Resize;
     this.notifyIcon.MouseDoubleClick += formNotifyIcon_MouseDoubleClick;
     this.notifyIcon.MouseClick += formNotifyIcon_MouseDoubleClick;
 }
Exemple #2
0
 static async Task Run()
 {
     var guidBot = new GuidBot();
     guidBot.MessageReceived+= (sender, args) => System.Console.WriteLine("{0} : {1}",args.UserName, args.Text);
     await guidBot.Start();
 }
 private async Task RunBot()
 {
     var guidBot = new GuidBot();
     await guidBot.Start();
 }