private void OnFileComming(object sender, ControlCommandOccuredEventArgs e) { FileMessageBubble bbl = addReceivedFileMessageToUI(new FileMessage() { time = DateTime.Now }); ShowBubble(bbl); // middleController.fileShareController.transferManager.isAudioComming = false; }
public void ShowBubble(FileMessageBubble bbl) { if (InvokeRequired) { Invoke(new MsgReceivedEventHandler(ShowBubble), bbl); return; } panel2.Controls.Add(bbl); workSpace.Top = bbl.Bottom + 20; bbl_old = bbl; panel2.VerticalScroll.Value = panel2.VerticalScroll.Maximum; }
public FileMessageBubble addReceivedFileMessageToUI(FileMessage message) { String time = message.time.ToString("h:mm:ss tt"); FileMessageBubble bbl = new FileMessageBubble(fileShareMiddleController, time, MsgType.IN); currentRunningBubble = bbl; bbl.Location = refPanel2.Location; // bbl.Width = 375; // bbl.Height = 141; bbl.Anchor = refPanel2.Anchor; bbl.Top = bbl_old.Bottom + 10; return(bbl); }