public void SelectConversation(ReferenceData.Entity.Conversation cv) { foreach (var cvst in ConversationList) { if (cvst.Cvst.Equals(cv)) { if (!cvst.Equals(this.currentConversation)) { if (this.currentConversation == null) { this.currentConversation = cvst; } else { this.currentConversation.bg.FillColor = Color.FromArgb(16, 22, 37); this.currentConversation.bg.FillColor2 = Color.FromArgb(16, 22, 37); this.currentConversation = cvst; } this.currentConversation.bg.FillColor = Color.FromArgb(250, 48, 90); this.currentConversation.bg.FillColor2 = Color.FromArgb(128, 36, 206); } break; } } }
public void AddChatBox(ReferenceData.Entity.Conversation cvst) { if (ChatBox == null || ChatBox.Conversation.id != currentConversation.Cvst.id || cvst.id == null) { this.pnlPages.Controls.Clear(); ChatBox = new ChatBox(this, cvst); this.pnlPages.Controls.Add(ChatBox); ChatBox.Location = new Point(0, 0); } }
public ChatBox(Frame form, ReferenceData.Entity.Conversation cvst) { InitializeComponent(); Form = form; Conversation = cvst; this.messageBox.flowLayoutPanel.Padding = new Padding(10, 0, 0, 0); FPMessage1.AutoScroll = false; FPMessage2.AutoScroll = false; FPMessage1.WrapContents = false; FPMessage2.WrapContents = false; FPMessage1.AutoSize = true; FPMessage2.AutoSize = true; FPMessage1.FlowDirection = FlowDirection.TopDown; FPMessage2.FlowDirection = FlowDirection.BottomUp; this.messageBox.flowLayoutPanel.Controls.Add(FPMessage2); this.messageBox.flowLayoutPanel.Controls.Add(FPMessage1); this.messageBox.UpdateUi(); }
private void handleInsertConversation(object data) { ReferenceData.Entity.Conversation cvst = (ReferenceData.Entity.Conversation)data; form.Invoke(new InsertConversationListDelegate(form.InsertConversationList), new object[] { cvst }); form.Invoke(new NoArgumentDelegate(form.DisplayNewConversation), new object[] { }); }
public void InsertConversationList(ReferenceData.Entity.Conversation cv) { Components.Conversation cvst = new Components.Conversation(cv, User); cvst.ConversationClick(new OpenConversationHandler(this, cvst).Handle); ConversationList.Add(cvst); }