예제 #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();
        }