Exemplo n.º 1
0
        /// <summary>
        /// 写入登录信息
        /// </summary>
        /// <param name="sectionName"></param>
        /// <param name="value">账号信息(数字json)</param>
        /// <param name="appKey">加密key->软件唯一编码</param>
        /// <param name="root"></param>
        public static void WriteLoginInfo(List <ServiceIniLoginResponse> list, string appKey, string sectionName = sectionName)
        {
            var json  = JsonConvert.SerializeObject(list);
            var value = AESHelper.Encrypt(json, appKey);

            ServiceIniHelper.Write(sectionName, "loginInfo", value, root: DocumentDefintion.DocumentPath, fileType: Framework.Enums.EnumIniFileType.Cache);
        }
Exemplo n.º 2
0
        private static void WriteModuleDescription(string sectionName, string value)
        {
            if (sectionName.Equals(_baseInfo))
            {
                throw new ArgumentNullException("sectionName value is a built-in definition module");
            }

            ServiceIniHelper.Write(sectionName, "description", value);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 写入是否是主程序
        /// </summary>
        private static void WriteModuleIsMainProcess(string sectionName, bool isMainProcess)
        {
            if (sectionName.Equals(_baseInfo))
            {
                throw new ArgumentNullException("sectionName value is a built-in definition module");
            }

            ServiceIniHelper.Write(sectionName, "isMainProcess", isMainProcess ? "1" : "0");
        }
Exemplo n.º 4
0
 /// <summary>
 /// 写入启动
 /// </summary>
 /// <param name="startProcess"></param>
 public static void WriteStartProcess(string startProcess)
 {
     ServiceIniHelper.Write(_baseInfo, "startProcess", startProcess, fileType: EnumIniFileType.Start);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 写入升级标题
 /// </summary>
 /// <param name="title"></param>
 public static void WriteTitle(string title)
 {
     ServiceIniHelper.Write(_baseInfo, "title", title);
 }
Exemplo n.º 6
0
 /// <summary>
 /// 写入代理服务器端口地址
 /// </summary>
 /// <param name="port"></param>
 public static void WriteProxyPort(string port)
 {
     ServiceIniHelper.Write(_baseInfo, "port", port);
 }
Exemplo n.º 7
0
        //public static void WriteStartProcess(string startProcess)
        //{
        //    ServiceIniHelper.Write(_baseInfo, "startProcess", startProcess);
        //}

        #region 代理服务器
        /// <summary>
        /// 写入代理服务器Ip地址
        /// </summary>
        /// <param name="ip"></param>
        public static void WriteProxyIp(string ip)
        {
            ServiceIniHelper.Write(_baseInfo, "ip", ip);
        }
Exemplo n.º 8
0
 /// <summary>
 /// 写入更新得模块列表,多个用|号隔开
 /// </summary>
 /// <param name="module"></param>
 public static void WriteModuleList(string module)
 {
     ServiceIniHelper.Write(_baseInfo, "moduleList", module);
 }
Exemplo n.º 9
0
 /// <summary>
 /// 写入升级描述内容
 /// </summary>
 /// <param name="upgradeDescription"></param>
 public static void WriteUpgradeDescription(string upgradeDescription)
 {
     upgradeDescription = DESHelper.DESEncrypt(upgradeDescription);
     ServiceIniHelper.Write(_baseInfo, "description", upgradeDescription);
 }
Exemplo n.º 10
0
 /// <summary>
 /// 写入当前得进程文件名称,避免存在文件被重新命名问题
 /// </summary>
 /// <param name="exeName"></param>
 public static void WriteExeName(string exeName)
 {
     ServiceIniHelper.Write(_baseInfo, "exeName", exeName);
 }