public Reply(ConversationReply reply, string myLogin) { Author = reply.Author; Time = reply.Time; Text = reply.Text; IsMyReply = reply.Author == myLogin; }
/// <summary> /// Insert reply to top of replies in conversation. /// </summary> /// <param name="interlocutor">interlocutor.</param> /// <param name="reply">reply.</param> public void InsertReplyToTop(string interlocutor, ConversationReply reply) { Conversation c = GetConversation(interlocutor); if (c == null) { c = new Conversation(interlocutor); c.InsertReplyToTop(reply); AddConversation(c); } else { c.InsertReplyToTop(reply); } }
/// <summary> /// Add reply to conversation with interlocutor. /// </summary> /// <param name="interlocutor">interlocutor.</param> /// <param name="reply">reply.</param> public void AddReply(string interlocutor, ConversationReply reply) { Conversation c = GetConversation(interlocutor); if (c == null) { c = new Conversation(interlocutor); c.AddReply(reply); AddConversation(c); } else { c.AddReply(reply); } }
/// <summary> /// Insert reply to top of replies in conversation. /// </summary> /// <param name="reply">reply.</param> public void InsertReplyToTop(ConversationReply reply) { replies?.Insert(0, reply); }
/// <summary> /// Add reply in conversation. /// </summary> /// <param name="reply">reply.</param> public void AddReply(ConversationReply reply) { replies?.Add(reply); }
// update conversations private void OldReply(string interlocutor, ConversationReply reply) { if (SelectedFriend != null && interlocutor == SelectedFriend.Name) RepliesList.Insert(0, new Reply(reply, client.Name)); }