mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -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
|
@ -110,7 +110,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void timer_Tick(object sender, EventArgs e) {
|
||||
private void timer_Tick(object sender, EventArgs e) {
|
||||
try {
|
||||
Animate();
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -92,8 +92,8 @@ namespace GreenshotPlugin.Controls {
|
|||
_shouldClose = true;
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
void BackgroundFormFormClosing(object sender, FormClosingEventArgs e) {
|
||||
|
||||
private void BackgroundFormFormClosing(object sender, FormClosingEventArgs e) {
|
||||
timer_checkforclose.Stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,14 +25,14 @@ using GreenshotInterop.Interop;
|
|||
namespace GreenshotPlugin.Controls {
|
||||
public class ExtendedWebBrowser : WebBrowser {
|
||||
protected class ExtendedWebBrowserSite : WebBrowserSite, IOleCommandTarget {
|
||||
const int OLECMDID_SHOWSCRIPTERROR = 40;
|
||||
const int OLECMDID_SHOWMESSAGE = 41;
|
||||
private const int OLECMDID_SHOWSCRIPTERROR = 40;
|
||||
private const int OLECMDID_SHOWMESSAGE = 41;
|
||||
|
||||
static readonly Guid CGID_DocHostCommandHandler = new Guid("F38BC242-B950-11D1-8918-00C04FC2C836");
|
||||
private static readonly Guid CGID_DocHostCommandHandler = new Guid("F38BC242-B950-11D1-8918-00C04FC2C836");
|
||||
|
||||
const int S_OK = 0;
|
||||
const int OLECMDERR_E_NOTSUPPORTED = (-2147221248);
|
||||
const int OLECMDERR_E_UNKNOWNGROUP = (-2147221244);
|
||||
private const int S_OK = 0;
|
||||
private const int OLECMDERR_E_NOTSUPPORTED = (-2147221248);
|
||||
private const int OLECMDERR_E_UNKNOWNGROUP = (-2147221244);
|
||||
|
||||
public ExtendedWebBrowserSite(WebBrowser wb) : base(wb) {
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// Fires when a key is pushed down. Here, we'll want to update the text in the box
|
||||
/// to notify the user what combination is currently pressed.
|
||||
/// </summary>
|
||||
void HotkeyControl_KeyDown(object sender, KeyEventArgs e) {
|
||||
private void HotkeyControl_KeyDown(object sender, KeyEventArgs e) {
|
||||
// Clear the current hotkey
|
||||
if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Delete) {
|
||||
ResetHotkey();
|
||||
|
@ -217,7 +217,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// Fires when all keys are released. If the current hotkey isn't valid, reset it.
|
||||
/// Otherwise, do nothing and keep the text and hotkey as it was.
|
||||
/// </summary>
|
||||
void HotkeyControl_KeyUp(object sender, KeyEventArgs e) {
|
||||
private void HotkeyControl_KeyUp(object sender, KeyEventArgs e) {
|
||||
// Somehow the PrintScreen only comes as a keyup, therefore we handle it here.
|
||||
if (e.KeyCode == Keys.PrintScreen) {
|
||||
_modifiers = e.Modifiers;
|
||||
|
@ -235,7 +235,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// Prevents the letter/whatever entered to show up in the TextBox
|
||||
/// Without this, a "A" key press would appear as "aControl, Alt + A"
|
||||
/// </summary>
|
||||
void HotkeyControl_KeyPress(object sender, KeyPressEventArgs e) {
|
||||
private void HotkeyControl_KeyPress(object sender, KeyPressEventArgs e) {
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void CancelButtonClick(object sender, EventArgs e) {
|
||||
private void CancelButtonClick(object sender, EventArgs e) {
|
||||
LOG.DebugFormat("Cancel clicked on {0}", _title);
|
||||
cancelButton.Enabled = false;
|
||||
_waitFor.Abort();
|
||||
|
|
|
@ -48,8 +48,8 @@ namespace GreenshotPlugin.Controls {
|
|||
textBoxJpegQuality.Text = Settings.JPGQuality.ToString();
|
||||
ToFront = true;
|
||||
}
|
||||
|
||||
void Button_okClick(object sender, EventArgs e) {
|
||||
|
||||
private void Button_okClick(object sender, EventArgs e) {
|
||||
Settings.JPGQuality = trackBarJpegQuality.Value;
|
||||
Settings.ReduceColors = checkBox_reduceColors.Checked;
|
||||
if (checkbox_dontaskagain.Checked) {
|
||||
|
@ -59,8 +59,8 @@ namespace GreenshotPlugin.Controls {
|
|||
IniConfig.Save();
|
||||
}
|
||||
}
|
||||
|
||||
void TrackBarJpegQualityScroll(object sender, EventArgs e) {
|
||||
|
||||
private void TrackBarJpegQualityScroll(object sender, EventArgs e) {
|
||||
textBoxJpegQuality.Text = trackBarJpegQuality.Value.ToString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue