/// <summary> /// 联系人移除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void Conversation_ParticipantAdded(object sender, ParticipantCollectionChangedEventArgs e) { try { //使用异步委托 Application.Current.Dispatcher.BeginInvoke(new Action(() => { if (Add_ConversationParticalCallBack != null) { Add_ConversationParticalCallBack(e.Participant); } })); } catch (Exception ex) { LogManage.WriteLog(typeof(LyncHelper), ex); } finally { } }
public void ClearTempConfig(int type) { try { if (type == 0) { ConferenceInformationEntityPCList = null; } else if (type == 1) { ReservationConferenceInformationEntityPCList = null; } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 检查是否已连接 /// </summary> /// <returns></returns> public bool CheckIsConnected() { //是否可以 bool isConnected = false; try { if (this._clientSocket.Connected) { isConnected = true; } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } return(isConnected); }
/// <summary> /// 子项拖动完成(鼠标点击弹起) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ConferenceTreeView_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e) { try { if (ConferenceTreeItem.currentConferenceTreeItem != null) { //鼠标点击释放了,不可再拖动 ConferenceTreeItem.currentConferenceTreeItem.isDrag = false; } //显示虚拟拖拽节点 ConferenceTreeView.conferenceTreeView.conferenceTreeItemVisual.Visibility = vy.Collapsed; } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 评论区焦点获取 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void txtComment_GotFocus(object sender, RoutedEventArgs e) { try { //设置占用者 this.AcademicReviewItemTransferEntity.FocusAuthor = TreeCodeEnterEntity.LoginUserName; //占用评论 this.AcademicReviewItemTransferEntity.Operation = ConferenceTreeOperationType.FocusType2; //强行占用焦点 ModelManage.ConferenceTree.ForceOccupyFocus(TreeCodeEnterEntity.ConferenceName, this.AcademicReviewItemTransferEntity, new Action <bool>((result) => { })); } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 浏览器数据初始化 /// </summary> public void WebBrowserViewDataInitPrepare() { try { //uri列表存储地址 WebBrowserCodeEnterEntity.urlStoreFileName = Constant.urlStoreFileName; //智存空间登陆用户名 WebBrowserCodeEnterEntity.WebLoginUserName = Constant.WebLoginUserName; //智存空间登陆密码 WebBrowserCodeEnterEntity.WebLoginPassword = Constant.WebLoginPassword; //网络浏览地址 WebBrowserCodeEnterEntity.WebUri = Constant.WebUri; } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 克隆(xaml,最好不要有资源resource和x:name命名【不支持强命名(name,)】} /// </summary> /// <typeparam name="T"></typeparam> /// <param name="source"></param> /// <returns></returns> public static T XamlClone <T>(T source) { T target = default(T); try { string savedObject = markUp.XamlWriter.Save(source); // Load the XamlObject StringReader stringReader = new StringReader(savedObject); reader xmlReader = reader.Create(stringReader); target = (T)markUp.XamlReader.Load(xmlReader); } catch (Exception ex) { LogManage.WriteLog(typeof(ObjectCloneManage), ex); } finally { } return(target); }
/// <summary> /// 不带语音(无权限) /// </summary> public void NoLimitNoAudio() { try { //移除上传提示 this.stackPane2.Children.Remove(this.btnUploadTip); //删除播放按钮 this.stackPanel.Children.Remove(this.btnItemPlay); //清除删除按钮 this.stackPane2.Children.Clear(); //调整宽度 this.columnH3.Width = new GridLength(10); } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
public void Dispose() { try { if (this.meetingSpace != null) { this.meetingSpace.Dispose(); } if (this.personalSpace != null) { this.personalSpace.Dispose(); } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
void InputMessageWindow_KeyDown(object sender, KeyEventArgs e) { try { if (e.Key == Key.Enter) { if (this.OkEventCallBack != null) { this.OkEventCallBack(this.txtInput.Text.Trim()); this.Close(); } } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 该容器的左键点击释放事件(防止子项拖动释放时鼠标不在子项区域而进行的调整) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void DragTab_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { try { if (framewokElementList != null && framewokElementList.Count > 0) { //调整所有子项的偏移 foreach (var item in framewokElementList) { item.Margin = new Thickness(0); } } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
public static List <Device> GetAllVideoDevices() { List <Device> audioList = new List <Device>(); try { IList <Device> audioDevices = null; audioDevices = deviceManager.VideoDevices; foreach (var item in audioDevices) { audioList.Add(item); } } catch (Exception ex) { LogManage.WriteLog(typeof(DeviceMange), ex); } return(audioList); }
/// <summary> /// 会话共享移除(本地共享) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected static void ConversationCard_ContentRemoved(object sender, ContentCollectionChangedEventArgs e) { try { Application.Current.Dispatcher.BeginInvoke(new Action(() => { if (ShareableContentList.Contains(e.Item)) { ShareableContentList.Remove(e.Item); if (RemoveContent_Type_CallBack != null) { RemoveContent_Type_CallBack(SharingType.ppt | SharingType.OherContent); } } })); } catch (Exception ex) { LogManage.WriteLog(typeof(LyncHelper), ex); } }
/// <summary> /// 使用浏览器的方式参会 /// </summary> /// <param name="meetAddress">会议地址</param> public static void JoinConversationByWebBrowser(string meet_Address) { try { //指定浏览器先释放资源 if (conversationWebBrowser != null) { conversationWebBrowser.Dispose(); } conversationWebBrowser = new System.Windows.Forms.WebBrowser(); //导航到指定地址 conversationWebBrowser.Navigate(meet_Address); } catch (Exception ex) { LogManage.WriteLog(typeof(LyncHelper), ex); } finally { } }
/// <summary> /// 加载完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void WebBrowser_DocumentCompleted(object sender, System.Windows.Forms.WebBrowserDocumentCompletedEventArgs e) { try { System.Windows.Forms.WebBrowserReadyState readyState = this.webView.webBrowser.ReadyState; if (readyState == System.Windows.Forms.WebBrowserReadyState.Complete) { if (this.DocumentLoadCompleateCallBack != null) { this.DocumentLoadCompleateCallBack(); } } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 获取参数(获取人员树) /// </summary> /// <param name="spaceType">空间类型</param> /// <param name="methodName">方法名称</param> /// <param name="ItemID">子项ID</param> /// <returns></returns> internal static string GetParameters_Path(SpaceType spaceType, string methodName, string path) { string str = string.Empty; try { ParametersInit(spaceType); dirIn.Add(SpaceCodeEnterEntity.MethodName, methodName); dirIn.Add(SpaceCodeEnterEntity.Path, path); str = JsonManage.DictionaryToJson(dirIn); } catch (Exception ex) { LogManage.WriteLog(typeof(SpaceHelper), ex); } finally { } return(str); }
/// <summary> /// 加载卡片 /// </summary> private void AddCardEventCallBack() { try { //关闭所有会话 LyncHelper.CloseAllConversation(new Action(() => { //离开会话 ModelManage.ConferenceLyncConversation.LeaveConversation(MyConferenceCodeEnterEntity.ConferenceName, MyConferenceCodeEnterEntity.SelfUri, new Action <bool>((isSuccessed) => { })); })); } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 获取参数(获取目录) /// </summary> /// <param name="spaceType">空间类型</param> /// <param name="methodName">方法名称</param> /// <param name="ItemID">子项ID</param> /// <returns></returns> internal static string GetParameters(SpaceType spaceType, string methodName, int ItemID) { string str = string.Empty; try { ParametersInit(spaceType); dirIn.Add(SpaceCodeEnterEntity.MethodName, methodName); dirIn.Add(SpaceCodeEnterEntity.SP_ItemID, Convert.ToString(ItemID)); str = JsonManage.DictionaryToJson(dirIn); } catch (Exception ex) { LogManage.WriteLog(typeof(SpaceHelper), ex); } finally { } return(str); }
public static void UpdateUser(User user) { try { using (var db = new SMSContext()) { var tempUser = db.Users.Single(x => x.Id == user.Id); tempUser.FirstName = user.FirstName; tempUser.LastName = user.LastName; tempUser.Password = user.Password; tempUser.EmailAddress = user.EmailAddress; tempUser.Phone1 = user.Phone1; tempUser.Phone2 = user.Phone2; db.SaveChanges(); } } catch (Exception exception) { LogManage.Log("MethodName:GetClassById " + Environment.NewLine + " Time: " + DateTime.Now + Environment.NewLine + " ErrorMsg: " + exception.Message); } }
void TimerSetting() { try { //当前播放时间 _timer = new DispatcherTimer(); _timer.Tick += new EventHandler(timer_Tick); _timer.Interval = TimeSpan.FromSeconds(0.3); _timer.Start(); //总共播放的时间 DispatcherTimer timer2 = new DispatcherTimer(); timer2.Tick += new EventHandler(timer2_Tick); timer2.Interval = TimeSpan.FromMilliseconds(10); timer2.Start(); } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } }
/// <summary> /// 样式收集 /// </summary> public void StyleCollection() { try { if (brush_unfold != null && this.Resources.Contains("brush_unfold")) { brush_unfold = this.Resources["brush_unfold"] as ImageBrush; } if (brush_fold != null && this.Resources.Contains("brush_fold")) { brush_fold = this.Resources["brush_fold"] as ImageBrush; } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 获取客户端配置信息完成事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Client_GetClientConfigInformationCompleted(object sender, GetClientConfigInformationCompletedEventArgs e) { try { if (e.Error == null) { if (this.GetClientAppConfig_CallBack != null) { //获取会议信息回调 this.GetClientAppConfig_CallBack(true, e.Result); } } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
/// <summary> /// 高度同步 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void borMain_SizeChanged(object sender, SizeChangedEventArgs e) { try { //var height = this.ActualHeight; //if(e.HeightChanged&&this.ACA_Parent!= null) //{ // foreach (var item in this.ACA_Parent.ACA_ChildList) // { // item.Height = height; // } //} } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
private void HandleVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { try { bool isVisible = (bool)e.NewValue; if (isVisible) { Start(); } else { Stop(); } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } }
/// <summary> /// 获取研讨客户端配置信息 /// </summary> public ClientConfigEntity GetClientConfigInformation() { ClientConfigEntity clientConfigEntity = null; try { if (ClientConfigEntity != null) { //获取客户端配置信息 clientConfigEntity = ClientConfigEntity; } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } return(clientConfigEntity); }
/// <summary> /// 用户名密码错误 /// </summary> /// <param name="tip">信息提示</param> public void CodeOrUserIsNull(string tip) { try { //登录提示旋转按钮隐藏 //this.IsLogining = vy.Hidden; //错误提示 this.ErrorTip = tip; //提示显示 //VisibilityManage.SetShowThanHidenVisibility(this.userLogin_Tip); this.ErrorTipVisibility = vy.Visible; } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
public static void AvConnect(ConversationWindow conversationWindow) { try { AVModality avModality = (AVModality)conversationWindow.Conversation.Modalities[ModalityTypes.AudioVideo]; if (avModality != null) { if (avModality.CanInvoke(ModalityAction.Connect)) { avModality.BeginConnect(null, null); } } } catch (Exception ex) { LogManage.WriteLog(typeof(LyncHelper), ex); } finally { } }
/// <summary> /// 通过浏览器打开文件 /// </summary> public WebView OpenFileByBrowser(string uri) { try { if (this.webView == null) { this.webView = new WebView(uri, this.WebLoginUserName, this.WebLoginPassword); } else { this.webView.OpenUri(uri); } //加载UI事件(比如多媒体播放器,浏览器) this.book_LoadUI(this.webView); } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } return(this.webView); }
void Client_ForbiddenConversationInitCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { try { if (e.Error == null) { this.ForbiddenConversationInit_CallBack(true); } else { this.ForbiddenConversationInit_CallBack(false); } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }
void Client_CheckConversationInitCompleted(object sender, CheckConversationInitCompletedEventArgs e) { try { if (e.Error == null) { this.CheckConversationInit_CallBack(e.Result); } else { this.CheckConversationInit_CallBack(false); } } catch (Exception ex) { LogManage.WriteLog(this.GetType(), ex); } finally { } }