Esempio n. 1
0
 public void OnOpenChat(object sender, OpenChatEventArgs e)
 {
     if (e.Contact != null)
     {
         // Start a new chat session with the selected contact
         _chatSessions.StartNewSession(e.Contact, Me.User).OpenChat();
         _chat.GetConversation(Me.User, e.Contact).ContinueWith(conversationTask =>
             {
                 if (conversationTask.IsFaulted)
                 {
                     Debug.WriteLine("GetConversation faulted.");
                 }
                 else
                 {
                     var conversation = conversationTask.Result.ToList();
                     _chatSessions.LoadConversation(e.Contact, conversation);
                 }
             });
     }
 }
Esempio n. 2
0
 public void OnOpenChat(object sender, OpenChatEventArgs e)
 {
     if (e.Contact != null)
     {
         // Start a new chat session with the selected contact
         _chatSessions.StartNewSession(e.Contact, Me.User).OpenChat();
     }
 }