Beispiel #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);
         }
     }
 }
Beispiel #2
0
        protected void menuPixelData_Click(object sender, EventArgs e)
        {
            if (PixelForm == null || PixelForm.IsDisposed)
            {
                PixelForm       = new PixelDialog();
                PixelForm.Owner = this;
            }
            PixelForm.Show();
            Point p = pbxPhoto.PointToClient(Form.MousePosition);

            UpdatePixelDialog(p.X, p.Y);
        }
Beispiel #3
0
        private void mnuPixelData_Click(object sender, EventArgs e)
        {
            if (PixelForm == null || PixelForm.IsDisposed)
            {
                PixelForm       = PixelDialog.GlobalInstance;
                PixelForm.Owner = this;
            }
            PixelForm.Show();
            Point p = pbxPhoto.PointToClient(Form.MousePosition);

            UpdatePixelDialog(p.X, p.Y);
            UpdatePixelButton(true);
        }
Beispiel #4
0
        private void menuPixelData_Click_1(object sender, EventArgs e)
        {
            if (PixelForm == null)
            {
                menuPixelData.Text = "Hide Pi&xel Data";
                PixelForm          = new PixelDialog();
                PixelForm.Owner    = this;

                PixelForm.Show();
                Point p = pbxPhoto.PointToClient(Form.MousePosition);
                UpdatePixelDialog(p.X, p.Y);
            }
            else
            {
                menuPixelData.Text = "Pi&xel Data...";
                PixelForm.Close();
                PixelForm = null;
            }
        }
Beispiel #5
0
        private void menuPixelData_Click(object sender, EventArgs e)
        {
            // Only check for null as we count on the menuPhoto Opening
            // handler to adjust the PixelForm variable when the user
            // closes the dialog manually.
            if (PixelForm == null)
            {
                menuPixelData.Text = "Hide Pi&xel Data";
                PixelForm          = new PixelDialog();
                PixelForm.Owner    = this;

                PixelForm.Show();
                Point p = pbxPhoto.PointToClient(Form.MousePosition);
                UpdatePixelDialog(p.X, p.Y);
            }
            else
            {
                menuPixelData.Text = "Pi&xel Data...";
                PixelForm.Close();
                PixelForm = null;
            }
        }