public void RemoveCommentItem(panelOfLogCommentMessageItem iteml) { this.flowLayoutPanel1.Controls.Remove(iteml); this.flowLayoutPanel1.Height = iteml.Height * this.flowLayoutPanel1.Controls.Count; this.Height = this.flowLayoutPanel1.Location.Y + this.flowLayoutPanel1.Height + 20; if (this.flowLayoutPanel1.Controls.Count == 0) { this.Visible = true; } }
public void RemoveCommentItem(panelOfLogCommentMessageItem iteml) { this.flowLayoutPanel1.Controls.Remove(iteml); this.flowLayoutPanel1.Height = iteml.Height * this.flowLayoutPanel1.Controls.Count; this.Height = this.flowLayoutPanel1.Location.Y + this.flowLayoutPanel1.Height + 20; if (this.flowLayoutPanel1.Controls.Count == 0) { this.Visible = true; } }
public void AddCommentItem(panelOfLogCommentMessageItem iteml) { this.flowLayoutPanel1.Controls.Add(iteml); this.flowLayoutPanel1.Height = iteml.Height * this.flowLayoutPanel1.Controls.Count; this.Height = this.flowLayoutPanel1.Location.Y + this.flowLayoutPanel1.Height + 20; if (this.Height > 450) { this.flowLayoutPanel1.Height = 400; this.Height = 450; } }
public void AddCommentItem(panelOfLogCommentMessageItem iteml) { this.flowLayoutPanel1.Controls.Add(iteml); this.flowLayoutPanel1.Height = iteml.Height * this.flowLayoutPanel1.Controls.Count; this.Height = this.flowLayoutPanel1.Location.Y + this.flowLayoutPanel1.Height + 20; if (this.Height > 450) { this.flowLayoutPanel1.Height = 400; this.Height = 450; } }
private void AddInPanelOfLogCommentMessage() { if (commentlistfromService.Count > 0) { foreach (KjqbService.CommentInService com in commentlistfromService) { string sql = "select u from WkTUser u where u.KuName = '" + com.CommentUserName + "'"; WkTUser commentuser = (WkTUser)baseService.loadEntityList(sql)[0]; panelOfLogCommentMessageItem item = new panelOfLogCommentMessageItem(); item.HeaderUserid = int.Parse(commentuser.Id.ToString()); item.NameContent = com.CommentUserName; item.ContentClicked += item_ContentClicked; item.Tag = com.LogId; this.panelOfLogCommentMessage1.AddCommentItem(item); } this.panelOfLogCommentMessage1.Visible = true; } else { this.panelOfLogCommentMessage1.Visible = false; } }