Example #1
0
        private void btStartStop_Click(object sender, EventArgs e)
        {
            int.TryParse(tbRingSize.Text, out int ringSize);
            int msgQtt = 0;

            int.TryParse(tbMessageQuantity.Text, out msgQtt);
            if ((ringSize > 0) && (msgQtt > 0))
            {
                catcher.SetEvent(lblDuration, new EventHandler <string>(this.EvHandler));
                new RingActor(ringSize, msgQtt, catcher);
            }
        }
Example #2
0
 protected void EvHandler(object sender, string i)
 {
     listBox1.Items.Add(i);
     catcher.SetEvent(listBox1, new EventHandler <string>(this.EvHandler));
 }