Пример #1
0
        private void HandleQueryRoomStatusCompleted(object sender, Core.Services.AsyncCompletedEventArgs <ICollection <UserStateInfoResponse> > e)
        {
            if (e.Error != null)
            {
                _context.Post(_ => { ErrorMessage = e.Error.Message; }, null);
            }

            if (e.Result != null)
            {
                _context.Post(_ => { ErrorMessage = null; }, null);
                _context.Post(_ => UpdateStates(e.Result), null);
            }
        }
Пример #2
0
        //todo: unit test.
        private void HandleUserMessageServiceReceivedMessages(object sender, Core.Services.AsyncCompletedEventArgs <ICollection <UserMessageReceipt> > e)
        {
            if (e.Error != null || e.Result == null)
            {
                return;
            }

            foreach (UserMessageReceipt message in e.Result)
            {
                _growlNotifiactions.AddNotification(new Notification()
                {
                    ImageUrl = "pack://application:,,,/Wpf/Resources/mail_24x18.png",
                    Message  =
                        string.Format("{0} | {1} : {2}", message.FromName, message.SendTime, message.Message),
                    Title = "Time Warp Message"
                });
            }
        }