Ejemplo n.º 1
0
 private void UpdatePixelDialog(int x, int y)
 {
     if (IsMdiChild)
     {
         PixelForm = PixelDialog.GlobalInstance;
     }
     if (PixelForm != null && PixelForm.Visible)
     {
         Bitmap bmp = Manager.CurrentImage;
         PixelForm.Text = (Manager.Current == null
                             ? "Pixel Data"
                             : Manager.Current.Caption);
         if (bmp == null || !pbxPhoto.DisplayRectangle.Contains(x, y))
         {
             PixelForm.ClearPixelData();
         }
         else
         {
             PixelForm.UpdatePixelData(x, y, bmp,
                                       pbxPhoto.DisplayRectangle,
                                       new Rectangle(0, 0, bmp.Width, bmp.Height),
                                       pbxPhoto.SizeMode);
         }
     }
 }