mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Code quality fixes (NullReference checks, unused variables etc)
This commit is contained in:
parent
6ab6033f85
commit
ac08533727
99 changed files with 1252 additions and 1312 deletions
|
@ -19,6 +19,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using Greenshot.Forms;
|
||||
|
@ -41,7 +42,7 @@ namespace Greenshot.Controls {
|
|||
public Pipette() {
|
||||
BorderStyle = BorderStyle.FixedSingle;
|
||||
dragging = false;
|
||||
_image = (Bitmap)new System.ComponentModel.ComponentResourceManager(typeof(ColorDialog)).GetObject("pipette.Image");
|
||||
_image = (Bitmap)new ComponentResourceManager(typeof(ColorDialog)).GetObject("pipette.Image");
|
||||
Image = _image;
|
||||
_cursor = CreateCursor((Bitmap)_image, 1, 14);
|
||||
movableShowColorForm = new MovableShowColorForm();
|
||||
|
@ -99,7 +100,7 @@ namespace Greenshot.Controls {
|
|||
/// <param name="e">MouseEventArgs</param>
|
||||
protected override void OnMouseDown(MouseEventArgs e) {
|
||||
if (e.Button == MouseButtons.Left) {
|
||||
User32.SetCapture(this.Handle);
|
||||
User32.SetCapture(Handle);
|
||||
movableShowColorForm.MoveTo(PointToScreen(new Point(e.X, e.Y)));
|
||||
}
|
||||
base.OnMouseDown(e);
|
||||
|
@ -136,7 +137,7 @@ namespace Greenshot.Controls {
|
|||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnMouseCaptureChanged(EventArgs e) {
|
||||
if (this.Capture) {
|
||||
if (Capture) {
|
||||
dragging = true;
|
||||
Image = null;
|
||||
Cursor c = _cursor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue