mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
BUG-1908: Made Greenshot recheck & add the external commands like Ms-Paint and Paint.NET if they are not deleted manually and not yet available. Also cleaned up some code.
This commit is contained in:
parent
35ed3b8d60
commit
6efc7796b8
49 changed files with 322 additions and 294 deletions
|
@ -41,7 +41,7 @@ namespace Greenshot.Controls {
|
|||
CheckedChanged += BindableToolStripButton_CheckedChanged;
|
||||
}
|
||||
|
||||
void BindableToolStripButton_CheckedChanged(object sender, EventArgs e) {
|
||||
private void BindableToolStripButton_CheckedChanged(object sender, EventArgs e) {
|
||||
if(PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Checked"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Greenshot.Controls {
|
|||
SelectedIndexChanged += BindableToolStripComboBox_SelectedIndexChanged;
|
||||
}
|
||||
|
||||
void BindableToolStripComboBox_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
private void BindableToolStripComboBox_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
if(PropertyChanged != null) {
|
||||
PropertyChanged(this, new PropertyChangedEventArgs("SelectedItem"));
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace Greenshot.Controls {
|
|||
}
|
||||
}
|
||||
|
||||
void ColorButtonClick(object sender, EventArgs e) {
|
||||
private void ColorButtonClick(object sender, EventArgs e) {
|
||||
ColorDialog colorDialog = ColorDialog.GetInstance();
|
||||
colorDialog.Color = SelectedColor;
|
||||
// Using the parent to make sure the dialog doesn't show on another window
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Greenshot.Controls {
|
|||
}
|
||||
}
|
||||
|
||||
void ComboBox_DrawItem(object sender, DrawItemEventArgs e) {
|
||||
private void ComboBox_DrawItem(object sender, DrawItemEventArgs e) {
|
||||
// DrawBackground handles drawing the background (i.e,. hot-tracked v. not)
|
||||
// It uses the system colors (Bluish, and and white, by default)
|
||||
// same as calling e.Graphics.FillRectangle ( SystemBrushes.Highlight, e.Bounds );
|
||||
|
@ -108,7 +108,7 @@ namespace Greenshot.Controls {
|
|||
}
|
||||
}
|
||||
|
||||
void BindableToolStripComboBox_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
private void BindableToolStripComboBox_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
if (PropertyChanged != null) {
|
||||
PropertyChanged(this, new PropertyChangedEventArgs("Text"));
|
||||
PropertyChanged(this, new PropertyChangedEventArgs("FontFamily"));
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Greenshot.Controls {
|
|||
public class MenuStripEx : MenuStrip {
|
||||
private const int WM_MOUSEACTIVATE = 0x21;
|
||||
|
||||
enum NativeConstants : uint {
|
||||
private enum NativeConstants : uint {
|
||||
MA_ACTIVATE = 1,
|
||||
MA_ACTIVATEANDEAT = 2,
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Greenshot.Controls {
|
|||
}
|
||||
}
|
||||
|
||||
void ColorButtonClick(object sender, EventArgs e) {
|
||||
private void ColorButtonClick(object sender, EventArgs e) {
|
||||
ColorDialog colorDialog = ColorDialog.GetInstance();
|
||||
colorDialog.Color = SelectedColor;
|
||||
// Using the parent to make sure the dialog doesn't show on another window
|
||||
|
|
|
@ -26,10 +26,10 @@ namespace Greenshot.Controls {
|
|||
/// This is an extension of the default ToolStrip and allows us to click it even when the form doesn't have focus.
|
||||
/// See: http://blogs.msdn.com/b/rickbrew/archive/2006/01/09/511003.aspx
|
||||
/// </summary>
|
||||
class ToolStripEx : ToolStrip {
|
||||
internal class ToolStripEx : ToolStrip {
|
||||
private const int WM_MOUSEACTIVATE = 0x21;
|
||||
|
||||
enum NativeConstants : uint {
|
||||
private enum NativeConstants : uint {
|
||||
MA_ACTIVATE = 1,
|
||||
MA_ACTIVATEANDEAT = 2,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue