querryObj = new audioQuer.audioQuerClass(this.connString, this.connType,this.readKcount*1024);//创建远程对象,数据库连接类型
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
actEnable = false;
}
if (querryObj == null||!actEnable)
{
foreach (Control ctrl in this.Controls)
{
ctrl.Enabled = false;
}
}
this.button2.Enabled = this.testButtonEnable;
}
private void ProgramConfig()//读取xml配置文件
{
System.IO.FileInfo configFile = new System.IO.FileInfo("clientConfig.xml");
this.configFile = configFile.FullName;
try
{
System.Xml.XmlDocument configDoc = new System.Xml.XmlDocument();
configDoc.Load(this.configFile);
System.Xml.XmlElement root = configDoc.DocumentElement;
this.serverIP = root["serverIP"].InnerText;
this.serverPort = root["serverPort"].InnerText;
this.progName = root["progName"].InnerText;
this.txDonwloadPath.Text = root["downloadPath"].InnerText;
this.connString = root["connString"].InnerText;
this.connType = byte.Parse(root["connType"].InnerText);
this.psw = root["psw"].InnerText;
this.readKcount = byte.Parse(root["readKcount"].InnerText);
if (readKcount > 64)
{
|