mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 01:23:47 -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
|
@ -38,7 +38,7 @@ namespace Greenshot.Controls {
|
|||
private Color selectedColor = Color.Transparent;
|
||||
|
||||
public ToolStripColorButton() {
|
||||
Click+= new EventHandler(ColorButtonClick);
|
||||
Click+= ColorButtonClick;
|
||||
}
|
||||
|
||||
public Color SelectedColor {
|
||||
|
@ -69,7 +69,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