Пример #1
0
        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);
        }
Пример #2
0
        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);
        }