private void button4_Click(object sender, EventArgs e) { var excelPath = currDir + textBox1.Text.Trim(); if (string.IsNullOrEmpty(textBox1.Text) || !Directory.Exists(excelPath)) { MessageBox.Show("Excel目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var clientDir = currDir + textBox2.Text.Trim(); if (string.IsNullOrEmpty(textBox2.Text) || !Directory.Exists(clientDir)) { MessageBox.Show("客户端数据目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var clientCode = currDir + textBox3.Text.Trim(); if (string.IsNullOrEmpty(textBox3.Text) || !Directory.Exists(clientCode)) { MessageBox.Show("客户端代码目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var serverDir = currDir + textBox4.Text.Trim(); if (string.IsNullOrEmpty(textBox4.Text) || !Directory.Exists(serverDir)) { MessageBox.Show("服务器数据目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var serverCode = currDir + textBox5.Text.Trim(); if (string.IsNullOrEmpty(textBox5.Text) || !Directory.Exists(serverCode)) { MessageBox.Show("服务器代码目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var templateDir = currDir + textBox6.Text.Trim(); if (string.IsNullOrEmpty(textBox6.Text) || !Directory.Exists(templateDir)) { MessageBox.Show("服务器数据目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } button4.Enabled = false; //try { TableProc.Start(this, excelPath, clientDir, clientCode, serverDir, serverCode, templateDir); } //catch (Exception ex) //{ // Console.WriteLine(ex.Message); // MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); //} button4.Enabled = true; }
private void button4_Click(object sender, EventArgs e) { var excelPath = currDir + textBox1.Text.Trim(); if (string.IsNullOrEmpty(textBox1.Text) || !Directory.Exists(excelPath)) { MessageBox.Show("Excel目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var clientDir = currDir + textBox2.Text.Trim(); if (string.IsNullOrEmpty(textBox2.Text) || !Directory.Exists(clientDir)) { MessageBox.Show("客户端数据目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var clientCode = currDir + textBox3.Text.Trim(); if (string.IsNullOrEmpty(textBox3.Text) || !Directory.Exists(clientCode)) { MessageBox.Show("客户端代码目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var serverDir = currDir + textBox4.Text.Trim(); if (string.IsNullOrEmpty(textBox4.Text) || !Directory.Exists(serverDir)) { MessageBox.Show("服务器数据目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var serverCode = currDir + textBox5.Text.Trim(); if (string.IsNullOrEmpty(textBox5.Text) || !Directory.Exists(serverCode)) { MessageBox.Show("服务器代码目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var templateDir = currDir + textBox6.Text.Trim(); if (string.IsNullOrEmpty(textBox6.Text) || !Directory.Exists(templateDir)) { MessageBox.Show("服务器数据目录设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var clientDll = textBox8.Text.Trim(); if (string.IsNullOrEmpty(clientDll)) { MessageBox.Show("客户端DLL名称设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var serverDll = textBox7.Text.Trim(); if (string.IsNullOrEmpty(serverDll)) { MessageBox.Show("服务端DLL名称设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var luaPath = textBox9.Text.Trim(); if (string.IsNullOrEmpty(luaPath)) { MessageBox.Show("Lua代码路径设置错误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } button4.Enabled = false; TableProc.Start(this, clientDir, clientCode, luaPath, serverDir, serverCode, templateDir, clientDll, serverDll); button4.Enabled = true; }