mirror of
https://github.com/greenshot/greenshot
synced 2025-07-30 11:40:40 -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
|
@ -40,7 +40,7 @@ namespace Greenshot.Controls {
|
|||
}
|
||||
|
||||
public ColorButton() {
|
||||
Click += new EventHandler(ColorButtonClick);
|
||||
Click += ColorButtonClick;
|
||||
}
|
||||
|
||||
public Color SelectedColor {
|
||||
|
@ -71,7 +71,7 @@ namespace Greenshot.Controls {
|
|||
ColorDialog colorDialog = ColorDialog.GetInstance();
|
||||
colorDialog.Color = SelectedColor;
|
||||
// Using the parent to make sure the dialog doesn't show on another window
|
||||
colorDialog.ShowDialog(this.Parent.Parent);
|
||||
colorDialog.ShowDialog(Parent.Parent);
|
||||
if (colorDialog.DialogResult != DialogResult.Cancel) {
|
||||
if (!colorDialog.Color.Equals(SelectedColor)) {
|
||||
SelectedColor = colorDialog.Color;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue