public static void TableScroll(object sender, ScrollEventArgs e) { if (scrollOnOff) { int countRows = FormContainer.mainForm.Table.Rows.Count; int allCellHeight = FormContainer.mainForm.Table.Rows.GetRowsHeight(DataGridViewElementStates.None); int oneCellHeight = allCellHeight / countRows; int currentRows = FormContainer.mainForm.Table.VerticalScrollingOffset / oneCellHeight; if (e.ScrollOrientation == ScrollOrientation.VerticalScroll && countRows >= 1000) { if (countRows - currentRows <= 100) { EventContainer.Invoke(sender, "UploadRows"); if (FormContainer.mainForm.IsFull) { return; } FormContainer.mainForm.ScrollPointer = currentRows; scrollOnOff = false; } } } }
public static void DeleteTable(object sender, EventArgs e) { EventContainer.Invoke(sender, "TableDeleted"); }