void RenderEventList() { flpActions.Controls.Clear(); int vertScrollWidth = SystemInformation.VerticalScrollBarWidth; var w = flpActions.Width - 2; var oae = MainForm.Actions.Where(p => p.mode == Mode && p.objectid == Oid && p.objecttypeid == Otid).ToList(); if (oae.Count * AlertEventRow.Height >= flpActions.Height) { w = flpActions.Width - vertScrollWidth - 2; } foreach (var e in oae) { var c = new AlertEventRow(e) { Width = w }; c.AlertEntryDelete += CAlertEntryDelete; c.AlertEntryEdit += CAlertEntryEdit; c.MouseOver += CMouseOver; flpActions.Controls.Add(c); flpActions.SetFlowBreak(c, true); } flpActions.PerformLayout(); flpActions.HorizontalScroll.Visible = flpActions.HorizontalScroll.Enabled = false; }
void RenderEventList() { flpActions.Controls.Clear(); int vertScrollWidth = SystemInformation.VerticalScrollBarWidth; var w = flpActions.Width - 2; var oae = MainForm.Actions.Where(p => p.mode == Mode && p.objectid == Oid && p.objecttypeid == Otid).ToList(); if (oae.Count * AlertEventRow.Height >= flpActions.Height) w = flpActions.Width - vertScrollWidth - 2; foreach (var e in oae) { var c = new AlertEventRow(e) {Width = w}; c.AlertEntryDelete += CAlertEntryDelete; c.AlertEntryEdit += CAlertEntryEdit; c.MouseOver += CMouseOver; flpActions.Controls.Add(c); flpActions.SetFlowBreak(c, true); } flpActions.PerformLayout(); flpActions.HorizontalScroll.Visible = flpActions.HorizontalScroll.Enabled = false; }