public QueueNotification(Queue queue) { this.queue = queue; InitializeComponent(); this.DataContext = queue; QueueName.Text = queue.Name + " "; if (!string.IsNullOrWhiteSpace(queue.RestrictToGroup)) { GroupName.Text = queue.RestrictToGroup.Replace(" ", "\u00A0"); } MembersChanged(); queue.PropertyChanged += QueuePropertyChanged; queue.Flash += (s, e) => RaiseFlashEvent(); this.Loaded += OnLoaded; chatControls = new ChatControls(queue.User); chatControls.MessageSubmitted += ChatControlsOnMessageSubmitted; this.OuterPanel.Children.Add(chatControls); MessagesChanged(); }
private void ChatControlsOnMessageSubmitted(object sender, ChatControls.MessageEventArgs messageEventArgs) { SendMessage.SafeInvoke(this, new QueueMessageEventArgs(queue.Id, messageEventArgs.Message)); }