private void PictureBoxAdapter_MouseOverPixel(object sender, MousePixelEventsArgs e) { if (this.project.ImageGrid == null) { this.activeColorToolStripLabel.BackColor = e.Color; } }
private bool TryGetColor(Point point, out MousePixelEventsArgs args) { if (this.pictureBox.Image != null) { Point?imagePoint = TranslateToImage(point); if (imagePoint.HasValue) { args = new MousePixelEventsArgs( imagePoint.Value, ((Bitmap)this.pictureBox.Image).GetPixel(imagePoint.Value.X, imagePoint.Value.Y)); return(true); } } args = null; return(false); }