private void StopDrawRect(object sender, MouseButtonEventArgs e) { _timer.Enabled = false; if (_cropRegion.Width > 0 && _cropRegion.Height > 0) { _snip.Crop((Box)_cropRegion); Enqueue(_snip); Close(); } else { Close(); if (_cropRegion.Width <= 0) { CustomMessageBox.ShowOK("Your snip had a width of 0, so it was not taken.", "Error", "OK"); } else // height is <= 0 { CustomMessageBox.ShowOK("Your snip had a height of 0, so it was not taken.", "Error", "OK"); } } }