#region 保存指定节点值
private bool SaveRegCode(string regCode, string key)
{
try
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Application.StartupPath + "/StoreManageV3.Main.exe.config");
XmlNode connNode = xmlDoc.SelectSingleNode("/configuration/appSettings/add[@key='" + key + "']");
connNode.Attributes["value"].Value = regCode;
xmlDoc.Save(Application.StartupPath + "/StoreManageV3.Main.exe.config");
return true;
}
catch
{
return false;
}
}
#endregion