void btnStart_Click(object sender, EventArgs e) { if (btnStart.Text.Equals("시작")) { if (cboADBList.SelectedIndex < 0) { return; } btnRefresh.Enabled = false; cboADBList.Enabled = false; chkReceive.Enabled = false; txtTrade.Enabled = false; Imaging.GetHWND(); btnStart.Text = "중지"; mAdb.device = cboADBList.Text; t = new Thread(Macro, Int32.MaxValue); t.Start(); sw.Start(); //timer.Start(); } else { btnRefresh.Enabled = true; cboADBList.Enabled = true; chkReceive.Enabled = true; txtTrade.Enabled = true; btnStart.Text = "시작"; t.Abort(); sw.Stop(); //timer.Stop(); } }