日期:2014-05-17 浏览次数:20842 次
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="WebService测试程序.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<WebService测试程序.Properties.Settings>
<setting name="WebService测试程序_WebReference1_Service1" serializeAs="String">
<value>http://10.68.69.203:8081/TWS.asmx</value>
</setting>
<setting name="WebService测试程序_WebReference2_Service1" serializeAs="String">
<value>http://10.68.69.203:8082/TWS.asmx</value>
</setting>
</WebService测试程序.Properties.Settings>
</applicationSettings>
</configuration>
private void button1_Click(object sender, EventArgs e)
{
//string exeConfigFile = Process.GetCurrentProcess().MainModule.FileName + ".config";
//XmlDocument doc = new XmlDocument();
//doc.Load(exeConfigFile);
//XmlNodeList list = doc.DocumentElement.GetElementsByTagName("applicationSettings");
//foreach (XmlNode node in list)
//{
// MessageBox.Show(node.ChildNodes[0].ChildNodes[0].InnerText);
// node.ChildNodes[0].ChildNodes[0].InnerText = "aa";
// MessageBox.Show(node.ChildNodes[0].ChildNodes[0].InnerText);
//}
XmlDocument doc = new XmlDocument();