Inheritance: BaseRenderingCommand
コード例 #1
0
 public void Visit(DayMessageView view)
 {
     HistoryMessages.BeginChange();
     HistoryMessages.Document.Blocks.Clear();
     var entityThread = CreateThread(HistoryMessages.Document);
     view.Messages.Each(message =>
     {
         var command = new RenderXmppMessage(entityThread.Model, message);
         command.Execute();
     });
     HistoryMessages.EndChange();
 }
コード例 #2
0
 private void LoadHistoryExecuted()
 {
     var client = ModelContext.GetClientByContact(_interlocutor);
     var bare = XmppIdConverter.Jid(_interlocutor).Bare;
     var history = HistoryService.Read(client.Id, bare);
     ModifyTextBox(() =>
     {
         foreach (var message in history)
         {
             var command = new RenderXmppMessage(_conversationThread.Model, message);
             command.Execute();
         }
     });
 }
コード例 #3
0
        public void Consume(IMessage message)
        {
            if (!_frame.IsActive || _frame.CurrentChat != this)
            {
                _pendingMessages.Add(message);
            }
            else if (_frame.CurrentChat == this)
            {
                var counter = GetCounter();
                counter.MarkAsRead(message);
            }

            ModifyTextBox(() =>
            {
                var command = new RenderXmppMessage(_conversationThread.Model, message);
                command.Execute();
            });
        }
コード例 #4
0
 protected void ParseCurrentHistory()
 {
     ModifyTextBox(() =>
     {
         foreach (var msg in MessageFeed.GetMessages(Predicate))
         {
             var counter = GetCounter();
             counter.MarkAsRead(msg);
             var command = new RenderXmppMessage(_conversationThread.Model, msg);
             command.Execute();
         }
     });
 }
コード例 #5
0
ファイル: RoomChatViewModel.cs プロジェクト: Irdis/VSTalk
 public void Consume(IMessage message)
 {
     ModifyTextBox(() =>
     {
         var command = new RenderXmppMessage(_conversationThread.Model, message);
         command.Execute();
     });
 }