Ejemplo n.º 1
0
 public void getShouts(ShoutReceivedArgs e)                                 //Receive shouts from Darkbox
 {
     foreach (DBShout s in e.Shouts)
     {
         string time;
         if (checkBox4.Checked)                                             //Show the time messages were sent
            time = $"[{s.Date}] ";
         else
            time = "";
         Invoke(new MethodInvoker(() => richTextBox1.Text += time + $"{s.Username}: {s.Message}\n"));
         if (!ApplicationIsActivated())                                     //Shows notification if a message is sent
         {
             if (on == 2)
                 notifyIcon1.ShowBalloonTip(3000);
         }
     }
 }