void saveSettings() { string AppPath; AppPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); if (!AppPath.EndsWith(@"\")) { AppPath += @"\"; } string sXmlFile = AppPath + "settings.xml"; _settings.writeXML(sXmlFile); }
bool loadSettings() { bool bRet = false; string AppPath; AppPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); if (!AppPath.EndsWith(@"\")) { AppPath += @"\"; } string sXmlFile = AppPath + "settings.xml"; if (System.IO.File.Exists(sXmlFile)) { rdp_settings rdpsett = rdp_settings.loadSettings(sXmlFile); if (rdpsett != null) { _settings = rdpsett; updateForm(); bRet = true; } } return(bRet); }