private void buttonUpdateProgram_Click(object sender, EventArgs e) { if (MyMessageBox.MessageBoxOkCancel("textAreYouSureToUpdateProgram") == DialogResult.OK) { string deviceIP = kryptonComboBoxControllerIp.Text.Trim(); string filePath = textBoxFilePath.Text.Trim(); string downLoadCmd = DllC0402.Server; if ((filePath == "") || (filePath == null)) { MyMessageBox.MessageBoxOK("textFilePathIsNull"); return; } DownLoadThread downLoadThread = new DownLoadThread(deviceIP, filePath, downLoadCmd, progressBar2); downLoadThread.DownLoadThreadRun(); } }