private void button_Flash_Click(object sender, EventArgs e) { if (!CanControl.canConnect()) { MessageBox.Show("打开设备失败,请检查设备类型和设备索引号是否正确", "错误", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (s19.Count == 0) { MessageBox.Show("请选择s19文件", "错误", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (flash == null) { MessageBox.Show("请选择车型", "错误", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (!flash.flashThread.IsAlive) { flash.flashThread.Start(); } }
private void Form1_Load(object sender, EventArgs e) { CanControl.canConnect(); }