/// <summary> /// 登录初始化配置(lync相关) /// </summary> private void LoginEnviromentInit_Lync() { try { //关闭指定后台进程 ProcessManage.KillProcess("Lync"); //lync临时显示 WindowHide.SetTrayIconAllDsiplay("Lync"); //消除死亡托盘图标 SysTray.Refresh(); //判断当前进程是否为单例 ProcessManage.CheckCurrentProcessIsSingleInstance(new Action(() => { MessageBox.Show("该程序已经在运行中", "操作提示", MessageBoxButton.OK, MessageBoxImage.Information); //关闭程序 Application.Current.Shutdown(0); })); //更改lync注册表 RegeditManage.UpdateLyncRegedit(); //获取lync进程 Process[] processs = Process.GetProcessesByName("Lync"); if (processs.Count() > 0) { //清除lyncApp缓存文件 LyncManage.ClearLyncAppData(); } //打开lync实例 RegeditManage.OpenAplicationByRegedit2("Lync.exe"); //程序退出时释放lync实例 Application.Current.Exit += Current_Exit; #region old solution //验证是否能够访问AD (adpppds) //if (!DetectionManage.TestNetConnectity(Constant.TreeServiceIP)) //{ // MessageBox.Show("服务器连接失败,请及时联系管理员", "操作提示", MessageBoxButton.OK, MessageBoxImage.Information); // //关闭程序 // Application.Current.Shutdown(0); //} ////关闭指定后台进程 //ProcessManage.KillProcess("Lync"); ////lync临时显示 //WindowHide.SetTrayIconAllDsiplay("Lync"); #endregion } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 环境配置2(获取会议信息,持久层信息绑定【config】) /// </summary> public void LoginEnviromentInit3() { try { if (DetectionManage.TestNetConnectity(Constant.TreeServiceIP)) { //验证是否能够访问LYNC扩展web服务(研讨服务) if (DetectionManage.IsWebServiceAvaiable(Constant.TreeServiceAddressFront + Constant.ConferenceTreeServiceWebName)) { if (CheckLoginInitCompleatetimer != null) { this.CheckLoginInitCompleatetimer.Stop(); this.CheckLoginInitCompleatetimer = null; } //获取客户端配置信息 ModelManage.ConferenceInfo.GetClientAppConfig(new Action <bool, ConferenceModel.ConferenceInfoWebService.ClientConfigEntity>((successed, result) => { if (successed) { #region 配置本地环境 //客户端配置信息加载 this.AppconfigSetting(result); //客户端配置信息加载2 this.AppconfigSetting2(result); #region old solution ////防火墙规则添加(研讨客户端) //FireManage.OpenFireWall(Constant.FireName_Conference, Constant.ApplicationFullName); ////防火墙规则添加(版本更新) //FireManage.OpenFireWall(Constant.FireName_ConferenceUpdate, Constant.ConferenceVersionUpdateExe); ////验证并安装lync相关证书 //CertificationManage.SetUpCertification(Constant.CertificationSerial, Constant.Certification); //检测并开启rpc本地服务 //LocalServiceManage.CheckRunRpcService(); //设置证书(不检查发行商的证书是否吊销,不检查服务器证书吊销) //RegeditManage.SetNoCheckCertificationIsRevoke(); //指定webbrowser版本(9.0) //RegeditManage.SetWebBrowserVersion(Constant.ApplicationSingleName); #endregion //设置DNS NetWorkAdapter.SetNetworkAdapter(Constant.DNS1); //更改lync注册表 RegeditManage.UpdateLyncRegedit(); //确保PainFramework.dll存在系统目录 FileManage.CheckDebugHasTheFile(Constant.PaintFileName, Constant.PaintFileRoot); #endregion //获取信息成功 GetClientAppConfigSuccessedDealWidth(); } })); } } else { //获取信息失败 GetClientAppConfigFailedDealWidth(); } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }