Example #1
0
        /// <summary>
        /// 记录程序信息
        /// </summary>
        private void WriteAppInfo()
        {
            try
            {
                IniConfigManager ini             = new IniConfigManager();
                string           path            = ini.GetUpdateAppPath();
                string           version         = ini.GetAboutVersion();
                string           serverUpdateURL = ini.GetServerUpdateURL();
                string           file            = path + "/" + appName + ".ini";

                if (!Directory.Exists(path))
                {
                    // Create the directory it does not exist.
                    Directory.CreateDirectory(path);
                }

                IniFileController iniFile = new IniFileController(file);
                iniFile.IniWriteValue(appName, "Path", GetPath.GetCurrentDirectory());
                iniFile.IniWriteValue(appName, "Version", version);
                iniFile.IniWriteValue(appName, "UpdateURL", serverUpdateURL);
            }
            catch (Exception e)
            {
                CLog4net.LogError("WriteConfig:" + e);
            }
        }
Example #2
0
        public SoftUpdateManager()
        {
            IniConfigManager ini = new IniConfigManager();

            updateUrl = ini.GetServerUpdateURL();
        }