readKcount = 4;
}
}
catch (Exception ex)
{
MessageBox.Show("导入配置文档错误:" + ex.Message);
foreach (Control ctrl in this.Controls)
{
ctrl.Enabled = false;
}
}
}
private void MenuItemConfig_Click(object sender, EventArgs e)//修改配置浮动菜单处理
{
FormPsw fmpsw = new FormPsw();
if (fmpsw.ShowDialog() == DialogResult.OK && fmpsw.txPsw.Text == this.psw)
{
configForm fm = new configForm();
fm.txServerIP.Text = this.serverIP;
fm.txServerPort.Text = this.serverPort;
fm.txProgram.Text = this.progName;
fm.txDownloadPath.Text = this.txDonwloadPath.Text;
fm.txConnString.Text = this.connString;
fm.txConnType.Text = this.connType.ToString();
fm.txPsw.Text = this.psw;
fm.txReadKcount.Text = this.readKcount.ToString();
if (fm.ShowDialog() == DialogResult.OK)
{
this.serverIP = fm.txServerIP.Text;
this.serverPort = fm.txServerPort.Text;
|