private void btnStart_Click(object sender, EventArgs e) { if (process == null) { // validation check // IP, Port, ID, Pass if (txtIP.Text == "") { MessageBox.Show("호스트를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } if (txtPort.Text == "") { MessageBox.Show("서버 FTP Port를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } if (txtID.Text == "") { MessageBox.Show("User ID를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } if (txtPass.Text == "") { MessageBox.Show("User Password를 입력하지 않았습니다", "입력에러", MessageBoxButtons.OK); return; } process = new ObserverProcess(this); process.setHost(txtIP.Text); process.setID(txtID.Text); process.setPass(txtPass.Text); process.setPort(txtPort.Text); process.setStHost(txtStIP.Text); process.setStPort(txtStPort.Text); process.setStCode(txtStCode.Text); process.setSndLocalPort(m_sndLocalPort, m_st_rcv_port, m_ft_rcv_port, m_at_rcv_port); txtIP.ReadOnly = true; txtPort.ReadOnly = true; txtID.ReadOnly = true; txtPass.ReadOnly = true; txtStCode.ReadOnly = true; btnStart.Enabled = false; btnStop.Enabled = true; process.start(); statusPanel.Text = "Process started. Action Start...."; statusPanel.ToolTipText = "Last Activity"; btnStart.BackgroundImage = Properties.Resources.btn_start_sm_g; btnStart.BackgroundImageLayout = ImageLayout.Stretch; btnStop.BackgroundImage = Properties.Resources.btn_stop_sm; btnStop.BackgroundImageLayout = ImageLayout.Stretch; } }