private void btnStop_Click(object sender, EventArgs e) { process.abort(); process = null; btnStart.Enabled = true; btnStop.Enabled = false; txtAvertTime.Enabled = true; txtSectorSize.Enabled = true; txtScanningSpeed.Enabled = true; cboSite.Enabled = true; }
public Form1() { InitializeComponent(); cboSite.Items.Add("13211"); cboSite.Items.Add("13210"); cboSite.Items.Add("13206"); process = null; btnStop.Enabled = false; txtAvertTime.Text = "1000"; txtSectorSize.Text = "360"; txtScanningSpeed.Text = "1"; cboSite.SelectedIndex = 0; }
private void btnStart_Click(object sender, EventArgs e) { if (process == null) { if (txtAvertTime.Text == "") { MessageBox.Show("생성주기를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } if (txtSectorSize.Text == "") { MessageBox.Show("섹터 크기를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } if (txtScanningSpeed.Text == "") { MessageBox.Show("스캐닝 속도를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } if (cboSite.Text == "") { MessageBox.Show("사이트를 선택하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } process = new FileThreadCls(this); process.setAvertTime(txtAvertTime.Text); process.setSectorSize(txtSectorSize.Text); process.setScanningSpeed(txtScanningSpeed.Text); process.setSite(cboSite.Text); process.start(); btnStart.Enabled = false; btnStop.Enabled = true; txtAvertTime.Enabled = false; txtSectorSize.Enabled = false; txtScanningSpeed.Enabled = false; cboSite.Enabled = false; } }