示例#1
0
        /// <summary>
        /// 初始化配置目录信息
        /// </summary>
        public UpdateWork(string _programName, string localAddress, string isClickUpdate)
        {
            localInfo = new LocalInfo(localAddress);
            Process cur = Process.GetCurrentProcess();

            mainName    = Path.GetFileName(cur.MainModule.FileName);
            programName = _programName;
            //创建备份目录信息
            DirectoryInfo bakinfo = new DirectoryInfo(bakPath);

            if (bakinfo.Exists == false)
            {
                bakinfo.Create();
            }
            //创建临时目录信息
            DirectoryInfo tempinfo = new DirectoryInfo(tempPath);

            if (tempinfo.Exists == false)
            {
                tempinfo.Create();
            }
            localInfo.LoadXml();
            UpdateVerList = GetServer(localInfo.ServerUpdateUrl);
            CheckVer(localInfo.LocalVersion, localInfo.LocalIgnoreVersion, isClickUpdate);
        }