private void MouseDoubleClickHandler(object sender, MouseButtonEventArgs e) { try { if (WindowModel.Instance.IsOpenMessageCenterWindow()) { } if (e.LeftButton == MouseButtonState.Pressed) { EntGroupTab item = this.dataService.GetEntGroupChatTab(this.group.Gid) as EntGroupTab; if (item != null) { ((INWindow)this.dataService.INWindow).ContentTab.SelectedItem = item; GroupChatTabControl chat = item.TabContent; if (chat != null) { this.WatchMessage(chat); this.WatchShieldMessage(chat); this.UpdateShieldCount(); } } else { item = new EntGroupTab(this.group); item.SetDefaultStyle(); ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item); this.dataService.AddEntGroupChatTab(this.group.Gid, item); ((INWindow)this.dataService.INWindow).ContentTab.SelectedItem = item; this.WatchMessage(item.TabContent); this.WatchShieldMessage(item.TabContent); this.UpdateShieldCount(); } } } catch (System.Exception ex) { this.logger.Error(ex.ToString()); } }
private void GroupNewMessage(Message message) { EntGroupTab item = this.dataService.GetEntGroupChatTab(message.Gid) as EntGroupTab; if (item == null) { EntGroup group = this.dataService.GetEntGroup(message.Gid); if (group != null) { item = new EntGroupTab(group); item.SetDefaultStyle(); ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item); this.dataService.AddEntGroupChatTab(group.Gid, item); } } this.baseTab = item; GroupChatTabControl tab = item.TabContent; if (tab != null) { tab.ChatComponent.AddMessageGroup(message, false); tab.ChatComponent.inputMsgBox.Focus(); } }