void DataPanel_MouseWheel(object sender, MouseEventArgs e) { try { if (vScrollBar1.Value + e.Delta > 0) { if (vScrollBar1.Value + e.Delta < vScrollBar1.Maximum) { vScrollBar1.Value += e.Delta; } else { vScrollBar1.Value = vScrollBar1.Maximum; } } else { vScrollBar1.Value = 0; } DataPanel.Refresh(); } catch (Exception ex) { Common.Log(ex); } }
/*private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) * { * * } * * private void splitContainer1_Panel1_MouseDown(object sender, MouseEventArgs e) * { * * }*/ public void InitList(List <LineDbRecord> rec) { ToPaint = rec; vScrollBar1.Value = 0; vScrollBar1.Maximum = rec.Count; hScrollBar1.Value = 0; hScrollBar1.Maximum = 500; DataPanel.Refresh(); }
private void vScrollBar1_Scroll(object sender, ScrollEventArgs e) { try { DataPanel.Refresh(); } catch { } }
private void splitContainer1_Panel1_MouseDown(object sender, MouseEventArgs e) { try { DataPanel.Focus(); SelectedLine = vScrollBar1.Value + e.Y / 15; DataPanel.Refresh(); } catch (Exception ex) { Common.LogNoMsg(ex); } }
private void UpdateDATA() { dataPanel.UpdateLines(); dataPanel.Refresh(); }