예제 #1
0
        private void OnChatMessageReceived(XmppMessage message)
        {
            this.Dispatcher.BeginInvoke
            (
                DispatcherPriority.Normal,
                new ThreadStart
                (
                    delegate
                    {
                        WindowInteropHelper helper = new WindowInteropHelper(this);

                        if (!this.IsVisible)
                        {
                            this.ShowActivated  = false;
                            this.Visibility     = Visibility.Visible;
                        }

                        if (!this.IsActive ||
                            this.WindowState == WindowState.Minimized)
                        {
                            Win32NativeMethods.FlashWindow(helper.Handle);
                        }
                    }
                )
            );
        }
예제 #2
0
 private void OnErrorMessageReceived(XmppMessage message)
 {
     this.messageReceivedSubject.OnNext(message);
 }
예제 #3
0
        private void OnChatMessageReceived(XmppMessage message)
        {
            XmppChat chat = null;

            if (String.IsNullOrEmpty(message.Body) &&
                !this.chats.ContainsKey(message.From.BareIdentifier))
            {
            }
            else
            {
                if (!this.chats.ContainsKey(message.From.BareIdentifier))
                {
                    chat = this.CreateChat(message.From);
                }
                else
                {
                    chat = this.chats[message.From.BareIdentifier];
                }

                this.messageReceivedSubject.OnNext(message);
            }
        }
예제 #4
0
 private void OnChatMessageReceived(XmppMessage message)
 {
     this.OpenChatView(message.From);
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="">XmppMessageEvent</see> class.
 /// </summary>
 /// <param name="message">The message information</param>
 public XmppMessageEvent(XmppMessage message)
 {
     this.message = message;
 }
예제 #6
0
 private void OnMultiUserChatMessageReceived(XmppMessage message)
 {
     this.createChatRoomEvent.Set();
     this.seekEnterChatRoomEvent.Set();
 }