예제 #1
0
 private void ClearToolTip()
 {
     if (tips != null)
     {
         tips.Clear();
     }
     tips = null;
     Invalidate();
 }
예제 #2
0
 private void Figure_MouseUp(object sender, MouseEventArgs e)
 {
     if (AltIsDown == false)
     {
         if (tips != null)
         {
             tips.Clear(); tips = null;
         }
         Refresh();
         CalRealZoomRect(zoomRegion);
     }
 }
예제 #3
0
        private void Plot2D_MouseUp(object sender, MouseEventArgs e)
        {
            if (zoomRegion != null & AltIsDown == false)
            {
                if (tips != null)
                {
                    tips.Clear(); tips = null;
                }
                Invalidate();
                CalRealZoomRect(new Rectangle(zoomRegion.minX, zoomRegion.minY, zoomRegion.width, zoomRegion.height));

                zoomRegion = null;
            }
        }
예제 #4
0
        /// <summary>
        /// 显示数据游标
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        private void AddToolTip(int x, int y)
        {
            ClearToolTip();
            float data;
            uint  colorIndex;
            int   matr = 0, matc = 0, index = 0;

            ima.GetColorIndex(x, y, ref matr, ref matc, ref index);
            colorIndex = ima.inputData.matrix[matr, matc];
            data       = ima.inputData.data[index];
            tips       = new DataTips();

            tips.bmp    = ima.bmp;
            tips.parent = this;
            int halfPointSize = (tips.PointSize - 1) / 2;

            tips.Location     = new Point(x - halfPointSize, y - halfPointSize);
            tips.DataLocation = new Point(x, y);
            tips.Add(matc, matr, data, colorIndex);
        }