示例#1
0
 private void OnMouseDoubleClick(object sender, MouseEventArgs e)
 {
     // sanity checks
     if (null != _viewer && _viewer.TryPicking(e.Location.X, e.Location.Y, out uint index))
     {
         VolumeSelected?.Invoke((int)index);
     }
     else
     {
         VolumeSelected?.Invoke(-1);
     }
     Invalidate();
 }
示例#2
0
 private void OnMouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         // sanity checks
         if (null != Viewer && Viewer.TryPicking(e.Location.X, e.Location.Y, out uint index))
         {
             VolumeSelected?.Invoke((int)index);
         }
         else
         {
             VolumeSelected?.Invoke(-1);
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.ToString());
     }
     Invalidate();
 }
示例#3
0
        private void onMouseDoubleClick(object sender, MouseEventArgs e)
        {
            // sanity checks
            uint index = 0;

            if (null != _viewer && _viewer.TryPicking(e.Location.X, e.Location.Y, out index))
            {
                if (null != VolumeSelected)
                {
                    VolumeSelected((int)index);
                }
            }
            else
            {
                if (null != VolumeSelected)
                {
                    VolumeSelected(-1);
                }
            }
            Invalidate();
        }