Exemplo n.º 1
0
 private void btnSend_Click(object sender, EventArgs e)
 {
     btnSend.Enabled = false;
     tc         = new tempClass(Convert.ToInt16(cbbStart.Text), Convert.ToInt16(cbbEnd.Text));
     tc.st      = new SendText(SendModeSet);
     SendThread = new Thread(new ThreadStart(tc.send));
     SendThread.IsBackground = true;
     SendThread.Start();
     btnStop.Enabled = true;
 }
Exemplo n.º 2
0
 private void btnClose_Click(object sender, EventArgs e)
 {
     if (mUdp != null)
     {
         mUdp.fUdpClose();
         mUdp = null;
     }
     if (SendThread != null)
     {
         SendThread.Abort();
         SendThread = null;
     }
     tc = null;
     this.Close();
     this.Dispose();
 }
Exemplo n.º 3
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     btnStop.Enabled = false;
     if (mUdp != null)
     {
         mUdp.fUdpClose();
         mUdp = null;
     }
     if (SendThread != null)
     {
         SendThread.Abort();
         SendThread = null;
     }
     tc = null;
     btnSend.Enabled = true;
 }