Exemplo n.º 1
0
 /// <summary>
 /// 加载自动更新程序。
 /// </summary>
 /// <param name="initService"></param>
 protected void LoadAutoUpdateProgram(InitialService initService)
 {
     if (initService != null)
     {
         CredentialsCollection cred = CredentialsFactory.DeSerialize(FolderStructure.CredentialsFile);
         if (cred != null && cred.Count > 0)
         {
             this.CoreService.Add("credentials", cred[0]);
             try
             {
                 string url = cred[0].ServiceURL;
                 if (!string.IsNullOrEmpty(url))
                 {
                     initService.RaiseChanged("检测自动更新...");
                     string[] urls = url.Split('/');
                     url = url.Replace(urls[urls.Length - 1], "AutoUpdate.ashx");
                     Process.Start("Yaesoft.SFIT.Client.AutoUpdate.exe", url);
                 }
             }
             catch (Exception x)
             {
                 initService.RaiseChanged("自动更新异常:" + x.Message);
             }
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 加载端口设置文件。
 /// </summary>
 protected void LoadNetPortSettingsCfg(InitialService initService)
 {
     if (initService != null)
     {
         initService.RaiseChanged("开始加载端口设置数据...");
         PortSettings ps = NetPortSettingsMgr.DeSerializer();
         if (ps != null)
         {
             initService.Add("portsettings", ps);
             initService.RaiseChanged("加载端口设置数据完成...");
         }
         else
         {
             initService.RaiseChanged("加载端口设置数据失败");
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 加载监控界面颜色配置文件。
 /// </summary>
 /// <param name="initService"></param>
 protected void LoadMonitorUIColorSettingsCfg(InitialService initService)
 {
     if (initService != null)
     {
         initService.RaiseChanged("开始加载监控界面颜色配置数据...");
         MonitorUIColorSettings settings = MonitorUIColorSettings.DeSerializer();
         if (settings != null)
         {
             initService.Add("monitoruicolorsettings", settings);
             initService.RaiseChanged("加载监控界面颜色配置数据完成...");
         }
         else
         {
             initService.RaiseChanged("加载监控界面颜色配置数据失败");
         }
     }
 }