Пример #1
0
 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);
     }
 }
Пример #2
0
        /*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();
        }
Пример #3
0
 private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
 {
     try
     {
         DataPanel.Refresh();
     }
     catch
     {
     }
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 private void UpdateDATA()
 {
     dataPanel.UpdateLines();
     dataPanel.Refresh();
 }