Beispiel #1
0
        private void TestViewBox_MouseMove(object sender, MouseEventArgs e)
        {
            int CurrentColIndex = grid.MouseMove(e);
            int ShowColIndex    = CurrentColIndex + 1 + grid.GetStartPosition();

            SelectColIndex.Text = ShowColIndex.ToString();
            int getvalue = grid.GetCurrentColorValue(CurrentColIndex);

            if (getvalue == -100)
            {
                CurrentSelectValue.Text = "无取值";
            }
            else if (getvalue == 1)
            {
                CurrentSelectValue.Text = "发火";
            }
            else if (getvalue == 0)
            {
                CurrentSelectValue.Text = "瞎火";
            }
            getvalue = grid.GetCurrentValue(CurrentColIndex);
            if (getvalue == -100)
            {
                CurrentGetValue.Text = "无取值";
            }
            else
            {
                float jisuangvalue = getvalue * 0.05f + 60;
                CurrentGetValue.Text = jisuangvalue.ToString() + " KV";
            }
            TestViewBox.Refresh();
        }
Beispiel #2
0
 private void viewbar_Scroll(object sender, ScrollEventArgs e)
 {
     grid.SetStartPosition(viewbar.Value);
     TestViewBox.Refresh();
 }