Esempio n. 1
0
 private void Timer_Tick(object sender, EventArgs e)
 {
     if (messageQueue.Count > 0)
     {
         string message = messageQueue.Dequeue();
         KafkaWorker.sendAlarmMessage(message, ckb_showMessage.Checked);
     }
     else
     {
         timer.Stop();
         MessageBox.Show("已经没有待发的消息了");
         btn_start.Enabled = true;
         btn_stop.Enabled  = false;
     }
 }
Esempio n. 2
0
 private void btn_send_Click(object sender, EventArgs e)
 {
     KafkaWorker.sendAlarmMessage(rtb_message.Text.Trim(), false, true);
 }