From 87f3b6a8717f80bfb0297eb112a418c817b0518c Mon Sep 17 00:00:00 2001
From: Robin
Date: Tue, 14 Apr 2020 12:31:52 +0200
Subject: [PATCH 001/224] Improving stability for the notification issue
reported in #182
---
GreenshotPlugin/Core/SimpleServiceProvider.cs | 4 +
.../ToastNotificationService.cs | 375 ++++++++++--------
GreenshotWin10Plugin/Win10Plugin.cs | 2 +-
3 files changed, 204 insertions(+), 177 deletions(-)
diff --git a/GreenshotPlugin/Core/SimpleServiceProvider.cs b/GreenshotPlugin/Core/SimpleServiceProvider.cs
index 5482f107a..9ffd9d590 100644
--- a/GreenshotPlugin/Core/SimpleServiceProvider.cs
+++ b/GreenshotPlugin/Core/SimpleServiceProvider.cs
@@ -43,6 +43,10 @@ namespace GreenshotPlugin.Core
foreach (var service in services)
{
+ if (service == null)
+ {
+ continue;
+ }
currentServices.Add(service);
}
}
diff --git a/GreenshotWin10Plugin/ToastNotificationService.cs b/GreenshotWin10Plugin/ToastNotificationService.cs
index 70ef5084a..413a51c00 100644
--- a/GreenshotWin10Plugin/ToastNotificationService.cs
+++ b/GreenshotWin10Plugin/ToastNotificationService.cs
@@ -1,176 +1,199 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System;
-using System.Drawing.Imaging;
-using System.IO;
-using System.Linq;
-using Windows.UI.Notifications;
-using GreenshotPlugin.Core;
-using GreenshotPlugin.IniFile;
-using GreenshotPlugin.Interfaces;
-using GreenshotWin10Plugin.Native;
-using log4net;
-
-namespace GreenshotWin10Plugin
-{
- ///
- /// This service provides a way to inform (notify) the user.
- ///
- public class ToastNotificationService : INotificationService
- {
- private static readonly ILog Log = LogManager.GetLogger(typeof(ToastNotificationService));
- private static readonly CoreConfiguration CoreConfiguration = IniConfig.GetIniSection();
-
- private readonly string _imageFilePath;
- public ToastNotificationService()
- {
- // Register AUMID and COM server (for Desktop Bridge apps, this no-ops)
- DesktopNotificationManagerCompat.RegisterAumidAndComServer("Greenshot");
- // Register COM server and activator type
- DesktopNotificationManagerCompat.RegisterActivator();
-
- var localAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Greenshot");
- if (!Directory.Exists(localAppData))
- {
- Directory.CreateDirectory(localAppData);
- }
- _imageFilePath = Path.Combine(localAppData, "greenshot.png");
-
- if (File.Exists(_imageFilePath))
- {
- return;
- }
-
- using var greenshotImage = GreenshotResources.GetGreenshotIcon().ToBitmap();
- greenshotImage.Save(_imageFilePath, ImageFormat.Png);
- }
-
- ///
- /// This creates the actual toast
- ///
- /// string
- /// milliseconds until the toast timeouts
- /// Action called when clicked
- /// Action called when the toast is closed
- private void ShowMessage(string message, int timeout, Action onClickAction, Action onClosedAction)
- {
- // Do not inform the user if this is disabled
- if (!CoreConfiguration.ShowTrayNotification)
- {
- return;
- }
- // Prepare the toast notifier. Be sure to specify the AppUserModelId on your application's shortcut!
- var toastNotifier = DesktopNotificationManagerCompat.CreateToastNotifier();
- if (toastNotifier.Setting != NotificationSetting.Enabled)
- {
- Log.DebugFormat("Ignored toast due to {0}", toastNotifier.Setting);
- return;
- }
-
- // Get a toast XML template
- var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText01);
-
- // Fill in the text elements
- var stringElement = toastXml.GetElementsByTagName("text").First();
- stringElement.AppendChild(toastXml.CreateTextNode(message));
-
- if (_imageFilePath != null && File.Exists(_imageFilePath))
- {
- // Specify the absolute path to an image
- var imageElement = toastXml.GetElementsByTagName("image").First();
- var imageSrcNode = imageElement.Attributes.GetNamedItem("src");
- if (imageSrcNode != null)
- {
- imageSrcNode.NodeValue = _imageFilePath;
- }
- }
-
- // Create the toast and attach event listeners
- var toast = new ToastNotification(toastXml)
- {
- // Windows 10 first with 1903: ExpiresOnReboot = true,
- ExpirationTime = timeout > 0 ? DateTimeOffset.Now.AddMilliseconds(timeout) : (DateTimeOffset?)null
- };
-
- void ToastActivatedHandler(ToastNotification toastNotification, object sender)
- {
- try
- {
- onClickAction?.Invoke();
- }
- catch (Exception ex)
- {
- Log.Warn("Exception while handling the onclick action: ", ex);
- }
-
- toast.Activated -= ToastActivatedHandler;
- }
-
- if (onClickAction != null)
- {
- toast.Activated += ToastActivatedHandler;
- }
-
- void ToastDismissedHandler(ToastNotification toastNotification, ToastDismissedEventArgs eventArgs)
- {
- Log.Debug("Toast closed");
- try
- {
- onClosedAction?.Invoke();
- }
- catch (Exception ex)
- {
- Log.Warn("Exception while handling the onClosed action: ", ex);
- }
-
- toast.Dismissed -= ToastDismissedHandler;
- // Remove the other handler too
- toast.Activated -= ToastActivatedHandler;
- toast.Failed -= ToastOnFailed;
- }
- toast.Dismissed += ToastDismissedHandler;
- toast.Failed += ToastOnFailed;
- toastNotifier.Show(toast);
- }
-
- private void ToastOnFailed(ToastNotification sender, ToastFailedEventArgs args)
- {
- Log.WarnFormat("Failed to display a toast due to {0}", args.ErrorCode);
- Log.Debug(sender.Content.GetXml());
- }
-
- public void ShowWarningMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
- {
- ShowMessage(message, timeout, onClickAction, onClosedAction);
- }
-
- public void ShowErrorMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
- {
- ShowMessage(message, timeout, onClickAction, onClosedAction);
- }
-
- public void ShowInfoMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
- {
- ShowMessage(message, timeout, onClickAction, onClosedAction);
- }
- }
-}
+/*
+ * Greenshot - a free and open source screenshot tool
+ * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ *
+ * For more information see: http://getgreenshot.org/
+ * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+using System;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Linq;
+using Windows.Foundation.Metadata;
+using Windows.UI.Notifications;
+using GreenshotPlugin.Core;
+using GreenshotPlugin.IniFile;
+using GreenshotPlugin.Interfaces;
+using GreenshotWin10Plugin.Native;
+using log4net;
+
+namespace GreenshotWin10Plugin
+{
+ ///
+ /// This service provides a way to inform (notify) the user.
+ ///
+ public class ToastNotificationService : INotificationService
+ {
+ private static readonly ILog Log = LogManager.GetLogger(typeof(ToastNotificationService));
+ private static readonly CoreConfiguration CoreConfiguration = IniConfig.GetIniSection();
+
+ private readonly string _imageFilePath;
+ public ToastNotificationService()
+ {
+ // Register AUMID and COM server (for Desktop Bridge apps, this no-ops)
+ DesktopNotificationManagerCompat.RegisterAumidAndComServer("Greenshot");
+ // Register COM server and activator type
+ DesktopNotificationManagerCompat.RegisterActivator();
+
+ var localAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Greenshot");
+ if (!Directory.Exists(localAppData))
+ {
+ Directory.CreateDirectory(localAppData);
+ }
+ _imageFilePath = Path.Combine(localAppData, "greenshot.png");
+
+ if (File.Exists(_imageFilePath))
+ {
+ return;
+ }
+
+ using var greenshotImage = GreenshotResources.GetGreenshotIcon().ToBitmap();
+ greenshotImage.Save(_imageFilePath, ImageFormat.Png);
+ }
+
+ ///
+ /// This creates the actual toast
+ ///
+ /// string
+ /// milliseconds until the toast timeouts
+ /// Action called when clicked
+ /// Action called when the toast is closed
+ private void ShowMessage(string message, int timeout, Action onClickAction, Action onClosedAction)
+ {
+ // Do not inform the user if this is disabled
+ if (!CoreConfiguration.ShowTrayNotification)
+ {
+ return;
+ }
+ // Prepare the toast notifier. Be sure to specify the AppUserModelId on your application's shortcut!
+ var toastNotifier = DesktopNotificationManagerCompat.CreateToastNotifier();
+ if (toastNotifier.Setting != NotificationSetting.Enabled)
+ {
+ Log.DebugFormat("Ignored toast due to {0}", toastNotifier.Setting);
+ return;
+ }
+
+ // Get a toast XML template
+ var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText01);
+
+ // Fill in the text elements
+ var stringElement = toastXml.GetElementsByTagName("text").First();
+ stringElement.AppendChild(toastXml.CreateTextNode(message));
+
+ if (_imageFilePath != null && File.Exists(_imageFilePath))
+ {
+ // Specify the absolute path to an image
+ var imageElement = toastXml.GetElementsByTagName("image").First();
+ var imageSrcNode = imageElement.Attributes.GetNamedItem("src");
+ if (imageSrcNode != null)
+ {
+ imageSrcNode.NodeValue = _imageFilePath;
+ }
+ }
+
+ // Create the toast and attach event listeners
+ var toast = new ToastNotification(toastXml)
+ {
+ // Windows 10 first with 1903: ExpiresOnReboot = true,
+ ExpirationTime = timeout > 0 ? DateTimeOffset.Now.AddMilliseconds(timeout) : (DateTimeOffset?)null
+ };
+
+ void ToastActivatedHandler(ToastNotification toastNotification, object sender)
+ {
+ try
+ {
+ onClickAction?.Invoke();
+ }
+ catch (Exception ex)
+ {
+ Log.Warn("Exception while handling the onclick action: ", ex);
+ }
+
+ toast.Activated -= ToastActivatedHandler;
+ }
+
+ if (onClickAction != null)
+ {
+ toast.Activated += ToastActivatedHandler;
+ }
+
+ void ToastDismissedHandler(ToastNotification toastNotification, ToastDismissedEventArgs eventArgs)
+ {
+ Log.Debug("Toast closed");
+ try
+ {
+ onClosedAction?.Invoke();
+ }
+ catch (Exception ex)
+ {
+ Log.Warn("Exception while handling the onClosed action: ", ex);
+ }
+
+ toast.Dismissed -= ToastDismissedHandler;
+ // Remove the other handler too
+ toast.Activated -= ToastActivatedHandler;
+ toast.Failed -= ToastOnFailed;
+ }
+ toast.Dismissed += ToastDismissedHandler;
+ toast.Failed += ToastOnFailed;
+ try
+ {
+ toastNotifier.Show(toast);
+ }
+ catch (Exception ex)
+ {
+ Log.Error("Couldn't show notification.", ex);
+ }
+ }
+
+ private void ToastOnFailed(ToastNotification sender, ToastFailedEventArgs args)
+ {
+ Log.WarnFormat("Failed to display a toast due to {0}", args.ErrorCode);
+ Log.Debug(sender.Content.GetXml());
+ }
+
+ public void ShowWarningMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ {
+ ShowMessage(message, timeout, onClickAction, onClosedAction);
+ }
+
+ public void ShowErrorMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ {
+ ShowMessage(message, timeout, onClickAction, onClosedAction);
+ }
+
+ public void ShowInfoMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ {
+ ShowMessage(message, timeout, onClickAction, onClosedAction);
+ }
+
+ ///
+ /// Factory method, helping with checking if the notification service is even available
+ ///
+ /// ToastNotificationService
+ public static ToastNotificationService Create()
+ {
+ if (ApiInformation.IsTypePresent("Windows.ApplicationModel.Background.ToastNotificationActionTrigger"))
+ {
+ return new ToastNotificationService();
+ }
+ Log.Warn("ToastNotificationActionTrigger not available.");
+
+ return null;
+ }
+ }
+}
diff --git a/GreenshotWin10Plugin/Win10Plugin.cs b/GreenshotWin10Plugin/Win10Plugin.cs
index 947ce180c..1e0519071 100644
--- a/GreenshotWin10Plugin/Win10Plugin.cs
+++ b/GreenshotWin10Plugin/Win10Plugin.cs
@@ -63,7 +63,7 @@ namespace GreenshotWin10Plugin
return false;
}
- SimpleServiceProvider.Current.AddService(new ToastNotificationService());
+ SimpleServiceProvider.Current.AddService(ToastNotificationService.Create());
// Set this as IOcrProvider
SimpleServiceProvider.Current.AddService(new Win10OcrProvider());
// Add the processor
From 6e7a911477689b340776e6b921182a9e4b93a1cd Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Wed, 15 Apr 2020 22:49:43 +0200
Subject: [PATCH 002/224] This should fix showing the notification on the first
start.
---
Greenshot/Forms/MainForm.cs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index a197a8cf5..9a7f21290 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -352,7 +352,7 @@ namespace Greenshot {
// Disable access to the settings, for feature #3521446
contextmenu_settings.Visible = !_conf.DisableSettings;
- // Make sure all hotkeys pass this window!
+ // Make sure all hot-keys pass this window!
HotkeyControl.RegisterHotkeyHwnd(Handle);
RegisterHotkeys();
@@ -444,9 +444,11 @@ namespace Greenshot {
Exit();
break;
case CommandEnum.FirstLaunch:
- LOG.Info("FirstLaunch: Created new configuration, showing balloon.");
- var notifyIconClassicMessageHandler = SimpleServiceProvider.Current.GetInstance();
- notifyIconClassicMessageHandler.ShowInfoMessage(Language.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.RegionHotkey)), 2000, ShowSetting);
+ Invoke((MethodInvoker)delegate {
+ LOG.Info("FirstLaunch: Created new configuration, showing balloon.");
+ var notifyIconClassicMessageHandler = SimpleServiceProvider.Current.GetInstance();
+ notifyIconClassicMessageHandler.ShowInfoMessage(Language.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.RegionHotkey)), 2000, ShowSetting);
+ });
break;
case CommandEnum.ReloadConfig:
LOG.Info("Reload requested");
From 9c31b900215b0dc9166a8b9fa727012dd29c6173 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 16 Apr 2020 21:19:07 +0200
Subject: [PATCH 003/224] Fix #182, the notifications don't work due to a quirk
in the Windows API.
---
GreenshotWin10Plugin/ToastNotificationService.cs | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/GreenshotWin10Plugin/ToastNotificationService.cs b/GreenshotWin10Plugin/ToastNotificationService.cs
index 413a51c00..5f51d7fd6 100644
--- a/GreenshotWin10Plugin/ToastNotificationService.cs
+++ b/GreenshotWin10Plugin/ToastNotificationService.cs
@@ -81,10 +81,19 @@ namespace GreenshotWin10Plugin
}
// Prepare the toast notifier. Be sure to specify the AppUserModelId on your application's shortcut!
var toastNotifier = DesktopNotificationManagerCompat.CreateToastNotifier();
- if (toastNotifier.Setting != NotificationSetting.Enabled)
+
+ // Here is an interesting article on reading the settings: https://www.rudyhuyn.com/blog/2018/02/10/toastnotifier-and-settings-careful-with-non-uwp-applications/
+ try
{
- Log.DebugFormat("Ignored toast due to {0}", toastNotifier.Setting);
- return;
+ if (toastNotifier.Setting != NotificationSetting.Enabled)
+ {
+ Log.DebugFormat("Ignored toast due to {0}", toastNotifier.Setting);
+ return;
+ }
+ }
+ catch (Exception)
+ {
+ Log.Info("Ignoring exception as this means that there was no stored settings.");
}
// Get a toast XML template
From 700fb07e4092fe0148679b8482c42cda344b3918 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 16 Apr 2020 21:19:58 +0200
Subject: [PATCH 004/224] Changed the update check, this should be more stable
and flexible.
---
Greenshot/Drawing/Surface.cs | 2 +-
Greenshot/Forms/MainForm.Designer.cs | 22 +--
Greenshot/Forms/MainForm.cs | 94 ++++------
Greenshot/Helpers/Entities/UpdateFeed.cs | 35 ++++
Greenshot/Helpers/UpdateHelper.cs | 184 -------------------
Greenshot/Helpers/UpdateService.cs | 222 +++++++++++++++++++++++
GreenshotPlugin/Core/RssHelper.cs | 204 ---------------------
7 files changed, 304 insertions(+), 459 deletions(-)
create mode 100644 Greenshot/Helpers/Entities/UpdateFeed.cs
delete mode 100644 Greenshot/Helpers/UpdateHelper.cs
create mode 100644 Greenshot/Helpers/UpdateService.cs
delete mode 100644 GreenshotPlugin/Core/RssHelper.cs
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 3ec79db52..bd56db3a2 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -239,7 +239,7 @@ namespace Greenshot.Drawing
_counterStart = value;
Invalidate();
- _propertyChanged?.Invoke(this, new PropertyChangedEventArgs("CounterStart"));
+ _propertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CounterStart)));
}
}
diff --git a/Greenshot/Forms/MainForm.Designer.cs b/Greenshot/Forms/MainForm.Designer.cs
index a93b815d0..f94f4b87d 100644
--- a/Greenshot/Forms/MainForm.Designer.cs
+++ b/Greenshot/Forms/MainForm.Designer.cs
@@ -73,7 +73,6 @@ namespace Greenshot {
this.toolStripCloseSeparator = new System.Windows.Forms.ToolStripSeparator();
this.contextmenu_exit = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
- this.backgroundWorkerTimer = new System.Windows.Forms.Timer(this.components);
this.contextMenu.SuspendLayout();
this.SuspendLayout();
//
@@ -122,7 +121,7 @@ namespace Greenshot {
this.contextmenu_capturelastregion.Name = "contextmenu_capturelastregion";
this.contextmenu_capturelastregion.ShortcutKeyDisplayString = "Shift + Print";
this.contextmenu_capturelastregion.Size = new System.Drawing.Size(170, 22);
- this.contextmenu_capturelastregion.Click += new System.EventHandler(this.Contextmenu_capturelastregionClick);
+ this.contextmenu_capturelastregion.Click += new System.EventHandler(this.Contextmenu_CaptureLastRegionClick);
//
// contextmenu_capturewindow
//
@@ -130,7 +129,7 @@ namespace Greenshot {
this.contextmenu_capturewindow.Name = "contextmenu_capturewindow";
this.contextmenu_capturewindow.ShortcutKeyDisplayString = "Alt + Print";
this.contextmenu_capturewindow.Size = new System.Drawing.Size(170, 22);
- this.contextmenu_capturewindow.Click += new System.EventHandler(this.Contextmenu_capturewindow_Click);
+ this.contextmenu_capturewindow.Click += new System.EventHandler(this.Contextmenu_CaptureWindow_Click);
//
// contextmenu_capturefullscreen
//
@@ -144,7 +143,7 @@ namespace Greenshot {
this.contextmenu_captureie.Name = "contextmenu_captureie";
this.contextmenu_captureie.ShortcutKeyDisplayString = "Ctrl + Shift + Print";
this.contextmenu_captureie.Size = new System.Drawing.Size(170, 22);
- this.contextmenu_captureie.Click += new System.EventHandler(this.Contextmenu_captureie_Click);
+ this.contextmenu_captureie.Click += new System.EventHandler(this.Contextmenu_CaptureIe_Click);
//
// toolStripListCaptureSeparator
//
@@ -210,7 +209,7 @@ namespace Greenshot {
this.contextmenu_settings.Image = ((System.Drawing.Image)(resources.GetObject("contextmenu_settings.Image")));
this.contextmenu_settings.Name = "contextmenu_settings";
this.contextmenu_settings.Size = new System.Drawing.Size(170, 22);
- this.contextmenu_settings.Click += new System.EventHandler(this.Contextmenu_settingsClick);
+ this.contextmenu_settings.Click += new System.EventHandler(this.Contextmenu_SettingsClick);
//
// toolStripMiscSeparator
//
@@ -229,13 +228,13 @@ namespace Greenshot {
this.contextmenu_donate.Image = ((System.Drawing.Image)(resources.GetObject("contextmenu_donate.Image")));
this.contextmenu_donate.Name = "contextmenu_donate";
this.contextmenu_donate.Size = new System.Drawing.Size(170, 22);
- this.contextmenu_donate.Click += new System.EventHandler(this.Contextmenu_donateClick);
+ this.contextmenu_donate.Click += new System.EventHandler(this.Contextmenu_DonateClick);
//
// contextmenu_about
//
this.contextmenu_about.Name = "contextmenu_about";
this.contextmenu_about.Size = new System.Drawing.Size(170, 22);
- this.contextmenu_about.Click += new System.EventHandler(this.Contextmenu_aboutClick);
+ this.contextmenu_about.Click += new System.EventHandler(this.Contextmenu_AboutClick);
//
// toolStripCloseSeparator
//
@@ -255,12 +254,6 @@ namespace Greenshot {
this.notifyIcon.Text = "Greenshot";
this.notifyIcon.MouseUp += new System.Windows.Forms.MouseEventHandler(this.NotifyIconClickTest);
//
- // backgroundWorkerTimer
- //
- this.backgroundWorkerTimer.Enabled = true;
- this.backgroundWorkerTimer.Interval = 300000;
- this.backgroundWorkerTimer.Tick += new System.EventHandler(this.BackgroundWorkerTimerTick);
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -282,8 +275,7 @@ namespace Greenshot {
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem contextmenu_capturewindowfromlist;
private System.Windows.Forms.ToolStripSeparator toolStripListCaptureSeparator;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem contextmenu_openrecentcapture;
- private System.Windows.Forms.Timer backgroundWorkerTimer;
- private GreenshotPlugin.Controls.GreenshotToolStripMenuItem contextmenu_captureie;
+ private GreenshotPlugin.Controls.GreenshotToolStripMenuItem contextmenu_captureie;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem contextmenu_donate;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem contextmenu_openfile;
private System.Windows.Forms.ToolStripSeparator toolStripPluginSeparator;
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index 9a7f21290..b96211a97 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -418,6 +418,11 @@ namespace Greenshot {
HandleDataTransport(dataTransport);
}
+ // Start the update check in the background
+ var updateService = new UpdateService();
+ updateService.Startup();
+ SimpleServiceProvider.Current.AddService(updateService);
+
// Make Greenshot use less memory after startup
if (_conf.MinimizeWorkingSetSize) {
PsAPI.EmptyWorkingSet();
@@ -444,11 +449,9 @@ namespace Greenshot {
Exit();
break;
case CommandEnum.FirstLaunch:
- Invoke((MethodInvoker)delegate {
LOG.Info("FirstLaunch: Created new configuration, showing balloon.");
var notifyIconClassicMessageHandler = SimpleServiceProvider.Current.GetInstance();
notifyIconClassicMessageHandler.ShowInfoMessage(Language.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.RegionHotkey)), 2000, ShowSetting);
- });
break;
case CommandEnum.ReloadConfig:
LOG.Info("Reload requested");
@@ -554,15 +557,16 @@ namespace Greenshot {
/// object
/// PropertyChangedEventArgs
private void OnIconSizeChanged(object sender, PropertyChangedEventArgs e) {
- if (e.PropertyName == "IconSize")
- {
- ApplyDpiScaling();
- string ieExePath = PluginUtils.GetExePath("iexplore.exe");
- if (!string.IsNullOrEmpty(ieExePath)) {
- contextmenu_captureie.Image = PluginUtils.GetCachedExeIcon(ieExePath, 0);
- }
- }
- }
+ if (e.PropertyName != "IconSize")
+ {
+ return;
+ }
+ ApplyDpiScaling();
+ string ieExePath = PluginUtils.GetExePath("iexplore.exe");
+ if (!string.IsNullOrEmpty(ieExePath)) {
+ contextmenu_captureie.Image = PluginUtils.GetCachedExeIcon(ieExePath, 0);
+ }
+ }
///
/// Modify the DPI settings depending in the current value
@@ -627,7 +631,7 @@ namespace Greenshot {
///
/// Check if OneDrive is blocking hotkeys
///
- /// true if onedrive has hotkeys turned on
+ /// true if one-drive has hotkeys turned on
private static bool IsOneDriveBlockingHotkey()
{
if (!WindowsVersion.IsWindows10OrLater)
@@ -706,14 +710,16 @@ namespace Greenshot {
private void CaptureFile() {
var openFileDialog = new OpenFileDialog
{
- Filter = "Image files (*.greenshot, *.png, *.jpg, *.gif, *.bmp, *.ico, *.tiff, *.wmf)|*.greenshot; *.png; *.jpg; *.jpeg; *.gif; *.bmp; *.ico; *.tiff; *.tif; *.wmf"
+ Filter = @"Image files (*.greenshot, *.png, *.jpg, *.gif, *.bmp, *.ico, *.tiff, *.wmf)|*.greenshot; *.png; *.jpg; *.jpeg; *.gif; *.bmp; *.ico; *.tiff; *.tif; *.wmf"
};
- if (openFileDialog.ShowDialog() == DialogResult.OK) {
- if (File.Exists(openFileDialog.FileName)) {
- CaptureHelper.CaptureFile(openFileDialog.FileName);
- }
- }
- }
+ if (openFileDialog.ShowDialog() != DialogResult.OK)
+ {
+ return;
+ }
+ if (File.Exists(openFileDialog.FileName)) {
+ CaptureHelper.CaptureFile(openFileDialog.FileName);
+ }
+ }
private void CaptureFullScreen() {
CaptureHelper.CaptureFullscreen(true, _conf.ScreenCaptureMode);
@@ -807,7 +813,7 @@ namespace Greenshot {
int index = counter.ContainsKey(tabData.Key) ? counter[tabData.Key] : 0;
captureIeTabItem.Image = tabData.Key.DisplayIcon;
captureIeTabItem.Tag = new KeyValuePair(tabData.Key, index++);
- captureIeTabItem.Click += Contextmenu_captureiefromlist_Click;
+ captureIeTabItem.Click += Contextmenu_CaptureIeFromList_Click;
contextmenu_captureiefromlist.DropDownItems.Add(captureIeTabItem);
if (counter.ContainsKey(tabData.Key)) {
counter[tabData.Key] = index;
@@ -884,7 +890,7 @@ namespace Greenshot {
// captureForm.MakeCapture(CaptureMode.Window, false);
// Now we check which windows are there to capture
ToolStripMenuItem captureWindowFromListMenuItem = (ToolStripMenuItem)sender;
- AddCaptureWindowMenuItems(captureWindowFromListMenuItem, Contextmenu_capturewindowfromlist_Click);
+ AddCaptureWindowMenuItems(captureWindowFromListMenuItem, Contextmenu_CaptureWindowFromList_Click);
}
private void CaptureWindowFromListMenuDropDownClosed(object sender, EventArgs e) {
@@ -959,19 +965,19 @@ namespace Greenshot {
});
}
- private void Contextmenu_capturelastregionClick(object sender, EventArgs e) {
+ private void Contextmenu_CaptureLastRegionClick(object sender, EventArgs e) {
BeginInvoke((MethodInvoker)delegate {
CaptureHelper.CaptureLastRegion(false);
});
}
- private void Contextmenu_capturewindow_Click(object sender,EventArgs e) {
+ private void Contextmenu_CaptureWindow_Click(object sender,EventArgs e) {
BeginInvoke((MethodInvoker)delegate {
CaptureHelper.CaptureWindowInteractive(false);
});
}
- private void Contextmenu_capturewindowfromlist_Click(object sender,EventArgs e) {
+ private void Contextmenu_CaptureWindowFromList_Click(object sender,EventArgs e) {
ToolStripMenuItem clickedItem = (ToolStripMenuItem)sender;
BeginInvoke((MethodInvoker)delegate {
try {
@@ -983,11 +989,11 @@ namespace Greenshot {
});
}
- private void Contextmenu_captureie_Click(object sender, EventArgs e) {
+ private void Contextmenu_CaptureIe_Click(object sender, EventArgs e) {
CaptureIE();
}
- private void Contextmenu_captureiefromlist_Click(object sender, EventArgs e) {
+ private void Contextmenu_CaptureIeFromList_Click(object sender, EventArgs e) {
if (!_conf.IECapture) {
LOG.InfoFormat("IE Capture is disabled.");
return;
@@ -1015,9 +1021,9 @@ namespace Greenshot {
///
/// Context menu entry "Support Greenshot"
///
- ///
- ///
- private void Contextmenu_donateClick(object sender, EventArgs e) {
+ /// object
+ /// EventArgs
+ private void Contextmenu_DonateClick(object sender, EventArgs e) {
BeginInvoke((MethodInvoker)delegate {
Process.Start("http://getgreenshot.org/support/?version=" + Assembly.GetEntryAssembly().GetName().Version);
});
@@ -1028,7 +1034,7 @@ namespace Greenshot {
///
///
///
- private void Contextmenu_settingsClick(object sender, EventArgs e) {
+ private void Contextmenu_SettingsClick(object sender, EventArgs e) {
BeginInvoke((MethodInvoker)ShowSetting);
}
@@ -1056,7 +1062,7 @@ namespace Greenshot {
///
///
///
- private void Contextmenu_aboutClick(object sender, EventArgs e) {
+ private void Contextmenu_AboutClick(object sender, EventArgs e) {
ShowAbout();
}
@@ -1110,7 +1116,7 @@ namespace Greenshot {
// Only add if the value is not fixed
if (!_conf.Values["CaptureMousepointer"].IsFixed) {
- // For the capture mousecursor option
+ // For the capture mouse-cursor option
ToolStripMenuSelectListItem captureMouseItem = new ToolStripMenuSelectListItem
{
Text = Language.GetString("settings_capture_mousepointer"),
@@ -1463,27 +1469,5 @@ namespace Greenshot {
notifyIcon = null;
}
}
-
-
- ///
- /// Do work in the background
- ///
- ///
- ///
- private void BackgroundWorkerTimerTick(object sender, EventArgs e) {
- if (_conf.MinimizeWorkingSetSize) {
- PsAPI.EmptyWorkingSet();
- }
- if (UpdateHelper.IsUpdateCheckNeeded()) {
- LOG.Debug("BackgroundWorkerTimerTick checking for update");
- // Start update check in the background
- var backgroundTask = new Thread(UpdateHelper.CheckAndAskForUpdate)
- {
- Name = "Update check",
- IsBackground = true
- };
- backgroundTask.Start();
- }
- }
- }
+ }
}
\ No newline at end of file
diff --git a/Greenshot/Helpers/Entities/UpdateFeed.cs b/Greenshot/Helpers/Entities/UpdateFeed.cs
new file mode 100644
index 000000000..a7a80afb8
--- /dev/null
+++ b/Greenshot/Helpers/Entities/UpdateFeed.cs
@@ -0,0 +1,35 @@
+/*
+ * Greenshot - a free and open source screenshot tool
+ * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ *
+ * For more information see: http://getgreenshot.org/
+ * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+using Newtonsoft.Json;
+
+namespace Greenshot.Helpers.Entities
+{
+ [JsonObject]
+ public class UpdateFeed
+ {
+ [JsonProperty("release")]
+ public string CurrentReleaseVersion { get; set; }
+
+ [JsonProperty("beta")]
+ public string CurrentBetaVersion { get; set; }
+ }
+}
diff --git a/Greenshot/Helpers/UpdateHelper.cs b/Greenshot/Helpers/UpdateHelper.cs
deleted file mode 100644
index 479a66955..000000000
--- a/Greenshot/Helpers/UpdateHelper.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Reflection;
-using System.Windows.Forms;
-using Greenshot.Configuration;
-using GreenshotPlugin.Core;
-using GreenshotPlugin.IniFile;
-using log4net;
-
-namespace Greenshot.Helpers {
- ///
- /// Description of RssFeedHelper.
- ///
- public static class UpdateHelper {
- private static readonly ILog Log = LogManager.GetLogger(typeof(UpdateHelper));
- private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection();
- private const string StableDownloadLink = "https://getgreenshot.org/downloads/";
- private const string VersionHistoryLink = "https://getgreenshot.org/version-history/";
- private static readonly object LockObject = new object();
- private static RssFile _latestGreenshot;
- private static string _downloadLink = StableDownloadLink;
-
- ///
- /// Is an update check needed?
- ///
- /// bool true if yes
- public static bool IsUpdateCheckNeeded() {
- lock (LockObject)
- {
- if (CoreConfig.UpdateCheckInterval == 0)
- {
- return false;
- }
- DateTime checkTime = CoreConfig.LastUpdateCheck;
- checkTime = checkTime.AddDays(CoreConfig.UpdateCheckInterval);
- if (DateTime.Now.CompareTo(checkTime) < 0)
- {
- Log.DebugFormat("No need to check RSS feed for updates, feed check will be after {0}", checkTime);
- return false;
- }
- Log.DebugFormat("Update check is due, last check was {0} check needs to be made after {1} (which is one {2} later)", CoreConfig.LastUpdateCheck, checkTime, CoreConfig.UpdateCheckInterval);
- if (!RssHelper.IsRssModifiedAfter(CoreConfig.LastUpdateCheck))
- {
- Log.DebugFormat("RSS feed has not been updated since after {0}", CoreConfig.LastUpdateCheck);
- return false;
- }
- }
- return true;
- }
-
- ///
- /// Read the RSS feed to see if there is a Greenshot update
- ///
- public static void CheckAndAskForUpdate() {
- lock (LockObject) {
- Version currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
- // Test like this:
- // currentVersion = new Version("0.8.1.1198");
-
- // Make sure we update the LastUpdateCheck, in case an error occurs we should not retry every 5 minutes
- // This actually prevents an update check, but rather one to less than many to many
- CoreConfig.LastUpdateCheck = DateTime.Now;
-
- try
- {
- _latestGreenshot = null;
- ProcessRssInfo(currentVersion);
- if (_latestGreenshot != null) {
- var notifyIcon = SimpleServiceProvider.Current.GetInstance();
-
- notifyIcon.BalloonTipClicked += HandleBalloonTipClick;
- notifyIcon.BalloonTipClosed += CleanupBalloonTipClick;
- notifyIcon.ShowBalloonTip(10000, "Greenshot", Language.GetFormattedString(LangKey.update_found, "'" + _latestGreenshot.File + "'"), ToolTipIcon.Info);
- }
- } catch (Exception e) {
- Log.Error("An error occured while checking for updates, the error will be ignored: ", e);
- }
- }
- }
-
- private static void CleanupBalloonTipClick(object sender, EventArgs e) {
- var notifyIcon = SimpleServiceProvider.Current.GetInstance();
- notifyIcon.BalloonTipClicked -= HandleBalloonTipClick;
- notifyIcon.BalloonTipClosed -= CleanupBalloonTipClick;
- }
-
- private static void HandleBalloonTipClick(object sender, EventArgs e) {
- try {
- if (_latestGreenshot != null) {
- // "Direct" download link
- // Process.Start(latestGreenshot.Link);
- // Go to getgreenshot.org
- Process.Start(_downloadLink);
- }
- } catch (Exception) {
- MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, _downloadLink), Language.GetString(LangKey.error));
- } finally {
- CleanupBalloonTipClick(sender, e);
- }
- }
-
- private static void ProcessRssInfo(Version currentVersion) {
- // Reset latest Greenshot
- IList rssFiles = RssHelper.ReadRss();
-
- if (rssFiles == null) {
- return;
- }
-
- // Retrieve the current and latest greenshot
- foreach(RssFile rssFile in rssFiles) {
- if (rssFile.File.StartsWith("Greenshot")) {
- // check for exe
- if (!rssFile.IsExe) {
- continue;
- }
-
- // do we have a version?
- if (rssFile.Version == null) {
- Log.DebugFormat("Skipping unversioned exe {0} which is published at {1} : {2}", rssFile.File, rssFile.Pubdate.ToLocalTime(), rssFile.Link);
- continue;
- }
-
- // if the file is unstable, we will skip it when:
- // the current version is a release or release candidate AND check unstable is turned off.
- if (rssFile.IsUnstable) {
- // Skip if we shouldn't check unstables
- if ((CoreConfig.BuildState == BuildStates.RELEASE) && !CoreConfig.CheckForUnstable) {
- continue;
- }
- }
-
- // if the file is a release candidate, we will skip it when:
- // the current version is a release AND check unstable is turned off.
- if (rssFile.IsReleaseCandidate) {
- if (CoreConfig.BuildState == BuildStates.RELEASE && !CoreConfig.CheckForUnstable) {
- continue;
- }
- }
-
- // Compare versions
- int versionCompare = rssFile.Version.CompareTo(currentVersion);
- if (versionCompare > 0) {
- Log.DebugFormat("Found newer Greenshot '{0}' with version {1} published at {2} : {3}", rssFile.File, rssFile.Version, rssFile.Pubdate.ToLocalTime(), rssFile.Link);
- if (_latestGreenshot == null || rssFile.Version.CompareTo(_latestGreenshot.Version) > 0) {
- _latestGreenshot = rssFile;
- if (rssFile.IsReleaseCandidate || rssFile.IsUnstable) {
- _downloadLink = VersionHistoryLink;
- } else {
- _downloadLink = StableDownloadLink;
- }
- }
- } else if (versionCompare < 0) {
- Log.DebugFormat("Skipping older greenshot with version {0}", rssFile.Version);
- } else if (versionCompare == 0) {
- Log.DebugFormat("Found current version as exe {0} with version {1} published at {2} : {3}", rssFile.File, rssFile.Version, rssFile.Pubdate.ToLocalTime(), rssFile.Link);
- }
- }
- }
- }
- }
-}
diff --git a/Greenshot/Helpers/UpdateService.cs b/Greenshot/Helpers/UpdateService.cs
new file mode 100644
index 000000000..d1f755472
--- /dev/null
+++ b/Greenshot/Helpers/UpdateService.cs
@@ -0,0 +1,222 @@
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+using System;
+using System.Diagnostics;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+using Dapplo.HttpExtensions;
+using Dapplo.HttpExtensions.JsonNet;
+using Greenshot.Configuration;
+using Greenshot.Helpers.Entities;
+using GreenshotPlugin.Core;
+using GreenshotPlugin.IniFile;
+using GreenshotPlugin.Interfaces;
+using log4net;
+
+namespace Greenshot.Helpers
+{
+ ///
+ /// This processes the information, if there are updates available.
+ ///
+ public class UpdateService
+ {
+ private static readonly ILog Log = LogManager.GetLogger(typeof(UpdateService));
+ private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection();
+ private static readonly Uri UpdateFeed = new Uri("https://getgreenshot.org/update-feed.json");
+ private static readonly Uri Downloads = new Uri("https://getgreenshot.org/downloads");
+ private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
+
+ ///
+ /// Provides the current version
+ ///
+ public Version CurrentVersion { get; }
+
+ ///
+ /// Provides the latest known version
+ ///
+ public Version LatestReleaseVersion { get; private set; }
+
+ ///
+ /// The latest beta version
+ ///
+ public Version LatestBetaVersion { get; private set; }
+
+ ///
+ /// Checks if there is an release update available
+ ///
+ public bool IsUpdateAvailable => LatestReleaseVersion > CurrentVersion;
+
+ ///
+ /// Checks if there is an beta update available
+ ///
+ public bool IsBetaUpdateAvailable => LatestBetaVersion > CurrentVersion;
+
+ ///
+ /// Keep track of when the update was shown, so it won't be every few minutes
+ ///
+ public DateTimeOffset LastUpdateShown = DateTimeOffset.MinValue;
+
+ ///
+ /// Constructor with dependencies
+ ///
+ public UpdateService()
+ {
+ JsonNetJsonSerializer.RegisterGlobally();
+ var version = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
+ LatestReleaseVersion = CurrentVersion = new Version(version.FileMajorPart, version.FileMinorPart, version.FileBuildPart);
+ CoreConfig.LastSaveWithVersion = CurrentVersion.ToString();
+ }
+
+ ///
+ /// Start the background task which checks for updates
+ ///
+ public void Startup()
+ {
+ _ = BackgroundTask(() => TimeSpan.FromDays(CoreConfig.UpdateCheckInterval), UpdateCheck, _cancellationTokenSource.Token);
+ }
+
+ ///
+ /// Stop the update checks
+ ///
+ public void Shutdown()
+ {
+ if (!_cancellationTokenSource.IsCancellationRequested)
+ {
+ _cancellationTokenSource.Cancel();
+ }
+ }
+
+ ///
+ /// This runs a periodic task in the background
+ ///
+ /// Func which returns a TimeSpan
+ /// Func which returns a task
+ /// CancellationToken
+ /// Task
+ private async Task BackgroundTask(Func intervalFactory, Func reoccurringTask, CancellationToken cancellationToken = default)
+ {
+ // Initial delay, to make sure this doesn't happen at the startup
+ await Task.Delay(20000, cancellationToken);
+ Log.Info("Starting background task to check for updates");
+ await Task.Run(async () =>
+ {
+ while (!cancellationToken.IsCancellationRequested)
+ {
+ var interval = intervalFactory();
+ var task = reoccurringTask;
+ // If the check is disabled, handle that here
+ if (TimeSpan.Zero == interval)
+ {
+ interval = TimeSpan.FromMinutes(10);
+ task = c => Task.FromResult(true);
+ }
+
+ try
+ {
+ await task(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception ex)
+ {
+ Log.Error("Error occured when trying to check for updates.", ex);
+ }
+
+ try
+ {
+ await Task.Delay(interval, cancellationToken).ConfigureAwait(false);
+ }
+ catch (TaskCanceledException)
+ {
+ // Ignore, this always happens
+ }
+ catch (Exception ex)
+ {
+ Log.Error("Error occured await for the next update check.", ex);
+ }
+
+ }
+ }, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Do the actual update check
+ ///
+ /// CancellationToken
+ /// Task
+ private async Task UpdateCheck(CancellationToken cancellationToken = default)
+ {
+ Log.InfoFormat("Checking for updates from {0}", UpdateFeed);
+ var updateFeed = await UpdateFeed.GetAsAsync(cancellationToken);
+ if (updateFeed == null)
+ {
+ return;
+ }
+
+ CoreConfig.LastUpdateCheck = DateTime.Now;
+
+ ProcessFeed(updateFeed);
+
+ // Only show if the update was shown >24 hours ago.
+ if (DateTimeOffset.Now.AddDays(-1) > LastUpdateShown)
+ {
+ if (IsBetaUpdateAvailable)
+ {
+ LastUpdateShown = DateTimeOffset.Now;
+ ShowUpdate(LatestBetaVersion);
+ } else if (IsUpdateAvailable)
+ {
+ LastUpdateShown = DateTimeOffset.Now;
+ ShowUpdate(LatestReleaseVersion);
+ }
+ }
+
+ }
+
+
+ ///
+ /// This takes care of creating the toast view model, publishing it, and disposing afterwards
+ ///
+ /// Version
+ private void ShowUpdate(Version newVersion)
+ {
+ var notificationService = SimpleServiceProvider.Current.GetInstance();
+ var message = Language.GetFormattedString(LangKey.update_found, newVersion.ToString());
+ notificationService.ShowInfoMessage(message, 10000, () => Process.Start(Downloads.AbsoluteUri));
+ }
+
+ ///
+ /// Process the update feed to get the latest version
+ ///
+ ///
+ private void ProcessFeed(UpdateFeed updateFeed)
+ {
+ var latestReleaseString = Regex.Replace(updateFeed.CurrentReleaseVersion, "[a-zA-Z\\-]*", "");
+ if (Version.TryParse(latestReleaseString, out var latestReleaseVersion))
+ {
+ LatestReleaseVersion = latestReleaseVersion;
+ }
+ var latestBetaString = Regex.Replace(updateFeed.CurrentBetaVersion, "[a-zA-Z\\-]*", "");
+ if (Version.TryParse(latestBetaString, out var latestBetaVersion))
+ {
+ LatestBetaVersion = latestBetaVersion;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/GreenshotPlugin/Core/RssHelper.cs b/GreenshotPlugin/Core/RssHelper.cs
deleted file mode 100644
index f7a48289c..000000000
--- a/GreenshotPlugin/Core/RssHelper.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Net;
-using System.Text.RegularExpressions;
-using System.Xml;
-using log4net;
-
-namespace GreenshotPlugin.Core {
- public class RssFile {
- public string File { get; }
- private readonly DateTime _pubdate;
- public DateTime Pubdate => _pubdate;
-
- public string Link { get; }
- public Version Version { get; set; }
-
- public string Language { get; set; }
-
- public bool IsExe {
- get {
- if (File != null) {
- return File.ToLower().EndsWith(".exe");
- }
- return false;
- }
- }
-
- public bool IsUnstable {
- get {
- if (File != null) {
- return File.ToLower().Contains("unstable");
- }
- return false;
- }
- }
-
- public bool IsReleaseCandidate {
- get {
- if (File != null) {
- return Regex.IsMatch(File.ToLower(), "rc[0-9]+");
- }
- return false;
- }
- }
-
- public RssFile(string file, string pubdate, string link) {
- File = file;
- if (!DateTime.TryParse(pubdate, out _pubdate))
- {
- DateTime.TryParseExact(pubdate.Replace(" UT", ""), "ddd, dd MMM yyyy HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out _pubdate);
- }
- Link = link;
- }
- }
-
- ///
- /// Description of RssHelper.
- ///
- public class RssHelper {
- private static readonly ILog Log = LogManager.GetLogger(typeof(RssHelper));
- private const string Rssfeed = "http://getgreenshot.org/project-feed/";
-
- ///
- /// This is using the HTTP HEAD Method to check if the RSS Feed is modified after the supplied date
- ///
- /// DateTime
- /// true if the feed is newer
- public static bool IsRssModifiedAfter(DateTime updateTime) {
- DateTime lastModified = NetworkHelper.GetLastModified(new Uri(Rssfeed));
- if (lastModified == DateTime.MinValue)
- {
- // Time could not be read, just take now and add one hour to it.
- // This assist BUG-1850
- lastModified = DateTime.Now.AddHours(1);
- }
- return updateTime.CompareTo(lastModified) < 0;
- }
-
- ///
- /// Read the Greenshot RSS feed, so we can use this information to check for updates
- ///
- /// List with RssFile(s)
- public static IList ReadRss() {
- XmlDocument rssDoc = new XmlDocument();
- try {
- HttpWebRequest webRequest = NetworkHelper.CreateWebRequest(Rssfeed);
- XmlTextReader rssReader = new XmlTextReader(webRequest.GetResponse().GetResponseStream());
-
- // Load the XML content into a XmlDocument
- rssDoc.Load(rssReader);
- } catch (Exception wE) {
- Log.WarnFormat("Problem reading RSS from {0}", Rssfeed);
- Log.Warn(wE.Message);
- return null;
- }
-
- // Loop for the tag
- XmlNode nodeRss = null;
- for (int i = 0; i < rssDoc.ChildNodes.Count; i++) {
- // If it is the rss tag
- if (rssDoc.ChildNodes[i].Name == "rss") {
- // tag found
- nodeRss = rssDoc.ChildNodes[i];
- }
- }
-
- if (nodeRss == null) {
- Log.Debug("No RSS Feed!");
- return null;
- }
-
- // Loop for the tag
- XmlNode nodeChannel = null;
- for (int i = 0; i < nodeRss.ChildNodes.Count; i++) {
- // If it is the channel tag
- if (nodeRss.ChildNodes[i].Name == "channel") {
- // tag found
- nodeChannel = nodeRss.ChildNodes[i];
- }
- }
-
- if (nodeChannel == null) {
- Log.Debug("No channel in RSS feed!");
- return null;
- }
-
- IList rssFiles = new List();
-
- // Loop for the , , and all the other tags
- for (int i = 0; i < nodeChannel.ChildNodes.Count; i++) {
- // If it is the item tag, then it has children tags which we will add as items to the ListView
-
- if (nodeChannel.ChildNodes[i].Name != "item")
- {
- continue;
- }
- XmlNode nodeItem = nodeChannel.ChildNodes[i];
- string link = nodeItem["link"]?.InnerText;
- string pubdate = nodeItem["pubDate"]?.InnerText;
- try {
- if (link == null)
- {
- continue;
- }
- Match match = Regex.Match(Uri.UnescapeDataString(link), @"^.*\/(Greenshot.+)\/download$");
- if (!match.Success)
- {
- continue;
- }
- string file = match.Groups[1].Value;
-
- RssFile rssFile = new RssFile(file, pubdate, link);
- if (file.EndsWith(".exe") ||file.EndsWith(".zip")) {
- string version = Regex.Replace(file, @".*[a-zA-Z_]\-", string.Empty);
- version = version.Replace(@"\-[a-zA-Z]+.*","");
- version = Regex.Replace(version, @"\.exe$", string.Empty);
- version = Regex.Replace(version, @"\.zip$", string.Empty);
- version = Regex.Replace(version, @"RC[0-9]+", string.Empty);
- if (version.Trim().Length > 0) {
- version = version.Replace('-','.');
- version = version.Replace(',','.');
- version = Regex.Replace(version, @"^[a-zA-Z_]*\.", string.Empty);
- version = Regex.Replace(version, @"\.[a-zA-Z_]*$", string.Empty);
-
- try {
- rssFile.Version = new Version(version);
- } catch (Exception) {
- Log.DebugFormat("Found invalid version {0} in file {1}", version, file);
- }
- }
- rssFiles.Add(rssFile);
- }
- } catch (Exception ex) {
- Log.WarnFormat("Couldn't read RSS entry for: {0}", nodeChannel["title"]?.InnerText);
- Log.Warn("Reason: ", ex);
- }
- }
-
- return rssFiles;
- }
- }
-}
From 1d20faea2b64ef1b671a70a6cbd2cb4d26855199 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sat, 25 Apr 2020 21:59:21 +0200
Subject: [PATCH 005/224] Fixed the manifest, somehow there was an error which
prevented DPI support.
---
Greenshot/greenshot.manifest | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Greenshot/greenshot.manifest b/Greenshot/greenshot.manifest
index 77ba35d7a..89cf7a2b6 100644
--- a/Greenshot/greenshot.manifest
+++ b/Greenshot/greenshot.manifest
@@ -2,14 +2,14 @@
-
- True/PM
+
+ True/PM
- true
- true
- PerMonitorV2,PerMonitor
- true
- true
+ true
+ true
+ PerMonitorV2,PerMonitor
+ true
+ false
@@ -33,7 +33,7 @@
The presence of the "requestedExecutionLevel" node will disable
file and registry virtualization on Vista. See:
http://msdn.microsoft.com/en-us/library/aa965884%28v=vs.85%29.aspx
-
+
Use the "level" attribute to specify the User Account Control level:
asInvoker = Never prompt for elevation
requireAdministrator = Always prompt for elevation
From 8b45489b1123ea33adec779b32ce8dfb0f1a6a1a Mon Sep 17 00:00:00 2001
From: Killy
Date: Sun, 26 Apr 2020 16:50:17 +0300
Subject: [PATCH 006/224] Zoom feature for the editor
---
Greenshot/Drawing/Adorners/AbstractAdorner.cs | 17 ++
Greenshot/Drawing/Adorners/MoveAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/ResizeAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/TargetAdorner.cs | 2 +-
Greenshot/Drawing/CropContainer.cs | 17 +-
Greenshot/Drawing/DrawableContainer.cs | 2 +-
Greenshot/Drawing/DrawableContainerList.cs | 2 +-
Greenshot/Drawing/Surface.cs | 100 +++++++--
Greenshot/Drawing/TextContainer.cs | 14 +-
Greenshot/Forms/ImageEditorForm.Designer.cs | 212 +++++++++++++++++-
Greenshot/Forms/ImageEditorForm.cs | 167 ++++++++++++--
Greenshot/Forms/ImageEditorForm.resx | 81 +++++++
.../icons/fugue/magnifier-zoom-actual.png | Bin 0 -> 742 bytes
Greenshot/icons/fugue/magnifier-zoom-fit.png | Bin 0 -> 726 bytes
Greenshot/icons/fugue/magnifier-zoom-in.png | Bin 0 -> 733 bytes
Greenshot/icons/fugue/magnifier-zoom-out.png | Bin 0 -> 707 bytes
Greenshot/icons/fugue/magnifier-zoom.png | Bin 0 -> 676 bytes
GreenshotPlugin/Interfaces/ISurface.cs | 19 +-
18 files changed, 585 insertions(+), 52 deletions(-)
create mode 100644 Greenshot/icons/fugue/magnifier-zoom-actual.png
create mode 100644 Greenshot/icons/fugue/magnifier-zoom-fit.png
create mode 100644 Greenshot/icons/fugue/magnifier-zoom-in.png
create mode 100644 Greenshot/icons/fugue/magnifier-zoom-out.png
create mode 100644 Greenshot/icons/fugue/magnifier-zoom.png
diff --git a/Greenshot/Drawing/Adorners/AbstractAdorner.cs b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
index 0612753aa..fc3d72371 100644
--- a/Greenshot/Drawing/Adorners/AbstractAdorner.cs
+++ b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
@@ -116,6 +116,23 @@ namespace Greenshot.Drawing.Adorners
}
}
+ ///
+ /// Return the bounds of the Adorner as displayed on the parent Surface
+ ///
+ protected virtual Rectangle SurfaceBounds
+ {
+ get
+ {
+ Point[] points = { Location };
+ var matrix = Owner.Parent.ZoomMatrix;
+ if (!matrix.IsIdentity)
+ {
+ matrix.TransformPoints(points);
+ }
+ return new Rectangle(points[0].X - _size.Width / 2, points[0].Y - _size.Height / 2, _size.Width, _size.Height);
+ }
+ }
+
///
/// The adorner is active if the edit status is not idle or undrawn
///
diff --git a/Greenshot/Drawing/Adorners/MoveAdorner.cs b/Greenshot/Drawing/Adorners/MoveAdorner.cs
index ec3dcf2d3..21c42a9fa 100644
--- a/Greenshot/Drawing/Adorners/MoveAdorner.cs
+++ b/Greenshot/Drawing/Adorners/MoveAdorner.cs
@@ -142,7 +142,7 @@ namespace Greenshot.Drawing.Adorners
{
Graphics targetGraphics = paintEventArgs.Graphics;
- var bounds = Bounds;
+ var bounds = SurfaceBounds;
GraphicsState state = targetGraphics.Save();
targetGraphics.SmoothingMode = SmoothingMode.None;
diff --git a/Greenshot/Drawing/Adorners/ResizeAdorner.cs b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
index e75126f10..ef61b17bc 100644
--- a/Greenshot/Drawing/Adorners/ResizeAdorner.cs
+++ b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
@@ -169,7 +169,7 @@ namespace Greenshot.Drawing.Adorners
{
Graphics targetGraphics = paintEventArgs.Graphics;
- var bounds = Bounds;
+ var bounds = SurfaceBounds;
GraphicsState state = targetGraphics.Save();
targetGraphics.SmoothingMode = SmoothingMode.None;
diff --git a/Greenshot/Drawing/Adorners/TargetAdorner.cs b/Greenshot/Drawing/Adorners/TargetAdorner.cs
index 8ca0a91ef..23cf29d09 100644
--- a/Greenshot/Drawing/Adorners/TargetAdorner.cs
+++ b/Greenshot/Drawing/Adorners/TargetAdorner.cs
@@ -96,7 +96,7 @@ namespace Greenshot.Drawing.Adorners
{
Graphics targetGraphics = paintEventArgs.Graphics;
- var bounds = Bounds;
+ var bounds = SurfaceBounds;
targetGraphics.FillRectangle(Brushes.Green, bounds.X, bounds.Y, bounds.Width, bounds.Height);
}
diff --git a/Greenshot/Drawing/CropContainer.cs b/Greenshot/Drawing/CropContainer.cs
index 2dc9761c0..f5288074d 100644
--- a/Greenshot/Drawing/CropContainer.cs
+++ b/Greenshot/Drawing/CropContainer.cs
@@ -56,7 +56,15 @@ namespace Greenshot.Drawing {
/// We need to override the DrawingBound, return a rectangle in the size of the image, to make sure this element is always draw
/// (we create a transparent brown over the complete picture)
///
- public override Rectangle DrawingBounds => new Rectangle(0,0,_parent?.Width??0, _parent?.Height ?? 0);
+ public override Rectangle DrawingBounds {
+ get {
+ if (_parent?.Image is Image image) {
+ return new Rectangle(0, 0, image.Width, image.Height);
+ } else {
+ return new Rectangle();
+ }
+ }
+ }
public override void Draw(Graphics g, RenderMode rm) {
if (_parent == null)
@@ -67,17 +75,18 @@ namespace Greenshot.Drawing {
using Brush cropBrush = new SolidBrush(Color.FromArgb(100, 150, 150, 100));
Rectangle cropRectangle = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height);
Rectangle selectionRect = new Rectangle(cropRectangle.Left - 1, cropRectangle.Top - 1, cropRectangle.Width + 1, cropRectangle.Height + 1);
+ Size imageSize = _parent.Image.Size;
DrawSelectionBorder(g, selectionRect);
// top
- g.FillRectangle(cropBrush, new Rectangle(0, 0, _parent.Width, cropRectangle.Top));
+ g.FillRectangle(cropBrush, new Rectangle(0, 0, imageSize.Width, cropRectangle.Top));
// left
g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top, cropRectangle.Left, cropRectangle.Height));
// right
- g.FillRectangle(cropBrush, new Rectangle(cropRectangle.Left + cropRectangle.Width, cropRectangle.Top, _parent.Width - (cropRectangle.Left + cropRectangle.Width), cropRectangle.Height));
+ g.FillRectangle(cropBrush, new Rectangle(cropRectangle.Left + cropRectangle.Width, cropRectangle.Top, imageSize.Width - (cropRectangle.Left + cropRectangle.Width), cropRectangle.Height));
// bottom
- g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top + cropRectangle.Height, _parent.Width, _parent.Height - (cropRectangle.Top + cropRectangle.Height)));
+ g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top + cropRectangle.Height, imageSize.Width, imageSize.Height - (cropRectangle.Top + cropRectangle.Height)));
}
public override bool HasContextMenu {
diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs
index 8d805b1f0..65ff42de3 100644
--- a/Greenshot/Drawing/DrawableContainer.cs
+++ b/Greenshot/Drawing/DrawableContainer.cs
@@ -298,7 +298,7 @@ namespace Greenshot.Drawing
public virtual void Invalidate() {
if (Status != EditStatus.UNDRAWN) {
- _parent?.Invalidate(DrawingBounds);
+ _parent?.InvalidateElements(DrawingBounds);
}
}
diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs
index d3c325f5b..17b879538 100644
--- a/Greenshot/Drawing/DrawableContainerList.cs
+++ b/Greenshot/Drawing/DrawableContainerList.cs
@@ -286,7 +286,7 @@ namespace Greenshot.Drawing {
{
region = Rectangle.Union(region, dc.DrawingBounds);
}
- Parent.Invalidate(region);
+ Parent.InvalidateElements(region);
}
///
/// Indicates whether the given list of elements can be pulled up,
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index bd56db3a2..5c38bea8e 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -298,10 +298,34 @@ namespace Greenshot.Drawing
set
{
_image = value;
- Size = _image.Size;
+ UpdateSize();
}
}
+ [NonSerialized]
+ private float _zoomFactor = 1.0f;
+ public float ZoomFactor
+ {
+ get => _zoomFactor;
+ set
+ {
+ _zoomFactor = value;
+ ZoomMatrix = new Matrix(_zoomFactor, 0, 0, _zoomFactor, 0, 0);
+ UpdateSize();
+ }
+ }
+
+ public Matrix ZoomMatrix { get; private set; } = new Matrix(1, 0, 0, 1, 0, 0);
+
+ ///
+ /// Sets the surface size as zoomed image size.
+ ///
+ private void UpdateSize()
+ {
+ var size = _image.Size;
+ Size = new Size((int)(size.Width * _zoomFactor), (int)(size.Height * _zoomFactor));
+ }
+
///
/// The field aggregator is that which is used to have access to all the fields inside the currently selected elements.
/// e.g. used to decided if and which line thickness is shown when multiple elements are selected.
@@ -447,7 +471,6 @@ namespace Greenshot.Drawing
// Set new values
Image = newImage;
- Size = newImage.Size;
_modified = true;
}
@@ -1086,6 +1109,12 @@ namespace Greenshot.Drawing
return null;
}
+ ///
+ /// Translate mouse coordinates as if they were applied directly to unscaled image.
+ ///
+ private MouseEventArgs InverseZoomMouseCoordinates(MouseEventArgs e)
+ => new MouseEventArgs(e.Button, e.Clicks, (int)(e.X / _zoomFactor), (int)(e.Y / _zoomFactor), e.Delta);
+
///
/// This event handler is called when someone presses the mouse on a surface.
///
@@ -1093,6 +1122,7 @@ namespace Greenshot.Drawing
///
private void SurfaceMouseDown(object sender, MouseEventArgs e)
{
+ e = InverseZoomMouseCoordinates(e);
// Handle Adorners
var adorner = FindActiveAdorner(e);
@@ -1187,6 +1217,7 @@ namespace Greenshot.Drawing
///
private void SurfaceMouseUp(object sender, MouseEventArgs e)
{
+ e = InverseZoomMouseCoordinates(e);
// Handle Adorners
var adorner = FindActiveAdorner(e);
@@ -1276,6 +1307,8 @@ namespace Greenshot.Drawing
///
private void SurfaceMouseMove(object sender, MouseEventArgs e)
{
+ e = InverseZoomMouseCoordinates(e);
+
// Handle Adorners
var adorner = FindActiveAdorner(e);
if (adorner != null)
@@ -1371,6 +1404,25 @@ namespace Greenshot.Drawing
return GetImage(RenderMode.EXPORT);
}
+ private Rectangle ZoomClipRectangle(Rectangle rc, double scale)
+ => new Rectangle(
+ (int)(rc.X * scale),
+ (int)(rc.Y * scale),
+ (int)((rc.Width + 1) * scale) + 1, // making sure to redraw enough pixels when moving scaled image
+ (int)((rc.Height + 1) * scale) + 1
+ );
+
+ private RectangleF ZoomClipRectangle(RectangleF rc, double scale)
+ => new RectangleF(
+ (float)Math.Floor(rc.X * scale),
+ (float)Math.Floor(rc.Y * scale),
+ (float)Math.Ceiling(rc.Width * scale),
+ (float)Math.Ceiling(rc.Height * scale)
+ );
+
+ public void InvalidateElements(Rectangle rc)
+ => Invalidate(ZoomClipRectangle(rc, _zoomFactor));
+
///
/// This is the event handler for the Paint Event, try to draw as little as possible!
///
@@ -1379,14 +1431,16 @@ namespace Greenshot.Drawing
private void SurfacePaint(object sender, PaintEventArgs paintEventArgs)
{
Graphics targetGraphics = paintEventArgs.Graphics;
- Rectangle clipRectangle = paintEventArgs.ClipRectangle;
- if (Rectangle.Empty.Equals(clipRectangle))
+ Rectangle targetClipRectangle = paintEventArgs.ClipRectangle;
+ if (Rectangle.Empty.Equals(targetClipRectangle))
{
LOG.Debug("Empty cliprectangle??");
return;
}
+ Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, 1.0 / _zoomFactor);
- if (_elements.HasIntersectingFilters(clipRectangle))
+ bool isZoomedIn = ZoomFactor > 1f;
+ if (_elements.HasIntersectingFilters(imageClipRectangle) || isZoomedIn)
{
if (_buffer != null)
{
@@ -1409,18 +1463,38 @@ namespace Greenshot.Drawing
//graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
//graphics.CompositingQuality = CompositingQuality.HighQuality;
//graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
- DrawBackground(graphics, clipRectangle);
- graphics.DrawImage(Image, clipRectangle, clipRectangle, GraphicsUnit.Pixel);
- graphics.SetClip(targetGraphics);
- _elements.Draw(graphics, _buffer, RenderMode.EDIT, clipRectangle);
+ DrawBackground(graphics, imageClipRectangle);
+ graphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ graphics.SetClip(ZoomClipRectangle(targetGraphics.ClipBounds, 1.0 / _zoomFactor));
+ _elements.Draw(graphics, _buffer, RenderMode.EDIT, imageClipRectangle);
}
- targetGraphics.DrawImage(_buffer, clipRectangle, clipRectangle, GraphicsUnit.Pixel);
+ targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
+ if (isZoomedIn)
+ {
+ var state = targetGraphics.Save();
+ targetGraphics.SmoothingMode = SmoothingMode.None;
+ targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
+ targetGraphics.CompositingQuality = CompositingQuality.HighQuality;
+ targetGraphics.PixelOffsetMode = PixelOffsetMode.None;
+
+ targetGraphics.DrawImage(_buffer, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+
+ targetGraphics.Restore(state);
+ }
+ else
+ {
+ targetGraphics.DrawImage(_buffer, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ }
+ targetGraphics.ResetTransform();
}
else
{
- DrawBackground(targetGraphics, clipRectangle);
- targetGraphics.DrawImage(Image, clipRectangle, clipRectangle, GraphicsUnit.Pixel);
- _elements.Draw(targetGraphics, null, RenderMode.EDIT, clipRectangle);
+ DrawBackground(targetGraphics, targetClipRectangle);
+
+ targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
+ targetGraphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ _elements.Draw(targetGraphics, null, RenderMode.EDIT, imageClipRectangle);
+ targetGraphics.ResetTransform();
}
// No clipping for the adorners
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index 0f4866d71..bd4c75274 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -442,14 +442,20 @@ namespace Greenshot.Drawing
correction = -1;
}
Rectangle absRectangle = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height);
- _textBox.Left = absRectangle.Left + lineWidth;
- _textBox.Top = absRectangle.Top + lineWidth;
+ Point[] points = { absRectangle.Location, absRectangle.Location + absRectangle.Size };
+ var matrix = Parent.ZoomMatrix;
+ if (!matrix.IsIdentity)
+ {
+ matrix.TransformPoints(points);
+ }
+ _textBox.Left = points[0].X + lineWidth;
+ _textBox.Top = points[0].Y + lineWidth;
if (lineThickness <= 1)
{
lineWidth = 0;
}
- _textBox.Width = absRectangle.Width - 2 * lineWidth + correction;
- _textBox.Height = absRectangle.Height - 2 * lineWidth + correction;
+ _textBox.Width = points[1].X - points[0].X - 2 * lineWidth + correction;
+ _textBox.Height = points[1].Y - points[0].Y - 2 * lineWidth + correction;
}
public override void ApplyBounds(RectangleF newBounds)
diff --git a/Greenshot/Forms/ImageEditorForm.Designer.cs b/Greenshot/Forms/ImageEditorForm.Designer.cs
index 9a653cc21..5789a19a6 100644
--- a/Greenshot/Forms/ImageEditorForm.Designer.cs
+++ b/Greenshot/Forms/ImageEditorForm.Designer.cs
@@ -194,6 +194,26 @@ namespace Greenshot {
this.alignLeftToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.alignCenterToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.alignRightToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
+ this.zoomMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.zoomInMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoomOutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoomMenuSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.zoomBestFitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoomMenuSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.zoom25MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoom50MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoom66MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoom75MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoomMenuSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+ this.zoomActualSizeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoomMenuSeparator4 = new System.Windows.Forms.ToolStripSeparator();
+ this.zoom200MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoom300MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoom400MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoom600MenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.zoomStatusDropDownBtn = new System.Windows.Forms.ToolStripDropDownButton();
+ this.zoomMainMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.statusStripSpacer = new System.Windows.Forms.ToolStripStatusLabel();
this.topToolStripContainer.BottomToolStripPanel.SuspendLayout();
this.topToolStripContainer.ContentPanel.SuspendLayout();
this.topToolStripContainer.LeftToolStripPanel.SuspendLayout();
@@ -203,6 +223,7 @@ namespace Greenshot {
this.tableLayoutPanel1.SuspendLayout();
this.toolsToolStrip.SuspendLayout();
this.menuStrip1.SuspendLayout();
+ this.zoomMenuStrip.SuspendLayout();
this.destinationsToolStrip.SuspendLayout();
this.propertiesToolStrip.SuspendLayout();
this.fileSavedStatusContextMenu.SuspendLayout();
@@ -238,7 +259,9 @@ namespace Greenshot {
this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.dimensionsLabel,
- this.statusLabel});
+ this.statusLabel,
+ this.statusStripSpacer,
+ this.zoomStatusDropDownBtn});
this.statusStrip1.Location = new System.Drawing.Point(0, 0);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(785, 24);
@@ -538,6 +561,7 @@ namespace Greenshot {
this.editToolStripMenuItem,
this.objectToolStripMenuItem,
this.pluginToolStripMenuItem,
+ this.zoomMainMenuItem,
this.helpToolStripMenuItem});
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.BackColor = System.Drawing.SystemColors.Control;
@@ -1624,6 +1648,171 @@ namespace Greenshot {
this.alignRightToolStripMenuItem.Name = "alignRightToolStripMenuItem";
this.alignRightToolStripMenuItem.Tag = System.Drawing.StringAlignment.Far;
//
+ // zoomMainMenuItem
+ //
+ this.zoomMainMenuItem.DropDown = this.zoomMenuStrip;
+ this.zoomMainMenuItem.Name = "zoomMainMenuItem";
+ this.zoomMainMenuItem.Size = new System.Drawing.Size(51, 20);
+ this.zoomMainMenuItem.Text = "Zoom";
+ //
+ // zoomMenuStrip
+ //
+ this.zoomMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.zoomInMenuItem,
+ this.zoomOutMenuItem,
+ this.zoomMenuSeparator1,
+ this.zoomBestFitMenuItem,
+ this.zoomMenuSeparator2,
+ this.zoom25MenuItem,
+ this.zoom50MenuItem,
+ this.zoom66MenuItem,
+ this.zoom75MenuItem,
+ this.zoomMenuSeparator3,
+ this.zoomActualSizeMenuItem,
+ this.zoomMenuSeparator4,
+ this.zoom200MenuItem,
+ this.zoom300MenuItem,
+ this.zoom400MenuItem,
+ this.zoom600MenuItem});
+ this.zoomMenuStrip.Name = "zoomMenuStrip";
+ this.zoomMenuStrip.Size = new System.Drawing.Size(210, 292);
+ //
+ // zoomInMenuItem
+ //
+ this.zoomInMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("zoomInMenuItem.Image")));
+ this.zoomInMenuItem.Name = "zoomInMenuItem";
+ this.zoomInMenuItem.ShortcutKeyDisplayString = "Ctrl++";
+ this.zoomInMenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoomInMenuItem.Text = "Zoom In";
+ this.zoomInMenuItem.Click += new System.EventHandler(this.ZoomInMenuItemClick);
+ //
+ // zoomOutMenuItem
+ //
+ this.zoomOutMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("zoomOutMenuItem.Image")));
+ this.zoomOutMenuItem.Name = "zoomOutMenuItem";
+ this.zoomOutMenuItem.ShortcutKeyDisplayString = "Ctrl+-";
+ this.zoomOutMenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoomOutMenuItem.Text = "Zoom Out";
+ this.zoomOutMenuItem.Click += new System.EventHandler(this.ZoomOutMenuItemClick);
+ //
+ // zoomMenuSeparator1
+ //
+ this.zoomMenuSeparator1.Name = "zoomMenuSeparator1";
+ this.zoomMenuSeparator1.Size = new System.Drawing.Size(206, 6);
+ //
+ // zoomBestFitMenuItem
+ //
+ this.zoomBestFitMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("zoomBestFitMenuItem.Image")));
+ this.zoomBestFitMenuItem.Name = "zoomBestFitMenuItem";
+ this.zoomBestFitMenuItem.ShortcutKeyDisplayString = "Ctrl+*";
+ this.zoomBestFitMenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoomBestFitMenuItem.Text = "Best Fit";
+ this.zoomBestFitMenuItem.Click += new System.EventHandler(this.ZoomBestFitMenuItemClick);
+ //
+ // zoomMenuSeparator2
+ //
+ this.zoomMenuSeparator2.Name = "zoomMenuSeparator2";
+ this.zoomMenuSeparator2.Size = new System.Drawing.Size(206, 6);
+ //
+ // zoom25MenuItem
+ //
+ this.zoom25MenuItem.Name = "zoom25MenuItem";
+ this.zoom25MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom25MenuItem.Tag = "25";
+ this.zoom25MenuItem.Text = "25%";
+ this.zoom25MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoom50MenuItem
+ //
+ this.zoom50MenuItem.Name = "zoom50MenuItem";
+ this.zoom50MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom50MenuItem.Tag = "50";
+ this.zoom50MenuItem.Text = "50%";
+ this.zoom50MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoom66MenuItem
+ //
+ this.zoom66MenuItem.Name = "zoom66MenuItem";
+ this.zoom66MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom66MenuItem.Tag = "66";
+ this.zoom66MenuItem.Text = "66%";
+ this.zoom66MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoom75MenuItem
+ //
+ this.zoom75MenuItem.Name = "zoom75MenuItem";
+ this.zoom75MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom75MenuItem.Tag = "75";
+ this.zoom75MenuItem.Text = "75%";
+ this.zoom75MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoomMenuSeparator3
+ //
+ this.zoomMenuSeparator3.Name = "zoomMenuSeparator3";
+ this.zoomMenuSeparator3.Size = new System.Drawing.Size(206, 6);
+ //
+ // zoomActualSizeMenuItem
+ //
+ this.zoomActualSizeMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("zoomActualSizeMenuItem.Image")));
+ this.zoomActualSizeMenuItem.Name = "zoomActualSizeMenuItem";
+ this.zoomActualSizeMenuItem.ShortcutKeyDisplayString = "Ctrl+/";
+ this.zoomActualSizeMenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoomActualSizeMenuItem.Tag = "100";
+ this.zoomActualSizeMenuItem.Text = "100% - Actual Size";
+ this.zoomActualSizeMenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoomMenuSeparator4
+ //
+ this.zoomMenuSeparator4.Name = "zoomMenuSeparator4";
+ this.zoomMenuSeparator4.Size = new System.Drawing.Size(206, 6);
+ //
+ // zoom200MenuItem
+ //
+ this.zoom200MenuItem.Name = "zoom200MenuItem";
+ this.zoom200MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom200MenuItem.Tag = "200";
+ this.zoom200MenuItem.Text = "200%";
+ this.zoom200MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoom300MenuItem
+ //
+ this.zoom300MenuItem.Name = "zoom300MenuItem";
+ this.zoom300MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom300MenuItem.Tag = "300";
+ this.zoom300MenuItem.Text = "300%";
+ this.zoom300MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoom400MenuItem
+ //
+ this.zoom400MenuItem.Name = "zoom400MenuItem";
+ this.zoom400MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom400MenuItem.Tag = "400";
+ this.zoom400MenuItem.Text = "400%";
+ this.zoom400MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // zoom600MenuItem
+ //
+ this.zoom600MenuItem.Name = "zoom600MenuItem";
+ this.zoom600MenuItem.Size = new System.Drawing.Size(209, 22);
+ this.zoom600MenuItem.Tag = "600";
+ this.zoom600MenuItem.Text = "600%";
+ this.zoom600MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
+ //
+ // statusStripSpacer
+ //
+ this.statusStripSpacer.Name = "statusStripSpacer";
+ this.statusStripSpacer.Size = new System.Drawing.Size(599, 19);
+ this.statusStripSpacer.Spring = true;
+ //
+ // zoomStatusDropDownBtn
+ //
+ this.zoomStatusDropDownBtn.DropDown = this.zoomMenuStrip;
+ this.zoomStatusDropDownBtn.Image = ((System.Drawing.Image)(resources.GetObject("zoomStatusDropDownBtn.Image")));
+ this.zoomStatusDropDownBtn.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.zoomStatusDropDownBtn.Name = "zoomStatusDropDownBtn";
+ this.zoomStatusDropDownBtn.Size = new System.Drawing.Size(64, 22);
+ this.zoomStatusDropDownBtn.Text = "100%";
+ //
// ImageEditorForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1645,6 +1834,7 @@ namespace Greenshot {
this.statusStrip1.ResumeLayout(true);
this.tableLayoutPanel1.ResumeLayout(true);
this.toolsToolStrip.ResumeLayout(true);
+ this.zoomMenuStrip.ResumeLayout(false);
this.menuStrip1.ResumeLayout(true);
this.destinationsToolStrip.ResumeLayout(true);
this.propertiesToolStrip.ResumeLayout(true);
@@ -1794,5 +1984,25 @@ namespace Greenshot {
private Greenshot.Controls.ToolStripColorButton btnLineColor;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem autoCropToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator17;
+ private System.Windows.Forms.ContextMenuStrip zoomMenuStrip;
+ private System.Windows.Forms.ToolStripMenuItem zoomInMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoomOutMenuItem;
+ private System.Windows.Forms.ToolStripSeparator zoomMenuSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem zoomBestFitMenuItem;
+ private System.Windows.Forms.ToolStripSeparator zoomMenuSeparator2;
+ private System.Windows.Forms.ToolStripMenuItem zoom25MenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoom50MenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoom66MenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoom75MenuItem;
+ private System.Windows.Forms.ToolStripSeparator zoomMenuSeparator3;
+ private System.Windows.Forms.ToolStripMenuItem zoomActualSizeMenuItem;
+ private System.Windows.Forms.ToolStripSeparator zoomMenuSeparator4;
+ private System.Windows.Forms.ToolStripMenuItem zoom200MenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoom300MenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoom400MenuItem;
+ private System.Windows.Forms.ToolStripMenuItem zoom600MenuItem;
+ private System.Windows.Forms.ToolStripDropDownButton zoomStatusDropDownBtn;
+ private System.Windows.Forms.ToolStripMenuItem zoomMainMenuItem;
+ private System.Windows.Forms.ToolStripStatusLabel statusStripSpacer;
}
}
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index bcb8c275c..dd9ec94e1 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -66,6 +66,12 @@ namespace Greenshot {
// whether part of the editor controls are disabled depending on selected item(s)
private bool _controlsDisabledDueToConfirmable;
+ ///
+ /// All provided zoom values (in percents) in ascending order.
+ ///
+ private readonly int[] ZOOM_VALUES = new[] { 25, 50, 66, 75, 100, 200, 300, 400, 600 };
+ private int _zoomValue = 100;
+
///
/// An Implementation for the IImageEditor, this way Plugins have access to the HWND handles wich can be used with Win32 API calls.
///
@@ -420,20 +426,14 @@ namespace Greenshot {
///
///
///
- private void SurfaceSizeChanged(object sender, EventArgs e) {
- if (EditorConfiguration.MatchSizeToCapture) {
- // Set editor's initial size to the size of the surface plus the size of the chrome
- Size imageSize = Surface.Image.Size;
- Size currentFormSize = Size;
- Size currentImageClientSize = panel1.ClientSize;
- int minimumFormWidth = 650;
- int minimumFormHeight = 530;
- int newWidth = Math.Max(minimumFormWidth, currentFormSize.Width - currentImageClientSize.Width + imageSize.Width);
- int newHeight = Math.Max(minimumFormHeight, currentFormSize.Height - currentImageClientSize.Height + imageSize.Height);
- Size = new Size(newWidth, newHeight);
+ private void SurfaceSizeChanged(object sender, EventArgs e)
+ {
+ if (EditorConfiguration.MatchSizeToCapture)
+ {
+ Size = GetOptimalWindowSize();
}
dimensionsLabel.Text = Surface.Image.Width + "x" + Surface.Image.Height;
- ImageEditorFormResize(sender, new EventArgs());
+ AlignCanvasPositionAfterResize();
}
public ISurface Surface {
@@ -860,15 +860,34 @@ namespace Greenshot {
case Keys.Oemcomma: // Rotate CCW Ctrl + ,
RotateCcwToolstripButtonClick(sender, e);
break;
- case Keys.OemPeriod: // Rotate CW Ctrl + .
+ case Keys.OemPeriod: // Rotate CW Ctrl + .
RotateCwToolstripButtonClick(sender, e);
break;
- case Keys.Add: // Ctrl + +
- case Keys.Oemplus: // Ctrl + +
+ case Keys.Add: // Ctrl + Num+
+ case Keys.Oemplus: // Ctrl + +
+ ZoomInMenuItemClick(sender, e);
+ break;
+ case Keys.Subtract: // Ctrl + Num-
+ case Keys.OemMinus: // Ctrl + -
+ ZoomOutMenuItemClick(sender, e);
+ break;
+ case Keys.Divide: // Ctrl + Num/
+ case Keys.OemQuestion: // Ctrl + / (?)
+ ZoomSetValueMenuItemClick(zoomActualSizeMenuItem, e);
+ break;
+ case Keys.Multiply: // Ctrl + Num*
+ case Keys.D8: // Ctrl + 8 (*)
+ ZoomBestFitMenuItemClick(sender, e);
+ break;
+ }
+ } else if (e.Modifiers.Equals(Keys.Control | Keys.Shift)) {
+ switch (e.KeyCode) {
+ case Keys.Add: // Ctrl + Shift + Num+
+ case Keys.Oemplus: // Ctrl + Shift + +
EnlargeCanvasToolStripMenuItemClick(sender, e);
break;
- case Keys.Subtract: // Ctrl + -
- case Keys.OemMinus: // Ctrl + -
+ case Keys.Subtract: // Ctrl + Shift + Num-
+ case Keys.OemMinus: // Ctrl + Shift + -
ShrinkCanvasToolStripMenuItemClick(sender, e);
break;
}
@@ -1444,28 +1463,130 @@ namespace Greenshot {
}
private void ImageEditorFormResize(object sender, EventArgs e) {
+ AlignCanvasPositionAfterResize();
+ }
+
+ private void AlignCanvasPositionAfterResize() {
if (Surface?.Image == null || panel1 == null) {
return;
}
- Size imageSize = Surface.Image.Size;
- Size currentClientSize = panel1.ClientSize;
var canvas = Surface as Control;
+ Size canvasSize = canvas.Size;
+ Size currentClientSize = panel1.ClientSize;
Panel panel = (Panel) canvas?.Parent;
if (panel == null) {
return;
}
int offsetX = -panel.HorizontalScroll.Value;
int offsetY = -panel.VerticalScroll.Value;
- if (currentClientSize.Width > imageSize.Width) {
- canvas.Left = offsetX + (currentClientSize.Width - imageSize.Width) / 2;
+ if (currentClientSize.Width > canvasSize.Width) {
+ canvas.Left = offsetX + (currentClientSize.Width - canvasSize.Width) / 2;
} else {
canvas.Left = offsetX + 0;
}
- if (currentClientSize.Height > imageSize.Height) {
- canvas.Top = offsetY + (currentClientSize.Height - imageSize.Height) / 2;
+ if (currentClientSize.Height > canvasSize.Height) {
+ canvas.Top = offsetY + (currentClientSize.Height - canvasSize.Height) / 2;
} else {
canvas.Top = offsetY + 0;
}
}
+
+ ///
+ /// Compute a size as a sum of surface size and chrome.
+ /// Upper bound is working area of the screen. Lower bound is fixed value.
+ ///
+ private Size GetOptimalWindowSize() {
+ var surfaceSize = (Surface as Control).Size;
+ var chromeSize = GetChromeSize();
+ var newWidth = chromeSize.Width + surfaceSize.Width;
+ var newHeight = chromeSize.Height + surfaceSize.Height;
+
+ // Upper bound. Don't make it bigger than the available working area.
+ var screen = Screen.FromControl(this);
+ var workingArea = screen.WorkingArea;
+ newWidth = Math.Min(newWidth, workingArea.Width);
+ newHeight = Math.Min(newHeight, workingArea.Height);
+
+ // Lower bound. Don't make it smaller than a fixed value.
+ int minimumFormWidth = 650;
+ int minimumFormHeight = 530;
+ newWidth = Math.Max(minimumFormWidth, newWidth);
+ newHeight = Math.Max(minimumFormHeight, newHeight);
+
+ return new Size(newWidth, newHeight);
+ }
+
+ private Size GetChromeSize()
+ => Size - panel1.ClientSize;
+
+ ///
+ /// Compute a size that the form can take without getting out of working area of the screen.
+ ///
+ private Size GetAvailableScreenSpace() {
+ var screen = Screen.FromControl(this);
+ var screenBounds = screen.Bounds;
+ var workingArea = screen.WorkingArea;
+ if (Left > screenBounds.Left && Top > screenBounds.Top) {
+ return new Size(workingArea.Width - Left, workingArea.Height - Top);
+ } else {
+ return workingArea.Size;
+ }
+ }
+
+ private void ZoomInMenuItemClick(object sender, EventArgs e) {
+ var nextIndex = Array.FindIndex(ZOOM_VALUES, v => v > _zoomValue);
+ var nextValue = nextIndex < 0 ? ZOOM_VALUES[ZOOM_VALUES.Length - 1] : ZOOM_VALUES[nextIndex];
+
+ ZoomSetValue(nextValue);
+ }
+
+ private void ZoomOutMenuItemClick(object sender, EventArgs e) {
+ var nextIndex = Array.FindLastIndex(ZOOM_VALUES, v => v < _zoomValue);
+ var nextValue = nextIndex < 0 ? ZOOM_VALUES[0] : ZOOM_VALUES[nextIndex];
+
+ ZoomSetValue(nextValue);
+ }
+
+ private void ZoomSetValueMenuItemClick(object sender, EventArgs e) {
+ var senderMenuItem = (ToolStripMenuItem)sender;
+ int zoomPercent = int.Parse((string)senderMenuItem.Tag);
+
+ ZoomSetValue(zoomPercent);
+ }
+
+ private void ZoomBestFitMenuItemClick(object sender, EventArgs e) {
+ var maxWindowSize = GetAvailableScreenSpace();
+ var chromeSize = GetChromeSize();
+ var maxImageSize = maxWindowSize - chromeSize;
+ var imageSize = Surface.Image.Size;
+
+ static bool isFit(int zoom, int source, int boundary)
+ => source * zoom / 100 <= boundary;
+
+ var nextValue = Array.FindLast(
+ ZOOM_VALUES,
+ zoom => isFit(zoom, imageSize.Width, maxImageSize.Width)
+ && isFit(zoom, imageSize.Height, maxImageSize.Height)
+ );
+
+ ZoomSetValue(nextValue);
+ }
+
+ private void ZoomSetValue(int value) {
+ _zoomValue = value;
+ Surface.ZoomFactor = 1f * value / 100;
+
+ // Update zoom controls
+ string valueString = value.ToString();
+ zoomStatusDropDownBtn.Text = valueString + "%";
+ foreach (var item in zoomMenuStrip.Items) {
+ if (item is ToolStripMenuItem menuItem) {
+ menuItem.Checked = menuItem.Tag as string == valueString;
+ }
+ }
+
+ Size = GetOptimalWindowSize();
+ AlignCanvasPositionAfterResize();
+ }
}
}
diff --git a/Greenshot/Forms/ImageEditorForm.resx b/Greenshot/Forms/ImageEditorForm.resx
index e4188604b..025543b10 100644
--- a/Greenshot/Forms/ImageEditorForm.resx
+++ b/Greenshot/Forms/ImageEditorForm.resx
@@ -937,6 +937,84 @@
BIhPAPEZIL7CAAQ6fptA+D+IJskFIM2cgtoMKm6rQfg/iEY3oB9oC8jWozBbgXquAvFykGYQkDJuZlBy
WQvC/0E0QRfANIJoLmF9BnXPHTD8H8QmyQD9wBMMSPg/iE20ATK6uQwWUTeR8X8Qn2gDHJOfM6Dh/yA+
igHkZijqZSZyXQAA4IG1TpHFZ2gAAAAASUVORK5CYII=
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+ dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJKSURBVDhPY/j//z+DX8FVDBxZ/ZAhqeWVRkrbm7lA
+ fB+If0HpuSBxkDxIHU4DIqruB0bXPrzftODpia0n3+668/zLiaNXPh3oXf7yFEgcJA9SBzbALeMsCvbI
+ Oq/hk3fx/rSND3ccufH60MuPP259+vb7+etPP28/evPt7PztT3b5AuVB6sAGWMUcQMdz83svnth96cWB
+ q48/ngBpBor9B9FP3n47d+3JpxMlEy6dAqkDG6Djtwkd35+77e72M/feXbj78suDd19+fQCK/QfRID5I
+ fOme+3tA6sAGqLitRse/dp5/fgCkGMj+j44/fvv97PC118eA7F9gA5Rc1qLj+wu239sNsgmk+Ofvv5+B
+ Yv9BNDgsPv68tWrfw0MgdWAD1D13oOO52W3nz+6/+urw/ZdfT4M0AcXgYQAMyHPF3RcvgdSBDXBwcGCw
+ s7NjsLW1ZbCxsWEwd8q0Mgo+/GLe5gdnbz77fBoU+mCbgfSz998vbtj/6pRxyMn7egHHILGAbIC1tbU8
+ 0JDijsl7/ltFXnjVOOP5pZNXvpx+/u7H9VNXv5zpmPvymk3crfvmkdcDDYPPQNIBzACgRi03N/eaHTv2
+ /BcVFWtWs2qxc0x+PheI7wPxLyg91z7xiYZF1E0GFAOAtlsEBga3HTly5r+iolIPCwuLqpJxCYNTyisM
+ DDSAAcUAoO3eCQkpEy5evPtfT89gGlCzMRAzEG2Aubl5ya1br/7b2zvPY2VldQFpJskAPT09LRERkRag
+ 5hiYZhAWlrEhzgDy8X8GAJItIDq7n94UAAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+ dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIySURBVDhPY/j//z+DtrY2g559IYNfwVU4jqx+yJDU
+ 8kojpe3NXCC+D8S/oPRckDhIHqQObACyRhiOqLofGF378H7Tgqcntp58u+vO8y8njl75dKB3+ctTIHGQ
+ PEgd2AC3jLMo2CPrvIZP3sX70zY+3HHkxutDj958O/vk7bdzIAxiz9/+ZJcvUB6kDmyAVcwBdDw3v/fi
+ id2XXhy4+vjjCZhmGL725NOJkgmXToHUgQ3Q8duEju/P3XZ3+5l77y7cffnlAToGiS/dc38PSB3YABW3
+ 1ej4187zzw+AFAPZ/9Hxx2+/nx2+9voYkP0LbICSy1p0fH/B9nu7QTaBFH/69vs5Mn798eetVfseHgKp
+ Axug7rkDHc/Nbjt/dv/VV4fvv/x6Gj0MgAF5rrj74iWQOrABDg4ODHZ2dgy2trYMNjY2DOZOmVZGwYdf
+ zNv84OzNZ59RDHj2/vvFDftfnTIOOXlfL+AYJBaQDbC2tpYHGlLcMXnPf6vIC68aZzy/dPLKl9PP3/24
+ furqlzMdc19es4m7dd888nqgYfAZSDqAGQDUqOXm5l6zY8ee/6KiYs1qVi12jsnP5wLxfSD+BaXn2ic+
+ 0bCIusmAYgDQdovAwOC2I0fO/FdUVOphYWFRVTIuYXBKeYWBgQYwoBgAtN07ISFlwsWLd//r6RlMA2o2
+ BmIGog0wNzcvuXXr1X97e+d5rKysLiDNJBmgp6enJSIi0gLUHAPTDMLCMjbEGUA+/s8AAJUZIgOF4ptY
+ AAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+ dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJISURBVDhPnZLLaxNRFIfvIvkLTF0J0uAjNDKoWaTk
+ bS1RUYshLowWqZqFD/BBs/KxUEMoaKEgiJuRbqRQ6UaojTqUYGpJYmpMSFuMxklK2mmmmba2kzSZINd7
+ pk1p4qa6+Djn3vs73x24gzDGSKvVIsp6B3XcntzEdS+LLnt5jdtXoAksQdqoNOzDOeRkwdbBGufuso4L
+ D7Lso/7Z0HBYeP+DE0OfkiuB3oF8BPbhHHKywH51oo7j12OaUzfj7ADDhTJ8MbNclOZWSlUOgH5wdD50
+ mpxDThYYOgON0Ld646F0XsyQHgOFpYpcgZywNuPpS0QgJwsOdLxphKXfpkdAQHq8KErL0EOFNfSvGJaB
+ nCzYY3/diPQuxgUgmBfWMHx6Tih9gQrrX6XqXHBqYRxyskDdPtQI2z/y8wMISI8r1d+rMAwV1iAYHM1+
+ hJws2H/C3wh9wxebyC4UZ0iPAV4oyxVYKkpc95N4AnKywGazIYvFgsxmMzKZTEjfds1w2BmcH2JmvxdW
+ K5svAIjlKj8cLCR1Z8MsdWZ8/RW2CoxG424i6e55xmCD6yv/8AWXCCfFz9xieToyKUZ76PyU6WKK1bum
+ HYec0fX/oCYggy12+7H7fj+Dm5p2Pt5n8FqOXOFoAkuQNiptvZTTtJ7/huoE5PZWh8PpGxuL4uZm9VOF
+ QrFXrfOgNjf/F0SA6gTk9pNdXe6+eDyNKergczKsI6BtC/R6vSeV4rHVevSlUqlsh+F/ElAU1aJSqbxk
+ uLM2DOzYZdqe4P/B6A86Ah9NBTgWLgAAAABJRU5ErkJggg==
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+ dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJXSURBVDhPnZLda1JhHMefC/0Lcl0FMelFZhwqLxy+
+ t4YV1UjsImvFKi+qQS9MuujlohIZ1GAQjG7O2k0ERdALpW3SZNpQ0zllall6NKwzj1OWczId8fT8zuaY
+ drO6+PBwvs/393kezjkIY4ykUimitNdQ19XoGqabGXTOyknMtjmawBBqqysNOexDjxesH6xz4gZjOHU7
+ w9wd+eF96yuMfmPL3o8zJdfA05wfctiHHi/QXwg2cPBSSHLkcpgZepVxeD7nJ+YXaz9LlWU2X6p+/T5X
+ CT62Z0ePkn3o8QJFt6sZ+spA2DsWmXVlC5VMrzWESYZBQp6nYtmS1zIY8UOPF+zqet0MQ79L2kEQSBWn
+ i+XaPMlwMldOQwY8cTJO6PGCbfrnzdTeh1i+CMDJJFu7AeCO5SehxwvEnS+aYUbsqTEY5n4tJarLvxdI
+ hmGF9wCCZx8yE9DjBTsPOZqhe22h4HiUc8+VqtnT1/2YZBhWuAV5kVN998MR6PECnU6HNBoNUqvVSKVS
+ IXnHRcVeo3t2+E06mOYW4zBUp7BQTb0c5/yy4z6GOja58hXWC5RK5VYi6et/6MQK0zR35xEb8c2UP7HF
+ pbg/Wg7007mY6kyCkZvihj3GwMp/UBeQwTa9/sAth8OJW1o239uhsGr2nWdpAkOora609mxW0n7yC2oQ
+ kNPbDQajzeMJ4NZW8QOBQLBdLLOgDjP3F0SAGgTk9MM9PebBcDiJKWr3EBmWEdCGBXK53JJIcFir3T8s
+ FAo7YfifBBRFtYlEIisZ7q4PA5u2qDYm+H8w+gNv9h/ta4LougAAAABJRU5ErkJggg==
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHYSURBVDhPY8AH4ltfa6S0vZ6b3Pr6PhD/AtEgPkgcqgQ3
+ iKi6Hxhd8/B+0/ynJ7acfLvrzrPPJ45c+Xigd9nLUyBxkDxUKSZwyzmj4Z176f7UjQ92HL7++tCjN9/O
+ Pn7z7RwIg9jztz3e5QOUB6mDakEFVjH75xb0Xjyx++KLA1cefToO0wzD1558OlE84eJpkDqoFlSg7bvp
+ /pytd3aADMCFl+6+vwekDqoFFSi7rf614/xzuGJ0Fzx+++3soauvjoHUQbWgAiXnNffn77i3G6wZqBib
+ ASv3PTgEUgfVggrUPLfPzWo/d3bv5VeH77/4fBrdgEevv54r7rpwCaQOqgUVWDpmWhkGHXoxf/P9szef
+ fkIx4Nn7b5fW73t5yjj45H2doKOYsWBpaSlvbW1d3DF5z3/LyAuvGqY/vXTiyqfTz999v37qyucz7fNe
+ XrOOvXXfNOIaZjqwsbHRcnV1r9mxY89/UVHRZlXLZjuH5GdzHZOf3XdMevYLRIP49vFPMW0G2moRGBjc
+ duTImf8KCko9bGxsqlApwgBos098fPKEixfv/tfT05/KyspqDJUiDpiZmZXcuvXqv52d8zxmZmYXqDDx
+ wMDAQEtYWLgFaHMMVIhegIEBADK7VwLsrsplAAAAAElFTkSuQmCC
@@ -1026,4 +1104,7 @@
17, 17
+
+ 782, 17
+
\ No newline at end of file
diff --git a/Greenshot/icons/fugue/magnifier-zoom-actual.png b/Greenshot/icons/fugue/magnifier-zoom-actual.png
new file mode 100644
index 0000000000000000000000000000000000000000..21cf71d635eba0f9646931cbe60c96972a285ac4
GIT binary patch
literal 742
zcmV)l(v^w`AQ8JqUw}r_G&HU#Qq<#yg(0so
zO-lat&+;<%hp_CWo#kl5vfLaV)&Sz0bd
zYbr|7BtR6)br1wT>~?`dUoUIyaaddn_cz+du77Z{kmhI#P{;i?o976%MRa-sK@b`-
zGU(-s#Fyvg;^NJtJmI&>ijv9+LTTHJ4#0d2;-;()Q?CiO%NO{Mae$_wEkJWjEEz%4)^@
z>K*TZ23rVel{9P!9>5cLF%$|f27?o~Tl#LiiN&v7jm67#lgKdUh^ki7BnJK!e8S;q
zyD&RDHx~?EzE>=6KeZ~Q3`H^T_l+so{j-C=UICqVyFH^bGjr3y;H8Jz?6>Eb&VU1$
zo8YtJPg1FkB}^s20ZmVU|E$-;!vl7n=hL{9w|h>$u=>vg6nVD)v7Z7A
Y06Z)@+8V}-SpWb407*qoM6N<$g5B>}-T(jq
literal 0
HcmV?d00001
diff --git a/Greenshot/icons/fugue/magnifier-zoom-fit.png b/Greenshot/icons/fugue/magnifier-zoom-fit.png
new file mode 100644
index 0000000000000000000000000000000000000000..8364359fdea5b43e86d72af9e429679c0dd59064
GIT binary patch
literal 726
zcmV;{0xA88P)~8
zhaein|M}?}<0fHXUh&(Fch!X_uh
z!v)kQ4R*o5e@y83>GK!ge}m*K!?!W8voi7Uak5H+Xb>L+p1=6^2c!;c04pmuI^K8s
z{6`_6jZ7fEp5JbsAK(8`Rq^;8nMnnuTFdsbq@m1Z#yWGG3{PkqPjQ{`gtiLW>20Hu{@16Ua>B=3Z
z7algeKjoxYcpg9h^L5{euUuOWe&l9hE!qWr$3{lL}q5L?mvIN-T>)gLDFm?Dk|<*TwGZh8ynX9{{6c}ygxtOW@KbOgpo`c
z{=!)-kXZQVt*or>T3A?_9~&Dy{qf^R%YnkT8HfO21AhMesaaLkmY}I_yve{tO>vL!1h_O%NOeA7nl{+Odc3RS}`sS6>vt2Ys?m5c{B%Du^4kDh$_3
zpR|;=h-;JnBx$l6?+u%{3~}IrkCU8xzVF_1&$+m&s@TQwI;JMrX@*;2Yh68G-xUW2I*?`ClFWGgwV%zF$vcrFzuNp
zAd2D+GTe0t0408I!ufS1Kw11A>wdG*U~^bObDx{!yPR?%k*vpM1>^`sXf_)=!1LUq
z&x=+42WXSaN>PYBdHtQ6CJBbXG5lD_ZVw#9f1o@~faiHV#z%ro&Baho6J>BKKsBQ{
z@{$6&+8xDoUuiLOkZwABauNTpa-TB((m<;5G$P8#hI
zptka)jywz}a3&I2yvee&w_N@kuhN-oSJRosj!85aEHOoCj?S~}rF+HV_a`u1!1iF8fFw!5rKQ{R
zb8}Z7=5k*WFqFmiXqo_gSue-NhMgS8qU%0C5g)VBYzUjhsOn}0<&?S0Lw
P00000NkvXXu0mjfX;4x~
literal 0
HcmV?d00001
diff --git a/Greenshot/icons/fugue/magnifier-zoom-out.png b/Greenshot/icons/fugue/magnifier-zoom-out.png
new file mode 100644
index 0000000000000000000000000000000000000000..3ec2b7a5d32c41a3313a95bec8f326ba356b3b46
GIT binary patch
literal 707
zcmV;!0zCbRP)6dkX{uLg1LH81P=-xq6aa85~3GVVpJ&FNG@s!
zNl@F}{OxXbJL~MymSlUd;DZM<`~A#&ytkO5C?FUN0;2yEI52S?Y=y;Q1tybe6vy!>
zx`t7@QI=7rA%tL`SA;_OMsw{bsh_Vkj-q=zJt(xBCxazf_)9LA_qrcMu*A3>TbM+GV5(hbY4y
zu-%c_iJQr{i}
ztCCUuST`t2uvw|LWuz->1{7t{8>DlexWitLwXxRdNEC??-5^u|SkAK!q)TfCF8&Ux
z0s?g>)RgGZgZKH_MG{>T!iW!_8)9Zza2gEuIJtBFikIrF9Gf{I4&Hyv
z;-#{odgi!I^bC>KQblg1vn}I`x161%>=CH63ZzavhBokGBoe*JFtfLuBR5`Wa@VeA
za*du%BnWd{mRki?Lw1Re4h#&QUtEmE80PZb_4Tz!Hjyo281Zh$nu3k()8-W5IiJrz
zy|56QXP8U(N~NDq(B~r9MQ8@1C3;;}Y5)Y3gBsBm4002ovPDHLkV1nfvIIaKy
literal 0
HcmV?d00001
diff --git a/Greenshot/icons/fugue/magnifier-zoom.png b/Greenshot/icons/fugue/magnifier-zoom.png
new file mode 100644
index 0000000000000000000000000000000000000000..941b1035673a42d2c0dfe636ef27fd1d7236775f
GIT binary patch
literal 676
zcmV;V0$crwP);C@z`;D((zc8>c-~j*s{|o&2^LwAVGRsS2O^(~@
za_lc(zWw*(#O3e0=dS(O4wNqfDq9aW;Kz?2D4Kz`YW(~6x6jL&|E8Wg8<(62r!W&E
z1Eaho6Pv6A?|&hI-?!Io|Je8Y&)@4zAPrx>d`7{aK7A}zk^lcvRgs-Tkei(qq#15F
zkZrEZ$EU8u@CKv~?1E39KB4=-Nmo<$CXnWM_Ws+?XYUz)qAM`e=KHf_-vcM87ck_d
zWhA*C!Z@1Je0=CZ#KFS+6R1xb?1g{-n9%Xl=P$qihHB=;7Rb+EeES1Z2R49}l^Y%J
zJAMA65Hk}K^KYOsbj|<%{bxLR_JaUO9oP$!-#dVU{}@1N0)&6F>CQcVI&z(f&bO!1
zLY)6tks_O!iIL^Zr7u4Yoctlk&d%4(f*Jq+
/// This returns false if the container is deleted but still in the undo stack
bool IsOnSurface(IDrawableContainer container);
- void Invalidate(Rectangle rectangleToInvalidate);
void Invalidate();
+ ///
+ /// Invalidates the specified region of the Surface.
+ /// Takes care of the Surface zoom level, accepts rectangle in the coordinate space of the Image.
+ ///
+ /// Bounding rectangle for updated elements, in the coordinate space of the Image.
+ void InvalidateElements(Rectangle rectangleToInvalidate);
bool Modified
{
get;
@@ -189,6 +195,15 @@ namespace GreenshotPlugin.Interfaces
int Width { get; }
int Height { get; }
+ ///
+ /// Zoom value applied to the surface. 1.0f for actual size (100%).
+ ///
+ float ZoomFactor { get; set; }
+ ///
+ /// Matrix representing zoom applied to the surface.
+ ///
+ Matrix ZoomMatrix { get; }
+
void MakeUndoable(IMemento memento, bool allowMerge);
}
-}
\ No newline at end of file
+}
From 136953aa4e16f4c7150becaea546f70f9622872a Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 01:13:22 +0300
Subject: [PATCH 007/224] Fixes for some identified issues
- better interface for coordinate translation;
- correct context menu location;
- speech bubble tail can be dragged over the whole image.
---
Greenshot/Drawing/Adorners/AbstractAdorner.cs | 11 ++------
Greenshot/Drawing/Adorners/TargetAdorner.cs | 22 +++++++--------
Greenshot/Drawing/DrawableContainerList.cs | 7 ++---
Greenshot/Drawing/Surface.cs | 28 +++++++++++++++++--
Greenshot/Drawing/TextContainer.cs | 15 ++++------
GreenshotPlugin/Interfaces/ISurface.cs | 11 ++++++--
6 files changed, 55 insertions(+), 39 deletions(-)
diff --git a/Greenshot/Drawing/Adorners/AbstractAdorner.cs b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
index fc3d72371..51ae7f14f 100644
--- a/Greenshot/Drawing/Adorners/AbstractAdorner.cs
+++ b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -123,13 +123,8 @@ namespace Greenshot.Drawing.Adorners
{
get
{
- Point[] points = { Location };
- var matrix = Owner.Parent.ZoomMatrix;
- if (!matrix.IsIdentity)
- {
- matrix.TransformPoints(points);
- }
- return new Rectangle(points[0].X - _size.Width / 2, points[0].Y - _size.Height / 2, _size.Width, _size.Height);
+ Point displayLocation = Owner.Parent.ToSurfaceCoordinates(Location);
+ return new Rectangle(displayLocation.X - _size.Width / 2, displayLocation.Y - _size.Height / 2, _size.Width, _size.Height);
}
}
diff --git a/Greenshot/Drawing/Adorners/TargetAdorner.cs b/Greenshot/Drawing/Adorners/TargetAdorner.cs
index 23cf29d09..4011754f7 100644
--- a/Greenshot/Drawing/Adorners/TargetAdorner.cs
+++ b/Greenshot/Drawing/Adorners/TargetAdorner.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -61,26 +61,26 @@ namespace Greenshot.Drawing.Adorners
Owner.Invalidate();
Point newGripperLocation = new Point(mouseEventArgs.X, mouseEventArgs.Y);
- Rectangle surfaceBounds = new Rectangle(0, 0, Owner.Parent.Width, Owner.Parent.Height);
+ Rectangle imageBounds = new Rectangle(0, 0, Owner.Parent.Image.Width, Owner.Parent.Image.Height);
// Check if gripper inside the parent (surface), if not we need to move it inside
// This was made for BUG-1682
- if (!surfaceBounds.Contains(newGripperLocation))
+ if (!imageBounds.Contains(newGripperLocation))
{
- if (newGripperLocation.X > surfaceBounds.Right)
+ if (newGripperLocation.X > imageBounds.Right)
{
- newGripperLocation.X = surfaceBounds.Right - 5;
+ newGripperLocation.X = imageBounds.Right - 5;
}
- if (newGripperLocation.X < surfaceBounds.Left)
+ if (newGripperLocation.X < imageBounds.Left)
{
- newGripperLocation.X = surfaceBounds.Left;
+ newGripperLocation.X = imageBounds.Left;
}
- if (newGripperLocation.Y > surfaceBounds.Bottom)
+ if (newGripperLocation.Y > imageBounds.Bottom)
{
- newGripperLocation.Y = surfaceBounds.Bottom - 5;
+ newGripperLocation.Y = imageBounds.Bottom - 5;
}
- if (newGripperLocation.Y < surfaceBounds.Top)
+ if (newGripperLocation.Y < imageBounds.Top)
{
- newGripperLocation.Y = surfaceBounds.Top;
+ newGripperLocation.Y = imageBounds.Top;
}
}
diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs
index 17b879538..9451b06ea 100644
--- a/Greenshot/Drawing/DrawableContainerList.cs
+++ b/Greenshot/Drawing/DrawableContainerList.cs
@@ -523,9 +523,9 @@ namespace Greenshot.Drawing {
}
}
- public virtual void ShowContextMenu(MouseEventArgs e, ISurface surface)
+ public virtual void ShowContextMenu(MouseEventArgs e, ISurface iSurface)
{
- if (!(surface is Surface))
+ if (!(iSurface is Surface surface))
{
return;
}
@@ -542,8 +542,7 @@ namespace Greenshot.Drawing {
ContextMenuStrip menu = new ContextMenuStrip();
AddContextMenuItems(menu, surface);
if (menu.Items.Count > 0) {
- // TODO: cast should be somehow avoided
- menu.Show((Surface)surface, e.Location);
+ menu.Show(surface, surface.ToSurfaceCoordinates(e.Location));
while (true) {
if (menu.Visible) {
Application.DoEvents();
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 5c38bea8e..0057a0838 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -302,6 +302,8 @@ namespace Greenshot.Drawing
}
}
+ [NonSerialized]
+ private Matrix _zoomMatrix = new Matrix(1, 0, 0, 1, 0, 0);
[NonSerialized]
private float _zoomFactor = 1.0f;
public float ZoomFactor
@@ -310,12 +312,11 @@ namespace Greenshot.Drawing
set
{
_zoomFactor = value;
- ZoomMatrix = new Matrix(_zoomFactor, 0, 0, _zoomFactor, 0, 0);
+ _zoomMatrix = new Matrix(_zoomFactor, 0, 0, _zoomFactor, 0, 0);
UpdateSize();
}
}
- public Matrix ZoomMatrix { get; private set; } = new Matrix(1, 0, 0, 1, 0, 0);
///
/// Sets the surface size as zoomed image size.
@@ -2108,5 +2109,26 @@ namespace Greenshot.Drawing
{
return _elements.Contains(container);
}
+
+ public Point ToSurfaceCoordinates(Point point)
+ {
+ Point[] points = { point };
+ _zoomMatrix.TransformPoints(points);
+ return points[0];
+ }
+
+ public Rectangle ToSurfaceCoordinates(Rectangle rc)
+ {
+ if (_zoomMatrix.IsIdentity)
+ {
+ return rc;
+ }
+ else
+ {
+ Point[] points = { rc.Location, rc.Location + rc.Size };
+ _zoomMatrix.TransformPoints(points);
+ return new Rectangle(points[0].X, points[0].Y, points[1].X - points[0].X, points[1].Y - points[1].Y);
+ }
+ }
}
}
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index bd4c75274..726ab5b7f 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -442,20 +442,15 @@ namespace Greenshot.Drawing
correction = -1;
}
Rectangle absRectangle = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height);
- Point[] points = { absRectangle.Location, absRectangle.Location + absRectangle.Size };
- var matrix = Parent.ZoomMatrix;
- if (!matrix.IsIdentity)
- {
- matrix.TransformPoints(points);
- }
- _textBox.Left = points[0].X + lineWidth;
- _textBox.Top = points[0].Y + lineWidth;
+ Rectangle displayRectangle = Parent.ToSurfaceCoordinates(absRectangle);
+ _textBox.Left = displayRectangle.X + lineWidth;
+ _textBox.Top = displayRectangle.Y + lineWidth;
if (lineThickness <= 1)
{
lineWidth = 0;
}
- _textBox.Width = points[1].X - points[0].X - 2 * lineWidth + correction;
- _textBox.Height = points[1].Y - points[0].Y - 2 * lineWidth + correction;
+ _textBox.Width = displayRectangle.Width - 2 * lineWidth + correction;
+ _textBox.Height = displayRectangle.Height - 2 * lineWidth + correction;
}
public override void ApplyBounds(RectangleF newBounds)
diff --git a/GreenshotPlugin/Interfaces/ISurface.cs b/GreenshotPlugin/Interfaces/ISurface.cs
index 8ab44c810..a94415cbc 100644
--- a/GreenshotPlugin/Interfaces/ISurface.cs
+++ b/GreenshotPlugin/Interfaces/ISurface.cs
@@ -21,7 +21,6 @@
using System;
using System.Drawing;
-using System.Drawing.Drawing2D;
using System.IO;
using System.Windows.Forms;
using GreenshotPlugin.Effects;
@@ -200,9 +199,15 @@ namespace GreenshotPlugin.Interfaces
///
float ZoomFactor { get; set; }
///
- /// Matrix representing zoom applied to the surface.
+ /// Translate a point from image coorditate space to surface coordinate space.
///
- Matrix ZoomMatrix { get; }
+ /// A point in the coordinate space of the image.
+ Point ToSurfaceCoordinates(Point point);
+ ///
+ /// Translate a rectangle from image coorditate space to surface coordinate space.
+ ///
+ /// A rectangle in the coordinate space of the image.
+ Rectangle ToSurfaceCoordinates(Rectangle rc);
void MakeUndoable(IMemento memento, bool allowMerge);
}
From 79742d1b4d01a11b2dc6d10e7a0074d6824ecc43 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 01:14:52 +0300
Subject: [PATCH 008/224] Code review nitpicks
---
Greenshot/Drawing/Adorners/AbstractAdorner.cs | 4 ++--
Greenshot/Drawing/Adorners/MoveAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/ResizeAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/TargetAdorner.cs | 4 ++--
Greenshot/Drawing/CropContainer.cs | 2 +-
Greenshot/Drawing/Surface.cs | 6 +++---
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Greenshot/Drawing/Adorners/AbstractAdorner.cs b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
index 51ae7f14f..70a56f29e 100644
--- a/Greenshot/Drawing/Adorners/AbstractAdorner.cs
+++ b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -119,7 +119,7 @@ namespace Greenshot.Drawing.Adorners
///
/// Return the bounds of the Adorner as displayed on the parent Surface
///
- protected virtual Rectangle SurfaceBounds
+ protected virtual Rectangle BoundsOnSurface
{
get
{
diff --git a/Greenshot/Drawing/Adorners/MoveAdorner.cs b/Greenshot/Drawing/Adorners/MoveAdorner.cs
index 21c42a9fa..d07a25ef7 100644
--- a/Greenshot/Drawing/Adorners/MoveAdorner.cs
+++ b/Greenshot/Drawing/Adorners/MoveAdorner.cs
@@ -142,7 +142,7 @@ namespace Greenshot.Drawing.Adorners
{
Graphics targetGraphics = paintEventArgs.Graphics;
- var bounds = SurfaceBounds;
+ var bounds = BoundsOnSurface;
GraphicsState state = targetGraphics.Save();
targetGraphics.SmoothingMode = SmoothingMode.None;
diff --git a/Greenshot/Drawing/Adorners/ResizeAdorner.cs b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
index ef61b17bc..dce78b461 100644
--- a/Greenshot/Drawing/Adorners/ResizeAdorner.cs
+++ b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
@@ -169,7 +169,7 @@ namespace Greenshot.Drawing.Adorners
{
Graphics targetGraphics = paintEventArgs.Graphics;
- var bounds = SurfaceBounds;
+ var bounds = BoundsOnSurface;
GraphicsState state = targetGraphics.Save();
targetGraphics.SmoothingMode = SmoothingMode.None;
diff --git a/Greenshot/Drawing/Adorners/TargetAdorner.cs b/Greenshot/Drawing/Adorners/TargetAdorner.cs
index 4011754f7..67c01a533 100644
--- a/Greenshot/Drawing/Adorners/TargetAdorner.cs
+++ b/Greenshot/Drawing/Adorners/TargetAdorner.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -96,7 +96,7 @@ namespace Greenshot.Drawing.Adorners
{
Graphics targetGraphics = paintEventArgs.Graphics;
- var bounds = SurfaceBounds;
+ var bounds = BoundsOnSurface;
targetGraphics.FillRectangle(Brushes.Green, bounds.X, bounds.Y, bounds.Width, bounds.Height);
}
diff --git a/Greenshot/Drawing/CropContainer.cs b/Greenshot/Drawing/CropContainer.cs
index f5288074d..58cee17b1 100644
--- a/Greenshot/Drawing/CropContainer.cs
+++ b/Greenshot/Drawing/CropContainer.cs
@@ -61,7 +61,7 @@ namespace Greenshot.Drawing {
if (_parent?.Image is Image image) {
return new Rectangle(0, 0, image.Width, image.Height);
} else {
- return new Rectangle();
+ return Rectangle.Empty;
}
}
}
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 0057a0838..3d1f309a3 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -1405,7 +1405,7 @@ namespace Greenshot.Drawing
return GetImage(RenderMode.EXPORT);
}
- private Rectangle ZoomClipRectangle(Rectangle rc, double scale)
+ private static Rectangle ZoomClipRectangle(Rectangle rc, double scale)
=> new Rectangle(
(int)(rc.X * scale),
(int)(rc.Y * scale),
@@ -1413,7 +1413,7 @@ namespace Greenshot.Drawing
(int)((rc.Height + 1) * scale) + 1
);
- private RectangleF ZoomClipRectangle(RectangleF rc, double scale)
+ private static RectangleF ZoomClipRectangle(RectangleF rc, double scale)
=> new RectangleF(
(float)Math.Floor(rc.X * scale),
(float)Math.Floor(rc.Y * scale),
From 41082c2be15c94a8a3dfe9fd0e9db06c99139a96 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 01:18:05 +0300
Subject: [PATCH 009/224] Image size in OneNoteExporter
There is now a distinction between Surface size and Surface.Image size.
---
GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
index 23525b608..611594334 100644
--- a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
@@ -95,7 +95,7 @@ namespace GreenshotOfficePlugin.OfficeExport
var pngOutputSettings = new SurfaceOutputSettings(OutputFormat.png, 100, false);
ImageOutput.SaveToStream(surfaceToUpload, pngStream, pngOutputSettings);
var base64String = Convert.ToBase64String(pngStream.GetBuffer());
- var imageXmlStr = string.Format(XmlImageContent, base64String, surfaceToUpload.Width, surfaceToUpload.Height);
+ var imageXmlStr = string.Format(XmlImageContent, base64String, surfaceToUpload.Image.Width, surfaceToUpload.Image.Height);
var pageChangesXml = string.Format(XmlOutline, imageXmlStr, page.Id, OnenoteNamespace2010, page.Name);
LOG.InfoFormat("Sending XML: {0}", pageChangesXml);
oneNoteApplication.ComObject.UpdatePageContent(pageChangesXml, DateTime.MinValue, XMLSchema.xs2010, false);
From 95c759e3fd62eaed79a5bbbde218e1a0c7e00bd8 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 01:19:38 +0300
Subject: [PATCH 010/224] Changed shortcuts - Ctrl+0, Ctrl+9
---
Greenshot/Forms/ImageEditorForm.Designer.cs | 4 ++--
Greenshot/Forms/ImageEditorForm.cs | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Greenshot/Forms/ImageEditorForm.Designer.cs b/Greenshot/Forms/ImageEditorForm.Designer.cs
index 5789a19a6..606b72773 100644
--- a/Greenshot/Forms/ImageEditorForm.Designer.cs
+++ b/Greenshot/Forms/ImageEditorForm.Designer.cs
@@ -1704,7 +1704,7 @@ namespace Greenshot {
//
this.zoomBestFitMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("zoomBestFitMenuItem.Image")));
this.zoomBestFitMenuItem.Name = "zoomBestFitMenuItem";
- this.zoomBestFitMenuItem.ShortcutKeyDisplayString = "Ctrl+*";
+ this.zoomBestFitMenuItem.ShortcutKeyDisplayString = "Ctrl+9";
this.zoomBestFitMenuItem.Size = new System.Drawing.Size(209, 22);
this.zoomBestFitMenuItem.Text = "Best Fit";
this.zoomBestFitMenuItem.Click += new System.EventHandler(this.ZoomBestFitMenuItemClick);
@@ -1755,7 +1755,7 @@ namespace Greenshot {
//
this.zoomActualSizeMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("zoomActualSizeMenuItem.Image")));
this.zoomActualSizeMenuItem.Name = "zoomActualSizeMenuItem";
- this.zoomActualSizeMenuItem.ShortcutKeyDisplayString = "Ctrl+/";
+ this.zoomActualSizeMenuItem.ShortcutKeyDisplayString = "Ctrl+0";
this.zoomActualSizeMenuItem.Size = new System.Drawing.Size(209, 22);
this.zoomActualSizeMenuItem.Tag = "100";
this.zoomActualSizeMenuItem.Text = "100% - Actual Size";
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index dd9ec94e1..3396acd15 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -871,12 +871,12 @@ namespace Greenshot {
case Keys.OemMinus: // Ctrl + -
ZoomOutMenuItemClick(sender, e);
break;
- case Keys.Divide: // Ctrl + Num/
- case Keys.OemQuestion: // Ctrl + / (?)
+ case Keys.NumPad0: // Ctrl + Num0
+ case Keys.D0: // Ctrl + 0
ZoomSetValueMenuItemClick(zoomActualSizeMenuItem, e);
break;
- case Keys.Multiply: // Ctrl + Num*
- case Keys.D8: // Ctrl + 8 (*)
+ case Keys.NumPad9: // Ctrl + Num9
+ case Keys.D9: // Ctrl + 9
ZoomBestFitMenuItemClick(sender, e);
break;
}
From ec2c46daa852d5692bf891ca1700ac6c267abfd3 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 01:23:23 +0300
Subject: [PATCH 011/224] GetOptimalWindowSize - bound by available screen
space
Limiting by working area size was not good enough - having whole chrome on screen is important.
---
Greenshot/Forms/ImageEditorForm.cs | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 3396acd15..4609ff4a8 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1502,10 +1502,9 @@ namespace Greenshot {
var newHeight = chromeSize.Height + surfaceSize.Height;
// Upper bound. Don't make it bigger than the available working area.
- var screen = Screen.FromControl(this);
- var workingArea = screen.WorkingArea;
- newWidth = Math.Min(newWidth, workingArea.Width);
- newHeight = Math.Min(newHeight, workingArea.Height);
+ var maxWindowSize = GetAvailableScreenSpace();
+ newWidth = Math.Min(newWidth, maxWindowSize.Width);
+ newHeight = Math.Min(newHeight, maxWindowSize.Height);
// Lower bound. Don't make it smaller than a fixed value.
int minimumFormWidth = 650;
From 3d39241f82799b741afb039e65783f6d0e52f9c0 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 16:00:58 +0300
Subject: [PATCH 012/224] More fixes for Surface.Image size
- crop works properly;
- Freehand drawings are selectable everywhere at all zoom levels.
Known issue: freehand selection outline is not drawn
---
Greenshot/Drawing/FreehandContainer.cs | 13 ++++++++++---
Greenshot/Drawing/Surface.cs | 8 ++++----
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/Greenshot/Drawing/FreehandContainer.cs b/Greenshot/Drawing/FreehandContainer.cs
index 129ba4822..c7d5cf1e8 100644
--- a/Greenshot/Drawing/FreehandContainer.cs
+++ b/Greenshot/Drawing/FreehandContainer.cs
@@ -47,8 +47,8 @@ namespace Greenshot.Drawing {
/// Constructor
///
public FreehandContainer(Surface parent) : base(parent) {
- Width = parent.Width;
- Height = parent.Height;
+ Width = parent.Image.Width;
+ Height = parent.Image.Height;
Top = 0;
Left = 0;
}
@@ -236,7 +236,14 @@ namespace Greenshot.Drawing {
int safetymargin = 10;
return new Rectangle(myBounds.Left + Left - (safetymargin+lineThickness), myBounds.Top + Top - (safetymargin+lineThickness), myBounds.Width + 2*(lineThickness+safetymargin), myBounds.Height + 2*(lineThickness+safetymargin));
}
- return new Rectangle(0, 0, _parent?.Width??0, _parent?.Height?? 0);
+ if (_parent?.Image is Image image)
+ {
+ return new Rectangle(0, 0, image.Width, image.Height);
+ }
+ else
+ {
+ return Rectangle.Empty;
+ }
}
}
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 3d1f309a3..e9d26ef05 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -991,13 +991,13 @@ namespace Greenshot.Drawing
{
cropRectangle = new Rectangle(cropRectangle.Left, 0, cropRectangle.Width, cropRectangle.Height + cropRectangle.Top);
}
- if (cropRectangle.Left + cropRectangle.Width > Width)
+ if (cropRectangle.Left + cropRectangle.Width > Image.Width)
{
- cropRectangle = new Rectangle(cropRectangle.Left, cropRectangle.Top, Width - cropRectangle.Left, cropRectangle.Height);
+ cropRectangle = new Rectangle(cropRectangle.Left, cropRectangle.Top, Image.Width - cropRectangle.Left, cropRectangle.Height);
}
- if (cropRectangle.Top + cropRectangle.Height > Height)
+ if (cropRectangle.Top + cropRectangle.Height > Image.Height)
{
- cropRectangle = new Rectangle(cropRectangle.Left, cropRectangle.Top, cropRectangle.Width, Height - cropRectangle.Top);
+ cropRectangle = new Rectangle(cropRectangle.Left, cropRectangle.Top, cropRectangle.Width, Image.Height - cropRectangle.Top);
}
if (cropRectangle.Height > 0 && cropRectangle.Width > 0)
{
From 169dbdccec9e117d6bcaabb26bcbf66e90fc2471 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 19:15:08 +0300
Subject: [PATCH 013/224] Rework for paste from clipboard
- location is determined by the same code for images and text;
- use visible area to determine the location.
---
Greenshot/Drawing/DrawableContainer.cs | 27 -----
Greenshot/Drawing/Surface.cs | 99 +++++++++++++++----
.../Interfaces/Drawing/Container.cs | 1 -
GreenshotPlugin/Interfaces/ISurface.cs | 16 ++-
4 files changed, 93 insertions(+), 50 deletions(-)
diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs
index 65ff42de3..e7caf7ea3 100644
--- a/Greenshot/Drawing/DrawableContainer.cs
+++ b/Greenshot/Drawing/DrawableContainer.cs
@@ -302,33 +302,6 @@ namespace Greenshot.Drawing
}
}
- public void AlignToParent(HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) {
- if (_parent == null)
- {
- return;
- }
- int lineThickness = GetFieldValueAsInt(FieldType.LINE_THICKNESS);
- if (horizontalAlignment == HorizontalAlignment.Left) {
- Left = lineThickness/2;
- }
- if (horizontalAlignment == HorizontalAlignment.Right) {
- Left = _parent.Width - Width - lineThickness/2;
- }
- if (horizontalAlignment == HorizontalAlignment.Center) {
- Left = (_parent.Width / 2) - (Width / 2) - lineThickness/2;
- }
-
- if (verticalAlignment == VerticalAlignment.TOP) {
- Top = lineThickness/2;
- }
- if (verticalAlignment == VerticalAlignment.BOTTOM) {
- Top = _parent.Height - Height - lineThickness/2;
- }
- if (verticalAlignment == VerticalAlignment.CENTER) {
- Top = (_parent.Height / 2) - (Height / 2) - lineThickness/2;
- }
- }
-
public virtual bool InitContent() { return true; }
public virtual void OnDoubleClick() {}
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index e9d26ef05..4435a7f39 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -305,6 +305,8 @@ namespace Greenshot.Drawing
[NonSerialized]
private Matrix _zoomMatrix = new Matrix(1, 0, 0, 1, 0, 0);
[NonSerialized]
+ private Matrix _inverseZoomMatrix = new Matrix(1, 0, 0, 1, 0, 0);
+ [NonSerialized]
private float _zoomFactor = 1.0f;
public float ZoomFactor
{
@@ -313,6 +315,7 @@ namespace Greenshot.Drawing
{
_zoomFactor = value;
_zoomMatrix = new Matrix(_zoomFactor, 0, 0, _zoomFactor, 0, 0);
+ _inverseZoomMatrix = new Matrix(1f / _zoomFactor, 0, 0, 1f / _zoomFactor, 0, 0);
UpdateSize();
}
}
@@ -803,9 +806,9 @@ namespace Greenshot.Drawing
return cursorContainer;
}
- public ITextContainer AddTextContainer(string text, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, FontFamily family, float size, bool italic, bool bold, bool shadow, int borderSize, Color color, Color fillColor)
+ public ITextContainer AddTextContainer(string text, int x, int y, FontFamily family, float size, bool italic, bool bold, bool shadow, int borderSize, Color color, Color fillColor)
{
- TextContainer textContainer = new TextContainer(this) {Text = text};
+ TextContainer textContainer = new TextContainer(this) {Text = text, Left = x, Top = y};
textContainer.SetFieldValue(FieldType.FONT_FAMILY, family.Name);
textContainer.SetFieldValue(FieldType.FONT_BOLD, bold);
textContainer.SetFieldValue(FieldType.FONT_ITALIC, italic);
@@ -816,8 +819,6 @@ namespace Greenshot.Drawing
textContainer.SetFieldValue(FieldType.SHADOW, shadow);
// Make sure the Text fits
textContainer.FitToText();
- // Align to Surface
- textContainer.AlignToParent(horizontalAlignment, verticalAlignment);
//AggregatedProperties.UpdateElement(textContainer);
AddElement(textContainer);
@@ -1817,43 +1818,72 @@ namespace Greenshot.Drawing
}
else if (ClipboardHelper.ContainsImage(clipboard))
{
- int x = 10;
- int y = 10;
-
- // FEATURE-995: Added a check for the current mouse cursor location, to paste the image on that location.
- var mousePositionOnControl = PointToClient(MousePosition);
- if (ClientRectangle.Contains(mousePositionOnControl))
- {
- x = mousePositionOnControl.X;
- y = mousePositionOnControl.Y;
- }
+ Point pasteLocation = GetPasteLocation(0.1f, 0.1f);
foreach (Image clipboardImage in ClipboardHelper.GetImages(clipboard))
{
if (clipboardImage != null)
{
DeselectAllElements();
- IImageContainer container = AddImageContainer(clipboardImage as Bitmap, x, y);
+ IImageContainer container = AddImageContainer(clipboardImage as Bitmap, pasteLocation.X, pasteLocation.Y);
SelectElement(container);
clipboardImage.Dispose();
- x += 10;
- y += 10;
+ pasteLocation.X += 10;
+ pasteLocation.Y += 10;
}
}
}
else if (ClipboardHelper.ContainsText(clipboard))
{
+ Point pasteLocation = GetPasteLocation(0.4f, 0.4f);
+
string text = ClipboardHelper.GetText(clipboard);
if (text != null)
{
DeselectAllElements();
- ITextContainer textContainer = AddTextContainer(text, HorizontalAlignment.Center, VerticalAlignment.CENTER,
+ ITextContainer textContainer = AddTextContainer(text, pasteLocation.X, pasteLocation.Y,
FontFamily.GenericSansSerif, 12f, false, false, false, 2, Color.Black, Color.Transparent);
SelectElement(textContainer);
}
}
}
+ ///
+ /// Find a location to paste elements.
+ /// If mouse is over the surface - use it's position, otherwise use the visible area.
+ /// Return a point in image coordinate space.
+ ///
+ /// 0.0f for the left edge of visible area, 1.0f for the right edge of visible area.
+ /// 0.0f for the top edge of visible area, 1.0f for the bottom edge of visible area.
+ private Point GetPasteLocation(float horizontalRatio = 0.5f, float verticalRatio = 0.5f)
+ {
+ var point = PointToClient(MousePosition);
+ var rc = GetVisibleRectangle();
+ if (!rc.Contains(point))
+ {
+ point = new Point(
+ rc.Left + (int)(rc.Width * horizontalRatio),
+ rc.Top + (int)(rc.Height * verticalRatio)
+ );
+ }
+ return ToImageCoordinates(point);
+ }
+
+ ///
+ /// Get the rectangle bounding the part of this Surface currently visible in the editor (in surface coordinate space).
+ ///
+ private Rectangle GetVisibleRectangle()
+ {
+ var bounds = Bounds;
+ var clientArea = Parent.ClientRectangle;
+ return new Rectangle(
+ Math.Max(0, -bounds.Left),
+ Math.Max(0, -bounds.Top),
+ clientArea.Width,
+ clientArea.Height
+ );
+ }
+
///
/// Duplicate all the selecteded elements
///
@@ -2127,7 +2157,38 @@ namespace Greenshot.Drawing
{
Point[] points = { rc.Location, rc.Location + rc.Size };
_zoomMatrix.TransformPoints(points);
- return new Rectangle(points[0].X, points[0].Y, points[1].X - points[0].X, points[1].Y - points[1].Y);
+ return new Rectangle(
+ points[0].X,
+ points[0].Y,
+ points[1].X - points[0].X,
+ points[1].Y - points[0].Y
+ );
+ }
+ }
+
+ public Point ToImageCoordinates(Point point)
+ {
+ Point[] points = { point };
+ _inverseZoomMatrix.TransformPoints(points);
+ return points[0];
+ }
+
+ public Rectangle ToImageCoordinates(Rectangle rc)
+ {
+ if (_inverseZoomMatrix.IsIdentity)
+ {
+ return rc;
+ }
+ else
+ {
+ Point[] points = { rc.Location, rc.Location + rc.Size };
+ _inverseZoomMatrix.TransformPoints(points);
+ return new Rectangle(
+ points[0].X,
+ points[0].Y,
+ points[1].X - points[0].X,
+ points[1].Y - points[0].Y
+ );
}
}
}
diff --git a/GreenshotPlugin/Interfaces/Drawing/Container.cs b/GreenshotPlugin/Interfaces/Drawing/Container.cs
index b2b6e3d19..35a6cf50a 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Container.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Container.cs
@@ -102,7 +102,6 @@ namespace GreenshotPlugin.Interfaces.Drawing
get;
set;
}
- void AlignToParent(HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment);
void Invalidate();
bool ClickableAt(int x, int y);
void MoveBy(int x, int y);
diff --git a/GreenshotPlugin/Interfaces/ISurface.cs b/GreenshotPlugin/Interfaces/ISurface.cs
index a94415cbc..e32247188 100644
--- a/GreenshotPlugin/Interfaces/ISurface.cs
+++ b/GreenshotPlugin/Interfaces/ISurface.cs
@@ -84,8 +84,8 @@ namespace GreenshotPlugin.Interfaces
/// The TextContainer will be "re"sized to the text size.
///
/// String to show
- /// Left, Center, Right
- /// TOP, CENTER, BOTTOM
+ /// Where to put the container, X coordinate in the Image coordinate space
+ /// Where to put the container, Y coordinate in the Image coordinate space
/// FontFamily
/// Font Size in float
/// bool true if italic
@@ -94,7 +94,7 @@ namespace GreenshotPlugin.Interfaces
/// size of border (0 for none)
/// Color of string
/// Color of background (e.g. Color.Transparent)
- ITextContainer AddTextContainer(string text, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, FontFamily family, float size, bool italic, bool bold, bool shadow, int borderSize, Color color, Color fillColor);
+ ITextContainer AddTextContainer(string text, int x, int y, FontFamily family, float size, bool italic, bool bold, bool shadow, int borderSize, Color color, Color fillColor);
IImageContainer AddImageContainer(Image image, int x, int y);
ICursorContainer AddCursorContainer(Cursor cursor, int x, int y);
@@ -208,6 +208,16 @@ namespace GreenshotPlugin.Interfaces
///
/// A rectangle in the coordinate space of the image.
Rectangle ToSurfaceCoordinates(Rectangle rc);
+ ///
+ /// Translate a point from surface coorditate space to image coordinate space.
+ ///
+ /// A point in the coordinate space of the surface.
+ Point ToImageCoordinates(Point point);
+ ///
+ /// Translate a rectangle from surface coorditate space to image coordinate space.
+ ///
+ /// A rectangle in the coordinate space of the surface.
+ Rectangle ToImageCoordinates(Rectangle rc);
void MakeUndoable(IMemento memento, bool allowMerge);
}
From 195b5c3ab7579e850e1816c4ec72aaae2ebe46ae Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 19:15:36 +0300
Subject: [PATCH 014/224] Fix NPE
---
Greenshot/Drawing/TextContainer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index 726ab5b7f..c73424908 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -428,7 +428,7 @@ namespace Greenshot.Drawing
///
private void UpdateTextBoxPosition()
{
- if (_textBox == null)
+ if (_textBox == null || Parent == null)
{
return;
}
From 2be1898c53f90c4769e38d55685f3688f2795c91 Mon Sep 17 00:00:00 2001
From: Killy
Date: Mon, 27 Apr 2020 19:30:22 +0300
Subject: [PATCH 015/224] Width and Height shouldn't be exposed through
ISurface anymore
---
GreenshotPlugin/Interfaces/ISurface.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/GreenshotPlugin/Interfaces/ISurface.cs b/GreenshotPlugin/Interfaces/ISurface.cs
index e32247188..73b31b05d 100644
--- a/GreenshotPlugin/Interfaces/ISurface.cs
+++ b/GreenshotPlugin/Interfaces/ISurface.cs
@@ -191,8 +191,6 @@ namespace GreenshotPlugin.Interfaces
get;
set;
}
- int Width { get; }
- int Height { get; }
///
/// Zoom value applied to the surface. 1.0f for actual size (100%).
From 5fe700bc840c1aac874ac474ae03c362d1d1a615 Mon Sep 17 00:00:00 2001
From: MXI
Date: Mon, 27 Apr 2020 21:00:59 +0300
Subject: [PATCH 016/224] Fix GetAvailableScreenSpace on secondary screens
Co-Authored-By: jklingen
---
Greenshot/Forms/ImageEditorForm.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 4609ff4a8..d5de0b5c9 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1526,7 +1526,7 @@ namespace Greenshot {
var screenBounds = screen.Bounds;
var workingArea = screen.WorkingArea;
if (Left > screenBounds.Left && Top > screenBounds.Top) {
- return new Size(workingArea.Width - Left, workingArea.Height - Top);
+ return new Size(workingArea.Right - Left, workingArea.Bottom - Top);
} else {
return workingArea.Size;
}
From d47271e7e14c848145411a2ef5820424f3c62d7b Mon Sep 17 00:00:00 2001
From: Killy
Date: Tue, 28 Apr 2020 18:55:43 +0300
Subject: [PATCH 017/224] Fix rendering quality at small zoom levels when
redrawing small parts
---
Greenshot/Drawing/Surface.cs | 42 +++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 12 deletions(-)
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 4435a7f39..09bbe028e 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -1473,19 +1473,11 @@ namespace Greenshot.Drawing
targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
if (isZoomedIn)
{
- var state = targetGraphics.Save();
- targetGraphics.SmoothingMode = SmoothingMode.None;
- targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
- targetGraphics.CompositingQuality = CompositingQuality.HighQuality;
- targetGraphics.PixelOffsetMode = PixelOffsetMode.None;
-
- targetGraphics.DrawImage(_buffer, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
-
- targetGraphics.Restore(state);
+ DrawSharpImage(targetGraphics, _buffer, imageClipRectangle);
}
else
{
- targetGraphics.DrawImage(_buffer, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ DrawSmoothImage(targetGraphics, _buffer, imageClipRectangle);
}
targetGraphics.ResetTransform();
}
@@ -1494,7 +1486,7 @@ namespace Greenshot.Drawing
DrawBackground(targetGraphics, targetClipRectangle);
targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
- targetGraphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ DrawSmoothImage(targetGraphics, Image, imageClipRectangle);
_elements.Draw(targetGraphics, null, RenderMode.EDIT, imageClipRectangle);
targetGraphics.ResetTransform();
}
@@ -1511,6 +1503,32 @@ namespace Greenshot.Drawing
}
}
+ private void DrawSmoothImage(Graphics targetGraphics, Image image, Rectangle imageClipRectangle)
+ {
+ var state = targetGraphics.Save();
+ targetGraphics.SmoothingMode = SmoothingMode.HighQuality;
+ targetGraphics.InterpolationMode = InterpolationMode.HighQualityBilinear;
+ targetGraphics.CompositingQuality = CompositingQuality.HighQuality;
+ targetGraphics.PixelOffsetMode = PixelOffsetMode.None;
+
+ targetGraphics.DrawImage(image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+
+ targetGraphics.Restore(state);
+ }
+
+ private void DrawSharpImage(Graphics targetGraphics, Image image, Rectangle imageClipRectangle)
+ {
+ var state = targetGraphics.Save();
+ targetGraphics.SmoothingMode = SmoothingMode.None;
+ targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
+ targetGraphics.CompositingQuality = CompositingQuality.HighQuality;
+ targetGraphics.PixelOffsetMode = PixelOffsetMode.None;
+
+ targetGraphics.DrawImage(image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+
+ targetGraphics.Restore(state);
+ }
+
private void DrawBackground(Graphics targetGraphics, Rectangle clipRectangle)
{
// check if we need to draw the checkerboard
From 4c0277be90fc31ab5119ba23f716f5a0ad5f771e Mon Sep 17 00:00:00 2001
From: Killy
Date: Tue, 28 Apr 2020 19:19:17 +0300
Subject: [PATCH 018/224] Robust clip region resize
---
Greenshot/Drawing/Surface.cs | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 09bbe028e..a6da5b4ed 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1406,24 +1406,24 @@ namespace Greenshot.Drawing
return GetImage(RenderMode.EXPORT);
}
- private static Rectangle ZoomClipRectangle(Rectangle rc, double scale)
- => new Rectangle(
+ private static Rectangle ZoomClipRectangle(Rectangle rc, double scale, int inflateAmount = 0)
+ {
+ rc = new Rectangle(
(int)(rc.X * scale),
(int)(rc.Y * scale),
- (int)((rc.Width + 1) * scale) + 1, // making sure to redraw enough pixels when moving scaled image
- (int)((rc.Height + 1) * scale) + 1
- );
-
- private static RectangleF ZoomClipRectangle(RectangleF rc, double scale)
- => new RectangleF(
- (float)Math.Floor(rc.X * scale),
- (float)Math.Floor(rc.Y * scale),
- (float)Math.Ceiling(rc.Width * scale),
- (float)Math.Ceiling(rc.Height * scale)
+ (int)(rc.Width * scale) + 1,
+ (int)(rc.Height * scale) + 1
);
+ if (scale > 1)
+ {
+ inflateAmount = (int)(inflateAmount * scale);
+ }
+ rc.Inflate(inflateAmount, inflateAmount);
+ return rc;
+ }
public void InvalidateElements(Rectangle rc)
- => Invalidate(ZoomClipRectangle(rc, _zoomFactor));
+ => Invalidate(ZoomClipRectangle(rc, _zoomFactor, 1));
///
/// This is the event handler for the Paint Event, try to draw as little as possible!
@@ -1439,7 +1439,7 @@ namespace Greenshot.Drawing
LOG.Debug("Empty cliprectangle??");
return;
}
- Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, 1.0 / _zoomFactor);
+ Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, 1.0 / _zoomFactor, 2);
bool isZoomedIn = ZoomFactor > 1f;
if (_elements.HasIntersectingFilters(imageClipRectangle) || isZoomedIn)
@@ -1467,7 +1467,7 @@ namespace Greenshot.Drawing
//graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
DrawBackground(graphics, imageClipRectangle);
graphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
- graphics.SetClip(ZoomClipRectangle(targetGraphics.ClipBounds, 1.0 / _zoomFactor));
+ graphics.SetClip(ZoomClipRectangle(Rectangle.Round(targetGraphics.ClipBounds), 1.0 / _zoomFactor, 2));
_elements.Draw(graphics, _buffer, RenderMode.EDIT, imageClipRectangle);
}
targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
From e6e2ed523ab166529dd15a08eabe8fab65e31071 Mon Sep 17 00:00:00 2001
From: Killy
Date: Tue, 28 Apr 2020 21:43:01 +0300
Subject: [PATCH 019/224] Keep center of visible area static on zoom when
possible
---
Greenshot/Drawing/Surface.cs | 2 +-
Greenshot/Forms/ImageEditorForm.cs | 25 +++++++++++++++++++++++--
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index a6da5b4ed..339e4b02c 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1890,7 +1890,7 @@ namespace Greenshot.Drawing
///
/// Get the rectangle bounding the part of this Surface currently visible in the editor (in surface coordinate space).
///
- private Rectangle GetVisibleRectangle()
+ public Rectangle GetVisibleRectangle()
{
var bounds = Bounds;
var clientArea = Parent.ClientRectangle;
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index d5de0b5c9..ec53969f5 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1572,8 +1572,24 @@ namespace Greenshot {
}
private void ZoomSetValue(int value) {
+ var surface = Surface as Surface;
+ var panel = surface?.Parent as Panel;
+ if (panel == null)
+ {
+ return;
+ }
+
+ // Store old scroll position
+ var rc = surface.GetVisibleRectangle();
+ var size = surface.Size;
+ var horizontalCenter = 1.0 * (rc.Left + rc.Width / 2) / size.Width;
+ var verticalCenter = 1.0 * (rc.Top + rc.Height / 2) / size.Height;
+
+ // Set the new zoom value
_zoomValue = value;
Surface.ZoomFactor = 1f * value / 100;
+ Size = GetOptimalWindowSize();
+ AlignCanvasPositionAfterResize();
// Update zoom controls
string valueString = value.ToString();
@@ -1584,8 +1600,13 @@ namespace Greenshot {
}
}
- Size = GetOptimalWindowSize();
- AlignCanvasPositionAfterResize();
+ // Restore scroll position
+ rc = surface.GetVisibleRectangle();
+ size = surface.Size;
+ panel.AutoScrollPosition = new Point(
+ (int)(horizontalCenter * size.Width) - rc.Width / 2,
+ (int)(verticalCenter * size.Height) - rc.Height / 2
+ );
}
}
}
From 1ef2df9602dc155279e78024c7247e2618905446 Mon Sep 17 00:00:00 2001
From: Killy
Date: Tue, 28 Apr 2020 21:46:45 +0300
Subject: [PATCH 020/224] Unneeded using
after 169dbdc
---
Greenshot/Drawing/DrawableContainer.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs
index e7caf7ea3..33339ee00 100644
--- a/Greenshot/Drawing/DrawableContainer.cs
+++ b/Greenshot/Drawing/DrawableContainer.cs
@@ -33,7 +33,6 @@ using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Runtime.Serialization;
-using System.Windows.Forms;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Drawing.Adorners;
From 99742ad05ad203c44b7ef8ed7a857a3de08d47dd Mon Sep 17 00:00:00 2001
From: Killy
Date: Wed, 29 Apr 2020 23:23:29 +0300
Subject: [PATCH 021/224] Fix for Best Fit on images bigger than 4 times the
available space
---
Greenshot/Forms/ImageEditorForm.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index ec53969f5..334a72dc3 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1562,11 +1562,12 @@ namespace Greenshot {
static bool isFit(int zoom, int source, int boundary)
=> source * zoom / 100 <= boundary;
- var nextValue = Array.FindLast(
+ var nextIndex = Array.FindLastIndex(
ZOOM_VALUES,
zoom => isFit(zoom, imageSize.Width, maxImageSize.Width)
&& isFit(zoom, imageSize.Height, maxImageSize.Height)
);
+ var nextValue = nextIndex < 0 ? ZOOM_VALUES[0] : ZOOM_VALUES[nextIndex];
ZoomSetValue(nextValue);
}
From 464e5e872f723b2cd0df343c5b82c309088a41c6 Mon Sep 17 00:00:00 2001
From: Killy
Date: Thu, 30 Apr 2020 17:39:03 +0300
Subject: [PATCH 022/224] Fix weird scroll position when going from no scroll
zoom value
Also prefer top left corner in that situation - it is less disorienting when working with screenshots.
---
Greenshot/Forms/ImageEditorForm.cs | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 334a72dc3..ca0cb1a7b 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1581,10 +1581,19 @@ namespace Greenshot {
}
// Store old scroll position
+ // When no scroll is currently needed - prefer top left corner.
+ var horizontalCenter = 0.0;
+ var verticalCenter = 0.0;
var rc = surface.GetVisibleRectangle();
var size = surface.Size;
- var horizontalCenter = 1.0 * (rc.Left + rc.Width / 2) / size.Width;
- var verticalCenter = 1.0 * (rc.Top + rc.Height / 2) / size.Height;
+ if (size.Width > rc.Width)
+ {
+ horizontalCenter = 1.0 * (rc.Left + rc.Width / 2) / size.Width;
+ }
+ if (size.Height > rc.Height)
+ {
+ verticalCenter = 1.0 * (rc.Top + rc.Height / 2) / size.Height;
+ }
// Set the new zoom value
_zoomValue = value;
From dcf75fd081b6b0792069fa7a88c4cccf0b8ee626 Mon Sep 17 00:00:00 2001
From: Killy
Date: Thu, 30 Apr 2020 17:57:36 +0300
Subject: [PATCH 023/224] Use Fractions to represent zoom factor
The goal is to be able to get as close as possible to perfect 66.(6)% (2/3) zoom factor, and also remove types mismatch between the editor form and the surface.
---
Greenshot/Drawing/Surface.cs | 13 +-
Greenshot/Forms/ImageEditorForm.Designer.cs | 18 +--
Greenshot/Forms/ImageEditorForm.cs | 24 ++--
GreenshotPlugin/Core/Fraction.cs | 152 ++++++++++++++++++++
GreenshotPlugin/Interfaces/ISurface.cs | 5 +-
5 files changed, 183 insertions(+), 29 deletions(-)
create mode 100644 GreenshotPlugin/Core/Fraction.cs
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 339e4b02c..811466cf7 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -307,15 +307,16 @@ namespace Greenshot.Drawing
[NonSerialized]
private Matrix _inverseZoomMatrix = new Matrix(1, 0, 0, 1, 0, 0);
[NonSerialized]
- private float _zoomFactor = 1.0f;
- public float ZoomFactor
+ private Fraction _zoomFactor = Fraction.Identity;
+ public Fraction ZoomFactor
{
get => _zoomFactor;
set
{
_zoomFactor = value;
+ var inverse = _zoomFactor.Inverse();
_zoomMatrix = new Matrix(_zoomFactor, 0, 0, _zoomFactor, 0, 0);
- _inverseZoomMatrix = new Matrix(1f / _zoomFactor, 0, 0, 1f / _zoomFactor, 0, 0);
+ _inverseZoomMatrix = new Matrix(inverse, 0, 0, inverse, 0, 0);
UpdateSize();
}
}
@@ -1439,9 +1440,9 @@ namespace Greenshot.Drawing
LOG.Debug("Empty cliprectangle??");
return;
}
- Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, 1.0 / _zoomFactor, 2);
+ Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, _zoomFactor.Inverse(), 2);
- bool isZoomedIn = ZoomFactor > 1f;
+ bool isZoomedIn = _zoomFactor > Fraction.Identity;
if (_elements.HasIntersectingFilters(imageClipRectangle) || isZoomedIn)
{
if (_buffer != null)
@@ -1467,7 +1468,7 @@ namespace Greenshot.Drawing
//graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
DrawBackground(graphics, imageClipRectangle);
graphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
- graphics.SetClip(ZoomClipRectangle(Rectangle.Round(targetGraphics.ClipBounds), 1.0 / _zoomFactor, 2));
+ graphics.SetClip(ZoomClipRectangle(Rectangle.Round(targetGraphics.ClipBounds), _zoomFactor.Inverse(), 2));
_elements.Draw(graphics, _buffer, RenderMode.EDIT, imageClipRectangle);
}
targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
diff --git a/Greenshot/Forms/ImageEditorForm.Designer.cs b/Greenshot/Forms/ImageEditorForm.Designer.cs
index 606b72773..04da3d0a0 100644
--- a/Greenshot/Forms/ImageEditorForm.Designer.cs
+++ b/Greenshot/Forms/ImageEditorForm.Designer.cs
@@ -1718,7 +1718,7 @@ namespace Greenshot {
//
this.zoom25MenuItem.Name = "zoom25MenuItem";
this.zoom25MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom25MenuItem.Tag = "25";
+ this.zoom25MenuItem.Tag = "1/4";
this.zoom25MenuItem.Text = "25%";
this.zoom25MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1726,7 +1726,7 @@ namespace Greenshot {
//
this.zoom50MenuItem.Name = "zoom50MenuItem";
this.zoom50MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom50MenuItem.Tag = "50";
+ this.zoom50MenuItem.Tag = "1/2";
this.zoom50MenuItem.Text = "50%";
this.zoom50MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1734,7 +1734,7 @@ namespace Greenshot {
//
this.zoom66MenuItem.Name = "zoom66MenuItem";
this.zoom66MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom66MenuItem.Tag = "66";
+ this.zoom66MenuItem.Tag = "2/3";
this.zoom66MenuItem.Text = "66%";
this.zoom66MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1742,7 +1742,7 @@ namespace Greenshot {
//
this.zoom75MenuItem.Name = "zoom75MenuItem";
this.zoom75MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom75MenuItem.Tag = "75";
+ this.zoom75MenuItem.Tag = "3/4";
this.zoom75MenuItem.Text = "75%";
this.zoom75MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1757,7 +1757,7 @@ namespace Greenshot {
this.zoomActualSizeMenuItem.Name = "zoomActualSizeMenuItem";
this.zoomActualSizeMenuItem.ShortcutKeyDisplayString = "Ctrl+0";
this.zoomActualSizeMenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoomActualSizeMenuItem.Tag = "100";
+ this.zoomActualSizeMenuItem.Tag = "1/1";
this.zoomActualSizeMenuItem.Text = "100% - Actual Size";
this.zoomActualSizeMenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1770,7 +1770,7 @@ namespace Greenshot {
//
this.zoom200MenuItem.Name = "zoom200MenuItem";
this.zoom200MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom200MenuItem.Tag = "200";
+ this.zoom200MenuItem.Tag = "2/1";
this.zoom200MenuItem.Text = "200%";
this.zoom200MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1778,7 +1778,7 @@ namespace Greenshot {
//
this.zoom300MenuItem.Name = "zoom300MenuItem";
this.zoom300MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom300MenuItem.Tag = "300";
+ this.zoom300MenuItem.Tag = "3/1";
this.zoom300MenuItem.Text = "300%";
this.zoom300MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1786,7 +1786,7 @@ namespace Greenshot {
//
this.zoom400MenuItem.Name = "zoom400MenuItem";
this.zoom400MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom400MenuItem.Tag = "400";
+ this.zoom400MenuItem.Tag = "4/1";
this.zoom400MenuItem.Text = "400%";
this.zoom400MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
@@ -1794,7 +1794,7 @@ namespace Greenshot {
//
this.zoom600MenuItem.Name = "zoom600MenuItem";
this.zoom600MenuItem.Size = new System.Drawing.Size(209, 22);
- this.zoom600MenuItem.Tag = "600";
+ this.zoom600MenuItem.Tag = "6/1";
this.zoom600MenuItem.Text = "600%";
this.zoom600MenuItem.Click += new System.EventHandler(this.ZoomSetValueMenuItemClick);
//
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index ca0cb1a7b..0b5c40d42 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -69,8 +69,7 @@ namespace Greenshot {
///
/// All provided zoom values (in percents) in ascending order.
///
- private readonly int[] ZOOM_VALUES = new[] { 25, 50, 66, 75, 100, 200, 300, 400, 600 };
- private int _zoomValue = 100;
+ private readonly Fraction[] ZOOM_VALUES = new Fraction[] { (1, 4), (1, 2), (2, 3), (3, 4), (1 ,1), (2, 1), (3, 1), (4, 1), (6, 1) };
///
/// An Implementation for the IImageEditor, this way Plugins have access to the HWND handles wich can be used with Win32 API calls.
@@ -1533,14 +1532,16 @@ namespace Greenshot {
}
private void ZoomInMenuItemClick(object sender, EventArgs e) {
- var nextIndex = Array.FindIndex(ZOOM_VALUES, v => v > _zoomValue);
+ var zoomValue = Surface.ZoomFactor;
+ var nextIndex = Array.FindIndex(ZOOM_VALUES, v => v > zoomValue);
var nextValue = nextIndex < 0 ? ZOOM_VALUES[ZOOM_VALUES.Length - 1] : ZOOM_VALUES[nextIndex];
ZoomSetValue(nextValue);
}
private void ZoomOutMenuItemClick(object sender, EventArgs e) {
- var nextIndex = Array.FindLastIndex(ZOOM_VALUES, v => v < _zoomValue);
+ var zoomValue = Surface.ZoomFactor;
+ var nextIndex = Array.FindLastIndex(ZOOM_VALUES, v => v < zoomValue);
var nextValue = nextIndex < 0 ? ZOOM_VALUES[0] : ZOOM_VALUES[nextIndex];
ZoomSetValue(nextValue);
@@ -1548,7 +1549,7 @@ namespace Greenshot {
private void ZoomSetValueMenuItemClick(object sender, EventArgs e) {
var senderMenuItem = (ToolStripMenuItem)sender;
- int zoomPercent = int.Parse((string)senderMenuItem.Tag);
+ var zoomPercent = Fraction.Parse((string)senderMenuItem.Tag);
ZoomSetValue(zoomPercent);
}
@@ -1559,8 +1560,8 @@ namespace Greenshot {
var maxImageSize = maxWindowSize - chromeSize;
var imageSize = Surface.Image.Size;
- static bool isFit(int zoom, int source, int boundary)
- => source * zoom / 100 <= boundary;
+ static bool isFit(Fraction scale, int source, int boundary)
+ => (int)(source * scale) <= boundary;
var nextIndex = Array.FindLastIndex(
ZOOM_VALUES,
@@ -1572,7 +1573,7 @@ namespace Greenshot {
ZoomSetValue(nextValue);
}
- private void ZoomSetValue(int value) {
+ private void ZoomSetValue(Fraction value) {
var surface = Surface as Surface;
var panel = surface?.Parent as Panel;
if (panel == null)
@@ -1596,14 +1597,13 @@ namespace Greenshot {
}
// Set the new zoom value
- _zoomValue = value;
- Surface.ZoomFactor = 1f * value / 100;
+ Surface.ZoomFactor = value;
Size = GetOptimalWindowSize();
AlignCanvasPositionAfterResize();
// Update zoom controls
- string valueString = value.ToString();
- zoomStatusDropDownBtn.Text = valueString + "%";
+ zoomStatusDropDownBtn.Text = ((int)(100 * (double)value)).ToString() + "%";
+ var valueString = value.ToString();
foreach (var item in zoomMenuStrip.Items) {
if (item is ToolStripMenuItem menuItem) {
menuItem.Checked = menuItem.Tag as string == valueString;
diff --git a/GreenshotPlugin/Core/Fraction.cs b/GreenshotPlugin/Core/Fraction.cs
new file mode 100644
index 000000000..312b91bb8
--- /dev/null
+++ b/GreenshotPlugin/Core/Fraction.cs
@@ -0,0 +1,152 @@
+using System;
+using System.Text.RegularExpressions;
+
+namespace GreenshotPlugin.Core
+{
+ ///
+ /// Basic Fraction (Rational) numbers with features only needed to represent scale factors.
+ ///
+ public readonly struct Fraction : IEquatable, IComparable
+ {
+ public static Fraction Identity { get; } = new Fraction(1, 1);
+
+ public uint Numerator { get; }
+ public uint Denominator { get; }
+
+ public Fraction(uint numerator, uint denominator)
+ {
+ if (denominator == 0)
+ {
+ throw new ArgumentException("Can't divide by zero.", nameof(denominator));
+ }
+ if (numerator == 0)
+ {
+ throw new ArgumentException("Zero is not supported by this implementation.", nameof(numerator));
+ }
+ var gcd = GreatestCommonDivisor(numerator, denominator);
+ Numerator = numerator / gcd;
+ Denominator = denominator / gcd;
+ }
+
+ public Fraction Inverse()
+ => new Fraction(Denominator, Numerator);
+
+ #region Parse
+
+ private static readonly Regex PARSE_REGEX = new Regex(@"^([1-9][0-9]*)\/([1-9][0-9]*)$", RegexOptions.Compiled);
+ public static bool TryParse(string str, out Fraction result)
+ {
+ var match = PARSE_REGEX.Match(str);
+ if (!match.Success)
+ {
+ result = Identity;
+ return false;
+ }
+ var numerator = uint.Parse(match.Groups[1].Value);
+ var denominator = uint.Parse(match.Groups[2].Value);
+ result = new Fraction(numerator, denominator);
+ return true;
+ }
+
+ public static Fraction Parse(string str)
+ => TryParse(str, out var result)
+ ? result
+ : throw new ArgumentException($"Could not parse the input \"{str}\".", nameof(str));
+
+ #endregion
+
+ #region Overrides, interface implementations
+
+ public override string ToString()
+ => $"{Numerator}/{Denominator}";
+
+ public override bool Equals(object obj)
+ => obj is Fraction fraction && Equals(fraction);
+
+ public bool Equals(Fraction other)
+ => Numerator == other.Numerator && Denominator == other.Denominator;
+
+ public override int GetHashCode()
+ {
+ unchecked
+ {
+ int hashCode = -1534900553;
+ hashCode = hashCode * -1521134295 + Numerator.GetHashCode();
+ hashCode = hashCode * -1521134295 + Denominator.GetHashCode();
+ return hashCode;
+ }
+ }
+
+ public int CompareTo(Fraction other)
+ => (int)(Numerator * other.Denominator) - (int)(other.Numerator * Denominator);
+
+ #endregion
+
+ #region Equality operators
+
+ public static bool operator ==(Fraction left, Fraction right)
+ => left.Equals(right);
+
+ public static bool operator !=(Fraction left, Fraction right)
+ => !(left == right);
+
+ #endregion
+
+ #region Comparison operators
+
+ public static bool operator <(Fraction left, Fraction right)
+ => left.CompareTo(right) < 0;
+
+ public static bool operator <=(Fraction left, Fraction right)
+ => left.CompareTo(right) <= 0;
+
+ public static bool operator >(Fraction left, Fraction right)
+ => left.CompareTo(right) > 0;
+
+ public static bool operator >=(Fraction left, Fraction right)
+ => left.CompareTo(right) >= 0;
+
+ #endregion
+
+ #region Scale operators
+
+ public static Fraction operator *(Fraction left, Fraction right)
+ => new Fraction(left.Numerator * right.Numerator, left.Denominator * right.Denominator);
+
+ public static Fraction operator *(Fraction left, uint right)
+ => new Fraction(left.Numerator * right, left.Denominator);
+
+ public static Fraction operator *(uint left, Fraction right)
+ => new Fraction(left * right.Numerator, right.Denominator);
+
+ public static Fraction operator /(Fraction left, Fraction right)
+ => new Fraction(left.Numerator * right.Denominator, left.Denominator * right.Numerator);
+
+ public static Fraction operator /(Fraction left, uint right)
+ => new Fraction(left.Numerator, left.Denominator * right);
+
+ public static Fraction operator /(uint left, Fraction right)
+ => new Fraction(left * right.Denominator, right.Numerator);
+
+ #endregion
+
+ #region Type conversion operators
+
+ public static implicit operator double(Fraction fraction)
+ => 1.0 * fraction.Numerator / fraction.Denominator;
+
+ public static implicit operator float(Fraction fraction)
+ => 1.0f * fraction.Numerator / fraction.Denominator;
+
+ public static implicit operator Fraction(uint number)
+ => new Fraction(number, 1u);
+
+ public static implicit operator Fraction((uint numerator, uint demoninator) tuple)
+ => new Fraction(tuple.numerator, tuple.demoninator);
+
+ #endregion
+
+ private static uint GreatestCommonDivisor(uint a, uint b)
+ => (b != 0) ? GreatestCommonDivisor(b, a % b) : a;
+ }
+}
diff --git a/GreenshotPlugin/Interfaces/ISurface.cs b/GreenshotPlugin/Interfaces/ISurface.cs
index 73b31b05d..068ab0f29 100644
--- a/GreenshotPlugin/Interfaces/ISurface.cs
+++ b/GreenshotPlugin/Interfaces/ISurface.cs
@@ -23,6 +23,7 @@ using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
+using GreenshotPlugin.Core;
using GreenshotPlugin.Effects;
using GreenshotPlugin.Interfaces.Drawing;
@@ -193,9 +194,9 @@ namespace GreenshotPlugin.Interfaces
}
///
- /// Zoom value applied to the surface. 1.0f for actual size (100%).
+ /// Zoom value applied to the surface.
///
- float ZoomFactor { get; set; }
+ Fraction ZoomFactor { get; set; }
///
/// Translate a point from image coorditate space to surface coordinate space.
///
From bac1ff4ba06e855239658688cf8e23002efb248c Mon Sep 17 00:00:00 2001
From: Killy
Date: Thu, 30 Apr 2020 18:30:51 +0300
Subject: [PATCH 024/224] Fix for pixel jerk
---
Greenshot/Drawing/Surface.cs | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 811466cf7..2ea5e0b00 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1440,6 +1440,25 @@ namespace Greenshot.Drawing
LOG.Debug("Empty cliprectangle??");
return;
}
+
+ // Correction to prevent rounding errors at certain zoom levels.
+ // When zooming to N/M, clip rectangle top and left coordinates should be multiples of N.
+ if (_zoomFactor.Numerator > 1 && _zoomFactor.Denominator > 1)
+ {
+ int horizontalCorrection = targetClipRectangle.Left % (int)_zoomFactor.Numerator;
+ int verticalCorrection = targetClipRectangle.Top % (int)_zoomFactor.Numerator;
+ if (horizontalCorrection != 0)
+ {
+ targetClipRectangle.X -= horizontalCorrection;
+ targetClipRectangle.Width += horizontalCorrection;
+ }
+ if (verticalCorrection != 0)
+ {
+ targetClipRectangle.Y -= verticalCorrection;
+ targetClipRectangle.Height += verticalCorrection;
+ }
+ }
+
Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, _zoomFactor.Inverse(), 2);
bool isZoomedIn = _zoomFactor > Fraction.Identity;
From f494385ef73d45527357b5eabb79a40dffbed0e7 Mon Sep 17 00:00:00 2001
From: Killy
Date: Thu, 30 Apr 2020 19:16:05 +0300
Subject: [PATCH 025/224] Naming consistency - not a percentage value anymore
---
Greenshot/Forms/ImageEditorForm.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 0b5c40d42..1e177e428 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1549,9 +1549,9 @@ namespace Greenshot {
private void ZoomSetValueMenuItemClick(object sender, EventArgs e) {
var senderMenuItem = (ToolStripMenuItem)sender;
- var zoomPercent = Fraction.Parse((string)senderMenuItem.Tag);
+ var nextValue = Fraction.Parse((string)senderMenuItem.Tag);
- ZoomSetValue(zoomPercent);
+ ZoomSetValue(nextValue);
}
private void ZoomBestFitMenuItemClick(object sender, EventArgs e) {
From d93c9d6a3a24c18a0490b72e3ddfbc48849ca221 Mon Sep 17 00:00:00 2001
From: Killy
Date: Fri, 1 May 2020 00:46:27 +0300
Subject: [PATCH 026/224] TextContainer's TextBox on zoom - fix for position,
update font size
---
Greenshot/Drawing/TextContainer.cs | 59 +++++++++++++++++++++++++-----
1 file changed, 49 insertions(+), 10 deletions(-)
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index c73424908..939dd3de6 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -22,6 +22,7 @@
using Greenshot.Drawing.Fields;
using Greenshot.Helpers;
using Greenshot.Memento;
+using GreenshotPlugin.Core;
using GreenshotPlugin.Interfaces.Drawing;
using System;
using System.ComponentModel;
@@ -155,6 +156,24 @@ namespace Greenshot.Drawing
FieldChanged += TextContainer_FieldChanged;
}
+ protected override void SwitchParent(Surface newParent)
+ {
+ _parent.SizeChanged -= Parent_SizeChanged;
+ base.SwitchParent(newParent);
+ _parent.SizeChanged += Parent_SizeChanged;
+ }
+
+ private void Parent_SizeChanged(object sender, EventArgs e)
+ {
+ UpdateTextBoxPosition();
+ UpdateTextBoxFont();
+ }
+
+ public override void ApplyBounds(RectangleF newBounds)
+ {
+ base.ApplyBounds(newBounds);
+ UpdateTextBoxPosition();
+ }
public override void Invalidate()
{
@@ -255,7 +274,8 @@ namespace Greenshot.Drawing
AcceptsTab = true,
AcceptsReturn = true,
BorderStyle = BorderStyle.None,
- Visible = false
+ Visible = false,
+ Font = new Font(FontFamily.GenericSansSerif, 1) // just need something non-default here
};
_textBox.DataBindings.Add("Text", this, "Text", false, DataSourceUpdateMode.OnPropertyChanged);
@@ -388,7 +408,6 @@ namespace Greenshot.Drawing
var newFont = CreateFont(fontFamily, fontBold, fontItalic, fontSize);
_font?.Dispose();
_font = newFont;
- _textBox.Font = _font;
}
catch (Exception ex)
{
@@ -400,7 +419,6 @@ namespace Greenshot.Drawing
var newFont = CreateFont(fontFamily, fontBold, fontItalic, fontSize);
_font?.Dispose();
_font = newFont;
- _textBox.Font = _font;
}
catch (Exception)
{
@@ -413,6 +431,8 @@ namespace Greenshot.Drawing
}
}
+ UpdateTextBoxFont();
+
UpdateAlignment();
}
@@ -423,7 +443,29 @@ namespace Greenshot.Drawing
}
///
- /// This will create the textbox exactly to the inner size of the element
+ /// Set TextBox font according to the TextContainer font and the parent zoom factor.
+ ///
+ private void UpdateTextBoxFont()
+ {
+ if (_textBox == null || _font == null)
+ {
+ return;
+ }
+
+ var textBoxFontScale = _parent?.ZoomFactor ?? Fraction.Identity;
+
+ var newFont = new Font(
+ _font.FontFamily,
+ _font.Size * textBoxFontScale,
+ _font.Style,
+ GraphicsUnit.Pixel
+ );
+ _textBox.Font.Dispose();
+ _textBox.Font = newFont;
+ }
+
+ ///
+ /// This will align the textbox exactly to the inner size of the element
/// is a bit of a hack, but for now it seems to work...
///
private void UpdateTextBoxPosition()
@@ -453,12 +495,9 @@ namespace Greenshot.Drawing
_textBox.Height = displayRectangle.Height - 2 * lineWidth + correction;
}
- public override void ApplyBounds(RectangleF newBounds)
- {
- base.ApplyBounds(newBounds);
- UpdateTextBoxPosition();
- }
-
+ ///
+ /// Set TextBox text align and fore color according to field values.
+ ///
private void UpdateTextBoxFormat()
{
if (_textBox == null)
From ef5b5deb7ade72376f7adef6081125ab90cec90d Mon Sep 17 00:00:00 2001
From: Killy
Date: Fri, 1 May 2020 18:16:33 +0300
Subject: [PATCH 027/224] Smarter zoom - keep selected elements in sight
---
Greenshot/Drawing/DrawableContainerList.cs | 24 ++++++++++++
Greenshot/Drawing/Surface.cs | 7 ++++
Greenshot/Forms/ImageEditorForm.cs | 38 +++++++++++++------
.../Interfaces/Drawing/Container.cs | 4 ++
4 files changed, 62 insertions(+), 11 deletions(-)
diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs
index 9451b06ea..3d200598e 100644
--- a/Greenshot/Drawing/DrawableContainerList.cs
+++ b/Greenshot/Drawing/DrawableContainerList.cs
@@ -235,6 +235,30 @@ namespace Greenshot.Drawing {
return false;
}
+ ///
+ /// A rectangle containing DrawingBounds of all drawableContainers in this list,
+ /// or empty rectangle if nothing is there.
+ ///
+ public Rectangle DrawingBounds
+ {
+ get
+ {
+ if (Count == 0)
+ {
+ return Rectangle.Empty;
+ }
+ else
+ {
+ var result = this[0].DrawingBounds;
+ for (int i = 1; i < Count; i++)
+ {
+ result = Rectangle.Union(result, this[i].DrawingBounds);
+ }
+ return result;
+ }
+ }
+ }
+
///
/// Triggers all elements in the list ot be redrawn.
///
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 2ea5e0b00..8b33b6a56 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1922,6 +1922,13 @@ namespace Greenshot.Drawing
);
}
+ ///
+ /// Get the rectangle bounding all selected elements (in surface coordinates space),
+ /// or empty rectangle if nothing is selcted.
+ ///
+ public Rectangle GetSelectionRectangle()
+ => ToSurfaceCoordinates(selectedElements.DrawingBounds);
+
///
/// Duplicate all the selecteded elements
///
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 1e177e428..8bf59df27 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1580,21 +1580,37 @@ namespace Greenshot {
{
return;
}
+ if (value == Surface.ZoomFactor)
+ {
+ return;
+ }
- // Store old scroll position
- // When no scroll is currently needed - prefer top left corner.
- var horizontalCenter = 0.0;
- var verticalCenter = 0.0;
- var rc = surface.GetVisibleRectangle();
+ // Store scroll position
+ var rc = surface.GetVisibleRectangle(); // use visible rc by default
var size = surface.Size;
- if (size.Width > rc.Width)
+ if (value > Surface.ZoomFactor) // being smart on zoom-in
{
- horizontalCenter = 1.0 * (rc.Left + rc.Width / 2) / size.Width;
- }
- if (size.Height > rc.Height)
- {
- verticalCenter = 1.0 * (rc.Top + rc.Height / 2) / size.Height;
+ var sel = surface.GetSelectionRectangle();
+ if (sel != Rectangle.Empty)
+ {
+ rc.Intersect(sel); // zoom to visible part of selection
+ }
+ else
+ {
+ // if image fits completely to currently visible rc and there are no things to focus on
+ // - prefer top left corner to zoom-in as less disorienting for screenshots
+ if (size.Width < rc.Width)
+ {
+ rc.Width = 0;
+ }
+ if (size.Height < rc.Height)
+ {
+ rc.Height = 0;
+ }
+ }
}
+ var horizontalCenter = 1.0 * (rc.Left + rc.Width / 2) / size.Width;
+ var verticalCenter = 1.0 * (rc.Top + rc.Height / 2) / size.Height;
// Set the new zoom value
Surface.ZoomFactor = value;
diff --git a/GreenshotPlugin/Interfaces/Drawing/Container.cs b/GreenshotPlugin/Interfaces/Drawing/Container.cs
index 35a6cf50a..f4065801a 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Container.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Container.cs
@@ -145,6 +145,10 @@ namespace GreenshotPlugin.Interfaces.Drawing
get;
set;
}
+ Rectangle DrawingBounds
+ {
+ get;
+ }
void MakeBoundsChangeUndoable(bool allowMerge);
void Transform(Matrix matrix);
void MoveBy(int dx, int dy);
From 0fce43404d4a87c28713cfa9fdf10c845142e8c1 Mon Sep 17 00:00:00 2001
From: Killy
Date: Fri, 1 May 2020 18:45:10 +0300
Subject: [PATCH 028/224] Fix: prevent image blurring at 100% zoom
Even at 100% GDI+ manages to do some smoothing.
Also minor optimization - not messing with Graphics state when not needed.
---
Greenshot/Drawing/Surface.cs | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 8b33b6a56..9f2a839cd 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1461,8 +1461,7 @@ namespace Greenshot.Drawing
Rectangle imageClipRectangle = ZoomClipRectangle(targetClipRectangle, _zoomFactor.Inverse(), 2);
- bool isZoomedIn = _zoomFactor > Fraction.Identity;
- if (_elements.HasIntersectingFilters(imageClipRectangle) || isZoomedIn)
+ if (_elements.HasIntersectingFilters(imageClipRectangle) || _zoomFactor > Fraction.Identity)
{
if (_buffer != null)
{
@@ -1491,7 +1490,11 @@ namespace Greenshot.Drawing
_elements.Draw(graphics, _buffer, RenderMode.EDIT, imageClipRectangle);
}
targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
- if (isZoomedIn)
+ if (_zoomFactor == Fraction.Identity)
+ {
+ targetGraphics.DrawImage(_buffer, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ }
+ else if(_zoomFactor > Fraction.Identity)
{
DrawSharpImage(targetGraphics, _buffer, imageClipRectangle);
}
@@ -1506,7 +1509,14 @@ namespace Greenshot.Drawing
DrawBackground(targetGraphics, targetClipRectangle);
targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
- DrawSmoothImage(targetGraphics, Image, imageClipRectangle);
+ if (_zoomFactor == Fraction.Identity)
+ {
+ targetGraphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ }
+ else
+ {
+ DrawSmoothImage(targetGraphics, Image, imageClipRectangle);
+ }
_elements.Draw(targetGraphics, null, RenderMode.EDIT, imageClipRectangle);
targetGraphics.ResetTransform();
}
From b2a6fc877403388eb007fe8272242c964a0c0a1e Mon Sep 17 00:00:00 2001
From: Killy
Date: Fri, 1 May 2020 18:53:08 +0300
Subject: [PATCH 029/224] No ScaleTransform is needed at 100% zoom
---
Greenshot/Drawing/Surface.cs | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 9f2a839cd..6c89238f0 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1489,36 +1489,39 @@ namespace Greenshot.Drawing
graphics.SetClip(ZoomClipRectangle(Rectangle.Round(targetGraphics.ClipBounds), _zoomFactor.Inverse(), 2));
_elements.Draw(graphics, _buffer, RenderMode.EDIT, imageClipRectangle);
}
- targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
if (_zoomFactor == Fraction.Identity)
{
targetGraphics.DrawImage(_buffer, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
}
- else if(_zoomFactor > Fraction.Identity)
- {
- DrawSharpImage(targetGraphics, _buffer, imageClipRectangle);
- }
else
{
- DrawSmoothImage(targetGraphics, _buffer, imageClipRectangle);
+ targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
+ if (_zoomFactor > Fraction.Identity)
+ {
+ DrawSharpImage(targetGraphics, _buffer, imageClipRectangle);
+ }
+ else
+ {
+ DrawSmoothImage(targetGraphics, _buffer, imageClipRectangle);
+ }
+ targetGraphics.ResetTransform();
}
- targetGraphics.ResetTransform();
}
else
{
DrawBackground(targetGraphics, targetClipRectangle);
-
- targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
if (_zoomFactor == Fraction.Identity)
{
targetGraphics.DrawImage(Image, imageClipRectangle, imageClipRectangle, GraphicsUnit.Pixel);
+ _elements.Draw(targetGraphics, null, RenderMode.EDIT, imageClipRectangle);
}
else
{
+ targetGraphics.ScaleTransform(_zoomFactor, _zoomFactor);
DrawSmoothImage(targetGraphics, Image, imageClipRectangle);
+ _elements.Draw(targetGraphics, null, RenderMode.EDIT, imageClipRectangle);
+ targetGraphics.ResetTransform();
}
- _elements.Draw(targetGraphics, null, RenderMode.EDIT, imageClipRectangle);
- targetGraphics.ResetTransform();
}
// No clipping for the adorners
From 79ea558dbbdede0d1fcd5a1f2a7520d8d800648b Mon Sep 17 00:00:00 2001
From: Killy
Date: Sat, 2 May 2020 01:52:05 +0300
Subject: [PATCH 030/224] Fix: zoom-in when selection is out of sight
---
Greenshot/Forms/ImageEditorForm.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 8bf59df27..d397b8bc8 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1590,10 +1590,11 @@ namespace Greenshot {
var size = surface.Size;
if (value > Surface.ZoomFactor) // being smart on zoom-in
{
- var sel = surface.GetSelectionRectangle();
- if (sel != Rectangle.Empty)
+ var selection = surface.GetSelectionRectangle();
+ selection.Intersect(rc);
+ if (selection != Rectangle.Empty)
{
- rc.Intersect(sel); // zoom to visible part of selection
+ rc = selection; // zoom to visible part of selection
}
else
{
From 5a06b02d0ddf88c5f6e4720464efbd7f9f31731c Mon Sep 17 00:00:00 2001
From: Greenshot-AppVeyor
Date: Sat, 2 May 2020 21:44:44 +0200
Subject: [PATCH 031/224] Backport Italian Language Updates from Pull Request
#198
---
Greenshot/Languages/language-it-IT.xml | 629 +++++++++++++------------
1 file changed, 328 insertions(+), 301 deletions(-)
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index 58c8d11de..bb553e735 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -1,313 +1,340 @@
-
-
- Per favore, riporta le anomalie a
- Se gradisci Greenshot, puoi darci il tuo aiuto su:
- Greenshot è disponibile su GitHub a
- Icone prese da Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
-Greenshot viene fornito SENZA ALCUNA GARANZIA. Questo è "free software", e potete ri-distribuirlo secondo certe condizioni.
-Dettagli sulla General Public License GNU:
- Notizie su Greenshot
- Traduzione in Italiano curata da tonytogna
- Greenshot - Uno straordinario strumento per copiare immagini dallo schermo
- Chiudi
- Opss, si è verificato un errore inaspettato.
+
+
+ Seganal le anomalie a
+ Se ti piace Greenshot, dacci il tuo aiuto su:
+ Greenshot è disponibile su GitHub in
+ Libreria icone del set icone Fugue di Yusuke Kamiyamane (Creative Commons Attribution 3.0 license)
+ Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+Greenshot viene fornito SENZA ALCUNA GARANZIA.
+Questo software è garuitio", e potete ri-distribuirlo secondo certe condizioni.
+Dettagli della General Public License GNU:
+
+ Notizie su Greenshot
+ Traduzione in Italiano curata da bovirus e tonytogna
+ Greenshot - Uno straordinario strumento per copiare immagini dallo schermo
+ Chiudi
+ Si è verificato un errore inaspettato.
-La buona notizia è: puoi aiutarci ad eliminarlo riempiendo la segnalazione errori.
-Visita la pagina internet qui sotto, crea una nuova segnalazione errore e copia nella descrizione il contenuto preso dall'area di testo.
+La buona notizia è che puoi aiutarci ad eliminarlo segnalandoci l'errore.
+Visita la pagina internet qui sotto, crea una nuova segnalazione errore e copia nella descrizione il
+contenuto preso dall'area di testo.
-Aggiungi un riepilogo significativo e includi qualsiasi informazione tu consideri possa esserci d'aiuto per risolvere il problema.
-Inoltre, apprezzeremo molto se prima di inserire, tu controllassi se esiste già una segnalazione per questo tipo di errore (puoi usare la ricerca) Grazie :)
- Errore
- Annulla
- Si è verificato un errore inaspettato durante la scrittura sugli appunti.
- Nessuna immagine sugli Appunti.
- Greenshot non è riuscito a scrivere sugli appunti poichè il processo {0} teneva l'accesso bloccato.
- Windows Bitmap
- Device Independend Bitmap (DIB)
- HTML
- HTML con immagini in linea
- PNG
- Alfa
- Applica
- Blu
- Verde
- Colore HTML
- Colori usati di recente
- Rosso
- Scelta colore
- Trasparente
- La destinazione {0} ha rifiutato l'accesso a Greenshot, probabilmente c'è una finestra aperta. Chiudi la finestra e riprova nuovamente.
- Accesso rifiutato a Greenshot
- Il file di configurazione di Greenshot non può essere salvato. Controllare i permessi di accesso per '{0}'.
- Notizie su Greenshot
- Cattura regione
- Apri immagine dagli appunti
- Cattura schermo intero
- Tutto
- Basso
- Sinistra
- Destra
- Alto
- Cattura Internet Explorer
- Cattura Internet Explorer da lista
- Cattura ultima regione
- Cattura finestra
- Cattura finestra da lista
- Supporta Greenshot
- Esci
- Aiuto
- Apri immagine da file
- Apri ultima ubicazione di cattura
- Preferenze veloci
- Preferenze...
- Errori durente l'esportazione verso {0}. Pregasi riprovare nuovamente.
- In basso
- Centro
- Allineamento orizzontale
- Sinistra
- In mezzo
- Destra
- Alto
- Allineamento verticale
- Disponi
- Tipi di punta di freccia
- Entrambe
- Punto finale
- Nessuna
- Punto iniziale
- Ritaglia Automaticamente
- Colore di riempimento
- Raggio sfumatura
- Grassetto
- Bordi
- Luminosità
- Cancella
- Errore durante l'accesso agli appunti. Ritenta nuovamente.
- Chiudi
- Desideri salvare l'immagine?
- Salva l'immagine?
- Conferma
- Copia immagine sugli appunti
- Copia percorso sugli appunti
- Copia
- Ritaglia (C)
- Strumento di selezione (ESC)
- Taglia
- Elimina
- Giù di un livello
- Giù fino in fondo
- Disegna freccia (A)
- Disegna ellisse (E)
- Disegna mano libera (F)
- Evidenzia (H)
- Disegna linea (L)
- Disegna rettangolo (R)
- Aggiungi casella di testo (T)
- Duplica elementi selezionati
- Modifica
- Effetti
- E-Mail
- File
- Dimensioni
- Colore linea
- Scala di grigi
- Evidenzia l'area
- Scala di grigi
- Ingrandisci
- Modalità evidenziazione
- Evidenzia il testo
- Aggiungi ombra
- Immagine salvata su {0}.
- Inserisci finestra
- Negativo
- Corsivo
- Carica oggetti da file
- Fattore di ingrandimento
- Adatta a dimensioni di cattura
- Offusca (O)
- Sfuma
- Modalità di offuscamento
- Offusca/ pixelize
- Oggetti
- Apri cartella su Windows Explorer
- Incolla
- Dimensioni pixel
- Qualità anteprima
- Stampa
- Ripeti azione {0}
- Azzera Dimensione
- Percentuale
- Pixels
- Ruota senso antiorario
- Ruota senso orario
- Salva
- Salva oggetti su file
- Salva come...
- Seleziona tutto
- Stampa inviata a '{0}'.
- Ombra
- Ombra
- Immagine posta negli appunti (clipboard).
- Spessore linea
- Gestione Immagini di Greenshot
- Bordi strappati
- Annulla azione {0}
- Su di un livello
- Su fino in cima
- Client MAPI
- Outlook con HTML
- Outlook con testo
- Errore
- Un istanza di Greenshot è già attiva.
- Non è possibile salvare il file su {0}.
-Verifica l'accesso in scrittura sulla destinazione di salvataggio.
- Il file "{0}" non può essere aperto.
- Impossibile aprire il link '{0}'.
- Impossibile salvare l'immagine, è necessario trovare una destinazione valida.
- Utente esperto
- Crea una immagine 8-bit se i colori sono meno di 256 e l'immagine ha > 8 bits
- Controlla anche per Aggiornamenti instabili
- Formati degli appunti
- Numero per var. ${NUM} nel modello del nome file
- Sono consapevole di ciò che sto facendo!
- Modello piede di stampa
- Riduci uso della memoria, perdendo però in prestazioni (sconsigliato).
- Esegui ottimizzazioni per uso con desktop remoto
- Riutilizza la Gestione Immagini, se possibile
- Evita avviso di salvataggio in chiusura della gestione immagini
- Mostra anteprima finestra nel menù di contesto (Vista e Windows 7)
- Esportato su: {0}
- Si è verificato un errore durante l'esportazione verso {0}:
- Guida di Greenshot
- Scorciatoie di tastiera
- Scegliere la qualità per l'immagine JPEG.
- Salva come qualità JPEG di default, e non chiedere nuovamente
- Qualità JPEG di Greenshot
- Ok
- Si è verificato un errore durante la stampa.
- Centra nella pagina
- Ingrandisci fino alle dimensioni pagina
- Ruota a seconda dell'orientamento pagina
- Riduci alle dimensioni pagina
- Salva le opzioni come default, e non chiedere più
- Stampa con colori invertiti (negativo)
- Impostazione Colori
- Forza stampa in scala di grigi
- Forza stampa in bianco e nero
- Stampa data / ora sul piede della pagina
- Opzioni di stampa di Greenshot
- Impostazioni Layout di pagina
- Forza stampa a colori
- Save come qualità di default, e non chiedere più
- Qualità di Greenshot
- Salva direttamente (usando le impostazioni di emissione preferite)
- Visualizza scelta opzioni di stampa ogni volta che si stampa un'immagine
- Visualizza scelta qualità ogni volta che si salva una immagine
- Impostazioni dell'applicazione
- Lancia Greenshot all'avvio
- Cattura
- Cattura puntatore mouse
- Usa la modalità di cattura via finestra interattiva
- Intervallo di controllo aggiornamento, in giorni (0=nessun controllo)
- Configura
- Copia percorso file sugli appunti, ogni volta che una immagine viene salvata
- Destinazione dell'immagine
- Copia sugli appunti
- Apri in Gest. Immagini
- E-Mail
- Salva direttamente (usando le impostazioni qui sotto esposte)
- Salva come (visualizzando le scelte)
- Scegli la destinazione dinamicamente
- Invia alla stampante
- Gestione Immagini
- Modello del Nome File
- Generali
- Cattura Internet Explorer
- Qualità JPEG
- Impostazioni JPEG
- Lingua
- I parametri racchiusi tra % verranno sostituiti automaticamente:
-${YYYY} anno, 4 digits
-${MM} mese, 2 digits
-${DD} giorno, 2 digits
-${hh} ora, 2 digits
-${mm} minuti, 2 digits
-${ss} secondi, 2 digits
-${NUM} numero progressivo, 6 digits
+Aggiungi un riepilogo significativo e includi qualsiasi informazione tu consideri possa esserci d'aiuto per
+risolvere il problema.
+Inoltre apprezzeremo molto, se prima di inserire la segnaalzione, controllassi se esiste già una
+segnalazione per questo tipo di errore (puoi usare la ricerca)
+Grazie :)
+
+ Errore
+ Annulla
+ Si è verificato un errore inaspettato durante la scrittura negli Appunti.
+
+ Nessuna immagine sugli Appunti.
+ Greenshot non è riuscito a scrivere negli Appunti poichè il processo {0} teneva
+ l'accesso bloccato.
+
+ BMO (Bitmap Windows)
+ DIB (Device independent Bitmap)
+ HTML
+ HTML con immagini in linea
+ PNG
+ Alfa
+ Applica
+ Blu
+ Verde
+ Colore HTML
+ Colori usati di recente
+ Rosso
+ Scelta colore
+ Trasparente
+ La destinazione {0} ha rifiutato l'accesso a Greenshot.
+Probabilmente c'è una finestra aperta.
+Chiudi la finestra e riprova nuovamente.
+ Accesso rifiutato a Greenshot
+ Il file di configurazione di Greenshot non può essere salvato.
+Controlla i permessi di accesso per '{0}'.
+ Notizie su Greenshot
+ Cattura regione
+ Apri immagine dagli Appunti
+ Cattura schermo intero
+ Tutto
+ Basso
+ Sinistra
+ Destra
+ Alto
+ Cattura Internet Explorer
+ Cattura Internet Explorer da elenco
+ Cattura ultima regione
+ Cattura finestra
+ Cattura finestra da elenco
+ Supporta Greenshot
+ Esci
+ Aiuto
+ Apri immagine da file
+ Apri ultimo percorso cattura
+ Imposatzioni rapide
+ Impostazioni...
+ Errori durente l'esportazione in {0}. Riprova.
+ In basso
+ Centro
+ Allineamento orizzontale
+ Sinistra
+ In mezzo
+ Destra
+ Alto
+ Allineamento verticale
+ Disponi
+ Tipi di punta di freccia
+ Entrambe
+ Punto finale
+ Nessuna
+ Punto iniziale
+ Ritaglia Automaticamente
+ Colore di riempimento
+ Raggio sfumatura
+ Grassetto
+ Bordi
+ Luminosità
+ Cancella
+ Errore durante l'accesso agli appunti. Ritenta nuovamente.
+ Chiudi
+ Desideri salvare l'immagine?
+ Salva l'immagine?
+ Conferma
+ Copia immagine sugli appunti
+ Copia percorso sugli appunti
+ Copia
+ Ritaglia (C)
+ Strumento di selezione (ESC)
+ Taglia
+ Elimina
+ Giù di un livello
+ Giù fino in fondo
+ Disegna freccia (A)
+ Disegna ellisse (E)
+ Disegna mano libera (F)
+ Evidenzia (H)
+ Disegna linea (L)
+ Disegna rettangolo (R)
+ Aggiungi casella di testo (T)
+ Duplica elementi selezionati
+ Modifica
+ Effetti
+ E-Mail
+ File
+ Dimensioni
+ Colore linea
+ Scala di grigi
+ Evidenzia l'area
+ Scala di grigi
+ Ingrandisci
+ Modalità evidenziazione
+ Evidenzia il testo
+ Aggiungi ombra
+ Immagine salvata su {0}.
+ Inserisci finestra
+ Negativo
+ Corsivo
+ Carica oggetti da file
+ Fattore di ingrandimento
+ Adatta a dimensioni di cattura
+ Offusca (O)
+ Sfuma
+ Modalità di offuscamento
+ Offusca/ pixelize
+ Oggetti
+ Apri cartella su Windows Explorer
+ Incolla
+ Dimensioni pixel
+ Qualità anteprima
+ Stampa
+ Ripeti azione {0}
+ Azzera Dimensione
+ Percentuale
+ Pixels
+ Ruota senso antiorario
+ Ruota senso orario
+ Salva
+ Salva oggetti su file
+ Salva come...
+ Seleziona tutto
+ Stampa inviata a '{0}'.
+ Ombra
+ Ombra
+ Immagine posta negli appunti (clipboard).
+ Spessore linea
+ Gestione Immagini di Greenshot
+ Bordi strappati
+ Annulla azione {0}
+ Su di un livello
+ Su fino in cima
+ Client MAPI
+ Outlook con HTML
+ Outlook con testo
+ Errore
+ È già attiva un'istanza di Greenshot.
+
+Non è possibile salvare il file in {0}.
+Verifica l'accesso in scrittura nel percorso di salvataggio.
+
+ Il file "{0}" non può essere aperto.
+ Impossibile aprire il collegamento '{0}'.
+ Impossibile salvare l'immagine.
+È necessario trovare una destinazione valida.
+
+ Il nome file o cartella generato non è valido.
+Correggi la maschera noem file e riprova.
+
+ Utente esperto
+ Crea una immagine a 8bit se i colori sono meno di 256 el'immagine ha > 8 bit
+ Controlla disponibilità Aggiornamenti versioni beta
+ Formati degli Appunti
+ Numero per var. ${NUM} nel modello del nome file
+ Sono consapevole di ciò che sto facendo!
+ Modello piè di pagina
+ Riduci uso della memoria perdendo però in prestazioni (sconsigliato).
+ Esegui ottimizzazioni per uso con desktop remoto
+ Riutilizza se possibile la gestione immagini
+ Evita avviso di salvataggio in chiusura della gestione immagini
+ Visualizza anteprima finestra nel menù di contesto (Vista e Windows 7)
+ Esportato in: {0}
+ Si è verificato un errore durante l'esportazione in {0}:
+ Guida di Greenshot
+ Scorciatoie tastiera
+ Scegli la qualità dell'immagine JPEG.
+ OK
+ Si è verificato un errore durante la stampa.
+ Centra nella pagina
+ Ingrandisci fino alle dimensioni pagina
+ Ruota a seconda dell'orientamento pagina
+ Riduci alle dimensioni pagina
+ Impostazioni colore
+ Salva le opzioni come predefinite e non chiedere più
+ Stampa con colori invertiti (negativo)
+ Impostazioni layout pagina
+ Forza stampa a colori
+ Forza stampa in scala di grigi
+ Forza stampa in bianco e nero
+ Aggiungi data/ora nel piè di pagina
+ Opzioni di stampa di Greenshot
+ Save come qualità predefinita e non chiedere più
+ Qualità di Greenshot
+ Salva direttamente (usando le impostazioni preferite file destinazione)
+ Visualizza scelta opzioni di stampa ogni volta che stampi un'immagine
+ Visualizza scelta qualità ogni volta che si salva un'immagine
+ Impostazioni applicazione
+ Esegui Greenshot all'avvio del sistema
+ Cattura
+ Cattura puntatore mouse
+ Usa la modalità di cattura via finestra interattiva
+ Intervallo controllo aggiornamento in giorni (0=nessun controllo)
+ Imposta
+ Ogni volta che una immagine viene salvata copia percorso file negli Appunti
+ Destinazione immagine
+ Copia negli Appunti
+ Apri in Gest. Immagini
+ Email
+ Salva direttamente (usando le impostazioni esposte qui sotto)
+ Salva come (visualizzando le scelte)
+ Scegli la destinazione dinamicamente
+ Invia alla stampante
+ Gestione immagini
+ Modello nome fFile
+ Generali
+ Cattura Internet Explorer
+ Qualità JPEG
+ Impostazioni JPEG
+ Lingua
+ I parametri racchiusi tra % verranno automaticamente sostituiti:
+${YYYY} anno, 4 numeri
+${MM} mese, 2 numeri
+${DD} giorno, 2 numeri
+${hh} ora, 2 nuemri
+${mm} minuti, 2 numeri
+${ss} secondi, 2 numeri
+${NUM} numero progressivo, 6 numeri
${title} Titolo finestra
${user} Utente Windows
${domain} Dominio Windows
${hostname} Nome PC
-Puoi anche chiedere a Greenshot di creare le cartelle dinamicamente, basta usare la barra rovescia (\) per separare cartelle e nome file.
-Esempio: il modello ${YYYY}-${MM}-${DD}\${hh}-${mm}-${ss}
-genererà una cartella per il giorno corrente sulla destinazione di memorizzazione di default, es: 2008-06-29, il nome del file di immagine sarà basato sull'orario
-corrente, es: 11_58_32 (più l'estensione definita nelle impostazioni)
- Rete e aggiornamenti
- Emissione
- Emetti suono fotocamera
- Componenti Aggiuntivi
- Creato da
- Percorso DLL
- Nome
- Versione
- Impostazioni Preferite per l'Emissione File
- Formato immagine
- Stampante
- Opzioni di stampa
- Impostazioni Qualità
- Riduci i colori a un massimo di 256
- Registra scorciatoie di tastiera
- Mostra torcia elettrica
- Mostra le notifiche
- Mostra lente ingrandimento
- Destinaz. salvataggio
- Impostazioni
- Modello usato per generare il nome file in fase di salvataggio delle immagini
- Lingua dell'interfaccia utente di Greenshot (richiede il riavvio)
- Formato immagine di default
- Definisce se le scorciatoie Stamp, Ctrl + Stamp, Alt + Stamp sono riservate per uso globale di Greenshot dall'avvio del programma fino a quando viene chiuso.
- Destinazione dove le immagini dello schermo vengono salvate per default (lasciare vuoto per salvare sul desktop)
- Usa il proxy di default del sistema
- Effetti
- Millisecondi di attesa prima di catturare
- Modalità cattura finestra
- Cattura finestra
- Clicca tasto destro qui, o premi il tasto Stamp.
- Una nuova versione di Greenshot è ora disponibile! Vuoi scaricare Greenshot {0}?
- Attendere prego, finchè la pagina di Internet Explorer viene catturata...
- Attenzione
- La registrazione della/e scorciatoie di tastiera "{0}" non è andata a buon fine. Questo problema è causato probabilmente da un altro software{1} che richiede l'uso delle stesse scorciatoie di tastiera. E' possibile però variare le impostazioni delle scorciatoie, oppure disattivare il software.
+Puoi anche chiedere a Greenshot di creare le cartelle dinamicamente, usando la barra rovesciata (\) per
+separare cartelle e nome file.
+Esempio modello: ${YYYY}-${MM}-${DD}\${hh}-${mm}-${ss}
+creerà nelal destinazione predefinita una cartella con il giorno corrente , es: 2008-06-29.
+Il nome del file di immagine sarà basato sull'orario attuale, es: 11_58_32 (più l'estensione definita nelle
+impostazioni)
+
+ Rete e aggiornamenti
+ Destinazionione
+ Riproduci suono fotocamera
+ Componenti Aggiuntivi
+ Creato da
+ Percorso DLL
+ Nome
+ Versione
+ Impostazioni preferite file destinazione
+ Formato immagine
+ Stampante
+ Opzioni di stampa
+ Impostazioni qualità
+ Riduci i colori a un massimo di 256
+ Registra scorciatoie tastiera
+ Visualizza torcia elettrica
+ Visualizza notifiche
+ Visualizza lente ingrandimento
+ Percorso salvataggio
+ Impostazioni
+ Modello usato per generare il nome file in fase di salvataggio delle immagini
+ Lingua dell'interfaccia utente di Greenshot (richiede il riavvio)
+ Formato immagine predefinito
+ Definisce se le scorciatoie Stamp, Ctrl + Stamp, Alt + Stamp sono riservate per uso globale di Greenshot dall'avvio del programma fino a quando viene chiuso.
+ Percorso predefinito dove le immagini catturate vengono salvate (lascia vuoto per salvare sul desktop)
+ Usa proxy predefinito del sistema
+ Effetti
+ Millisecondi di attesa prima di catturare
+ Modalità cattura finestra
+ Cattura finestra
+ Cic tasto destro mouse qui, o premi il tasto 'Stamp'.
+ È disponibile una nuova versione {0} di Greenshot! Vuoi scaricare ora la nuova versione di Greenshot?
+ Attendi finchè viene completata la cattura della pagina di Internet Explorer...
+ Attenzione
+ La registrazione della/e scorciatoie di tastiera "{0}" non è andata a buon fine.
+Questo problema è causato probabilmente da un altro software che richiede l'uso delle stesse scorciatoie di
+tastiera.
+E' possibile però variare le impostazioni delle scorciatoie, oppure disattivare il software.
-In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono comunque disponibili dal menù visualizzabile con tasto destro del mouse sull'icona G nella barra.
- Usa colori personalizzati
- Conserva la trasparenza
- Automaticamente
- Usa i colori di default
- Come visualizzata
+In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono comunque disponibili dal
+menù visualizzabile con il tasto destro del mouse sull'icona G nella barra.
+
- Aggiungi conteggio
- Aggiungi nuvoletta
- Ridimensiona
- Impostazioni ridimensionamento
- Mantieni il rapporto dimensioni
- Larghezza
- Altezza
- Intensità ombra
- Offset ombra
- Impostazioni Ombreggiatura
- Spessore ombra
+ Usa colori personalizzati
+ Mantieni trasparenza
+ Automaticamente
+ Usa i colori predefiniti
+ Come visualizzata
+ Dimensione icona
+ Aggiungi conteggio
+ Aggiungi nuvoletta
+ Ridimensiona
+ Impostazioni ridimensionamento
+ Mantieni il rapporto dimensioni
+ Larghezza
+ Altezza
+ Intensità ombra
+ Offset ombra
+ Impostazioni Ombreggiatura
+ Spessore ombra
- Intervallo orizzontale dentellatura
- Impostazioni Bordi Strappati
- Dimensione dentellatura
- Intervallo verticale dentellatura
- Strappo lato sinistro
- Strappo lato destro
- Strappo lato in alto
- Strappo lato in basso
- Genera ombra
-
+ Intervallo orizzontale dentellatura
+ Impostazioni Bordi Strappati
+ Dimensione dentellatura
+ Intervallo verticale dentellatura
+ Strappo lato sinistro
+ Strappo lato destro
+ Strappo lato in alto
+ Strappo lato in basso
+ Genera ombra
+
From 161339c4bfa2c5a4927898faad1510d01df7d9d1 Mon Sep 17 00:00:00 2001
From: Greenshot-AppVeyor
Date: Sat, 2 May 2020 21:52:05 +0200
Subject: [PATCH 032/224] Backport German Language Updates from Pull Request
#168
---
Greenshot/Languages/language-de-DE.xml | 31 +++++++++++++-------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/Greenshot/Languages/language-de-DE.xml b/Greenshot/Languages/language-de-DE.xml
index 07876d483..2435a7105 100644
--- a/Greenshot/Languages/language-de-DE.xml
+++ b/Greenshot/Languages/language-de-DE.xml
@@ -14,7 +14,7 @@ Detaillierte Informationen zur GNU General Public License:
Tut uns leid, ein unerwarteter Fehler ist aufgetreten.
Die gute Nachricht ist: Sie können uns helfen, ihn zu beseitigen, indem Sie uns einen Fehlerbericht zukommen lassen.
Besuchen Sie die unten stehende URL und erstellen Sie einen neuen Fehlerbericht.
-Bitte geben Sie eine aussgekräftige Zusammenfassung an, fügen Sie den Inhalt des Textfelds in die Beschreibung ein, und ergänzen Sie diese mit zusätzlichen
+Bitte geben Sie eine aussagekräftige Zusammenfassung an, fügen Sie den Inhalt des Textfelds in die Beschreibung ein, und ergänzen Sie diese mit zusätzlichen
Informationen, die für das Nachvollziehen des Fehlers hilfreich sein könnten.
Wir wären sehr dankbar, wenn Sie vorher prüfen würden, ob dieser Fehler schon gemeldet wurde - nutzen Sie einfach die Suche, um bestehende Fehlerberichte
schnell zu finden. Vielen Dank :)
@@ -161,12 +161,12 @@ schnell zu finden. Vielen Dank :)
Greenshot läuft bereits.
Konnte Datei nicht nach {0} speichern.
Bitte überprüfen Sie die Schreibrechte oder wählen Sie einen anderen Speicherort.
- Die Datei "{0}" konnte nicht geöffnet werden.
+ Die Datei '{0}' konnte nicht geöffnet werden.
Konnte Link '{0}' nicht öffnen.
Screenshot konnte nicht gespeichert werden, bitte wählen Sie einen anderen Speicherort.
Der generierte Datei- oder Verzeichnisname ist nicht gültig. Bitte korrigieren Sie das Dateiname-Muster und versuchen Sie es erneut.
Experten
- 8-Bit-Bilder erstellen bei weniger als 256 Farben
+ 8-Bit-Bilder bei weniger als 256 Farben erstellen
Auch instabile Updates anbieten
Zwischenablage-Formate
Wert für ${NUM} im Dateiname-Muster
@@ -178,7 +178,7 @@ Bitte überprüfen Sie die Schreibrechte oder wählen Sie einen anderen Speicher
Speichern-Dialog beim Schließen des Editors unterdrücken
Fenster-Vorschau im Kontextmenü anzeigen (für Vista und Windows 7)
Exportiert nach: {0}
- Beim Export zu {0} ist ein Fehler aufgetreten:
+ Beim Export nach {0} ist ein Fehler aufgetreten:
Greenshot - Hilfe
Tastenkombinationen
Bitte wählen Sie die Qualität Ihres JPEG-Bildes.
@@ -194,7 +194,7 @@ Bitte überprüfen Sie die Schreibrechte oder wählen Sie einen anderen Speicher
Layout-Einstellungen
Farbdruck
Nur in Graustufen ausdrucken
- Schwarzweiß-Druck erzwingen
+ Schwarz-Weiß-Druck erzwingen
Datum und Uhrzeit am Ende der Seite einfügen
Greenshot - Druckeinstellungen
Als Standardqualität speichern und nicht wieder fragen
@@ -206,16 +206,16 @@ Bitte überprüfen Sie die Schreibrechte oder wählen Sie einen anderen Speicher
Greenshot mit Windows starten
Abfotografieren
Mauszeiger mitfotografieren
- Fenster-Teile einzeln abfotografieren
+ Fensterteile einzeln abfotografieren
Prüfen auf Updates alle X Tage (0=keine Prüfung)
- Konfigurieren
+ Konfigurieren...
Dateipfad in die Zwischenablage kopieren, wenn ein Bild gespeichert wird
Ziele
In Zwischenablage kopieren
Im Greenshot-Editor öffnen
E-Mail
Sofort speichern
- Speichern unter (mit Dialog)
+ Speichern unter... (mit Dialog)
Ziel dynamisch auswählen
An Drucker senden
Editor
@@ -238,7 +238,7 @@ ${domain} Windows-Domäne
${hostname} Computername
Greenshot kann auch Verzeichnisse dynamisch erstellen.
-Verwenden Sie das Backslash-Symbol \ um Verzeichnisse vom Dateinamen zu trennen.
+Verwenden Sie den Backslash \ um Verzeichnisse vom Dateinamen zu trennen.
Zum Beispiel: ${YYYY}-${MM}-${DD}\${hh}-${mm}-${ss}
Dieses Muster legt ein Verzeichnis für den aktuellen Tag im Standard-Speicherort an und speichert die Bilddateien im Uhrzeit-Format, mit der vorgegebenen Dateiendung ab.
z.B. C:\Users\MaxMustermann\Desktop\2012-08-13\12-58-32.png
@@ -264,22 +264,21 @@ z.B. C:\Users\MaxMustermann\Desktop\2012-08-13\12-58-32.png
Muster, das beim Speichern von Screenshots zum Generieren von Dateinamen verwendet wird
Sprache der Benutzeroberfläche
Standard-Bildformat
- Legt fest, ob beim Programmstart die Tastenkombinationen Drucken, Strg + Drucken, Alt + Drucken beim Betriebssystem zur globalen
-Verwendung durch Greenshot reserviert werden, bis das Programm geschlossen wird.
+ Legt fest, ob beim Programmstart die Tastenkombinationen Druck, Strg + Druck, Alt + Druck beim Betriebssystem zur globalen Verwendung durch Greenshot reserviert werden, bis das Programm geschlossen wird.
Standardpfad für Bildschirmausdrucke. Leer lassen für Desktop.
Standard-Proxyserver des Betriebssystems verwenden
Effekte
- Millisekunden warten vor abfotografieren
- Fenster abfotografier Modus
+ Millisekunden vor dem Abfotografieren warten
+ Abfotografiermodus-Fenster
Fenster abfotografieren
Lupe anzeigen
- Klicken Sie hier mit der rechten Maustaste oder drücken Sie die {0} Taste.
- Eine neuere Greenshot Version steht zur Verfügung. Wollen Sie Greenshot {0} herunterladen?
+ Klicken Sie hier mit der rechten Maustaste oder drücken Sie die Taste {0}.
+ Eine neuere Greenshot-Version steht zur Verfügung. Wollen Sie Greenshot {0} herunterladen?
Bitte warten Sie, während die Seite im Internet Explorer abfotografiert wird...
Hinweis
Die globale Tastenkombination "{0}" konnte nicht aktiviert werden.
Vermutlich wurde dieselbe Tastenkombination bereits von einem anderen Programm{1} reserviert.
-Sie können die Tastenkombinationen für Greenshot ändern, oder das Programm, das die Tastenkombination verwendet, deaktivieren.
+Sie können die Tastenkombination für Greenshot ändern, oder das Programm, das die Tastenkombination verwendet, deaktivieren.
Sie können aber auch alle Greenshot-Funktionen über das Kontextmenü des Greenshot-Icons im Infobereich verwenden.
Benutzerdefinierte Farbe verwenden
From debea3ad0269d28ea43e4c8de7a3a60bc415e010 Mon Sep 17 00:00:00 2001
From: Greenshot-AppVeyor
Date: Sat, 2 May 2020 21:55:13 +0200
Subject: [PATCH 033/224] Backport Russion Language Updates from Pull Request
#180
---
Greenshot/Languages/language-ru-RU.xml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Greenshot/Languages/language-ru-RU.xml b/Greenshot/Languages/language-ru-RU.xml
index 6955968e3..9823d8bf1 100644
--- a/Greenshot/Languages/language-ru-RU.xml
+++ b/Greenshot/Languages/language-ru-RU.xml
@@ -25,7 +25,7 @@ Greenshot поставляется БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ.
Greenshot не смог записать в буфер обмена, доступ заблокирован процессом {0}.
Изображение в буфере обмена не найдено.
Windows Bitmap
- Устройство Independend Bitmap (DIB)
+ Устройство independent Bitmap (DIB)
HTML
HTML со встроенными изображениями
PNG
@@ -38,7 +38,7 @@ Greenshot поставляется БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ.
Красный
Палитра цветов
Прозрачный
- Назначение {0} отклонил доступ к Greenshot, вероятно, отрыто окно. Закройте диалоговое окно и попробуйте ещё раз.
+ Назначение {0} отклонил доступ к Greenshot, вероятно, открыто окно. Закройте диалоговое окно и попробуйте ещё раз.
Доступ к Greenshot отклонён
Не удалось сохранить файл конфигурации Greenshot's. Пожалуйста, проверьте права доступа для '{0}'.
О программе Greenshot
@@ -61,7 +61,7 @@ Greenshot поставляется БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ.
Открыть изображение из файла
Открыть последнее место захвата
Быстрые настройки
- Предпочтения...
+ Настройки...
Ошибка при экспорте {0}. Пожалуйста, попробуйте ещё раз.
Внизу
По центру
@@ -229,6 +229,7 @@ Greenshot поставляется БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ.
Редактор
Шаблон имени файла
Общие
+ Размер иконки
Захват Internet Explorer
Качество JPEG
Язык
From e8343b4ed2c879790b8d85c77bc64d337248f6a3 Mon Sep 17 00:00:00 2001
From: jklingen
Date: Sun, 3 May 2020 18:27:04 +0200
Subject: [PATCH 034/224] Installer: Backport Russian Translation for the
Installer from PR #186
---
Greenshot/releases/innosetup/setup.iss | 1298 ++++++++++++------------
1 file changed, 656 insertions(+), 642 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index b2fd8e371..0c42af120 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -1,642 +1,656 @@
-#define ExeName "Greenshot"
-#define Version GetEnv('BuildVersionSimple')
-#define FileVersion GetEnv('AssemblyInformationalVersion')
-#define BaseDir "..\..\.."
-#define ReleaseDir "..\..\bin\Release\net472"
-#define BinDir "bin\Release\net472"
-
-; Include the scripts to install .NET Framework
-; See http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx
-#include "scripts\products.iss"
-#include "scripts\products\stringversion.iss"
-#include "scripts\products\winversion.iss"
-#include "scripts\products\fileversion.iss"
-#include "scripts\products\msi20.iss"
-#include "scripts\products\msi31.iss"
-#include "scripts\products\dotnetfxversion.iss"
-#include "scripts\products\dotnetfx47.iss"
-
-[Files]
-Source: {#ReleaseDir}\Greenshot.exe; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\GreenshotPlugin.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\Greenshot.exe.config; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\log4net.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\Dapplo.Http*.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\Dapplo.Log.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\Svg.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\Fizzler.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: {#ReleaseDir}\Newtonsoft.Json.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-Source: ..\..\log4net.xml; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion
-Source: {#ReleaseDir}\checksum.SHA256; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
-;Source: ..\greenshot-defaults.ini; DestDir: {app}; Flags: overwritereadonly ignoreversion replacesameversion
-Source: ..\additional_files\installer.txt; DestDir: {app}; Components: greenshot; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion
-Source: ..\additional_files\license.txt; DestDir: {app}; Components: greenshot; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion
-Source: ..\additional_files\readme.txt; DestDir: {app}; Components: greenshot; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion
-
-; Core language files
-Source: ..\..\Languages\*nl-NL*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*en-US*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*de-DE*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion;
-
-; Additional language files
-Source: ..\..\Languages\*ar-SY*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\arSY; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*ca-CA*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\caCA; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*cs-CZ*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\csCZ; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*da-DK*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\daDK; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*de-x-franconia*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\dexfranconia; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*el-GR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\elGR; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*es-ES*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\esES; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*et-EE*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\etEE; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*fa-IR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\faIR; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*fi-FI*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\fiFI; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*fr-FR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\frFR; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*fr-QC*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\frQC; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*he-IL*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\heIL; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*hu-HU*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\huHU; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*id-ID*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\idID; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*it-IT*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\itIT; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*ja-JP*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\jaJP; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*ko-KR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\koKR; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*kab-DZ*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\kabDZ; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*lt-LT*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ltLT; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*lv-LV*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\lvLV; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*nn-NO*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\nnNO; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*pl-PL*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\plPL; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*pt-BR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ptBR; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*pt-PT*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ptPT; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*ro-RO*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\roRO; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*ru-RU*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ruRU; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*sk-SK*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\skSK; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*sl-SI*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\slSI; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*sr-RS*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\srRS; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*sv-SE*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\svSE; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*tr-TR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\trTR; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*uk-UA*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ukUA; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*vi-VN*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\viVN; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*zh-CN*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\zhCN; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: ..\..\Languages\*zh-TW*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\zhTW; Flags: overwritereadonly ignoreversion replacesameversion;
-
-;Office Plugin
-Source: {#BaseDir}\GreenshotOfficePlugin\{#BinDir}\GreenshotOfficePlugin.dll; DestDir: {app}\Plugins\GreenshotOfficePlugin; Components: plugins\office; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-;OCR Plugin
-Source: {#BaseDir}\GreenshotOCRPlugin\{#BinDir}\GreenshotOCRPlugin.dll; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotOCRPlugin\Languages\language_ocr*.xml; DestDir: {app}\Languages\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotOCRCommand\{#BinDir}\GreenshotOCRCommand.exe; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotOCRCommand\{#BinDir}\GreenshotOCRCommand.exe.config; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-;JIRA Plugin
-Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\GreenshotJiraPlugin.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\Dapplo.Jira.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotJiraPlugin\Languages\language_jira*.xml; DestDir: {app}\Languages\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly ignoreversion replacesameversion;
-;Imgur Plugin
-Source: {#BaseDir}\GreenshotImgurPlugin\{#BinDir}\GreenshotImgurPlugin.dll; DestDir: {app}\Plugins\GreenshotImgurPlugin; Components: plugins\imgur; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotImgurPlugin\Languages\language_imgur*.xml; DestDir: {app}\Languages\Plugins\GreenshotImgurPlugin; Components: plugins\imgur; Flags: overwritereadonly ignoreversion replacesameversion;
-;Box Plugin
-Source: {#BaseDir}\GreenshotBoxPlugin\{#BinDir}\GreenshotBoxPlugin.dll; DestDir: {app}\Plugins\GreenshotBoxPlugin; Components: plugins\box; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotBoxPlugin\Languages\language_box*.xml; DestDir: {app}\Languages\Plugins\GreenshotBoxPlugin; Components: plugins\box; Flags: overwritereadonly ignoreversion replacesameversion;
-;DropBox Plugin
-Source: {#BaseDir}\GreenshotDropBoxPlugin\{#BinDir}\GreenshotDropboxPlugin.dll; DestDir: {app}\Plugins\GreenshotDropBoxPlugin; Components: plugins\dropbox; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotDropBoxPlugin\Languages\language_dropbox*.xml; DestDir: {app}\Languages\Plugins\GreenshotDropBoxPlugin; Components: plugins\dropbox; Flags: overwritereadonly ignoreversion replacesameversion;
-;Flickr Plugin
-Source: {#BaseDir}\GreenshotFlickrPlugin\{#BinDir}\GreenshotFlickrPlugin.dll; DestDir: {app}\Plugins\GreenshotFlickrPlugin; Components: plugins\flickr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotFlickrPlugin\Languages\language_flickr*.xml; DestDir: {app}\Languages\Plugins\GreenshotFlickrPlugin; Components: plugins\flickr; Flags: overwritereadonly ignoreversion replacesameversion;
-;Photobucket Plugin
-Source: {#BaseDir}\GreenshotPhotobucketPlugin\{#BinDir}\GreenshotPhotobucketPlugin.dll; DestDir: {app}\Plugins\GreenshotPhotobucketPlugin; Components: plugins\photobucket; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotPhotobucketPlugin\Languages\language_photo*.xml; DestDir: {app}\Languages\Plugins\GreenshotPhotobucketPlugin; Components: plugins\photobucket; Flags: overwritereadonly ignoreversion replacesameversion;
-;Picasa Plugin
-Source: {#BaseDir}\GreenshotPicasaPlugin\{#BinDir}\GreenshotPicasaPlugin.dll; DestDir: {app}\Plugins\GreenshotPicasaPlugin; Components: plugins\picasa; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotPicasaPlugin\Languages\language_picasa*.xml; DestDir: {app}\Languages\Plugins\GreenshotPicasaPlugin; Components: plugins\picasa; Flags: overwritereadonly ignoreversion replacesameversion;
-;Confluence Plugin
-Source: {#BaseDir}\GreenshotConfluencePlugin\{#BinDir}\GreenshotConfluencePlugin.dll; DestDir: {app}\Plugins\GreenshotConfluencePlugin; Components: plugins\confluence; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotConfluencePlugin\Languages\language_confluence*.xml; DestDir: {app}\Languages\Plugins\GreenshotConfluencePlugin; Components: plugins\confluence; Flags: overwritereadonly ignoreversion replacesameversion;
-;ExternalCommand Plugin
-Source: {#BaseDir}\GreenshotExternalCommandPlugin\{#BinDir}\GreenshotExternalCommandPlugin.dll; DestDir: {app}\Plugins\GreenshotExternalCommandPlugin; Components: plugins\externalcommand; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotExternalCommandPlugin\Languages\language_externalcommand*.xml; DestDir: {app}\Languages\Plugins\GreenshotExternalCommandPlugin; Components: plugins\externalcommand; Flags: overwritereadonly ignoreversion replacesameversion;
-;Win 10 Plugin
-Source: {#BaseDir}\GreenshotWin10Plugin\{#BinDir}\GreenshotWin10Plugin.dll; DestDir: {app}\Plugins\GreenshotWin10Plugin; Components: plugins\win10; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-[Setup]
-; changes associations is used when the installer installs new extensions, it clears the explorer icon cache
-ChangesAssociations=yes
-AppId={#ExeName}
-AppName={#ExeName}
-AppMutex=F48E86D3-E34C-4DB7-8F8F-9A0EA55F0D08
-AppPublisher={#ExeName}
-AppPublisherURL=http://getgreenshot.org
-AppSupportURL=http://getgreenshot.org
-AppUpdatesURL=http://getgreenshot.org
-AppVerName={#ExeName} {#Version}
-AppVersion={#Version}
-ArchitecturesInstallIn64BitMode=x64
-Compression=lzma2/ultra64
-SolidCompression=yes
-DefaultDirName={code:DefDirRoot}\{#ExeName}
-DefaultGroupName={#ExeName}
-InfoBeforeFile=..\additional_files\readme.txt
-LicenseFile=..\additional_files\license.txt
-LanguageDetectionMethod=uilanguage
-MinVersion=6.1.7600
-OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
-OutputDir=..\
-PrivilegesRequired=lowest
-SetupIconFile=..\..\icons\applicationIcon\icon.ico
-; Create a SHA1 signature
-; SignTool=SignTool sign /debug /fd sha1 /tr http://time.certum.pl /td sha1 $f
-; Append a SHA256 to the previous SHA1 signature (this is what as does)
-; SignTool=SignTool sign /debug /as /fd sha256 /tr http://time.certum.pl /td sha256 $f
-; SignedUninstaller=yes
-UninstallDisplayIcon={app}\{#ExeName}.exe
-Uninstallable=true
-VersionInfoCompany={#ExeName}
-VersionInfoProductName={#ExeName}
-VersionInfoProductTextVersion={#FileVersion}
-VersionInfoTextVersion={#FileVersion}
-VersionInfoVersion={#Version}
-; Reference a bitmap, max size 164x314
-WizardImageFile=installer-large.bmp
-; Reference a bitmap, max size 55x58
-WizardSmallImageFile=installer-small.bmp
-[Registry]
-; Delete all startup entries, so we don't have leftover values
-Root: HKCU; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
-Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
-Root: HKCU32; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror; Check: IsWin64()
-Root: HKLM32; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror; Check: IsWin64()
-
-; delete filetype mappings
-; HKEY_LOCAL_USER - for current user only
-Root: HKCU; Subkey: Software\Classes\.greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
-Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
-; HKEY_LOCAL_MACHINE - for all users when admin (with the noerror this doesn't matter)
-Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
-Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
-
-; Create the startup entries if requested to do so
-; HKEY_LOCAL_USER - for current user only
-Root: HKCU; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: {app}\{#ExeName}.exe; Permissions: users-modify; Flags: uninsdeletevalue noerror; Tasks: startup; Check: IsRegularUser
-; HKEY_LOCAL_MACHINE - for all users when admin
-Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: {app}\{#ExeName}.exe; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Tasks: startup; Check: not IsRegularUser
-
-; Register our own filetype for all users
-; HKEY_LOCAL_USER - for current user only
-Root: HKCU; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
-Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
-Root: HKCU; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: "{app}\Greenshot.EXE,0"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
-Root: HKCU; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
-; HKEY_LOCAL_MACHINE - for all users when admin
-Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
-Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
-Root: HKLM; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: "{app}\Greenshot.EXE,0"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
-Root: HKLM; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
-
-[Icons]
-Name: {group}\{#ExeName}; Filename: {app}\{#ExeName}.exe; WorkingDir: {app}; AppUserModelID: "{#ExeName}"
-Name: {group}\Uninstall {#ExeName}; Filename: {uninstallexe}; WorkingDir: {app};
-Name: {group}\Readme.txt; Filename: {app}\readme.txt; WorkingDir: {app}
-Name: {group}\License.txt; Filename: {app}\license.txt; WorkingDir: {app}
-
-[Languages]
-Name: en; MessagesFile: compiler:Default.isl
-Name: cn; MessagesFile: Languages\ChineseSimplified.isl
-Name: de; MessagesFile: compiler:Languages\German.isl
-Name: es; MessagesFile: compiler:Languages\Spanish.isl
-Name: fi; MessagesFile: compiler:Languages\Finnish.isl
-Name: fr; MessagesFile: compiler:Languages\French.isl
-Name: nl; MessagesFile: compiler:Languages\Dutch.isl
-Name: lt; MessagesFile: Languages\Latvian.isl
-Name: nn; MessagesFile: Languages\NorwegianNynorsk.isl
-Name: sr; MessagesFile: Languages\SerbianCyrillic.isl
-Name: sv; MessagesFile: Languages\Swedish.isl
-Name: uk; MessagesFile: compiler:Languages\Ukrainian.isl
-
-[Tasks]
-Name: startup; Description: {cm:startup}
-
-[CustomMessages]
-
-de.confluence=Confluence Plug-in
-de.default=Standard installation
-en.office=Microsoft Office Plug-in
-de.externalcommand=Externes Kommando Plug-in
-de.imgur=Imgur Plug-in (Siehe: http://imgur.com)
-de.jira=Jira Plug-in
-de.language=Zusätzliche Sprachen
-de.ocr=OCR Plug-in (benötigt Microsoft Office Document Imaging (MODI))
-de.optimize=Optimierung der Leistung, kann etwas dauern.
-de.startgreenshot={#ExeName} starten
-de.startup={#ExeName} starten wenn Windows hochfährt
-de.win10=Windows 10 Plug-in
-
-en.confluence=Confluence plug-in
-en.default=Default installation
-en.office=Microsoft Office plug-in
-en.externalcommand=Open with external command plug-in
-en.imgur=Imgur plug-in (See: http://imgur.com)
-en.jira=Jira plug-in
-en.language=Additional languages
-en.ocr=OCR plug-in (needs Microsoft Office Document Imaging (MODI))
-en.optimize=Optimizing performance, this may take a while.
-en.startgreenshot=Start {#ExeName}
-en.startup=Start {#ExeName} with Windows start
-en.win10=Windows 10 plug-in
-
-es.confluence=Extensión para Confluence
-es.default=${default}
-es.externalcommand=Extensión para abrir con programas externos
-es.imgur=Extensión para Imgur (Ver http://imgur.com)
-es.jira=Extensión para Jira
-es.language=Idiomas adicionales
-es.ocr=Extensión para OCR (necesita Microsoft Office Document Imaging (MODI))
-es.optimize=Optimizando rendimiento; por favor, espera.
-es.startgreenshot=Lanzar {#ExeName}
-es.startup=Lanzar {#ExeName} al iniciarse Windows
-es.win10=Extensión para Windows 10
-
-fi.confluence=Confluence-liitännäinen
-fi.default=${default}
-fi.office=Microsoft-Office-liitännäinen
-fi.externalcommand=Avaa Ulkoinen komento-liitännäisellä
-fi.imgur=Imgur-liitännäinen (Katso: http://imgur.com)
-fi.jira=Jira-liitännäinen
-fi.language=Lisäkielet
-fi.ocr=OCR-liitännäinen (Tarvitaan: Microsoft Office Document Imaging (MODI))
-fi.optimize=Optimoidaan suorituskykyä, tämä voi kestää hetken.
-fi.startgreenshot=Käynnistä {#ExeName}
-fi.startup=Käynnistä {#ExeName} Windowsin käynnistyessä
-fi.win10=Windows 10-liitännäinen
-
-fr.confluence=Greffon Confluence
-fr.default=${default}
-fr.office=Greffon Microsoft Office
-fr.externalcommand=Ouvrir avec le greffon de commande externe
-fr.imgur=Greffon Imgur (Voir: http://imgur.com)
-fr.jira=Greffon Jira
-fr.language=Langues additionnelles
-fr.ocr=Greffon OCR (nécessite Document Imaging de Microsoft Office [MODI])
-fr.optimize=Optimisation des performances, Ceci peut prendre un certain temps.
-fr.startgreenshot=Démarrer {#ExeName}
-fr.startup=Lancer {#ExeName} au démarrage de Windows
-fr.win10=Greffon Windows 10
-
-lt.confluence=Confluence spraudnis
-lt.default=${default}
-lt.office=Microsoft Office spraudnis
-lt.externalcommand=Pielāgotu darbību spraudnis
-lt.imgur=Imgur spraudnis (Vairāk šeit: http://imgur.com)
-lt.jira=Jira spraudnis
-lt.language=Papildus valodas
-lt.ocr=OCR spraudnis (nepieciešams Microsoft Office Document Imaging (MODI))
-lt.optimize=Uzlaboju veikstpēju, tas prasīs kādu laiciņu.
-lt.startgreenshot=Palaist {#ExeName}
-lt.startup=Palaist {#ExeName} uzsākot darbus
-lt.win10=Windows 10 spraudnis
-
-nl.confluence=Confluence plug-in
-nl.default=Standaardinstallatie
-nl.office=Microsoft Office plug-in
-nl.externalcommand=Openen met extern commando plug-in
-nl.imgur=Imgur plug-in (zie: http://imgur.com)
-nl.jira=Jira plug-in
-nl.language=Extra talen
-nl.ocr=OCR plug-in (vereist Microsoft Office Document Imaging (MODI))
-nl.optimize=Prestaties verbeteren, even geduld.
-nl.startgreenshot={#ExeName} starten
-nl.startup={#ExeName} automatisch starten met Windows
-nl.win10=Windows 10 plug-in
-
-nn.confluence=Confluence-tillegg
-nn.default=Default installation
-nn.office=Microsoft Office Tillegg
-nn.externalcommand=Tillegg for å opne med ekstern kommando
-nn.imgur=Imgur-tillegg (sjå http://imgur.com)
-nn.jira=Jira-tillegg
-nn.language=Andre språk
-nn.ocr=OCR-tillegg (krev Microsoft Office Document Imaging (MODI))
-nn.optimize=Optimaliserar ytelse, dette kan ta litt tid...
-nn.startgreenshot=Start {#ExeName}
-nn.startup=Start {#ExeName} når Windows startar
-nn.win10=Windows 10 Tillegg
-
-sr.confluence=Прикључак за Конфлуенс
-sr.default=${default}
-sr.externalcommand=Отвори са прикључком за спољне наредбе
-sr.imgur=Прикључак за Имиџер (http://imgur.com)
-sr.jira=Прикључак за Џиру
-sr.language=Додатни језици
-sr.ocr=OCR прикључак (захтева Microsoft Office Document Imaging (MODI))
-sr.optimize=Оптимизујем перформансе…
-sr.startgreenshot=Покрени Гриншот
-sr.startup=Покрени програм са системом
-sr.win10=Прикључак за Windows 10
-
-sv.startup=Starta {#ExeName} med Windows
-sv.startgreenshot=Starta {#ExeName}
-sv.jira=Jira-insticksprogram
-sv.confluence=Confluence-insticksprogram
-sv.externalcommand=Öppna med externt kommando-insticksprogram
-sv.ocr=OCR-insticksprogram (kräver Microsoft Office Document Imaging (MODI))
-sv.imgur=Imgur-insticksprogram (Se: http://imgur.com)
-sv.language=Ytterligare språk
-sv.optimize=Optimerar prestanda, detta kan ta en stund.
-sv.win10=Windows 10-insticksprogram
-
-uk.confluence=Плагін Confluence
-uk.default=${default}
-uk.externalcommand=Плагін запуску зовнішньої команди
-uk.imgur=Плагін Imgur (див.: http://imgur.com)
-uk.jira=Плагін Jira
-uk.language=Додаткові мови
-uk.ocr=Плагін OCR (потребує Microsoft Office Document Imaging (MODI))
-uk.optimize=Оптимізація продуктивності, це може забрати час.
-uk.startgreenshot=Запустити {#ExeName}
-uk.startup=Запускати {#ExeName} під час запуску Windows
-uk.win10=Плагін Windows 10
-
-cn.confluence=Confluence插件
-cn.default=${default}
-cn.externalcommand=使用外部命令打开插件
-cn.imgur=Imgur插件( (请访问: http://imgur.com))
-cn.jira=Jira插件
-cn.language=其它语言
-cn.ocr=OCR插件(需要Microsoft Office Document Imaging (MODI)的支持)
-cn.optimize=正在优化性能,这可能需要一点时间。
-cn.startgreenshot=启动{#ExeName}
-cn.startup=让{#ExeName}随Windows一起启动
-cn.win10=Windows 10插件
-
-[Types]
-Name: "default"; Description: "{cm:default}"
-Name: "full"; Description: "{code:FullInstall}"
-Name: "compact"; Description: "{code:CompactInstall}"
-Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
-
-[Components]
-Name: "greenshot"; Description: "Greenshot"; Types: default full compact custom; Flags: fixed
-Name: "plugins\office"; Description: {cm:office}; Types: default full custom; Flags: disablenouninstallwarning
-Name: "plugins\ocr"; Description: {cm:ocr}; Types: default full custom; Flags: disablenouninstallwarning
-Name: "plugins\jira"; Description: {cm:jira}; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\imgur"; Description: {cm:imgur}; Types: default full custom; Flags: disablenouninstallwarning
-Name: "plugins\confluence"; Description: {cm:confluence}; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning
-;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
-Name: "plugins\box"; Description: "Box Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\dropbox"; Description: "Dropbox Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\photobucket"; Description: "Photobucket Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\win10"; Description: "Windows 10 Plugin"; Types: default full custom; Flags: disablenouninstallwarning; Check: IsWindows10OrNewer()
-Name: "languages"; Description: {cm:language}; Types: full custom; Flags: disablenouninstallwarning
-Name: "languages\arSY"; Description: "العربية"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
-Name: "languages\caCA"; Description: "Català"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\csCZ"; Description: "Ceština"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\daDK"; Description: "Dansk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\dexfranconia"; Description: "Frängisch (Deutsch)"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\elGR"; Description: "ελληνικά"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('4')
-Name: "languages\esES"; Description: "Español"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\etEE"; Description: "Eesti"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\faIR"; Description: "پارسی"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
-Name: "languages\fiFI"; Description: "Suomi"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\frFR"; Description: "Français"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\frQC"; Description: "Français - Québec"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\heIL"; Description: "עִבְרִית"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('c')
-Name: "languages\huHU"; Description: "Magyar"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\idID"; Description: "Bahasa Indonesia"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\itIT"; Description: "Italiano"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\jaJP"; Description: "日本語"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('7')
-Name: "languages\koKR"; Description: "한국어"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
-Name: "languages\kabDZ"; Description: "Taqbaylit"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
-Name: "languages\ltLT"; Description: "Lietuvių"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
-Name: "languages\lvLV"; Description: "Latviski"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
-Name: "languages\nnNO"; Description: "Nynorsk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\plPL"; Description: "Polski"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\ptBR"; Description: "Português do Brasil"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\ptPT"; Description: "Português de Portugal"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\ruRU"; Description: "Pусский"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
-Name: "languages\roRO"; Description: "Română"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\skSK"; Description: "Slovenčina"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\slSI"; Description: "Slovenščina"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\srRS"; Description: "Српски"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
-Name: "languages\svSE"; Description: "Svenska"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\trTR"; Description: "Türk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('6')
-Name: "languages\ukUA"; Description: "Українська"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
-Name: "languages\viVN"; Description: "Việt"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
-Name: "languages\zhCN"; Description: "简体中文"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
-Name: "languages\zhTW"; Description: "繁體中文"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
-[Code]
-// Do we have a regular user trying to install this?
-function IsRegularUser(): Boolean;
-begin
- Result := not (IsAdmin or IsAdminInstallMode);
-end;
-
-// The following code is used to select the installation path, this is localappdata if non poweruser
-function DefDirRoot(Param: String): String;
-begin
- if IsRegularUser then
- Result := ExpandConstant('{localappdata}')
- else
- Result := ExpandConstant('{pf}')
-end;
-
-
-function FullInstall(Param : String) : String;
-begin
- result := SetupMessage(msgFullInstallation);
-end;
-
-function CustomInstall(Param : String) : String;
-begin
- result := SetupMessage(msgCustomInstallation);
-end;
-
-function CompactInstall(Param : String) : String;
-begin
- result := SetupMessage(msgCompactInstallation);
-end;
-/////////////////////////////////////////////////////////////////////
-// The following uninstall code was found at:
-// http://stackoverflow.com/questions/2000296/innosetup-how-to-automatically-uninstall-previous-installed-version
-// and than modified to work in a 32/64 bit environment
-/////////////////////////////////////////////////////////////////////
-function GetUninstallStrings(): array of String;
-var
- sUnInstPath: String;
- sUnInstallString: String;
- asUninstallStrings : array of String;
- index : Integer;
-begin
- sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
- sUnInstallString := '';
- index := 0;
-
- // Retrieve uninstall string from HKLM32 or HKCU32
- if RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then
- begin
- SetArrayLength(asUninstallStrings, index + 1);
- asUninstallStrings[index] := sUnInstallString;
- index := index +1;
- end;
-
- if RegQueryStringValue(HKCU32, sUnInstPath, 'UninstallString', sUnInstallString) then
- begin
- SetArrayLength(asUninstallStrings, index + 1);
- asUninstallStrings[index] := sUnInstallString;
- index := index +1;
- end;
-
- // Only for Windows with 64 bit support: Retrieve uninstall string from HKLM64 or HKCU64
- if IsWin64 then
- begin
- if RegQueryStringValue(HKLM64, sUnInstPath, 'UninstallString', sUnInstallString) then
- begin
- SetArrayLength(asUninstallStrings, index + 1);
- asUninstallStrings[index] := sUnInstallString;
- index := index +1;
- end;
-
- if RegQueryStringValue(HKCU64, sUnInstPath, 'UninstallString', sUnInstallString) then
- begin
- SetArrayLength(asUninstallStrings, index + 1);
- asUninstallStrings[index] := sUnInstallString;
- index := index +1;
- end;
- end;
- Result := asUninstallStrings;
-end;
-
-/////////////////////////////////////////////////////////////////////
-procedure UnInstallOldVersions();
-var
- sUnInstallString: String;
- index: Integer;
- isUninstallMade: Boolean;
- iResultCode : Integer;
- asUninstallStrings : array of String;
-begin
- isUninstallMade := false;
- asUninstallStrings := GetUninstallStrings();
- for index := 0 to (GetArrayLength(asUninstallStrings) -1) do
- begin
- sUnInstallString := RemoveQuotes(asUninstallStrings[index]);
- if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
- isUninstallMade := true;
- end;
-
- // Wait a few seconds to prevent installation issues, otherwise files are removed in one process while the other tries to link to them
- if (isUninstallMade) then
- Sleep(2000);
-end;
-
-/////////////////////////////////////////////////////////////////////
-procedure CurStepChanged(CurStep: TSetupStep);
-begin
- if (CurStep=ssInstall) then
- begin
- UnInstallOldVersions();
- end;
-end;
-/////////////////////////////////////////////////////////////////////
-// End of unstall code
-/////////////////////////////////////////////////////////////////////
-
-// Build a list of greenshot parameters from the supplied installer parameters
-function GetParamsForGS(argument: String): String;
-var
- i: Integer;
- parametersString: String;
- currentParameter: String;
- foundStart: Boolean;
- foundNoRun: Boolean;
- foundLanguage: Boolean;
-begin
- foundNoRun := false;
- foundLanguage := false;
- foundStart := false;
- for i:= 0 to ParamCount() do begin
- currentParameter := ParamStr(i);
-
- // check if norun is supplied
- if Lowercase(currentParameter) = '/norun' then begin
- foundNoRun := true;
- continue;
- end;
-
- if foundStart then begin
- parametersString := parametersString + ' ' + currentParameter;
- foundStart := false;
- end
- else begin
- if Lowercase(currentParameter) = '/language' then begin
- foundStart := true;
- foundLanguage := true;
- parametersString := parametersString + ' ' + currentParameter;
- end;
- end;
- end;
- if not foundLanguage then begin
- parametersString := parametersString + ' /language ' + ExpandConstant('{language}');
- end;
- if foundNoRun then begin
- parametersString := parametersString + ' /norun';
- end;
- // For debugging comment out the following
- //MsgBox(parametersString, mbInformation, MB_OK);
-
- Result := parametersString;
-end;
-
-// Check if language group is installed
-function hasLanguageGroup(argument: String): Boolean;
-var
- keyValue: String;
- returnValue: Boolean;
-begin
- returnValue := true;
- if (RegQueryStringValue( HKLM, 'SYSTEM\CurrentControlSet\Control\Nls\Language Groups', argument, keyValue)) then begin
- if Length(keyValue) = 0 then begin
- returnValue := false;
- end;
- end;
- Result := returnValue;
-end;
-
-function hasDotNet() : boolean;
-begin
- Result := netfxspversion(NetFx4x, '') >= 71;
-end;
-
-// Initialize the setup
-function InitializeSetup(): Boolean;
-begin
- // Check for .NET and install 4.7.1 if we don't have it
- if not hasDotNet() then
- begin
- // Enhance installer, if needed, otherwise .NET installations won't work
- msi20('2.0');
- msi31('3.0');
-
- //install .net 4.7.1
- dotnetfx47(71);
- end;
- Result := true;
-end;
-
-function IsWindowsVersionOrNewer(Major, Minor: Integer): Boolean;
-var
- Version: TWindowsVersion;
-begin
- GetWindowsVersionEx(Version);
- Result :=
- (Version.Major > Major) or
- ((Version.Major = Major) and (Version.Minor >= Minor));
-end;
-
-function IsWindows10OrNewer: Boolean;
-begin
- Result := IsWindowsVersionOrNewer(10, 0);
-end;
-
-[Run]
-Filename: "{app}\{#ExeName}.exe"; Description: "{cm:startgreenshot}"; Parameters: "{code:GetParamsForGS}"; WorkingDir: "{app}"; Flags: nowait postinstall runasoriginaluser
-Filename: "http://getgreenshot.org/thank-you/?language={language}&version={#Version}"; Flags: shellexec runasoriginaluser
-
-[InstallDelete]
-Name: {app}; Type: dirifempty;
+#define ExeName "Greenshot"
+#define Version GetEnv('BuildVersionSimple')
+#define FileVersion GetEnv('AssemblyInformationalVersion')
+#define BaseDir "..\..\.."
+#define ReleaseDir "..\..\bin\Release\net472"
+#define BinDir "bin\Release\net472"
+
+; Include the scripts to install .NET Framework
+; See http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx
+#include "scripts\products.iss"
+#include "scripts\products\stringversion.iss"
+#include "scripts\products\winversion.iss"
+#include "scripts\products\fileversion.iss"
+#include "scripts\products\msi20.iss"
+#include "scripts\products\msi31.iss"
+#include "scripts\products\dotnetfxversion.iss"
+#include "scripts\products\dotnetfx47.iss"
+
+[Files]
+Source: {#ReleaseDir}\Greenshot.exe; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\GreenshotPlugin.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\Greenshot.exe.config; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\log4net.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\Dapplo.Http*.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\Dapplo.Log.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\Svg.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\Fizzler.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: {#ReleaseDir}\Newtonsoft.Json.dll; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+Source: ..\..\log4net.xml; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion
+Source: {#ReleaseDir}\checksum.SHA256; DestDir: {app}; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion
+;Source: ..\greenshot-defaults.ini; DestDir: {app}; Flags: overwritereadonly ignoreversion replacesameversion
+Source: ..\additional_files\installer.txt; DestDir: {app}; Components: greenshot; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion
+Source: ..\additional_files\license.txt; DestDir: {app}; Components: greenshot; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion
+Source: ..\additional_files\readme.txt; DestDir: {app}; Components: greenshot; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion
+
+; Core language files
+Source: ..\..\Languages\*nl-NL*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*en-US*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*de-DE*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: greenshot; Flags: overwritereadonly ignoreversion replacesameversion;
+
+; Additional language files
+Source: ..\..\Languages\*ar-SY*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\arSY; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*ca-CA*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\caCA; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*cs-CZ*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\csCZ; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*da-DK*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\daDK; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*de-x-franconia*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\dexfranconia; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*el-GR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\elGR; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*es-ES*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\esES; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*et-EE*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\etEE; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*fa-IR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\faIR; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*fi-FI*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\fiFI; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*fr-FR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\frFR; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*fr-QC*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\frQC; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*he-IL*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\heIL; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*hu-HU*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\huHU; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*id-ID*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\idID; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*it-IT*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\itIT; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*ja-JP*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\jaJP; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*ko-KR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\koKR; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*kab-DZ*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\kabDZ; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*lt-LT*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ltLT; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*lv-LV*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\lvLV; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*nn-NO*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\nnNO; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*pl-PL*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\plPL; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*pt-BR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ptBR; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*pt-PT*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ptPT; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*ro-RO*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\roRO; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*ru-RU*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ruRU; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*sk-SK*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\skSK; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*sl-SI*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\slSI; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*sr-RS*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\srRS; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*sv-SE*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\svSE; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*tr-TR*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\trTR; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*uk-UA*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\ukUA; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*vi-VN*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\viVN; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*zh-CN*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\zhCN; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: ..\..\Languages\*zh-TW*; Excludes: "*installer*,*website*"; DestDir: {app}\Languages; Components: languages\zhTW; Flags: overwritereadonly ignoreversion replacesameversion;
+
+;Office Plugin
+Source: {#BaseDir}\GreenshotOfficePlugin\{#BinDir}\GreenshotOfficePlugin.dll; DestDir: {app}\Plugins\GreenshotOfficePlugin; Components: plugins\office; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+;OCR Plugin
+Source: {#BaseDir}\GreenshotOCRPlugin\{#BinDir}\GreenshotOCRPlugin.dll; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotOCRPlugin\Languages\language_ocr*.xml; DestDir: {app}\Languages\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotOCRCommand\{#BinDir}\GreenshotOCRCommand.exe; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotOCRCommand\{#BinDir}\GreenshotOCRCommand.exe.config; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+;JIRA Plugin
+Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\GreenshotJiraPlugin.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\Dapplo.Jira.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotJiraPlugin\Languages\language_jira*.xml; DestDir: {app}\Languages\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly ignoreversion replacesameversion;
+;Imgur Plugin
+Source: {#BaseDir}\GreenshotImgurPlugin\{#BinDir}\GreenshotImgurPlugin.dll; DestDir: {app}\Plugins\GreenshotImgurPlugin; Components: plugins\imgur; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotImgurPlugin\Languages\language_imgur*.xml; DestDir: {app}\Languages\Plugins\GreenshotImgurPlugin; Components: plugins\imgur; Flags: overwritereadonly ignoreversion replacesameversion;
+;Box Plugin
+Source: {#BaseDir}\GreenshotBoxPlugin\{#BinDir}\GreenshotBoxPlugin.dll; DestDir: {app}\Plugins\GreenshotBoxPlugin; Components: plugins\box; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotBoxPlugin\Languages\language_box*.xml; DestDir: {app}\Languages\Plugins\GreenshotBoxPlugin; Components: plugins\box; Flags: overwritereadonly ignoreversion replacesameversion;
+;DropBox Plugin
+Source: {#BaseDir}\GreenshotDropBoxPlugin\{#BinDir}\GreenshotDropboxPlugin.dll; DestDir: {app}\Plugins\GreenshotDropBoxPlugin; Components: plugins\dropbox; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotDropBoxPlugin\Languages\language_dropbox*.xml; DestDir: {app}\Languages\Plugins\GreenshotDropBoxPlugin; Components: plugins\dropbox; Flags: overwritereadonly ignoreversion replacesameversion;
+;Flickr Plugin
+Source: {#BaseDir}\GreenshotFlickrPlugin\{#BinDir}\GreenshotFlickrPlugin.dll; DestDir: {app}\Plugins\GreenshotFlickrPlugin; Components: plugins\flickr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotFlickrPlugin\Languages\language_flickr*.xml; DestDir: {app}\Languages\Plugins\GreenshotFlickrPlugin; Components: plugins\flickr; Flags: overwritereadonly ignoreversion replacesameversion;
+;Photobucket Plugin
+Source: {#BaseDir}\GreenshotPhotobucketPlugin\{#BinDir}\GreenshotPhotobucketPlugin.dll; DestDir: {app}\Plugins\GreenshotPhotobucketPlugin; Components: plugins\photobucket; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotPhotobucketPlugin\Languages\language_photo*.xml; DestDir: {app}\Languages\Plugins\GreenshotPhotobucketPlugin; Components: plugins\photobucket; Flags: overwritereadonly ignoreversion replacesameversion;
+;Picasa Plugin
+Source: {#BaseDir}\GreenshotPicasaPlugin\{#BinDir}\GreenshotPicasaPlugin.dll; DestDir: {app}\Plugins\GreenshotPicasaPlugin; Components: plugins\picasa; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotPicasaPlugin\Languages\language_picasa*.xml; DestDir: {app}\Languages\Plugins\GreenshotPicasaPlugin; Components: plugins\picasa; Flags: overwritereadonly ignoreversion replacesameversion;
+;Confluence Plugin
+Source: {#BaseDir}\GreenshotConfluencePlugin\{#BinDir}\GreenshotConfluencePlugin.dll; DestDir: {app}\Plugins\GreenshotConfluencePlugin; Components: plugins\confluence; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotConfluencePlugin\Languages\language_confluence*.xml; DestDir: {app}\Languages\Plugins\GreenshotConfluencePlugin; Components: plugins\confluence; Flags: overwritereadonly ignoreversion replacesameversion;
+;ExternalCommand Plugin
+Source: {#BaseDir}\GreenshotExternalCommandPlugin\{#BinDir}\GreenshotExternalCommandPlugin.dll; DestDir: {app}\Plugins\GreenshotExternalCommandPlugin; Components: plugins\externalcommand; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotExternalCommandPlugin\Languages\language_externalcommand*.xml; DestDir: {app}\Languages\Plugins\GreenshotExternalCommandPlugin; Components: plugins\externalcommand; Flags: overwritereadonly ignoreversion replacesameversion;
+;Win 10 Plugin
+Source: {#BaseDir}\GreenshotWin10Plugin\{#BinDir}\GreenshotWin10Plugin.dll; DestDir: {app}\Plugins\GreenshotWin10Plugin; Components: plugins\win10; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+[Setup]
+; changes associations is used when the installer installs new extensions, it clears the explorer icon cache
+ChangesAssociations=yes
+AppId={#ExeName}
+AppName={#ExeName}
+AppMutex=F48E86D3-E34C-4DB7-8F8F-9A0EA55F0D08
+AppPublisher={#ExeName}
+AppPublisherURL=http://getgreenshot.org
+AppSupportURL=http://getgreenshot.org
+AppUpdatesURL=http://getgreenshot.org
+AppVerName={#ExeName} {#Version}
+AppVersion={#Version}
+ArchitecturesInstallIn64BitMode=x64
+Compression=lzma2/ultra64
+SolidCompression=yes
+DefaultDirName={code:DefDirRoot}\{#ExeName}
+DefaultGroupName={#ExeName}
+InfoBeforeFile=..\additional_files\readme.txt
+LicenseFile=..\additional_files\license.txt
+LanguageDetectionMethod=uilanguage
+MinVersion=6.1.7600
+OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
+OutputDir=..\
+PrivilegesRequired=lowest
+SetupIconFile=..\..\icons\applicationIcon\icon.ico
+; Create a SHA1 signature
+; SignTool=SignTool sign /debug /fd sha1 /tr http://time.certum.pl /td sha1 $f
+; Append a SHA256 to the previous SHA1 signature (this is what as does)
+; SignTool=SignTool sign /debug /as /fd sha256 /tr http://time.certum.pl /td sha256 $f
+; SignedUninstaller=yes
+UninstallDisplayIcon={app}\{#ExeName}.exe
+Uninstallable=true
+VersionInfoCompany={#ExeName}
+VersionInfoProductName={#ExeName}
+VersionInfoProductTextVersion={#FileVersion}
+VersionInfoTextVersion={#FileVersion}
+VersionInfoVersion={#Version}
+; Reference a bitmap, max size 164x314
+WizardImageFile=installer-large.bmp
+; Reference a bitmap, max size 55x58
+WizardSmallImageFile=installer-small.bmp
+[Registry]
+; Delete all startup entries, so we don't have leftover values
+Root: HKCU; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
+Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
+Root: HKCU32; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror; Check: IsWin64()
+Root: HKLM32; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror; Check: IsWin64()
+
+; delete filetype mappings
+; HKEY_LOCAL_USER - for current user only
+Root: HKCU; Subkey: Software\Classes\.greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
+Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
+; HKEY_LOCAL_MACHINE - for all users when admin (with the noerror this doesn't matter)
+Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
+Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: none; ValueName: {#ExeName}; Flags: deletevalue noerror;
+
+; Create the startup entries if requested to do so
+; HKEY_LOCAL_USER - for current user only
+Root: HKCU; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: {app}\{#ExeName}.exe; Permissions: users-modify; Flags: uninsdeletevalue noerror; Tasks: startup; Check: IsRegularUser
+; HKEY_LOCAL_MACHINE - for all users when admin
+Root: HKLM; Subkey: Software\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: {#ExeName}; ValueData: {app}\{#ExeName}.exe; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Tasks: startup; Check: not IsRegularUser
+
+; Register our own filetype for all users
+; HKEY_LOCAL_USER - for current user only
+Root: HKCU; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+Root: HKCU; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+Root: HKCU; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: "{app}\Greenshot.EXE,0"; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+Root: HKCU; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: users-modify; Flags: uninsdeletevalue noerror; Check: IsRegularUser
+; HKEY_LOCAL_MACHINE - for all users when admin
+Root: HKLM; Subkey: Software\Classes\.greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+Root: HKLM; Subkey: Software\Classes\Greenshot; ValueType: string; ValueName: ""; ValueData: "Greenshot File"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+Root: HKLM; Subkey: Software\Classes\Greenshot\DefaultIcon; ValueType: string; ValueName: ""; ValueData: "{app}\Greenshot.EXE,0"; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+Root: HKLM; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: string; ValueName: ""; ValueData: """{app}\Greenshot.EXE"" --openfile ""%1"""; Permissions: admins-modify; Flags: uninsdeletevalue noerror; Check: not IsRegularUser
+
+[Icons]
+Name: {group}\{#ExeName}; Filename: {app}\{#ExeName}.exe; WorkingDir: {app}; AppUserModelID: "{#ExeName}"
+Name: {group}\Uninstall {#ExeName}; Filename: {uninstallexe}; WorkingDir: {app};
+Name: {group}\Readme.txt; Filename: {app}\readme.txt; WorkingDir: {app}
+Name: {group}\License.txt; Filename: {app}\license.txt; WorkingDir: {app}
+
+[Languages]
+Name: en; MessagesFile: compiler:Default.isl
+Name: cn; MessagesFile: Languages\ChineseSimplified.isl
+Name: de; MessagesFile: compiler:Languages\German.isl
+Name: es; MessagesFile: compiler:Languages\Spanish.isl
+Name: fi; MessagesFile: compiler:Languages\Finnish.isl
+Name: fr; MessagesFile: compiler:Languages\French.isl
+Name: nl; MessagesFile: compiler:Languages\Dutch.isl
+Name: lt; MessagesFile: Languages\Latvian.isl
+Name: nn; MessagesFile: Languages\NorwegianNynorsk.isl
+Name: ru; MessagesFile: compiler:Languages\Russian.isl
+Name: sr; MessagesFile: Languages\SerbianCyrillic.isl
+Name: sv; MessagesFile: Languages\Swedish.isl
+Name: uk; MessagesFile: compiler:Languages\Ukrainian.isl
+
+[Tasks]
+Name: startup; Description: {cm:startup}
+
+[CustomMessages]
+
+de.confluence=Confluence Plug-in
+de.default=Standard installation
+en.office=Microsoft Office Plug-in
+de.externalcommand=Externes Kommando Plug-in
+de.imgur=Imgur Plug-in (Siehe: http://imgur.com)
+de.jira=Jira Plug-in
+de.language=Zusätzliche Sprachen
+de.ocr=OCR Plug-in (benötigt Microsoft Office Document Imaging (MODI))
+de.optimize=Optimierung der Leistung, kann etwas dauern.
+de.startgreenshot={#ExeName} starten
+de.startup={#ExeName} starten wenn Windows hochfährt
+de.win10=Windows 10 Plug-in
+
+en.confluence=Confluence plug-in
+en.default=Default installation
+en.office=Microsoft Office plug-in
+en.externalcommand=Open with external command plug-in
+en.imgur=Imgur plug-in (See: http://imgur.com)
+en.jira=Jira plug-in
+en.language=Additional languages
+en.ocr=OCR plug-in (needs Microsoft Office Document Imaging (MODI))
+en.optimize=Optimizing performance, this may take a while.
+en.startgreenshot=Start {#ExeName}
+en.startup=Start {#ExeName} with Windows start
+en.win10=Windows 10 plug-in
+
+es.confluence=Extensión para Confluence
+es.default=${default}
+es.externalcommand=Extensión para abrir con programas externos
+es.imgur=Extensión para Imgur (Ver http://imgur.com)
+es.jira=Extensión para Jira
+es.language=Idiomas adicionales
+es.ocr=Extensión para OCR (necesita Microsoft Office Document Imaging (MODI))
+es.optimize=Optimizando rendimiento; por favor, espera.
+es.startgreenshot=Lanzar {#ExeName}
+es.startup=Lanzar {#ExeName} al iniciarse Windows
+es.win10=Extensión para Windows 10
+
+fi.confluence=Confluence-liitännäinen
+fi.default=${default}
+fi.office=Microsoft-Office-liitännäinen
+fi.externalcommand=Avaa Ulkoinen komento-liitännäisellä
+fi.imgur=Imgur-liitännäinen (Katso: http://imgur.com)
+fi.jira=Jira-liitännäinen
+fi.language=Lisäkielet
+fi.ocr=OCR-liitännäinen (Tarvitaan: Microsoft Office Document Imaging (MODI))
+fi.optimize=Optimoidaan suorituskykyä, tämä voi kestää hetken.
+fi.startgreenshot=Käynnistä {#ExeName}
+fi.startup=Käynnistä {#ExeName} Windowsin käynnistyessä
+fi.win10=Windows 10-liitännäinen
+
+fr.confluence=Greffon Confluence
+fr.default=${default}
+fr.office=Greffon Microsoft Office
+fr.externalcommand=Ouvrir avec le greffon de commande externe
+fr.imgur=Greffon Imgur (Voir: http://imgur.com)
+fr.jira=Greffon Jira
+fr.language=Langues additionnelles
+fr.ocr=Greffon OCR (nécessite Document Imaging de Microsoft Office [MODI])
+fr.optimize=Optimisation des performances, Ceci peut prendre un certain temps.
+fr.startgreenshot=Démarrer {#ExeName}
+fr.startup=Lancer {#ExeName} au démarrage de Windows
+fr.win10=Greffon Windows 10
+
+lt.confluence=Confluence spraudnis
+lt.default=${default}
+lt.office=Microsoft Office spraudnis
+lt.externalcommand=Pielāgotu darbību spraudnis
+lt.imgur=Imgur spraudnis (Vairāk šeit: http://imgur.com)
+lt.jira=Jira spraudnis
+lt.language=Papildus valodas
+lt.ocr=OCR spraudnis (nepieciešams Microsoft Office Document Imaging (MODI))
+lt.optimize=Uzlaboju veikstpēju, tas prasīs kādu laiciņu.
+lt.startgreenshot=Palaist {#ExeName}
+lt.startup=Palaist {#ExeName} uzsākot darbus
+lt.win10=Windows 10 spraudnis
+
+nl.confluence=Confluence plug-in
+nl.default=Standaardinstallatie
+nl.office=Microsoft Office plug-in
+nl.externalcommand=Openen met extern commando plug-in
+nl.imgur=Imgur plug-in (zie: http://imgur.com)
+nl.jira=Jira plug-in
+nl.language=Extra talen
+nl.ocr=OCR plug-in (vereist Microsoft Office Document Imaging (MODI))
+nl.optimize=Prestaties verbeteren, even geduld.
+nl.startgreenshot={#ExeName} starten
+nl.startup={#ExeName} automatisch starten met Windows
+nl.win10=Windows 10 plug-in
+
+nn.confluence=Confluence-tillegg
+nn.default=Default installation
+nn.office=Microsoft Office Tillegg
+nn.externalcommand=Tillegg for å opne med ekstern kommando
+nn.imgur=Imgur-tillegg (sjå http://imgur.com)
+nn.jira=Jira-tillegg
+nn.language=Andre språk
+nn.ocr=OCR-tillegg (krev Microsoft Office Document Imaging (MODI))
+nn.optimize=Optimaliserar ytelse, dette kan ta litt tid...
+nn.startgreenshot=Start {#ExeName}
+nn.startup=Start {#ExeName} når Windows startar
+nn.win10=Windows 10 Tillegg
+
+ru.confluence=Плагин Confluence
+ru.default=${default}
+ru.office=Плагин Microsoft Office
+ru.externalcommand=Открыть с плагином с помощью внешней команды
+ru.imgur=Плагин Imgur (смотрите https://imgur.com/)
+ru.jira=Плагин Jira
+ru.language=Дополнительные языки
+ru.ocr=Плагин OCR (требуется Microsoft Office Document Imaging (MODI))
+ru.optimize=Идет оптимизация производительности, это может занять некоторое время.
+ru.startgreenshot=Запустить {#ExeName}
+ru.startup=Запускать {#ExeName} при старте Windows
+ru.win10=Плагин Windows 10
+
+sr.confluence=Прикључак за Конфлуенс
+sr.default=${default}
+sr.externalcommand=Отвори са прикључком за спољне наредбе
+sr.imgur=Прикључак за Имиџер (http://imgur.com)
+sr.jira=Прикључак за Џиру
+sr.language=Додатни језици
+sr.ocr=OCR прикључак (захтева Microsoft Office Document Imaging (MODI))
+sr.optimize=Оптимизујем перформансе…
+sr.startgreenshot=Покрени Гриншот
+sr.startup=Покрени програм са системом
+sr.win10=Прикључак за Windows 10
+
+sv.startup=Starta {#ExeName} med Windows
+sv.startgreenshot=Starta {#ExeName}
+sv.jira=Jira-insticksprogram
+sv.confluence=Confluence-insticksprogram
+sv.externalcommand=Öppna med externt kommando-insticksprogram
+sv.ocr=OCR-insticksprogram (kräver Microsoft Office Document Imaging (MODI))
+sv.imgur=Imgur-insticksprogram (Se: http://imgur.com)
+sv.language=Ytterligare språk
+sv.optimize=Optimerar prestanda, detta kan ta en stund.
+sv.win10=Windows 10-insticksprogram
+
+uk.confluence=Плагін Confluence
+uk.default=${default}
+uk.externalcommand=Плагін запуску зовнішньої команди
+uk.imgur=Плагін Imgur (див.: http://imgur.com)
+uk.jira=Плагін Jira
+uk.language=Додаткові мови
+uk.ocr=Плагін OCR (потребує Microsoft Office Document Imaging (MODI))
+uk.optimize=Оптимізація продуктивності, це може забрати час.
+uk.startgreenshot=Запустити {#ExeName}
+uk.startup=Запускати {#ExeName} під час запуску Windows
+uk.win10=Плагін Windows 10
+
+cn.confluence=Confluence插件
+cn.default=${default}
+cn.externalcommand=使用外部命令打开插件
+cn.imgur=Imgur插件( (请访问: http://imgur.com))
+cn.jira=Jira插件
+cn.language=其它语言
+cn.ocr=OCR插件(需要Microsoft Office Document Imaging (MODI)的支持)
+cn.optimize=正在优化性能,这可能需要一点时间。
+cn.startgreenshot=启动{#ExeName}
+cn.startup=让{#ExeName}随Windows一起启动
+cn.win10=Windows 10插件
+
+[Types]
+Name: "default"; Description: "{cm:default}"
+Name: "full"; Description: "{code:FullInstall}"
+Name: "compact"; Description: "{code:CompactInstall}"
+Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
+
+[Components]
+Name: "greenshot"; Description: "Greenshot"; Types: default full compact custom; Flags: fixed
+Name: "plugins\office"; Description: {cm:office}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\ocr"; Description: {cm:ocr}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\jira"; Description: {cm:jira}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\imgur"; Description: {cm:imgur}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\confluence"; Description: {cm:confluence}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning
+;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
+Name: "plugins\box"; Description: "Box Plugin"; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\dropbox"; Description: "Dropbox Plugin"; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\photobucket"; Description: "Photobucket Plugin"; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\win10"; Description: "Windows 10 Plugin"; Types: default full custom; Flags: disablenouninstallwarning; Check: IsWindows10OrNewer()
+Name: "languages"; Description: {cm:language}; Types: full custom; Flags: disablenouninstallwarning
+Name: "languages\arSY"; Description: "العربية"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
+Name: "languages\caCA"; Description: "Català"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\csCZ"; Description: "Ceština"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\daDK"; Description: "Dansk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\dexfranconia"; Description: "Frängisch (Deutsch)"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\elGR"; Description: "ελληνικά"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('4')
+Name: "languages\esES"; Description: "Español"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\etEE"; Description: "Eesti"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\faIR"; Description: "پارسی"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
+Name: "languages\fiFI"; Description: "Suomi"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\frFR"; Description: "Français"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\frQC"; Description: "Français - Québec"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\heIL"; Description: "עִבְרִית"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('c')
+Name: "languages\huHU"; Description: "Magyar"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\idID"; Description: "Bahasa Indonesia"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\itIT"; Description: "Italiano"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\jaJP"; Description: "日本語"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('7')
+Name: "languages\koKR"; Description: "한국어"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
+Name: "languages\kabDZ"; Description: "Taqbaylit"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
+Name: "languages\ltLT"; Description: "Lietuvių"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
+Name: "languages\lvLV"; Description: "Latviski"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
+Name: "languages\nnNO"; Description: "Nynorsk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\plPL"; Description: "Polski"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\ptBR"; Description: "Português do Brasil"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\ptPT"; Description: "Português de Portugal"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\ruRU"; Description: "Pусский"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
+Name: "languages\roRO"; Description: "Română"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\skSK"; Description: "Slovenčina"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\slSI"; Description: "Slovenščina"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\srRS"; Description: "Српски"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
+Name: "languages\svSE"; Description: "Svenska"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\trTR"; Description: "Türk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('6')
+Name: "languages\ukUA"; Description: "Українська"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
+Name: "languages\viVN"; Description: "Việt"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
+Name: "languages\zhCN"; Description: "简体中文"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
+Name: "languages\zhTW"; Description: "繁體中文"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
+[Code]
+// Do we have a regular user trying to install this?
+function IsRegularUser(): Boolean;
+begin
+ Result := not (IsAdmin or IsAdminInstallMode);
+end;
+
+// The following code is used to select the installation path, this is localappdata if non poweruser
+function DefDirRoot(Param: String): String;
+begin
+ if IsRegularUser then
+ Result := ExpandConstant('{localappdata}')
+ else
+ Result := ExpandConstant('{pf}')
+end;
+
+
+function FullInstall(Param : String) : String;
+begin
+ result := SetupMessage(msgFullInstallation);
+end;
+
+function CustomInstall(Param : String) : String;
+begin
+ result := SetupMessage(msgCustomInstallation);
+end;
+
+function CompactInstall(Param : String) : String;
+begin
+ result := SetupMessage(msgCompactInstallation);
+end;
+/////////////////////////////////////////////////////////////////////
+// The following uninstall code was found at:
+// http://stackoverflow.com/questions/2000296/innosetup-how-to-automatically-uninstall-previous-installed-version
+// and than modified to work in a 32/64 bit environment
+/////////////////////////////////////////////////////////////////////
+function GetUninstallStrings(): array of String;
+var
+ sUnInstPath: String;
+ sUnInstallString: String;
+ asUninstallStrings : array of String;
+ index : Integer;
+begin
+ sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
+ sUnInstallString := '';
+ index := 0;
+
+ // Retrieve uninstall string from HKLM32 or HKCU32
+ if RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then
+ begin
+ SetArrayLength(asUninstallStrings, index + 1);
+ asUninstallStrings[index] := sUnInstallString;
+ index := index +1;
+ end;
+
+ if RegQueryStringValue(HKCU32, sUnInstPath, 'UninstallString', sUnInstallString) then
+ begin
+ SetArrayLength(asUninstallStrings, index + 1);
+ asUninstallStrings[index] := sUnInstallString;
+ index := index +1;
+ end;
+
+ // Only for Windows with 64 bit support: Retrieve uninstall string from HKLM64 or HKCU64
+ if IsWin64 then
+ begin
+ if RegQueryStringValue(HKLM64, sUnInstPath, 'UninstallString', sUnInstallString) then
+ begin
+ SetArrayLength(asUninstallStrings, index + 1);
+ asUninstallStrings[index] := sUnInstallString;
+ index := index +1;
+ end;
+
+ if RegQueryStringValue(HKCU64, sUnInstPath, 'UninstallString', sUnInstallString) then
+ begin
+ SetArrayLength(asUninstallStrings, index + 1);
+ asUninstallStrings[index] := sUnInstallString;
+ index := index +1;
+ end;
+ end;
+ Result := asUninstallStrings;
+end;
+
+/////////////////////////////////////////////////////////////////////
+procedure UnInstallOldVersions();
+var
+ sUnInstallString: String;
+ index: Integer;
+ isUninstallMade: Boolean;
+ iResultCode : Integer;
+ asUninstallStrings : array of String;
+begin
+ isUninstallMade := false;
+ asUninstallStrings := GetUninstallStrings();
+ for index := 0 to (GetArrayLength(asUninstallStrings) -1) do
+ begin
+ sUnInstallString := RemoveQuotes(asUninstallStrings[index]);
+ if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
+ isUninstallMade := true;
+ end;
+
+ // Wait a few seconds to prevent installation issues, otherwise files are removed in one process while the other tries to link to them
+ if (isUninstallMade) then
+ Sleep(2000);
+end;
+
+/////////////////////////////////////////////////////////////////////
+procedure CurStepChanged(CurStep: TSetupStep);
+begin
+ if (CurStep=ssInstall) then
+ begin
+ UnInstallOldVersions();
+ end;
+end;
+/////////////////////////////////////////////////////////////////////
+// End of unstall code
+/////////////////////////////////////////////////////////////////////
+
+// Build a list of greenshot parameters from the supplied installer parameters
+function GetParamsForGS(argument: String): String;
+var
+ i: Integer;
+ parametersString: String;
+ currentParameter: String;
+ foundStart: Boolean;
+ foundNoRun: Boolean;
+ foundLanguage: Boolean;
+begin
+ foundNoRun := false;
+ foundLanguage := false;
+ foundStart := false;
+ for i:= 0 to ParamCount() do begin
+ currentParameter := ParamStr(i);
+
+ // check if norun is supplied
+ if Lowercase(currentParameter) = '/norun' then begin
+ foundNoRun := true;
+ continue;
+ end;
+
+ if foundStart then begin
+ parametersString := parametersString + ' ' + currentParameter;
+ foundStart := false;
+ end
+ else begin
+ if Lowercase(currentParameter) = '/language' then begin
+ foundStart := true;
+ foundLanguage := true;
+ parametersString := parametersString + ' ' + currentParameter;
+ end;
+ end;
+ end;
+ if not foundLanguage then begin
+ parametersString := parametersString + ' /language ' + ExpandConstant('{language}');
+ end;
+ if foundNoRun then begin
+ parametersString := parametersString + ' /norun';
+ end;
+ // For debugging comment out the following
+ //MsgBox(parametersString, mbInformation, MB_OK);
+
+ Result := parametersString;
+end;
+
+// Check if language group is installed
+function hasLanguageGroup(argument: String): Boolean;
+var
+ keyValue: String;
+ returnValue: Boolean;
+begin
+ returnValue := true;
+ if (RegQueryStringValue( HKLM, 'SYSTEM\CurrentControlSet\Control\Nls\Language Groups', argument, keyValue)) then begin
+ if Length(keyValue) = 0 then begin
+ returnValue := false;
+ end;
+ end;
+ Result := returnValue;
+end;
+
+function hasDotNet() : boolean;
+begin
+ Result := netfxspversion(NetFx4x, '') >= 71;
+end;
+
+// Initialize the setup
+function InitializeSetup(): Boolean;
+begin
+ // Check for .NET and install 4.7.1 if we don't have it
+ if not hasDotNet() then
+ begin
+ // Enhance installer, if needed, otherwise .NET installations won't work
+ msi20('2.0');
+ msi31('3.0');
+
+ //install .net 4.7.1
+ dotnetfx47(71);
+ end;
+ Result := true;
+end;
+
+function IsWindowsVersionOrNewer(Major, Minor: Integer): Boolean;
+var
+ Version: TWindowsVersion;
+begin
+ GetWindowsVersionEx(Version);
+ Result :=
+ (Version.Major > Major) or
+ ((Version.Major = Major) and (Version.Minor >= Minor));
+end;
+
+function IsWindows10OrNewer: Boolean;
+begin
+ Result := IsWindowsVersionOrNewer(10, 0);
+end;
+
+[Run]
+Filename: "{app}\{#ExeName}.exe"; Description: "{cm:startgreenshot}"; Parameters: "{code:GetParamsForGS}"; WorkingDir: "{app}"; Flags: nowait postinstall runasoriginaluser
+Filename: "http://getgreenshot.org/thank-you/?language={language}&version={#Version}"; Flags: shellexec runasoriginaluser
+
+[InstallDelete]
+Name: {app}; Type: dirifempty;
From 53c93e25b576b7c3397ae981e7f8d3206c79b794 Mon Sep 17 00:00:00 2001
From: jklingen
Date: Sun, 3 May 2020 18:27:33 +0200
Subject: [PATCH 035/224] Installer: Backport: Fix Prefix for German
Translation Message
---
Greenshot/releases/innosetup/setup.iss | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index 0c42af120..f15a578aa 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -1,4 +1,4 @@
-#define ExeName "Greenshot"
+#define ExeName "Greenshot"
#define Version GetEnv('BuildVersionSimple')
#define FileVersion GetEnv('AssemblyInformationalVersion')
#define BaseDir "..\..\.."
@@ -215,7 +215,7 @@ Name: startup; Description: {cm:startup}
de.confluence=Confluence Plug-in
de.default=Standard installation
-en.office=Microsoft Office Plug-in
+de.office=Microsoft Office Plug-in
de.externalcommand=Externes Kommando Plug-in
de.imgur=Imgur Plug-in (Siehe: http://imgur.com)
de.jira=Jira Plug-in
From 2a5ae1557e132b0d332bf7bdb094d462938059ca Mon Sep 17 00:00:00 2001
From: MXI
Date: Mon, 11 May 2020 00:03:53 +0300
Subject: [PATCH 036/224] Converters fix for release 1.3 (#204)
* Converters fix for release 1.3
---
.../Drawing/Fields/Binding/DecimalFloatConverter.cs | 8 ++++----
.../Drawing/Fields/Binding/DecimalIntConverter.cs | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs b/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs
index b4a4283e4..70581bc10 100644
--- a/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs
@@ -35,13 +35,13 @@ namespace Greenshot.Drawing.Fields.Binding {
}
protected override float convert(decimal o) {
- return Convert.ToInt16(o);
+ return Convert.ToSingle(o);
}
public static DecimalFloatConverter GetInstance()
- {
- return _uniqueInstance ??= new DecimalFloatConverter();
- }
+ {
+ return _uniqueInstance ??= new DecimalFloatConverter();
+ }
}
}
diff --git a/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs b/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs
index d71d27528..693e532dd 100644
--- a/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -35,13 +35,13 @@ namespace Greenshot.Drawing.Fields.Binding {
}
protected override int convert(decimal o) {
- return Convert.ToInt16(o);
+ return Convert.ToInt32(o);
}
public static DecimalIntConverter GetInstance()
- {
- return _uniqueInstance ??= new DecimalIntConverter();
- }
+ {
+ return _uniqueInstance ??= new DecimalIntConverter();
+ }
}
}
From 5db1f5564b660734b2fe18dee070e23be7c8d7da Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sun, 10 May 2020 23:04:31 +0200
Subject: [PATCH 037/224] Fixed the issue that someone could have a windows 10
version which is older than what we can support. (#207)
Also upgrade Inno Setup and SVG
---
Directory.Build.props | 2 +-
Greenshot/Greenshot.csproj | 2 +-
GreenshotPlugin/Core/WindowsVersion.cs | 7 ++++++-
GreenshotPlugin/GreenshotPlugin.csproj | 2 +-
GreenshotWin10Plugin/Win10Plugin.cs | 8 ++++++--
5 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 37b63badc..1415521cf 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -56,7 +56,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj
index 1b25c59a2..080651ceb 100644
--- a/Greenshot/Greenshot.csproj
+++ b/Greenshot/Greenshot.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/GreenshotPlugin/Core/WindowsVersion.cs b/GreenshotPlugin/Core/WindowsVersion.cs
index 6dd4faa08..cd263d518 100644
--- a/GreenshotPlugin/Core/WindowsVersion.cs
+++ b/GreenshotPlugin/Core/WindowsVersion.cs
@@ -41,7 +41,7 @@ namespace GreenshotPlugin.Core
public static bool IsWindows7OrLater { get; } = WinVersion.Major == 6 && WinVersion.Minor >= 1 || WinVersion.Major > 6;
public static bool IsWindows7OrLower { get; } = WinVersionTotal <= 6.1;
-
+
///
/// Test if the current OS is Windows 8.0
///
@@ -102,6 +102,11 @@ namespace GreenshotPlugin.Core
/// true if we are running on Windows XP or later
public static bool IsWindowsXpOrLater { get; } = WinVersion.Major >= 5 || WinVersion.Major == 5 && WinVersion.Minor >= 1;
+ ///
+ /// Returns the windows build number
+ ///
+ public static int BuildVersion => WinVersion.Build;
+
///
/// Test if the current Windows version is 10 and the build number or later
/// See the build numbers here
diff --git a/GreenshotPlugin/GreenshotPlugin.csproj b/GreenshotPlugin/GreenshotPlugin.csproj
index 1a9598bc0..574e0fafc 100644
--- a/GreenshotPlugin/GreenshotPlugin.csproj
+++ b/GreenshotPlugin/GreenshotPlugin.csproj
@@ -15,7 +15,7 @@
-
+
diff --git a/GreenshotWin10Plugin/Win10Plugin.cs b/GreenshotWin10Plugin/Win10Plugin.cs
index 1e0519071..53344f391 100644
--- a/GreenshotWin10Plugin/Win10Plugin.cs
+++ b/GreenshotWin10Plugin/Win10Plugin.cs
@@ -35,7 +35,9 @@ namespace GreenshotWin10Plugin
[Plugin("Win10", false)]
public sealed class Win10Plugin : IGreenshotPlugin
{
- public void Dispose()
+ private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(Win10Plugin));
+
+ public void Dispose()
{
Dispose(true);
}
@@ -58,8 +60,10 @@ namespace GreenshotWin10Plugin
/// true if plugin is initialized, false if not (doesn't show)
public bool Initialize()
{
- if (!WindowsVersion.IsWindows10OrLater)
+ // Here we check if the build version of Windows is actually what we support
+ if (!WindowsVersion.IsWindows10BuildOrLater(17763))
{
+ Log.WarnFormat("No support for Windows build {0}", WindowsVersion.BuildVersion);
return false;
}
From 6a09345649ab36fcc74db305a072597b2009927a Mon Sep 17 00:00:00 2001
From: Robin
Date: Mon, 20 Jul 2020 00:00:42 +0200
Subject: [PATCH 038/224] Fixed a typo Fixed #218 Added JPEG (vs JPG) as a
format which can be handled Updated dependencies
---
Greenshot/Greenshot.csproj | 2 +-
GreenshotJiraPlugin/GreenshotJiraPlugin.csproj | 2 +-
GreenshotPlugin/Core/ClipboardHelper.cs | 11 +++++++----
GreenshotPlugin/GreenshotPlugin.csproj | 2 +-
GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs | 10 +++++++++-
5 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj
index 080651ceb..03b68dc1b 100644
--- a/Greenshot/Greenshot.csproj
+++ b/Greenshot/Greenshot.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
index 5579b7dac..6901a31c5 100644
--- a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
+++ b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
@@ -12,6 +12,6 @@
-
+
\ No newline at end of file
diff --git a/GreenshotPlugin/Core/ClipboardHelper.cs b/GreenshotPlugin/Core/ClipboardHelper.cs
index 272624c26..3933ccf71 100644
--- a/GreenshotPlugin/Core/ClipboardHelper.cs
+++ b/GreenshotPlugin/Core/ClipboardHelper.cs
@@ -49,6 +49,7 @@ namespace GreenshotPlugin.Core {
private static readonly string FORMAT_PNG_OFFICEART = "PNG+Office Art";
private static readonly string FORMAT_17 = "Format17";
private static readonly string FORMAT_JPG = "JPG";
+ private static readonly string FORMAT_JPEG = "JPEG";
private static readonly string FORMAT_JFIF = "JFIF";
private static readonly string FORMAT_JFIF_OFFICEART = "JFIF+Office Art";
private static readonly string FORMAT_GIF = "GIF";
@@ -253,7 +254,9 @@ EndSelection:<<<<<<<4
|| dataObject.GetDataPresent(FORMAT_PNG)
|| dataObject.GetDataPresent(FORMAT_17)
|| dataObject.GetDataPresent(FORMAT_JPG)
- || dataObject.GetDataPresent(FORMAT_GIF)) {
+ || dataObject.GetDataPresent(FORMAT_JFIF)
+ || dataObject.GetDataPresent(FORMAT_JPEG)
+ || dataObject.GetDataPresent(FORMAT_GIF)) {
return true;
}
var imageFiles = GetImageFilenames(dataObject);
@@ -345,9 +348,9 @@ EndSelection:<<<<<<<4
if (formats != null && formats.Contains(FORMAT_PNG_OFFICEART) && formats.Contains(DataFormats.Dib)) {
// Outlook ??
Log.Info("Most likely the current clipboard contents come from Outlook, as this has a problem with PNG and others we place the DIB format to the front...");
- retrieveFormats = new[] { DataFormats.Dib, FORMAT_BITMAP, FORMAT_FILECONTENTS, FORMAT_PNG_OFFICEART, FORMAT_PNG, FORMAT_JFIF_OFFICEART, FORMAT_JPG, FORMAT_JFIF, DataFormats.Tiff, FORMAT_GIF };
+ retrieveFormats = new[] { DataFormats.Dib, FORMAT_BITMAP, FORMAT_FILECONTENTS, FORMAT_PNG_OFFICEART, FORMAT_PNG, FORMAT_JFIF_OFFICEART, FORMAT_JPG, FORMAT_JPEG, FORMAT_JFIF, DataFormats.Tiff, FORMAT_GIF };
} else {
- retrieveFormats = new[] { FORMAT_PNG_OFFICEART, FORMAT_PNG, FORMAT_17, FORMAT_JFIF_OFFICEART, FORMAT_JPG, FORMAT_JFIF, DataFormats.Tiff, DataFormats.Dib, FORMAT_BITMAP, FORMAT_FILECONTENTS, FORMAT_GIF };
+ retrieveFormats = new[] { FORMAT_PNG_OFFICEART, FORMAT_PNG, FORMAT_17, FORMAT_JFIF_OFFICEART, FORMAT_JPG, FORMAT_JPEG, FORMAT_JFIF, DataFormats.Tiff, DataFormats.Dib, FORMAT_BITMAP, FORMAT_FILECONTENTS, FORMAT_GIF };
}
foreach (string currentFormat in retrieveFormats) {
if (formats != null && formats.Contains(currentFormat)) {
@@ -700,7 +703,7 @@ EndSelection:<<<<<<<4
//now copy to clipboard
IDataObject dataObj = new DataObject();
dataObj.SetData(format.Name, false, obj);
- // Use false to make the object dissapear when the application stops.
+ // Use false to make the object disappear when the application stops.
SetDataObject(dataObj, true);
}
diff --git a/GreenshotPlugin/GreenshotPlugin.csproj b/GreenshotPlugin/GreenshotPlugin.csproj
index 574e0fafc..461aa6c84 100644
--- a/GreenshotPlugin/GreenshotPlugin.csproj
+++ b/GreenshotPlugin/GreenshotPlugin.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs b/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
index c5b5a8f4f..3ed89b95d 100644
--- a/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
+++ b/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
@@ -41,9 +41,17 @@ namespace GreenshotWin10Plugin.Processors {
}
var ocrProvider = SimpleServiceProvider.Current.GetInstance();
+ if (ocrProvider == null)
+ {
+ return false;
+ }
+
var ocrResult = Task.Run(async () => await ocrProvider.DoOcrAsync(surface)).Result;
- if (!ocrResult.HasContent) return false;
+ if (!ocrResult.HasContent)
+ {
+ return false;
+ }
captureDetails.OcrInformation = ocrResult;
From d602433c535dcb34dd1edfbffd2b6a0927e35b9d Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Tue, 21 Jul 2020 12:56:02 +0200
Subject: [PATCH 039/224] Added additional guards and a configuration for the
Win10 plugin, which disables the OCR by default.
---
GreenshotPicasaPlugin/PicasaConfiguration.cs | 12 ++++++------
GreenshotPlugin/Core/AbstractProcessor.cs | 2 +-
.../Processors/Win10OcrProcessor.cs | 13 ++++++++++++-
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/GreenshotPicasaPlugin/PicasaConfiguration.cs b/GreenshotPicasaPlugin/PicasaConfiguration.cs
index eb8eb7100..a1372f598 100644
--- a/GreenshotPicasaPlugin/PicasaConfiguration.cs
+++ b/GreenshotPicasaPlugin/PicasaConfiguration.cs
@@ -1,19 +1,19 @@
/*
* A Picasa Plugin for Greenshot
* Copyright (C) 2011 Francis Noel
- *
+ *
* For more information see: http://getgreenshot.org/
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -42,13 +42,13 @@ namespace GreenshotPicasaPlugin {
set;
}
- [IniProperty("UploadUser", Description = "The picasa user to upload to", DefaultValue = "default")]
+ [IniProperty("UploadUser", Description = "The Picasa user to upload to", DefaultValue = "default")]
public string UploadUser {
get;
set;
}
- [IniProperty("UploadAlbum", Description = "The picasa album to upload to", DefaultValue = "default")]
+ [IniProperty("UploadAlbum", Description = "The Picasa album to upload to", DefaultValue = "default")]
public string UploadAlbum {
get;
set;
diff --git a/GreenshotPlugin/Core/AbstractProcessor.cs b/GreenshotPlugin/Core/AbstractProcessor.cs
index 5e82b1d23..1dce1ab16 100644
--- a/GreenshotPlugin/Core/AbstractProcessor.cs
+++ b/GreenshotPlugin/Core/AbstractProcessor.cs
@@ -32,7 +32,7 @@ namespace GreenshotPlugin.Core {
return 1;
}
if (Priority == other.Priority) {
- return Description.CompareTo(other.Description);
+ return string.Compare(Description, other.Description, StringComparison.Ordinal);
}
return Priority - other.Priority;
}
diff --git a/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs b/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
index 3ed89b95d..6cab7b81d 100644
--- a/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
+++ b/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
@@ -21,6 +21,7 @@
using System.Threading.Tasks;
using GreenshotPlugin.Core;
+using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Ocr;
@@ -29,13 +30,23 @@ namespace GreenshotWin10Plugin.Processors {
/// This processor processes a capture to see if there is text on it
///
public class Win10OcrProcessor : AbstractProcessor {
+ private static readonly Win10Configuration Win10Configuration = IniConfig.GetIniSection();
public override string Designation => "Windows10OcrProcessor";
public override string Description => Designation;
public override bool ProcessCapture(ISurface surface, ICaptureDetails captureDetails)
{
- if (captureDetails.OcrInformation != null)
+ if (!Win10Configuration.AlwaysRunOCROnCapture)
+ {
+ return false;
+ }
+
+ if (surface == null)
+ {
+ return false;
+ }
+ if (captureDetails == null || captureDetails.OcrInformation != null)
{
return false;
}
From 1f7e4e296250b085156e3438fff38e389c676bf2 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Tue, 21 Jul 2020 12:58:58 +0200
Subject: [PATCH 040/224] Forgot to add the new class... Silly me....
---
GreenshotWin10Plugin/Win10Configuration.cs | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 GreenshotWin10Plugin/Win10Configuration.cs
diff --git a/GreenshotWin10Plugin/Win10Configuration.cs b/GreenshotWin10Plugin/Win10Configuration.cs
new file mode 100644
index 000000000..642296e94
--- /dev/null
+++ b/GreenshotWin10Plugin/Win10Configuration.cs
@@ -0,0 +1,33 @@
+/*
+ * A Picasa Plugin for Greenshot
+ * Copyright (C) 2011 Francis Noel
+ *
+ * For more information see: http://getgreenshot.org/
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+using GreenshotPlugin.IniFile;
+
+namespace GreenshotWin10Plugin
+{
+ ///
+ /// Description of Win10Configuration.
+ ///
+ [IniSection("Win10", Description = "Greenshot Win10 Plugin configuration")]
+ public class Win10Configuration : IniSection {
+ [IniProperty("AlwaysRunOCROnCapture", Description="Determines if OCR is run automatically on every capture", DefaultValue="False")]
+ public bool AlwaysRunOCROnCapture { get; set; }
+ }
+}
From 90d1e114e0346ce500f80edb5617f2b0946eca57 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Wed, 29 Jul 2020 10:34:52 +0200
Subject: [PATCH 041/224] BUG-2644: Fixed a NPRE when exporting to Powerpoint
when it's not running yet.
---
.../OfficeExport/PowerpointExporter.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs b/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs
index 237fea1f9..a9d5632c4 100644
--- a/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs
@@ -1,19 +1,19 @@
// Greenshot - a free and open source screenshot tool
// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
-//
+//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
+//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 1 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
@@ -243,7 +243,7 @@ namespace GreenshotOfficePlugin.OfficeExport
// Ignore, probably no PowerPoint running
return null;
}
- if (powerPointApplication.ComObject != null)
+ if (powerPointApplication?.ComObject != null)
{
InitializeVariables(powerPointApplication);
}
From 80c262d47f721af828a3f18c07054789a0863c74 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 6 Aug 2020 16:52:11 +0200
Subject: [PATCH 042/224] Improvement for #220, the size of the font is
calculated according to the size of the counter
---
Greenshot/Drawing/StepLabelContainer.cs | 39 ++++++-------------------
1 file changed, 9 insertions(+), 30 deletions(-)
diff --git a/Greenshot/Drawing/StepLabelContainer.cs b/Greenshot/Drawing/StepLabelContainer.cs
index 26510e515..b750fcb20 100644
--- a/Greenshot/Drawing/StepLabelContainer.cs
+++ b/Greenshot/Drawing/StepLabelContainer.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2012 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -40,9 +40,7 @@ namespace Greenshot.Drawing {
private readonly bool _drawAsRectangle = false;
- private float fontSize = 16;
-
- public StepLabelContainer(Surface parent) : base(parent) {
+ public StepLabelContainer(Surface parent) : base(parent) {
parent.AddStepLabel(this);
InitContent();
Init();
@@ -168,26 +166,6 @@ namespace Greenshot.Drawing {
return true;
}
- ///
- /// Make sure the size of the font is scaled
- ///
- ///
- public override void Transform(Matrix matrix) {
- Rectangle rect = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height);
- int widthBefore = rect.Width;
- int heightBefore = rect.Height;
-
- // Transform this container
- base.Transform(matrix);
- rect = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height);
-
- int widthAfter = rect.Width;
- int heightAfter = rect.Height;
- float factor = ((float)widthAfter / widthBefore + (float)heightAfter / heightBefore) / 2;
-
- fontSize *= factor;
- }
-
///
/// Override the parent, calculate the label number, than draw
///
@@ -209,6 +187,7 @@ namespace Greenshot.Drawing {
EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false);
}
+ float fontSize = Math.Min(Width,Height) / 1.4f;
using FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name);
using Font font = new Font(fam, fontSize, FontStyle.Bold, GraphicsUnit.Pixel);
TextContainer.DrawText(graphics, rect, 0, lineColor, false, _stringFormat, text, font);
@@ -219,9 +198,9 @@ namespace Greenshot.Drawing {
Color fillColor = GetFieldValueAsColor(FieldType.FILL_COLOR);
if (_drawAsRectangle) {
return RectangleContainer.RectangleClickableAt(rect, 0, fillColor, x, y);
- } else {
- return EllipseContainer.EllipseClickableAt(rect, 0, fillColor, x, y);
}
- }
+
+ return EllipseContainer.EllipseClickableAt(rect, 0, fillColor, x, y);
+ }
}
}
From ca0095491b65b5b6b76759ace0d4e9c750afe4dd Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 6 Aug 2020 17:02:26 +0200
Subject: [PATCH 043/224] Fixed an issue which was described in #217, also did
some hardening that it doesn't happen on other locations in the
TextContainer.
---
Greenshot/Drawing/TextContainer.cs | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index 939dd3de6..ddfb2918e 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -158,9 +158,15 @@ namespace Greenshot.Drawing
protected override void SwitchParent(Surface newParent)
{
- _parent.SizeChanged -= Parent_SizeChanged;
+ if (_parent != null)
+ {
+ _parent.SizeChanged -= Parent_SizeChanged;
+ }
base.SwitchParent(newParent);
- _parent.SizeChanged += Parent_SizeChanged;
+ if (_parent != null)
+ {
+ _parent.SizeChanged += Parent_SizeChanged;
+ }
}
private void Parent_SizeChanged(object sender, EventArgs e)
@@ -320,8 +326,12 @@ namespace Greenshot.Drawing
private void HideTextBox()
{
- _parent.Focus();
+ _parent?.Focus();
_textBox?.Hide();
+ if (_parent == null)
+ {
+ return;
+ }
_parent.KeysLocked = false;
_parent.Controls.Remove(_textBox);
}
From 7fd013b6c8598bc297d76638d6e2cbeb8463d6be Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Thu, 6 Aug 2020 21:19:50 +0200
Subject: [PATCH 044/224] Release/1.3 (#224)
* Update Italian language for 1.3 installer
* Update Italian language for 1.3
---
.../installer/language-installer-it-IT.xml | 14 ++
Greenshot/Languages/language-it-IT.xml | 147 +++++++++---------
2 files changed, 84 insertions(+), 77 deletions(-)
create mode 100644 Greenshot/Languages/installer/language-installer-it-IT.xml
diff --git a/Greenshot/Languages/installer/language-installer-it-IT.xml b/Greenshot/Languages/installer/language-installer-it-IT.xml
new file mode 100644
index 000000000..7aa745871
--- /dev/null
+++ b/Greenshot/Languages/installer/language-installer-it-IT.xml
@@ -0,0 +1,14 @@
+
+
+
+ Esegui {#ExeName} all'avvio di Windows
+ Esegui {#ExeName}
+ Plugin Jira
+ Plugin Confluence
+ Apri con comando esterno plugin
+ Plugin OCR (richiede Microsoft Office Document Imaging (MODI))
+ Plugin Imgur (vedi: http://imgur.com)
+ Lingue aggiuntive
+ Ottimizzazione prestazioni (può richiedere tempo).
+
+
\ No newline at end of file
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index bb553e735..cef5e4705 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -8,8 +8,7 @@
Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
Greenshot viene fornito SENZA ALCUNA GARANZIA.
Questo software è garuitio", e potete ri-distribuirlo secondo certe condizioni.
-Dettagli della General Public License GNU:
-
+Dettagli della General Public License GNU:
Notizie su Greenshot
Traduzione in Italiano curata da bovirus e tonytogna
Greenshot - Uno straordinario strumento per copiare immagini dallo schermo
@@ -20,19 +19,15 @@ La buona notizia è che puoi aiutarci ad eliminarlo segnalandoci l'errore.
Visita la pagina internet qui sotto, crea una nuova segnalazione errore e copia nella descrizione il
contenuto preso dall'area di testo.
-Aggiungi un riepilogo significativo e includi qualsiasi informazione tu consideri possa esserci d'aiuto per
-risolvere il problema.
-Inoltre apprezzeremo molto, se prima di inserire la segnaalzione, controllassi se esiste già una
-segnalazione per questo tipo di errore (puoi usare la ricerca)
-Grazie :)
-
+Aggiungi un riepilogo significativo e includi qualsiasi informazione tu consideri possa esserci d'aiuto per risolvere il problema.
+Inoltre apprezzeremo molto, se prima di inserire la segnalazione, controllassi se esiste già una segnalazione per questo tipo di errore (puoi usare la ricerca)
+Grazie :)
Errore
Annulla
Si è verificato un errore inaspettato durante la scrittura negli Appunti.
Nessuna immagine sugli Appunti.
- Greenshot non è riuscito a scrivere negli Appunti poichè il processo {0} teneva
- l'accesso bloccato.
+ Greenshot non è riuscito a scrivere negli Appunti poiché il processo {0} teneva l'accesso bloccato.
BMO (Bitmap Windows)
DIB (Device independent Bitmap)
@@ -73,9 +68,9 @@ Controlla i permessi di accesso per '{0}'.
Aiuto
Apri immagine da file
Apri ultimo percorso cattura
- Imposatzioni rapide
+ Impostazioni rapide
Impostazioni...
- Errori durente l'esportazione in {0}. Riprova.
+ Errori durante l'esportazione in {0}. Riprova.
In basso
Centro
Allineamento orizzontale
@@ -96,14 +91,14 @@ Controlla i permessi di accesso per '{0}'.
Grassetto
Bordi
Luminosità
- Cancella
- Errore durante l'accesso agli appunti. Ritenta nuovamente.
+ Annulla
+ Errore durante l'accesso agli Appunti. Ritenta nuovamente.
Chiudi
- Desideri salvare l'immagine?
- Salva l'immagine?
+ Vuoi salvare l'immagine?
+ Vuoi salvare l'immagine?
Conferma
- Copia immagine sugli appunti
- Copia percorso sugli appunti
+ Copia immagine negli Appunti
+ Copia percorso negli appunti
Copia
Ritaglia (C)
Strumento di selezione (ESC)
@@ -113,15 +108,15 @@ Controlla i permessi di accesso per '{0}'.
Giù fino in fondo
Disegna freccia (A)
Disegna ellisse (E)
- Disegna mano libera (F)
+ Disegna a mano libera (F)
Evidenzia (H)
Disegna linea (L)
Disegna rettangolo (R)
- Aggiungi casella di testo (T)
+ Aggiungi casella testo (T)
Duplica elementi selezionati
Modifica
Effetti
- E-Mail
+ Email
File
Dimensioni
Colore linea
@@ -130,7 +125,7 @@ Controlla i permessi di accesso per '{0}'.
Scala di grigi
Ingrandisci
Modalità evidenziazione
- Evidenzia il testo
+ Evidenzia testo
Aggiungi ombra
Immagine salvata su {0}.
Inserisci finestra
@@ -142,7 +137,7 @@ Controlla i permessi di accesso per '{0}'.
Offusca (O)
Sfuma
Modalità di offuscamento
- Offusca/ pixelize
+ Offusca/pixelizza
Oggetti
Apri cartella su Windows Explorer
Incolla
@@ -150,9 +145,9 @@ Controlla i permessi di accesso per '{0}'.
Qualità anteprima
Stampa
Ripeti azione {0}
- Azzera Dimensione
+ Azzera dimensione
Percentuale
- Pixels
+ Pixel
Ruota senso antiorario
Ruota senso orario
Salva
@@ -162,9 +157,9 @@ Controlla i permessi di accesso per '{0}'.
Stampa inviata a '{0}'.
Ombra
Ombra
- Immagine posta negli appunti (clipboard).
+ Immagine copiata negli Appunti.
Spessore linea
- Gestione Immagini di Greenshot
+ Gestione immagini di Greenshot
Bordi strappati
Annulla azione {0}
Su di un livello
@@ -176,19 +171,16 @@ Controlla i permessi di accesso per '{0}'.
È già attiva un'istanza di Greenshot.
Non è possibile salvare il file in {0}.
-Verifica l'accesso in scrittura nel percorso di salvataggio.
-
+Verifica l'accesso in scrittura nel percorso di salvataggio.
Il file "{0}" non può essere aperto.
Impossibile aprire il collegamento '{0}'.
Impossibile salvare l'immagine.
-È necessario trovare una destinazione valida.
-
+È necessario trovare una destinazione valida.
Il nome file o cartella generato non è valido.
-Correggi la maschera noem file e riprova.
-
+Correggi la maschera noem file e riprova.
Utente esperto
- Crea una immagine a 8bit se i colori sono meno di 256 el'immagine ha > 8 bit
- Controlla disponibilità Aggiornamenti versioni beta
+ Crea una immagine a 8bit se i colori sono meno di 256 e l'immagine ha > 8 bit
+ Controlla disponibilità aggiornamenti versioni beta
Formati degli Appunti
Numero per var. ${NUM} nel modello del nome file
Sono consapevole di ciò che sto facendo!
@@ -200,7 +192,7 @@ Correggi la maschera noem file e riprova.
Visualizza anteprima finestra nel menù di contesto (Vista e Windows 7)
Esportato in: {0}
Si è verificato un errore durante l'esportazione in {0}:
- Guida di Greenshot
+ Guida in linea Greenshot
Scorciatoie tastiera
Scegli la qualità dell'immagine JPEG.
OK
@@ -218,7 +210,7 @@ Correggi la maschera noem file e riprova.
Forza stampa in bianco e nero
Aggiungi data/ora nel piè di pagina
Opzioni di stampa di Greenshot
- Save come qualità predefinita e non chiedere più
+ Salva come qualità predefinita e non chiedere più
Qualità di Greenshot
Salva direttamente (usando le impostazioni preferite file destinazione)
Visualizza scelta opzioni di stampa ogni volta che stampi un'immagine
@@ -233,14 +225,14 @@ Correggi la maschera noem file e riprova.
Ogni volta che una immagine viene salvata copia percorso file negli Appunti
Destinazione immagine
Copia negli Appunti
- Apri in Gest. Immagini
+ Apri in Gestione immagini
Email
- Salva direttamente (usando le impostazioni esposte qui sotto)
+ Salva direttamente (usando impostazioni indicate qui sotto)
Salva come (visualizzando le scelte)
- Scegli la destinazione dinamicamente
+ Scegli dinamicamente la destinazione
Invia alla stampante
Gestione immagini
- Modello nome fFile
+ Modello nome file
Generali
Cattura Internet Explorer
Qualità JPEG
@@ -250,7 +242,7 @@ Correggi la maschera noem file e riprova.
${YYYY} anno, 4 numeri
${MM} mese, 2 numeri
${DD} giorno, 2 numeri
-${hh} ora, 2 nuemri
+${hh} ora, 2 numeri
${mm} minuti, 2 numeri
${ss} secondi, 2 numeri
${NUM} numero progressivo, 6 numeri
@@ -262,12 +254,11 @@ ${hostname} Nome PC
Puoi anche chiedere a Greenshot di creare le cartelle dinamicamente, usando la barra rovesciata (\) per
separare cartelle e nome file.
Esempio modello: ${YYYY}-${MM}-${DD}\${hh}-${mm}-${ss}
-creerà nelal destinazione predefinita una cartella con il giorno corrente , es: 2008-06-29.
+creerà nella destinazione predefinita una cartella con il giorno attuale, es: 2008-06-29.
Il nome del file di immagine sarà basato sull'orario attuale, es: 11_58_32 (più l'estensione definita nelle
-impostazioni)
-
+impostazioni)
Rete e aggiornamenti
- Destinazionione
+ Destinazione
Riproduci suono fotocamera
Componenti Aggiuntivi
Creato da
@@ -289,7 +280,7 @@ impostazioni)
Modello usato per generare il nome file in fase di salvataggio delle immagini
Lingua dell'interfaccia utente di Greenshot (richiede il riavvio)
Formato immagine predefinito
- Definisce se le scorciatoie Stamp, Ctrl + Stamp, Alt + Stamp sono riservate per uso globale di Greenshot dall'avvio del programma fino a quando viene chiuso.
+ Definisce se le scorciatoie 'Stamp', 'Ctrl+Stamp', 'Alt+Stamp' sono riservate per uso globale di Greenshot dall'avvio del programma fino a quando viene chiuso.
Percorso predefinito dove le immagini catturate vengono salvate (lascia vuoto per salvare sul desktop)
Usa proxy predefinito del sistema
Effetti
@@ -301,40 +292,42 @@ impostazioni)
Attendi finchè viene completata la cattura della pagina di Internet Explorer...
Attenzione
La registrazione della/e scorciatoie di tastiera "{0}" non è andata a buon fine.
-Questo problema è causato probabilmente da un altro software che richiede l'uso delle stesse scorciatoie di
-tastiera.
+Questo problema è causato probabilmente da un altro software che richiede l'uso delle stesse scorciatoie di tastiera.
E' possibile però variare le impostazioni delle scorciatoie, oppure disattivare il software.
-In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono comunque disponibili dal
-menù visualizzabile con il tasto destro del mouse sull'icona G nella barra.
-
+In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono comunque disponibili dal menù visualizzabile con il tasto destro del mouse sull'icona G nella barra.
- Usa colori personalizzati
- Mantieni trasparenza
- Automaticamente
- Usa i colori predefiniti
+ Usa colori personalizzati
+ Mantieni trasparenza
+ Automaticamente
+ Usa i colori predefiniti
Come visualizzata
- Dimensione icona
- Aggiungi conteggio
- Aggiungi nuvoletta
- Ridimensiona
- Impostazioni ridimensionamento
- Mantieni il rapporto dimensioni
- Larghezza
- Altezza
- Intensità ombra
- Offset ombra
- Impostazioni Ombreggiatura
- Spessore ombra
- Intervallo orizzontale dentellatura
- Impostazioni Bordi Strappati
- Dimensione dentellatura
- Intervallo verticale dentellatura
- Strappo lato sinistro
- Strappo lato destro
- Strappo lato in alto
- Strappo lato in basso
- Genera ombra
+
+ Intensità ombra
+ Offset ombra
+ Impostazioni ombreggiatura
+ Spessore ombra
+
+ Intervallo orizzontale dentellatura
+ Impostazioni bordi strappati
+ Dimensione dentellatura
+ Intervallo verticale dentellatura
+ Strappo lato sinistro
+ Strappo lato destro
+ Strappo lato in alto
+ Strappo lato in basso
+ Genera ombra
+
+ Aggiungi conteggio
+ Aggiungi nuvoletta
+
+ Ridimensiona
+ Impostazioni ridimensionamento
+ Mantieni rapporto dimensioni
+ Larghezza
+ Altezza
+ Dimensione icona
+
From 926855cd70b1dc065a3cc2124a88fa43f0ceb20e Mon Sep 17 00:00:00 2001
From: Peter F
Date: Thu, 6 Aug 2020 15:27:39 -0400
Subject: [PATCH 045/224] Add placeholder for random alphanumerics in filename
(#216)
---
Greenshot/Languages/language-en-US.xml | 1 +
GreenshotPlugin/Core/FilenameHelper.cs | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/Greenshot/Languages/language-en-US.xml b/Greenshot/Languages/language-en-US.xml
index f2f2e1137..319871fa4 100644
--- a/Greenshot/Languages/language-en-US.xml
+++ b/Greenshot/Languages/language-en-US.xml
@@ -232,6 +232,7 @@ ${hh} hour, 2 digits
${mm} minute, 2 digits
${ss} second, 2 digits
${NUM} incrementing number, 6 digits
+${RRR...} random alphanumerics, same length as 'R's
${title} Window title
${user} Windows user
${domain} Windows domain
diff --git a/GreenshotPlugin/Core/FilenameHelper.cs b/GreenshotPlugin/Core/FilenameHelper.cs
index 47987163f..23fdbd9b4 100644
--- a/GreenshotPlugin/Core/FilenameHelper.cs
+++ b/GreenshotPlugin/Core/FilenameHelper.cs
@@ -44,6 +44,8 @@ namespace GreenshotPlugin.Core {
private const int MaxTitleLength = 80;
private static readonly CoreConfiguration CoreConfig = IniConfig.GetIniSection();
private const string UnsafeReplacement = "_";
+ private static readonly Random RandomNumberGen = new Random();
+ private static readonly Regex RandRegexp = new Regex("^R+$", RegexOptions.Compiled);
///
/// Remove invalid characters from the fully qualified filename
@@ -160,6 +162,7 @@ namespace GreenshotPlugin.Core {
string replaceValue = string.Empty;
string variable = match.Groups["variable"].Value;
string parameters = match.Groups["parameters"].Value;
+ string randomChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
if (parameters.Length > 0) {
string[] parms = SplitRegexp.Split(parameters);
@@ -241,6 +244,10 @@ namespace GreenshotPlugin.Core {
if (filenameSafeMode) {
replaceValue = MakePathSafe(replaceValue);
}
+ } else if (RandRegexp.IsMatch(variable)) {
+ for (int i = 0; i < variable.Length; i++) {
+ replaceValue += randomChars[RandomNumberGen.Next(randomChars.Length)];
+ }
} else {
// Handle other variables
// Default use "now" for the capture take´n
From f159a871ca191360fe7afb4c695d6eea19f89d0f Mon Sep 17 00:00:00 2001
From: jklingen
Date: Thu, 6 Aug 2020 21:29:55 +0200
Subject: [PATCH 046/224] Propagate DPI Changes down to Drawable Containers and
Adorners and Resize Grippers Accordingly (#200)
* Propagate DPI Changes down to Drawable Containers and Adorners and Resize Grippers Accordingly
* Make Grippers Slightly Larger
* Add White Border to Grippers for Better Contrast on Dark Backgrounds
---
Greenshot/Drawing/Adorners/AbstractAdorner.cs | 13 +-
Greenshot/Drawing/Adorners/MoveAdorner.cs | 6 +-
Greenshot/Drawing/Adorners/ResizeAdorner.cs | 6 +-
Greenshot/Drawing/Adorners/TargetAdorner.cs | 237 +++++++++---------
Greenshot/Drawing/DrawableContainer.cs | 12 +
Greenshot/Drawing/DrawableContainerList.cs | 13 +-
Greenshot/Drawing/Surface.cs | 11 +
Greenshot/Forms/ImageEditorForm.cs | 2 +
.../Interfaces/Drawing/Adorners/IAdorner.cs | 6 +
.../Interfaces/Drawing/Container.cs | 7 +
10 files changed, 185 insertions(+), 128 deletions(-)
diff --git a/Greenshot/Drawing/Adorners/AbstractAdorner.cs b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
index 70a56f29e..f6032d62f 100644
--- a/Greenshot/Drawing/Adorners/AbstractAdorner.cs
+++ b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
@@ -22,6 +22,7 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
+using GreenshotPlugin.Core;
using GreenshotPlugin.Interfaces.Drawing;
using GreenshotPlugin.Interfaces.Drawing.Adorners;
@@ -31,7 +32,8 @@ namespace Greenshot.Drawing.Adorners
{
public virtual EditStatus EditStatus { get; protected set; } = EditStatus.IDLE;
- protected Size _size = new Size(4, 4);
+ private static readonly Size defaultSize = new Size(6, 6);
+ protected Size _size = defaultSize;
public AbstractAdorner(IDrawableContainer owner)
{
@@ -139,6 +141,15 @@ namespace Greenshot.Drawing.Adorners
}
}
+ ///
+ /// Adjust UI elements to the supplied DPI settings
+ ///
+ ///
+ public void AdjustToDpi(uint dpi)
+ {
+ _size = DpiHelper.ScaleWithDpi(defaultSize, dpi);
+ }
+
///
/// Draw the adorner
///
diff --git a/Greenshot/Drawing/Adorners/MoveAdorner.cs b/Greenshot/Drawing/Adorners/MoveAdorner.cs
index d07a25ef7..916d569f4 100644
--- a/Greenshot/Drawing/Adorners/MoveAdorner.cs
+++ b/Greenshot/Drawing/Adorners/MoveAdorner.cs
@@ -145,14 +145,12 @@ namespace Greenshot.Drawing.Adorners
var bounds = BoundsOnSurface;
GraphicsState state = targetGraphics.Save();
- targetGraphics.SmoothingMode = SmoothingMode.None;
targetGraphics.CompositingMode = CompositingMode.SourceCopy;
- targetGraphics.PixelOffsetMode = PixelOffsetMode.Half;
- targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
try
{
- targetGraphics.FillRectangle(Brushes.Black, bounds.X, bounds.Y, bounds.Width, bounds.Height);
+ targetGraphics.FillRectangle(Brushes.Black, bounds);
+ targetGraphics.DrawRectangle(new Pen(Brushes.White), bounds);
}
catch
{
diff --git a/Greenshot/Drawing/Adorners/ResizeAdorner.cs b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
index dce78b461..d624add48 100644
--- a/Greenshot/Drawing/Adorners/ResizeAdorner.cs
+++ b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
@@ -172,12 +172,10 @@ namespace Greenshot.Drawing.Adorners
var bounds = BoundsOnSurface;
GraphicsState state = targetGraphics.Save();
- targetGraphics.SmoothingMode = SmoothingMode.None;
targetGraphics.CompositingMode = CompositingMode.SourceCopy;
- targetGraphics.PixelOffsetMode = PixelOffsetMode.Half;
- targetGraphics.InterpolationMode = InterpolationMode.NearestNeighbor;
- targetGraphics.FillRectangle(Brushes.Black, bounds.X, bounds.Y, bounds.Width , bounds.Height);
+ targetGraphics.FillRectangle(Brushes.Black, bounds);
+ targetGraphics.DrawRectangle(new Pen(Brushes.White), bounds);
targetGraphics.Restore(state);
}
}
diff --git a/Greenshot/Drawing/Adorners/TargetAdorner.cs b/Greenshot/Drawing/Adorners/TargetAdorner.cs
index 67c01a533..542657c14 100644
--- a/Greenshot/Drawing/Adorners/TargetAdorner.cs
+++ b/Greenshot/Drawing/Adorners/TargetAdorner.cs
@@ -1,118 +1,119 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Windows.Forms;
-using GreenshotPlugin.Interfaces.Drawing;
-
-namespace Greenshot.Drawing.Adorners
-{
- ///
- /// This implements the special "gripper" for the Speech-Bubble tail
- ///
- public class TargetAdorner : AbstractAdorner
- {
-
- public TargetAdorner(IDrawableContainer owner, Point location) : base(owner)
- {
- Location = location;
- }
-
- ///
- /// Handle the mouse down
- ///
- ///
- ///
- public override void MouseDown(object sender, MouseEventArgs mouseEventArgs)
- {
- EditStatus = EditStatus.MOVING;
- }
-
- ///
- /// Handle the mouse move
- ///
- ///
- ///
- public override void MouseMove(object sender, MouseEventArgs mouseEventArgs)
- {
- if (EditStatus != EditStatus.MOVING)
- {
- return;
- }
-
- Owner.Invalidate();
- Point newGripperLocation = new Point(mouseEventArgs.X, mouseEventArgs.Y);
- Rectangle imageBounds = new Rectangle(0, 0, Owner.Parent.Image.Width, Owner.Parent.Image.Height);
- // Check if gripper inside the parent (surface), if not we need to move it inside
- // This was made for BUG-1682
- if (!imageBounds.Contains(newGripperLocation))
- {
- if (newGripperLocation.X > imageBounds.Right)
- {
- newGripperLocation.X = imageBounds.Right - 5;
- }
- if (newGripperLocation.X < imageBounds.Left)
- {
- newGripperLocation.X = imageBounds.Left;
- }
- if (newGripperLocation.Y > imageBounds.Bottom)
- {
- newGripperLocation.Y = imageBounds.Bottom - 5;
- }
- if (newGripperLocation.Y < imageBounds.Top)
- {
- newGripperLocation.Y = imageBounds.Top;
- }
- }
-
- Location = newGripperLocation;
- Owner.Invalidate();
- }
-
- ///
- /// Draw the adorner
- ///
- /// PaintEventArgs
- public override void Paint(PaintEventArgs paintEventArgs)
- {
- Graphics targetGraphics = paintEventArgs.Graphics;
-
- var bounds = BoundsOnSurface;
- targetGraphics.FillRectangle(Brushes.Green, bounds.X, bounds.Y, bounds.Width, bounds.Height);
- }
-
- ///
- /// Made sure this adorner is transformed
- ///
- /// Matrix
- public override void Transform(Matrix matrix)
- {
- if (matrix == null)
- {
- return;
- }
- Point[] points = new[] { Location };
- matrix.TransformPoints(points);
- Location = points[0];
- }
- }
-}
+/*
+ * Greenshot - a free and open source screenshot tool
+ * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ *
+ * For more information see: http://getgreenshot.org/
+ * The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+using GreenshotPlugin.Interfaces.Drawing;
+
+namespace Greenshot.Drawing.Adorners
+{
+ ///
+ /// This implements the special "gripper" for the Speech-Bubble tail
+ ///
+ public class TargetAdorner : AbstractAdorner
+ {
+
+ public TargetAdorner(IDrawableContainer owner, Point location) : base(owner)
+ {
+ Location = location;
+ }
+
+ ///
+ /// Handle the mouse down
+ ///
+ ///
+ ///
+ public override void MouseDown(object sender, MouseEventArgs mouseEventArgs)
+ {
+ EditStatus = EditStatus.MOVING;
+ }
+
+ ///
+ /// Handle the mouse move
+ ///
+ ///
+ ///
+ public override void MouseMove(object sender, MouseEventArgs mouseEventArgs)
+ {
+ if (EditStatus != EditStatus.MOVING)
+ {
+ return;
+ }
+
+ Owner.Invalidate();
+ Point newGripperLocation = new Point(mouseEventArgs.X, mouseEventArgs.Y);
+ Rectangle imageBounds = new Rectangle(0, 0, Owner.Parent.Image.Width, Owner.Parent.Image.Height);
+ // Check if gripper inside the parent (surface), if not we need to move it inside
+ // This was made for BUG-1682
+ if (!imageBounds.Contains(newGripperLocation))
+ {
+ if (newGripperLocation.X > imageBounds.Right)
+ {
+ newGripperLocation.X = imageBounds.Right - 5;
+ }
+ if (newGripperLocation.X < imageBounds.Left)
+ {
+ newGripperLocation.X = imageBounds.Left;
+ }
+ if (newGripperLocation.Y > imageBounds.Bottom)
+ {
+ newGripperLocation.Y = imageBounds.Bottom - 5;
+ }
+ if (newGripperLocation.Y < imageBounds.Top)
+ {
+ newGripperLocation.Y = imageBounds.Top;
+ }
+ }
+
+ Location = newGripperLocation;
+ Owner.Invalidate();
+ }
+
+ ///
+ /// Draw the adorner
+ ///
+ /// PaintEventArgs
+ public override void Paint(PaintEventArgs paintEventArgs)
+ {
+ Graphics targetGraphics = paintEventArgs.Graphics;
+
+ var bounds = BoundsOnSurface;
+ targetGraphics.FillRectangle(Brushes.Green, bounds);
+ targetGraphics.DrawRectangle(new Pen(Brushes.White), bounds);
+ }
+
+ ///
+ /// Made sure this adorner is transformed
+ ///
+ /// Matrix
+ public override void Transform(Matrix matrix)
+ {
+ if (matrix == null)
+ {
+ return;
+ }
+ Point[] points = new[] { Location };
+ matrix.TransformPoints(points);
+ Location = points[0];
+ }
+ }
+}
diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs
index 33339ee00..a85cee791 100644
--- a/Greenshot/Drawing/DrawableContainer.cs
+++ b/Greenshot/Drawing/DrawableContainer.cs
@@ -369,6 +369,18 @@ namespace Greenshot.Drawing
Draw(graphics, renderMode);
}
+ ///
+ /// Adjust UI elements to the supplied DPI settings
+ ///
+ ///
+ public void AdjustToDpi(uint dpi)
+ {
+ foreach(var adorner in Adorners)
+ {
+ adorner.AdjustToDpi(dpi);
+ }
+ }
+
public virtual bool Contains(int x, int y) {
return Bounds.Contains(x , y);
}
diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs
index 3d200598e..666986002 100644
--- a/Greenshot/Drawing/DrawableContainerList.cs
+++ b/Greenshot/Drawing/DrawableContainerList.cs
@@ -604,5 +604,16 @@ namespace Greenshot.Drawing {
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
Dispose(true);
}
- }
+
+ ///
+ /// Adjust UI elements to the supplied DPI settings
+ ///
+ ///
+ public void AdjustToDpi(uint dpi)
+ {
+ foreach (var drawableContainer in this) {
+ drawableContainer.AdjustToDpi(dpi);
+ }
+ }
+ }
}
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index 6c89238f0..d7a4487fc 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -432,6 +432,17 @@ namespace Greenshot.Drawing
///
public ICaptureDetails CaptureDetails { get; set; }
+ ///
+ /// Adjust UI elements to the supplied DPI settings
+ ///
+ ///
+ public void AdjustToDpi(uint dpi)
+ {
+ foreach (var element in this._elements) {
+ element.AdjustToDpi(dpi);
+ }
+ }
+
///
/// Base Surface constructor
///
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index d397b8bc8..ab7d037f7 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -101,6 +101,8 @@ namespace Greenshot {
destinationsToolStrip.ImageScalingSize = newSize;
propertiesToolStrip.ImageScalingSize = newSize;
propertiesToolStrip.MinimumSize = new Size(150, newSize.Height + 10);
+
+ _surface.AdjustToDpi(dpi);
}
public ImageEditorForm(ISurface iSurface, bool outputMade)
diff --git a/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs b/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
index e35af2141..b8e087101 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
@@ -87,5 +87,11 @@ namespace GreenshotPlugin.Interfaces.Drawing.Adorners
///
/// Matrix
void Transform(Matrix matrix);
+
+ ///
+ /// Adjust UI elements to the supplied DPI settings
+ ///
+ ///
+ void AdjustToDpi(uint dpi);
}
}
diff --git a/GreenshotPlugin/Interfaces/Drawing/Container.cs b/GreenshotPlugin/Interfaces/Drawing/Container.cs
index f4065801a..c8d85bdd7 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Container.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Container.cs
@@ -120,6 +120,12 @@ namespace GreenshotPlugin.Interfaces.Drawing
/// Available adorners for the DrawableContainer
///
IList Adorners { get; }
+
+ ///
+ /// Adjust UI elements to the supplied DPI settings
+ ///
+ ///
+ void AdjustToDpi(uint dpi);
}
public interface IDrawableContainerList : IList, IDisposable
@@ -167,6 +173,7 @@ namespace GreenshotPlugin.Interfaces.Drawing
void PushElementsToBottom(IDrawableContainerList elements);
void ShowContextMenu(MouseEventArgs e, ISurface surface);
void HandleFieldChangedEvent(object sender, FieldChangedEventArgs e);
+ void AdjustToDpi(uint dpi);
}
public interface ITextContainer : IDrawableContainer
From 63a9df5844a2e0b1760805c790e9fa1fbfd8dad7 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 6 Aug 2020 22:00:59 +0200
Subject: [PATCH 047/224] Fixed two issues with the adorner resize, sometime
the initial value wasn't set and also there were some drawing artifacts.
Still needs testing though.
---
Greenshot/Drawing/Adorners/AbstractAdorner.cs | 17 +++++-----
Greenshot/Drawing/DrawableContainer.cs | 31 +++++++++----------
GreenshotPlugin/Core/DpiHelper.cs | 4 +++
.../Interfaces/Drawing/Adorners/IAdorner.cs | 15 ++++++---
.../Interfaces/Drawing/Container.cs | 10 +++---
5 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/Greenshot/Drawing/Adorners/AbstractAdorner.cs b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
index f6032d62f..ecf0ce53d 100644
--- a/Greenshot/Drawing/Adorners/AbstractAdorner.cs
+++ b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -32,11 +32,12 @@ namespace Greenshot.Drawing.Adorners
{
public virtual EditStatus EditStatus { get; protected set; } = EditStatus.IDLE;
- private static readonly Size defaultSize = new Size(6, 6);
- protected Size _size = defaultSize;
+ private static readonly Size DefaultSize = new Size(6, 6);
+ protected Size _size;
public AbstractAdorner(IDrawableContainer owner)
{
+ _size = DpiHelper.ScaleWithDpi(DefaultSize, 0);
Owner = owner;
}
@@ -144,10 +145,10 @@ namespace Greenshot.Drawing.Adorners
///
/// Adjust UI elements to the supplied DPI settings
///
- ///
+ /// uint
public void AdjustToDpi(uint dpi)
{
- _size = DpiHelper.ScaleWithDpi(defaultSize, dpi);
+ _size = DpiHelper.ScaleWithDpi(DefaultSize, dpi);
}
///
diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs
index a85cee791..87b555914 100644
--- a/Greenshot/Drawing/DrawableContainer.cs
+++ b/Greenshot/Drawing/DrawableContainer.cs
@@ -32,6 +32,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
+using System.Linq;
using System.Runtime.Serialization;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
@@ -205,10 +206,8 @@ namespace Greenshot.Drawing
}
public Size Size {
- get {
- return new Size(width, height);
- }
- set {
+ get => new Size(width, height);
+ set {
width = value.Width;
height = value.Height;
}
@@ -219,15 +218,9 @@ namespace Greenshot.Drawing
///
[NonSerialized]
private IList _adorners = new List();
- public IList Adorners
- {
- get
- {
- return _adorners;
- }
- }
+ public IList Adorners => _adorners;
- [NonSerialized]
+ [NonSerialized]
// will store current bounds of this DrawableContainer before starting a resize
protected Rectangle _boundsBeforeResize = Rectangle.Empty;
@@ -236,8 +229,8 @@ namespace Greenshot.Drawing
protected RectangleF _boundsAfterResize = RectangleF.Empty;
public Rectangle Bounds {
- get { return GuiRectangle.GetGuiRectangle(Left, Top, Width, Height); }
- set {
+ get => GuiRectangle.GetGuiRectangle(Left, Top, Width, Height);
+ set {
Left = Round(value.Left);
Top = Round(value.Top);
Width = Round(value.Width);
@@ -279,8 +272,12 @@ namespace Greenshot.Drawing
return new Rectangle(Point.Empty, _parent.Image.Size);
}
}
- // Take a base safetymargin
+ // Take a base safety margin
int lineThickness = 5;
+
+ // add adorner size
+ lineThickness += Adorners.Max(adorner => Math.Max(adorner.Bounds.Width, adorner.Bounds.Height));
+
if (HasField(FieldType.LINE_THICKNESS)) {
lineThickness += GetFieldValueAsInt(FieldType.LINE_THICKNESS);
}
@@ -372,10 +369,10 @@ namespace Greenshot.Drawing
///
/// Adjust UI elements to the supplied DPI settings
///
- ///
+ /// uint with dpi value
public void AdjustToDpi(uint dpi)
{
- foreach(var adorner in Adorners)
+ foreach(var adorner in Adorners)
{
adorner.AdjustToDpi(dpi);
}
diff --git a/GreenshotPlugin/Core/DpiHelper.cs b/GreenshotPlugin/Core/DpiHelper.cs
index 2c67eb1b5..171cf19ee 100644
--- a/GreenshotPlugin/Core/DpiHelper.cs
+++ b/GreenshotPlugin/Core/DpiHelper.cs
@@ -35,6 +35,10 @@ namespace GreenshotPlugin.Core
/// double
public static float DpiScaleFactor(uint dpi)
{
+ if (dpi == 0)
+ {
+ dpi = Dpi;
+ }
return (float)dpi / DefaultScreenDpi;
}
diff --git a/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs b/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
index b8e087101..5d729376c 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -32,6 +32,11 @@ namespace GreenshotPlugin.Interfaces.Drawing.Adorners
///
bool IsActive { get; }
+ ///
+ /// These are the bounds of the adorner
+ ///
+ Rectangle Bounds { get; }
+
///
/// The current edit status, this is needed to locate the adorner to send events to
///
@@ -44,7 +49,7 @@ namespace GreenshotPlugin.Interfaces.Drawing.Adorners
///
/// Is the current point "over" the Adorner?
- /// If this is the case, the
+ /// If this is the case, the
///
/// Point to test
/// true if so
diff --git a/GreenshotPlugin/Interfaces/Drawing/Container.cs b/GreenshotPlugin/Interfaces/Drawing/Container.cs
index c8d85bdd7..0044a0bb0 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Container.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Container.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -124,7 +124,7 @@ namespace GreenshotPlugin.Interfaces.Drawing
///
/// Adjust UI elements to the supplied DPI settings
///
- ///
+ /// uint
void AdjustToDpi(uint dpi);
}
From 133438ab554c387477c0f606290bb810ea453fdd Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 6 Aug 2020 22:28:00 +0200
Subject: [PATCH 048/224] After work for #224
---
Greenshot/releases/innosetup/setup.iss | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index f15a578aa..f4b7cae5b 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -200,6 +200,7 @@ Name: de; MessagesFile: compiler:Languages\German.isl
Name: es; MessagesFile: compiler:Languages\Spanish.isl
Name: fi; MessagesFile: compiler:Languages\Finnish.isl
Name: fr; MessagesFile: compiler:Languages\French.isl
+Name: it; MessagesFile: compiler:Languages\Italian.isl
Name: nl; MessagesFile: compiler:Languages\Dutch.isl
Name: lt; MessagesFile: Languages\Latvian.isl
Name: nn; MessagesFile: Languages\NorwegianNynorsk.isl
@@ -277,6 +278,30 @@ fr.startgreenshot=Démarrer {#ExeName}
fr.startup=Lancer {#ExeName} au démarrage de Windows
fr.win10=Greffon Windows 10
+it.startup=Esegui {#ExeName} all''avvio di Windows
+it.startgreenshot=Esegui {#ExeName}
+it.jira=Plugin Jira
+it.confluence=Plugin Confluence
+it.externalcommand=Apri con comando esterno plugin
+it.ocr=Plugin OCR (richiede Microsoft Office Document Imaging (MODI))
+it.imgur=Plugin Imgur (vedi: http://imgur.com)
+it.language=Lingue aggiuntive
+it.optimize=Ottimizzazione prestazioni (può richiedere tempo).
+it.win10=Plugin Windows 10
+
+lt.confluence=Confluence spraudnis
+lt.default=${default}
+lt.office=Microsoft Office spraudnis
+lt.externalcommand=Pielāgotu darbību spraudnis
+lt.imgur=Imgur spraudnis (Vairāk šeit: http://imgur.com)
+lt.jira=Jira spraudnis
+lt.language=Papildus valodas
+lt.ocr=OCR spraudnis (nepieciešams Microsoft Office Document Imaging (MODI))
+lt.optimize=Uzlaboju veikstpēju, tas prasīs kādu laiciņu.
+lt.startgreenshot=Palaist {#ExeName}
+lt.startup=Palaist {#ExeName} uzsākot darbus
+lt.win10=Windows 10 spraudnis
+
lt.confluence=Confluence spraudnis
lt.default=${default}
lt.office=Microsoft Office spraudnis
From dd91c97cb85e380461b493158b32f25487df047f Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 7 Aug 2020 08:02:18 +0200
Subject: [PATCH 049/224] Small improvement for the translations in the
installer [skip ci]
---
Greenshot/releases/innosetup/setup.iss | 60 +++++++++++++-------------
1 file changed, 31 insertions(+), 29 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index f4b7cae5b..8d2546a4e 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -214,32 +214,32 @@ Name: startup; Description: {cm:startup}
[CustomMessages]
-de.confluence=Confluence Plug-in
-de.default=Standard installation
-de.office=Microsoft Office Plug-in
-de.externalcommand=Externes Kommando Plug-in
-de.imgur=Imgur Plug-in (Siehe: http://imgur.com)
-de.jira=Jira Plug-in
-de.language=Zusätzliche Sprachen
-de.ocr=OCR Plug-in (benötigt Microsoft Office Document Imaging (MODI))
-de.optimize=Optimierung der Leistung, kann etwas dauern.
-de.startgreenshot={#ExeName} starten
-de.startup={#ExeName} starten wenn Windows hochfährt
-de.win10=Windows 10 Plug-in
-
en.confluence=Confluence plug-in
en.default=Default installation
-en.office=Microsoft Office plug-in
en.externalcommand=Open with external command plug-in
en.imgur=Imgur plug-in (See: http://imgur.com)
en.jira=Jira plug-in
en.language=Additional languages
en.ocr=OCR plug-in (needs Microsoft Office Document Imaging (MODI))
+en.office=Microsoft Office plug-in
en.optimize=Optimizing performance, this may take a while.
en.startgreenshot=Start {#ExeName}
en.startup=Start {#ExeName} with Windows start
en.win10=Windows 10 plug-in
+de.confluence=Confluence Plug-in
+de.default=Standard installation
+de.externalcommand=Externes Kommando Plug-in
+de.imgur=Imgur Plug-in (Siehe: http://imgur.com)
+de.jira=Jira Plug-in
+de.language=Zusätzliche Sprachen
+de.ocr=OCR Plug-in (benötigt Microsoft Office Document Imaging (MODI))
+de.office=Microsoft Office Plug-in
+de.optimize=Optimierung der Leistung, kann etwas dauern.
+de.startgreenshot={#ExeName} starten
+de.startup={#ExeName} starten wenn Windows hochfährt
+de.win10=Windows 10 Plug-in
+
es.confluence=Extensión para Confluence
es.default=${default}
es.externalcommand=Extensión para abrir con programas externos
@@ -254,12 +254,12 @@ es.win10=Extensión para Windows 10
fi.confluence=Confluence-liitännäinen
fi.default=${default}
-fi.office=Microsoft-Office-liitännäinen
fi.externalcommand=Avaa Ulkoinen komento-liitännäisellä
fi.imgur=Imgur-liitännäinen (Katso: http://imgur.com)
fi.jira=Jira-liitännäinen
fi.language=Lisäkielet
fi.ocr=OCR-liitännäinen (Tarvitaan: Microsoft Office Document Imaging (MODI))
+fi.office=Microsoft-Office-liitännäinen
fi.optimize=Optimoidaan suorituskykyä, tämä voi kestää hetken.
fi.startgreenshot=Käynnistä {#ExeName}
fi.startup=Käynnistä {#ExeName} Windowsin käynnistyessä
@@ -267,36 +267,38 @@ fi.win10=Windows 10-liitännäinen
fr.confluence=Greffon Confluence
fr.default=${default}
-fr.office=Greffon Microsoft Office
fr.externalcommand=Ouvrir avec le greffon de commande externe
fr.imgur=Greffon Imgur (Voir: http://imgur.com)
fr.jira=Greffon Jira
fr.language=Langues additionnelles
fr.ocr=Greffon OCR (nécessite Document Imaging de Microsoft Office [MODI])
+fr.office=Greffon Microsoft Office
fr.optimize=Optimisation des performances, Ceci peut prendre un certain temps.
fr.startgreenshot=Démarrer {#ExeName}
fr.startup=Lancer {#ExeName} au démarrage de Windows
fr.win10=Greffon Windows 10
-it.startup=Esegui {#ExeName} all''avvio di Windows
-it.startgreenshot=Esegui {#ExeName}
-it.jira=Plugin Jira
it.confluence=Plugin Confluence
+it.default=Installazione di default
it.externalcommand=Apri con comando esterno plugin
-it.ocr=Plugin OCR (richiede Microsoft Office Document Imaging (MODI))
it.imgur=Plugin Imgur (vedi: http://imgur.com)
+it.jira=Plugin Jira
it.language=Lingue aggiuntive
+it.ocr=Plugin OCR (richiede Microsoft Office Document Imaging (MODI))
+it.office=Plugin Microsoft Office
it.optimize=Ottimizzazione prestazioni (può richiedere tempo).
+it.startgreenshot=Esegui {#ExeName}
+it.startup=Esegui {#ExeName} all''avvio di Windows
it.win10=Plugin Windows 10
lt.confluence=Confluence spraudnis
lt.default=${default}
-lt.office=Microsoft Office spraudnis
lt.externalcommand=Pielāgotu darbību spraudnis
lt.imgur=Imgur spraudnis (Vairāk šeit: http://imgur.com)
lt.jira=Jira spraudnis
lt.language=Papildus valodas
lt.ocr=OCR spraudnis (nepieciešams Microsoft Office Document Imaging (MODI))
+lt.office=Microsoft Office spraudnis
lt.optimize=Uzlaboju veikstpēju, tas prasīs kādu laiciņu.
lt.startgreenshot=Palaist {#ExeName}
lt.startup=Palaist {#ExeName} uzsākot darbus
@@ -304,12 +306,12 @@ lt.win10=Windows 10 spraudnis
lt.confluence=Confluence spraudnis
lt.default=${default}
-lt.office=Microsoft Office spraudnis
lt.externalcommand=Pielāgotu darbību spraudnis
lt.imgur=Imgur spraudnis (Vairāk šeit: http://imgur.com)
lt.jira=Jira spraudnis
lt.language=Papildus valodas
lt.ocr=OCR spraudnis (nepieciešams Microsoft Office Document Imaging (MODI))
+lt.office=Microsoft Office spraudnis
lt.optimize=Uzlaboju veikstpēju, tas prasīs kādu laiciņu.
lt.startgreenshot=Palaist {#ExeName}
lt.startup=Palaist {#ExeName} uzsākot darbus
@@ -317,12 +319,12 @@ lt.win10=Windows 10 spraudnis
nl.confluence=Confluence plug-in
nl.default=Standaardinstallatie
-nl.office=Microsoft Office plug-in
nl.externalcommand=Openen met extern commando plug-in
nl.imgur=Imgur plug-in (zie: http://imgur.com)
nl.jira=Jira plug-in
nl.language=Extra talen
nl.ocr=OCR plug-in (vereist Microsoft Office Document Imaging (MODI))
+nl.office=Microsoft Office plug-in
nl.optimize=Prestaties verbeteren, even geduld.
nl.startgreenshot={#ExeName} starten
nl.startup={#ExeName} automatisch starten met Windows
@@ -330,12 +332,12 @@ nl.win10=Windows 10 plug-in
nn.confluence=Confluence-tillegg
nn.default=Default installation
-nn.office=Microsoft Office Tillegg
nn.externalcommand=Tillegg for å opne med ekstern kommando
nn.imgur=Imgur-tillegg (sjå http://imgur.com)
nn.jira=Jira-tillegg
nn.language=Andre språk
nn.ocr=OCR-tillegg (krev Microsoft Office Document Imaging (MODI))
+nn.office=Microsoft Office Tillegg
nn.optimize=Optimaliserar ytelse, dette kan ta litt tid...
nn.startgreenshot=Start {#ExeName}
nn.startup=Start {#ExeName} når Windows startar
@@ -343,12 +345,12 @@ nn.win10=Windows 10 Tillegg
ru.confluence=Плагин Confluence
ru.default=${default}
-ru.office=Плагин Microsoft Office
ru.externalcommand=Открыть с плагином с помощью внешней команды
ru.imgur=Плагин Imgur (смотрите https://imgur.com/)
ru.jira=Плагин Jira
ru.language=Дополнительные языки
ru.ocr=Плагин OCR (требуется Microsoft Office Document Imaging (MODI))
+ru.office=Плагин Microsoft Office
ru.optimize=Идет оптимизация производительности, это может занять некоторое время.
ru.startgreenshot=Запустить {#ExeName}
ru.startup=Запускать {#ExeName} при старте Windows
@@ -366,15 +368,15 @@ sr.startgreenshot=Покрени Гриншот
sr.startup=Покрени програм са системом
sr.win10=Прикључак за Windows 10
-sv.startup=Starta {#ExeName} med Windows
-sv.startgreenshot=Starta {#ExeName}
-sv.jira=Jira-insticksprogram
sv.confluence=Confluence-insticksprogram
sv.externalcommand=Öppna med externt kommando-insticksprogram
-sv.ocr=OCR-insticksprogram (kräver Microsoft Office Document Imaging (MODI))
sv.imgur=Imgur-insticksprogram (Se: http://imgur.com)
+sv.jira=Jira-insticksprogram
sv.language=Ytterligare språk
+sv.ocr=OCR-insticksprogram (kräver Microsoft Office Document Imaging (MODI))
sv.optimize=Optimerar prestanda, detta kan ta en stund.
+sv.startgreenshot=Starta {#ExeName}
+sv.startup=Starta {#ExeName} med Windows
sv.win10=Windows 10-insticksprogram
uk.confluence=Плагін Confluence
From eb2e7261e3294832452e9e19a95104f74d3fea71 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 7 Aug 2020 09:40:33 +0200
Subject: [PATCH 050/224] Improvements for the translation possibilities in the
installer, and some enhancements for italian as was suggested in #225 [skip
ci]
---
Greenshot/releases/innosetup/setup.iss | 143 ++++++++++++++++---------
1 file changed, 95 insertions(+), 48 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index 8d2546a4e..57b171a7f 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -213,16 +213,58 @@ Name: uk; MessagesFile: compiler:Languages\Ukrainian.isl
Name: startup; Description: {cm:startup}
[CustomMessages]
+;Language names in the original language
+dexfranconia=Frängisch (Deutsch)
+arSY=العربية
+caCA=Català
+csCZ=Ceština
+daDK=Dansk
+elGR=ελληνικά
+esES=Español
+etEE=Eesti
+faIR=پارسی
+fiFI=Suomi
+frFR=Français
+frQC=Français - Québec
+heIL=עִבְרִית
+huHU=Magyar
+idID=Bahasa Indonesia
+itIT=Italiano
+jaJP=日本語
+kabDZ=Taqbaylit
+koKR=한국어
+ltLT=Lietuvių
+lvLV=Latviski
+nnNO=Nynorsk
+plPL=Polski
+ptBR=Português do Brasil
+ptPT=Português de Portugal
+roRO=Română
+ruRU=Pусский
+skSK=Slovenčina
+slSI=Slovenščina
+srRS=Српски
+svSE=Svenska
+trTR=Türk
+ukUA=Українська
+viVN=Việt
+zhCN=简体中文
+zhTW=繁體中文
+en.box=Box plug-in
en.confluence=Confluence plug-in
en.default=Default installation
+en.dropbox=Dropbox plug-in
en.externalcommand=Open with external command plug-in
+en.flickr=Flickr plug-in
en.imgur=Imgur plug-in (See: http://imgur.com)
en.jira=Jira plug-in
en.language=Additional languages
en.ocr=OCR plug-in (needs Microsoft Office Document Imaging (MODI))
en.office=Microsoft Office plug-in
en.optimize=Optimizing performance, this may take a while.
+en.photobucket=Photobucket plug-in
+en.picasa=Picasa plug-in
en.startgreenshot=Start {#ExeName}
en.startup=Start {#ExeName} with Windows start
en.win10=Windows 10 plug-in
@@ -278,15 +320,20 @@ fr.startgreenshot=Démarrer {#ExeName}
fr.startup=Lancer {#ExeName} au démarrage de Windows
fr.win10=Greffon Windows 10
+it.box=Plugin Box
it.confluence=Plugin Confluence
it.default=Installazione di default
+it.dropbox=Plugin Dropbox
it.externalcommand=Apri con comando esterno plugin
+it.flickr=Plugin Flickr
it.imgur=Plugin Imgur (vedi: http://imgur.com)
it.jira=Plugin Jira
it.language=Lingue aggiuntive
it.ocr=Plugin OCR (richiede Microsoft Office Document Imaging (MODI))
it.office=Plugin Microsoft Office
it.optimize=Ottimizzazione prestazioni (può richiedere tempo).
+it.photobucket=Plugin Photobucket
+it.picasa=Plugin Picasa
it.startgreenshot=Esegui {#ExeName}
it.startup=Esegui {#ExeName} all''avvio di Windows
it.win10=Plugin Windows 10
@@ -411,56 +458,56 @@ Name: "custom"; Description: "{code:CustomInstall}"; Flags: iscustom
[Components]
Name: "greenshot"; Description: "Greenshot"; Types: default full compact custom; Flags: fixed
-Name: "plugins\office"; Description: {cm:office}; Types: default full custom; Flags: disablenouninstallwarning
-Name: "plugins\ocr"; Description: {cm:ocr}; Types: default full custom; Flags: disablenouninstallwarning
-Name: "plugins\jira"; Description: {cm:jira}; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\imgur"; Description: {cm:imgur}; Types: default full custom; Flags: disablenouninstallwarning
-Name: "plugins\confluence"; Description: {cm:confluence}; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
-Name: "plugins\box"; Description: "Box Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\dropbox"; Description: "Dropbox Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\photobucket"; Description: "Photobucket Plugin"; Types: full custom; Flags: disablenouninstallwarning
-Name: "plugins\win10"; Description: "Windows 10 Plugin"; Types: default full custom; Flags: disablenouninstallwarning; Check: IsWindows10OrNewer()
+Name: "plugins\box"; Description: {cm:box}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\confluence"; Description: {cm:confluence}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\dropbox"; Description: {cm:dropbox}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\flickr"; Description: {cm:flickr}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\imgur"; Description: {cm:imgur}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\jira"; Description: {cm:jira}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\ocr"; Description: {cm:ocr}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\office"; Description: {cm:office}; Types: default full custom; Flags: disablenouninstallwarning
+Name: "plugins\photobucket"; Description: {cm:photobucket}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\picasa"; Description: {cm:picasa}; Types: full custom; Flags: disablenouninstallwarning
+Name: "plugins\win10"; Description: {cm:win10}; Types: default full custom; Flags: disablenouninstallwarning; Check: IsWindows10OrNewer()
Name: "languages"; Description: {cm:language}; Types: full custom; Flags: disablenouninstallwarning
-Name: "languages\arSY"; Description: "العربية"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
-Name: "languages\caCA"; Description: "Català"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\csCZ"; Description: "Ceština"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\daDK"; Description: "Dansk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\dexfranconia"; Description: "Frängisch (Deutsch)"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\elGR"; Description: "ελληνικά"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('4')
-Name: "languages\esES"; Description: "Español"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\etEE"; Description: "Eesti"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\faIR"; Description: "پارسی"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
-Name: "languages\fiFI"; Description: "Suomi"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\frFR"; Description: "Français"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\frQC"; Description: "Français - Québec"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\heIL"; Description: "עִבְרִית"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('c')
-Name: "languages\huHU"; Description: "Magyar"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\idID"; Description: "Bahasa Indonesia"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\itIT"; Description: "Italiano"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\jaJP"; Description: "日本語"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('7')
-Name: "languages\koKR"; Description: "한국어"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
-Name: "languages\kabDZ"; Description: "Taqbaylit"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
-Name: "languages\ltLT"; Description: "Lietuvių"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
-Name: "languages\lvLV"; Description: "Latviski"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
-Name: "languages\nnNO"; Description: "Nynorsk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\plPL"; Description: "Polski"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\ptBR"; Description: "Português do Brasil"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\ptPT"; Description: "Português de Portugal"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\ruRU"; Description: "Pусский"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
-Name: "languages\roRO"; Description: "Română"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\skSK"; Description: "Slovenčina"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\slSI"; Description: "Slovenščina"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
-Name: "languages\srRS"; Description: "Српски"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
-Name: "languages\svSE"; Description: "Svenska"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
-Name: "languages\trTR"; Description: "Türk"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('6')
-Name: "languages\ukUA"; Description: "Українська"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
-Name: "languages\viVN"; Description: "Việt"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
-Name: "languages\zhCN"; Description: "简体中文"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
-Name: "languages\zhTW"; Description: "繁體中文"; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
+Name: "languages\arSY"; Description: {cm:arSY}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
+Name: "languages\caCA"; Description: {cm:caCA}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\csCZ"; Description: {cm:csCZ}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\daDK"; Description: {cm:daDK}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\dexfranconia"; Description: {cm:dexfranconia}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\elGR"; Description: {cm:elGR}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('4')
+Name: "languages\esES"; Description: {cm:esES}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\etEE"; Description: {cm:etEE}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\faIR"; Description: {cm:faIR}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('d')
+Name: "languages\fiFI"; Description: {cm:fiFI}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\frFR"; Description: {cm:frFR}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\frQC"; Description: {cm:frQC}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\heIL"; Description: {cm:heIL}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('c')
+Name: "languages\huHU"; Description: {cm:huHU}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\idID"; Description: {cm:idID}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\itIT"; Description: {cm:itIT}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\jaJP"; Description: {cm:jaJP}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('7')
+Name: "languages\kabDZ"; Description: {cm:kabDZ}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
+Name: "languages\koKR"; Description: {cm:koKR}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('8')
+Name: "languages\ltLT"; Description: {cm:ltLT}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
+Name: "languages\lvLV"; Description: {cm:lvLV}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('3')
+Name: "languages\nnNO"; Description: {cm:nnNO}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\plPL"; Description: {cm:plPL}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\ptBR"; Description: {cm:ptBR}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\ptPT"; Description: {cm:ptPT}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\roRO"; Description: {cm:roRO}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\ruRU"; Description: {cm:ruRU}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
+Name: "languages\skSK"; Description: {cm:skSK}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\slSI"; Description: {cm:slSI}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('2')
+Name: "languages\srRS"; Description: {cm:srRS}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
+Name: "languages\svSE"; Description: {cm:svSE}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('1')
+Name: "languages\trTR"; Description: {cm:trTR}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('6')
+Name: "languages\ukUA"; Description: {cm:ukUA}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('5')
+Name: "languages\viVN"; Description: {cm:viVN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('e')
+Name: "languages\zhCN"; Description: {cm:zhCN}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('a')
+Name: "languages\zhTW"; Description: {cm:zhTW}; Types: full custom; Flags: disablenouninstallwarning; Check: hasLanguageGroup('9')
[Code]
// Do we have a regular user trying to install this?
function IsRegularUser(): Boolean;
From f2f47c64dbc8034e1bcba6b5031f4c439d237248 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Sat, 8 Aug 2020 12:20:53 +0200
Subject: [PATCH 051/224] Update setup.iss (#228)
Add Italian translation for additional lanuage
Modify script to use "Uninstall" string localziation
Add "Uninstall" string localziation for English and Italian.
---
Greenshot/releases/innosetup/setup.iss | 42 ++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index 57b171a7f..38636fce7 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -189,7 +189,7 @@ Root: HKLM; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: st
[Icons]
Name: {group}\{#ExeName}; Filename: {app}\{#ExeName}.exe; WorkingDir: {app}; AppUserModelID: "{#ExeName}"
-Name: {group}\Uninstall {#ExeName}; Filename: {uninstallexe}; WorkingDir: {app};
+Name: {group}\{cm:UninstallIconDescription} {#ExeName}; Filename: {uninstallexe}; WorkingDir: {app};
Name: {group}\Readme.txt; Filename: {app}\readme.txt; WorkingDir: {app}
Name: {group}\License.txt; Filename: {app}\license.txt; WorkingDir: {app}
@@ -268,6 +268,7 @@ en.picasa=Picasa plug-in
en.startgreenshot=Start {#ExeName}
en.startup=Start {#ExeName} with Windows start
en.win10=Windows 10 plug-in
+en.UninstallIconDescription=Uninstall
de.confluence=Confluence Plug-in
de.default=Standard installation
@@ -322,7 +323,7 @@ fr.win10=Greffon Windows 10
it.box=Plugin Box
it.confluence=Plugin Confluence
-it.default=Installazione di default
+it.default=Installazione predefinita
it.dropbox=Plugin Dropbox
it.externalcommand=Apri con comando esterno plugin
it.flickr=Plugin Flickr
@@ -337,6 +338,43 @@ it.picasa=Plugin Picasa
it.startgreenshot=Esegui {#ExeName}
it.startup=Esegui {#ExeName} all''avvio di Windows
it.win10=Plugin Windows 10
+it.UninstallIconDescription=Disinstalla
+it.dexfranconia=Fräncofono (Tedesco)
+it.arSY=Arabo (Siria)
+it.caCA=Catalano
+it.csCZ=Ceco
+it.daDK=Danese
+it.elGR=Greco
+it.esES=Spagnolo
+it.etEE=Eesti
+it.faIR=Farsi (Iran)
+it.fiFI=Suomi
+it.frFR=Francese
+it.frQC=Francese (Québec)
+it.heIL=Ebraico (Israele)
+it.huHU=Ungherese
+it.idID=Bahasa Indonesia
+it.itIT=Italiano
+it.jaJP=Giapponese
+it.kabDZ=Taqbaylit
+it.koKR=Coreano
+it.ltLT=Lituano
+it.lvLV=Latviano
+it.nnNO=Norvegese
+it.plPL=Polacco
+it.ptBR=Portoghese (Brasile)
+it.ptPT=Portoghese (Portogallo)
+it.roRO=Rumeno
+it.ruRU=Russo
+it.skSK=Slovacco
+it.slSI=Sloveno
+it.srRS=Serbo (Russia)
+it.svSE=Svedese
+it.trTR=Türco
+it.ukUA=Ucraino
+it.viVN=Vietnamita
+it.zhCN=Cinese (Semplificato)
+it.zhTW=Cinese (Taiwan)
lt.confluence=Confluence spraudnis
lt.default=${default}
From 90ad04caf7c49d9e2b55eecb390cc17690fafb06 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Tue, 11 Aug 2020 16:59:11 +0200
Subject: [PATCH 052/224] italian language files update (#230)
* Update Italian language (GUI)
* Update Italian language (website)
* Update italian.iss
* Update Italin language Box plugin
* Update Italian language Confluence Plugin
* Update Italian language Dropbox plugin
* Update Italian langueg External command plugin
* Update italian language Flickr plugin
* Update Italian language Imgur plugin
* Update Italian language Jira plugin
* Update Italian language OCR plugin
* Update Italian language Photobucket plugin
* Update Italian language Picasa plugin
---
Greenshot/Languages/language-it-IT.xml | 14 +++---
.../website/language-website-it-IT.xml | 20 ++++----
.../innosetup/scripts/lang/italian.iss | 10 ++--
.../Languages/language_boxplugin-it-IT.xml | 12 ++---
.../language_confluenceplugin-it-IT.xml | 22 ++++-----
.../language_dropboxplugin-it-IT.xml | 12 ++---
.../language_externalcommandplugin-it-IT.xml | 46 +++++++++++++------
.../Languages/language_flickrplugin-it-IT.xml | 12 ++---
.../Languages/language_imgurplugin-it-IT.xml | 21 +++++----
.../Languages/language_jiraplugin-it-IT.xml | 14 +++---
.../Languages/language_ocrplugin-it-IT.xml | 6 +--
.../language_photobucketplugin-it-IT.xml | 10 ++--
.../Languages/language_picasaplugin-it-IT.xml | 44 ++++++++++++------
13 files changed, 142 insertions(+), 101 deletions(-)
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index cef5e4705..93379225a 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -1,15 +1,15 @@
- Seganal le anomalie a
- Se ti piace Greenshot, dacci il tuo aiuto su:
- Greenshot è disponibile su GitHub in
+ Segnala eventuali bug a questo indirizzo
+ Se ti piace Greenshot, supportaci su:
+ Greenshot è disponibile nel repository GitHub
Libreria icone del set icone Fugue di Yusuke Kamiyamane (Creative Commons Attribution 3.0 license)
Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
Greenshot viene fornito SENZA ALCUNA GARANZIA.
Questo software è garuitio", e potete ri-distribuirlo secondo certe condizioni.
Dettagli della General Public License GNU:
- Notizie su Greenshot
+ Info su Greenshot
Traduzione in Italiano curata da bovirus e tonytogna
Greenshot - Uno straordinario strumento per copiare immagini dallo schermo
Chiudi
@@ -49,7 +49,7 @@ Chiudi la finestra e riprova nuovamente.
Accesso rifiutato a Greenshot
Il file di configurazione di Greenshot non può essere salvato.
Controlla i permessi di accesso per '{0}'.
- Notizie su Greenshot
+ Info su Greenshot
Cattura regione
Apri immagine dagli Appunti
Cattura schermo intero
@@ -260,8 +260,8 @@ impostazioni)
Rete e aggiornamenti
Destinazione
Riproduci suono fotocamera
- Componenti Aggiuntivi
- Creato da
+ Componenti aggiuntivi
+ Autore
Percorso DLL
Nome
Versione
diff --git a/Greenshot/Languages/website/language-website-it-IT.xml b/Greenshot/Languages/website/language-website-it-IT.xml
index 31f1b1dfb..6e4d8c737 100644
--- a/Greenshot/Languages/website/language-website-it-IT.xml
+++ b/Greenshot/Languages/website/language-website-it-IT.xml
@@ -2,18 +2,18 @@
Download
- Greenshot - strumento di cattura gratis ottimizzato per la produttività
- Greenshot è gratuito e open source
- Se si scopre che Greenshot risparmiare un sacco di tempo e / o denaro, è possibile <a href="/support/">sostenere lo sviluppo</a> di questa strumento di cattura.
- Greenshot è pubblicato sotto licenza <a href="http://en.wikipedia.org/wiki/GNU_General_Public_License" target="_blank">GPL</a>. Questo software può essere scaricato e utilizzato gratuitamente, anche in un ambiente commerciale.
+ Greenshot - è uno strumento di cattura gratuito ottimizzato per la produttività
+ Greenshot è gratuito ed open source
+ Se scopri che Greenshot ti fa risparmiare un sacco di tempo e/o denaro, puoi <a href="/support/">sostenere lo sviluppo</a> di questa strumento di cattura.
+ Greenshot è pubblicato sotto licenza <a href="http://en.wikipedia.org/wiki/GNU_General_Public_License" target="_blank">GPL</a>. Questo software può essere scaricato e usato gratuitamente, anche in un ambiente commerciale.
Vuoi saperne di più?
- Naturalmente c'è molto di più che si può fare per Greenshot. Check out alcuni <a href="/screenshots/">screenshot</a> di Greenshot in azione o provare la versione <a href="/downloads/">più recente</a>.
+ Naturalmente Greenshot pò fare molto di più per te. Guarda alcunr <a title="schermate di Greenshot in azione" href="/screenshots/">screenshots</a> of Greenshot in action or try the <a title="Scarica la versione stabile più recente di Greenshot" href="/downloads/">latest release</a>.
Greenshot - Che cosa è questo?
- Rapidamente rendere le immagini di uno schermo selezionata regione, finestra o completo schermo. È possibile anche catturare le pagine web da Internet Explorer completi (scorrimento).
- Annotare, evidenziare o nascondere parti di screenshot è facilmente.
- Greenshot è uno strumento di cattura schermo per Windows con leggeri caratteristiche essenziali:
+ Cattura facilmente una zona, una finestra o lo schermo per intero. È possibile anche catturare le pagine web complete (incluso lo scorrimento) in Internet Explorer.
+ Annota, evidenzia o nascondi facilmente parti di una schermata.
+ Greenshot è uno strumento di cattura schermo per Windows con le seguenti funzionalità principali:
... e molte altre opzioni per creare e lavorare con le immagini ogni giorno.
- Esportazione screenshot in vari modi: salvare in un file, stampa, copia negli appunti, attaccare a un messaggio, inviare ai programmi di Office o caricare su siti di foto come Flickr e Picasa, tra gli altri.
- Essere facile da capire e configurare, Greenshot è uno strumento efficace per i project manager, sviluppatori di software, redattori tecnici, collaudatori e chiunque altro la creazione di screenshot.
+ Esporta la schermate in vari modi: salvataggio in un file, stampa, copia negli Appunti, come allegati ad un messaggio, invio a programmi come Office o upload in siti di foto come Flickr e Picasa, etc.
+ Greenshot è facile da comprendere e configurare, ed è uno strumento efficace per i project manager, sviluppatori di software, redattori tecnici, collaudatori e chiunque altro crea schermate.
\ No newline at end of file
diff --git a/Greenshot/releases/innosetup/scripts/lang/italian.iss b/Greenshot/releases/innosetup/scripts/lang/italian.iss
index 67efc61ce..534bf7db6 100644
--- a/Greenshot/releases/innosetup/scripts/lang/italian.iss
+++ b/Greenshot/releases/innosetup/scripts/lang/italian.iss
@@ -4,14 +4,14 @@ Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
[CustomMessages]
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
it.lcid=1040
-it.depdownload_msg=Le seguenti applicazioni sono necessarie per procedere con l'installazione:%n%n%1%nSi desidera scaricarle ed installarle adesso?
+it.depdownload_msg=Per procedere con l'installazione sono necessarie le seguenti applicazioni:%n%n%1%nVuoi scaricare ed installarle le applicazioni adesso?
it.depdownload_memo_title=Dipendenze da scaricare
it.depinstall_memo_title=Dipendenze da installare
-it.depinstall_title=Installazione delle dipendenze
-it.depinstall_description=Si prega di attendere mentre vengono installate le dipendenze necessarie sul computer.
+it.depinstall_title=Installazione dipendenze
+it.depinstall_description=Attendi mentre vengono installate le dipendenze necessarie.
it.depinstall_status=Installazione %1...
-it.depinstall_missing=%1 deve essere installato per poter continuare. Si prega di installare %1 ed eseguire nuovamente il programma d'installazione.
-it.depinstall_error=Si è verificato un errore durante l'installazione delle dipendenze. Si prega di riavviare il computer ed eseguire nuovamente il programma d'installazione oppure di installare manualmente le seguenti applicazioni:%n
+it.depinstall_missing=per poter continuare deve essere installato %1.%n%nInstalla %1 ed esegui nuovamente il programma d'installazione.
+it.depinstall_error=Si è verificato un errore durante l'installazione delle dipendenze.%n%nRiavvia il computer ed esegui nuovamente il programma d'installazione oppure installa manualmente le seguenti dipendenze:%n
it.isxdl_langfile=italian.ini
diff --git a/GreenshotBoxPlugin/Languages/language_boxplugin-it-IT.xml b/GreenshotBoxPlugin/Languages/language_boxplugin-it-IT.xml
index e53e65909..786acfac8 100644
--- a/GreenshotBoxPlugin/Languages/language_boxplugin-it-IT.xml
+++ b/GreenshotBoxPlugin/Languages/language_boxplugin-it-IT.xml
@@ -1,14 +1,14 @@
-
+
- Collegamento agli appunti
+ Collegamento agli Appunti
- Dopo il carico
+ Dopo il caricamento
- Configurazione di Box
+ Impostazioni di Box
Carica su Box
@@ -17,7 +17,7 @@
Impostazioni di Box
- Immagine caricata correttamente su Box!
+ caricamento immagine su Box completato!
Si è verificato un errore durante il caricamento su Box:
@@ -26,7 +26,7 @@
Formato immagine
- Comunicazione con Box. Attendere prego...
+ Comunicazione con Box...
\ No newline at end of file
diff --git a/GreenshotConfluencePlugin/Languages/language_confluenceplugin-it-IT.xml b/GreenshotConfluencePlugin/Languages/language_confluenceplugin-it-IT.xml
index 1f145ac54..ba12ed4f4 100644
--- a/GreenshotConfluencePlugin/Languages/language_confluenceplugin-it-IT.xml
+++ b/GreenshotConfluencePlugin/Languages/language_confluenceplugin-it-IT.xml
@@ -1,14 +1,14 @@
-
+
Impostazioni di Confluence
- Si è verificato un problema durante il collegamento: {0}
+ Si è verificato un problema durante il caricamento: {0}
- Indirizzo Url
+ Indirizzo URL
Timeout
@@ -17,10 +17,10 @@
Utente
- Parola d'ordine
+ Password
- Inserisci le tue credenziali di collegamento a Confluence
+ Inserisci le credenziali di accesso a Confluence
OK
@@ -32,7 +32,7 @@
Carica su Confluence
- Immagine caricata correttamente su Confluence!
+ Caricamento immagine su Confluence completato!
Si è verificato un errore durante il caricamento su Confluence:
@@ -44,10 +44,10 @@
Formato di caricamento
- Copia Wikimarkup sugli appunti
+ Copia Wikimarkup negli Appunti
- Nome File
+ Nome file
Carica
@@ -59,7 +59,7 @@
Cerca pagine
- Naviga pagine
+ Sfoglia pagine
Cerca testo
@@ -68,13 +68,13 @@
Cerca
- Caricamento dati di Confluence, attendere prego...
+ Caricamento dati di Confluence...
Includi spazi personali in ricerca e navigazione
- Trasferimento dati verso Confluence, attendere prego...
+ Trasferimento dati su Confluence...
\ No newline at end of file
diff --git a/GreenshotDropboxPlugin/Languages/language_dropboxplugin-it-IT.xml b/GreenshotDropboxPlugin/Languages/language_dropboxplugin-it-IT.xml
index ec618c12e..e295eebab 100644
--- a/GreenshotDropboxPlugin/Languages/language_dropboxplugin-it-IT.xml
+++ b/GreenshotDropboxPlugin/Languages/language_dropboxplugin-it-IT.xml
@@ -1,17 +1,17 @@
-
+
- Collegamento agli appunti
+ Collegamento agli Appunti
Apri cronologia
- Dopo il carico
+ Dopo il caricamento
- Configurazione di Dropbox
+ Impostazioni di Dropbox
Carica su Dropbox
@@ -20,7 +20,7 @@
Impostazioni di Dropbox
- Immagine caricata correttamente su Dropbox!
+ Caricamento immagine su Dropbox completato!
Si è verificato un errore durante il caricamento su Dropbox:
@@ -29,7 +29,7 @@
Formato immagine
- Comunicazione con Dropbox. Attendere prego...
+ Comunicazione con Dropbox...
\ No newline at end of file
diff --git a/GreenshotExternalCommandPlugin/Languages/language_externalcommandplugin-it-IT.xml b/GreenshotExternalCommandPlugin/Languages/language_externalcommandplugin-it-IT.xml
index 3c0b77f87..164465ae9 100644
--- a/GreenshotExternalCommandPlugin/Languages/language_externalcommandplugin-it-IT.xml
+++ b/GreenshotExternalCommandPlugin/Languages/language_externalcommandplugin-it-IT.xml
@@ -1,15 +1,35 @@
-
-
- Configurazione comandi esterni
- Parametri
- Comando
- {0} è il nome file della vostra immagine
- Nome
- Elimina
- Configurazione comando
- Modifica
- Nuovo
- Impostazioni comandi esterni
-
+
+
+
+ Impostazioni comandi esterni
+
+
+ Impostazioni comandi esterni
+
+
+ Impostazioni comando
+
+
+ Nuovo
+
+
+ Elimina
+
+
+ Modifica
+
+
+ Nome
+
+
+ Comando
+
+
+ Argomenti
+
+
+ {0} è il noem file della schermata
+
+
\ No newline at end of file
diff --git a/GreenshotFlickrPlugin/Languages/language_flickrplugin-it-IT.xml b/GreenshotFlickrPlugin/Languages/language_flickrplugin-it-IT.xml
index 88347e287..0630da364 100644
--- a/GreenshotFlickrPlugin/Languages/language_flickrplugin-it-IT.xml
+++ b/GreenshotFlickrPlugin/Languages/language_flickrplugin-it-IT.xml
@@ -1,5 +1,5 @@
-
+
Visibilità
@@ -8,13 +8,13 @@
Liv. sicurezza
- Collegamento agli appunti
+ Collegamento agli Appunti
- Dopo il carico
+ Dopo il caricamento
- Configurazione Flickr
+ Impostazioni Flickr
Carica su Flickr
@@ -23,7 +23,7 @@
Impostazioni di Flickr
- Immagine caricata correttamente su Flickr!
+ Caricamento immagine su Flickr completato!
Si è verificato un errore durante il caricamento su Flickr:
@@ -32,7 +32,7 @@
Formato immagine
- Comunicazione con Flickr. Attendere prego...
+ Comunicazione con Flickr...
Pubblica
diff --git a/GreenshotImgurPlugin/Languages/language_imgurplugin-it-IT.xml b/GreenshotImgurPlugin/Languages/language_imgurplugin-it-IT.xml
index f3bb72df1..ebab6e677 100644
--- a/GreenshotImgurPlugin/Languages/language_imgurplugin-it-IT.xml
+++ b/GreenshotImgurPlugin/Languages/language_imgurplugin-it-IT.xml
@@ -1,5 +1,5 @@
-
+
Carica su Imgur
@@ -8,7 +8,7 @@
Impostazioni Imgur
- Url
+ URL
OK
@@ -17,34 +17,37 @@
Annulla
- Immagine caricata correttamente su Imgur!
+ caricamento immagine su Imgur completato!
- Si è verificato un problema durante il collegamento:
+ Si è verificato un problema durante il caricamento:
Formato immagine
- Comunicazione con Imgur. Attendere prego...
+ Comunicazione con Imgur...
- Sei sicuro si voler eliminare l'immagine {0} da Imgur?
+ Sei sicuro di voler eliminare l'immagine {0} da Imgur?
- Sei sicuro si voler eliminare la cronologia locale di Imgur?
+ Sei sicuro di voler eliminare la cronologia locale di Imgur?
Elimina Imgur {0}
+
+ Usa accesso anonimo
+
- Usa il collegamento alla pagina invece di quello all'immagine su appunti
+ Negli Appunti usa collegamento pagina invece di quello all'immagine
Cronologia
- Configurazione
+ Impostazioni
\ No newline at end of file
diff --git a/GreenshotJiraPlugin/Languages/language_jiraplugin-it-IT.xml b/GreenshotJiraPlugin/Languages/language_jiraplugin-it-IT.xml
index 8b9febaf8..be20028fb 100644
--- a/GreenshotJiraPlugin/Languages/language_jiraplugin-it-IT.xml
+++ b/GreenshotJiraPlugin/Languages/language_jiraplugin-it-IT.xml
@@ -1,5 +1,5 @@
-
+
Carica su Jira
@@ -14,7 +14,7 @@
ID
- Reporter
+ Segnalatore
Riepilogo
@@ -23,7 +23,7 @@
Commento
- Nome File
+ Nome file
JIRA
@@ -35,10 +35,10 @@
Si è verificato un problema durante il collegamento: {0}
- Url
+ URL
- Inserisci le tue credenziali di collegamento a Jira
+ Inserisci le credenziali di accesso a Jira
Impostazioni Jira
@@ -50,7 +50,7 @@
Annulla
- Immagine caricata correttamente su Jira!
+ caricamento immagine su Jira completato!
Si è verificato un errore durante il caricamento su Jira:
@@ -59,7 +59,7 @@
Formato immagine
- Trasferimento dati verso JIRA, attendere prego...
+ Trasferimento dati verso JIRA...
\ No newline at end of file
diff --git a/GreenshotOCRPlugin/Languages/language_ocrplugin-it-IT.xml b/GreenshotOCRPlugin/Languages/language_ocrplugin-it-IT.xml
index 670f233e2..52259f004 100644
--- a/GreenshotOCRPlugin/Languages/language_ocrplugin-it-IT.xml
+++ b/GreenshotOCRPlugin/Languages/language_ocrplugin-it-IT.xml
@@ -1,14 +1,14 @@
-
+
Lingua OCR
- Orienta
+ Orientamento immagine
- Raddrizza
+ Raddrizza immagine
\ No newline at end of file
diff --git a/GreenshotPhotobucketPlugin/Languages/language_photobucketplugin-it-IT.xml b/GreenshotPhotobucketPlugin/Languages/language_photobucketplugin-it-IT.xml
index f0c1e80d2..3ec36383f 100644
--- a/GreenshotPhotobucketPlugin/Languages/language_photobucketplugin-it-IT.xml
+++ b/GreenshotPhotobucketPlugin/Languages/language_photobucketplugin-it-IT.xml
@@ -1,5 +1,5 @@
-
+
Carica su Photobucket
@@ -14,7 +14,7 @@
Annulla
- Immagine caricata correttamente su Photobucket!
+ Caricamento immagine su Photobucket completato!
Si è verificato un errore durante il caricamento su Photobucket:
@@ -23,13 +23,13 @@
Formato immagine
- Comunicazione con Photobucket. Attendere prego...
+ Comunicazione con Photobucket...
- Usa il collegamento alla pagina invece di quello all'immagine su appunti
+ Negli Appunti usa il collegamento pagina invece di quello all'immagine
- Configurazione Photobucket
+ Impostazioni Photobucket
diff --git a/GreenshotPicasaPlugin/Languages/language_picasaplugin-it-IT.xml b/GreenshotPicasaPlugin/Languages/language_picasaplugin-it-IT.xml
index a72279d00..6f0b76c78 100644
--- a/GreenshotPicasaPlugin/Languages/language_picasaplugin-it-IT.xml
+++ b/GreenshotPicasaPlugin/Languages/language_picasaplugin-it-IT.xml
@@ -1,14 +1,32 @@
-
-
- Comunicazione con Picasa. Attendere prego...
- Configurazione Picasa
- Dopo il carico
- Collegamento agli appunti
- Formato immagine
- Impostazioni di Picasa
- Si è verificato un errore durante il caricamento su Picasa:
- Carica su Picasa
- Immagine caricata correttamente su Picasa!
-
-
\ No newline at end of file
+
+
+
+ Collegamento agli Appunti
+
+
+ Dopo il caricamento
+
+
+ Impostazioni Picasa
+
+
+ Carica su Picasa
+
+
+ Impostazioni Picasa
+
+
+ Caricamento immagine su Picasa completato!
+
+
+ Si è verificato un errore durante il caricamento su Picasa:
+
+
+ Formato immagine
+
+
+ Comunicazione con Picasa...
+
+
+
From 2c6de5b5e698c39f819253cf81c6052340879855 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Wed, 12 Aug 2020 19:36:19 +0200
Subject: [PATCH 053/224] Update Italian language (#238) [skip ci]
---
.../releases/innosetup/scripts/isxdl/italian.ini | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Greenshot/releases/innosetup/scripts/isxdl/italian.ini b/Greenshot/releases/innosetup/scripts/isxdl/italian.ini
index 9c290c6de..3aaaf1336 100644
--- a/Greenshot/releases/innosetup/scripts/isxdl/italian.ini
+++ b/Greenshot/releases/innosetup/scripts/isxdl/italian.ini
@@ -16,23 +16,23 @@
116=Collegamento a %1
; Messaggi di errore
-120=Errore nel collegamento a Internet.\n\n%1
+120=Errore nel collegamento ad Internet.\n\n%1
121=Errore nell'apertura di %1.\n\nIl server ha restituito il codice %2.
122=Errore nella lettura dell'URL.\n\n%1
123=Errore nella scrittura del file %1.\n\n%2
124=Errore nell'apertura del file %1.\n\n%2
-125='%1' è un URL non valido.
+125='%1' è una URL non valida.
126=Errore nell'apertura di %1.\n\n%2
127=Errore durante l'invio della richiesta.\n\n%1
-128=Protocollo non supportato. Sono supportati solo i protocolli HTTP e FTP.
+128=Protocollo non supportato.\nSono supportati solo i protocolli HTTP e FTP.
129=Impossibile connettersi a %1.\n\n%2
-130=Impossibile risolvere il codice di servizio.\n\n%1
+130=Richiesta codice servizio fallita.\n\n%1
131=Errore nella richiesta del file.\n\n%1
; Altro
-144=Informazioni su...
+144=Informazioni sul programma...
146=Download
-147=Il programma d'installazione sta scaricando sul computer i files aggiuntivi.
+147=Il programma d'installazione sta scaricando nel computer i file aggiuntivi.
; Etichette
160=File:
@@ -41,7 +41,7 @@
163=Tempo trascorso:
164=Tempo rimanente:
165=File attuale:
-166=Avanzamento generale:
+166=Progresso generale:
167=Annulla
168=OK
169=Nome utente e password
From 232e20cb72e696e43fad6410915c308caca1b987 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Wed, 12 Aug 2020 19:36:46 +0200
Subject: [PATCH 054/224] Update Italian language (#237)
---
Greenshot/Languages/language-it-IT.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index 93379225a..e715221b8 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -297,11 +297,11 @@ E' possibile però variare le impostazioni delle scorciatoie, oppure disattivare
In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono comunque disponibili dal menù visualizzabile con il tasto destro del mouse sull'icona G nella barra.
- Usa colori personalizzati
- Mantieni trasparenza
- Automaticamente
- Usa i colori predefiniti
- Come visualizzata
+ Usa colori personalizzati
+ Mantieni trasparenza
+ Automaticamente
+ Usa i colori predefiniti
+ Come visualizzata
Intensità ombra
From 6adefe32dfd95af6946e1b526e3400570888b7fe Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Sun, 16 Aug 2020 10:32:57 +0200
Subject: [PATCH 055/224] Italian language update
@Lakritzator
Align strings numbers (Add a new string)
Add refence about translation date
Please merge.
---
Greenshot/Languages/language-it-IT.xml | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index e715221b8..9693dd080 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -1,4 +1,4 @@
-
+
Segnala eventuali bug a questo indirizzo
@@ -10,25 +10,22 @@ Greenshot viene fornito SENZA ALCUNA GARANZIA.
Questo software è garuitio", e potete ri-distribuirlo secondo certe condizioni.
Dettagli della General Public License GNU:
Info su Greenshot
- Traduzione in Italiano curata da bovirus e tonytogna
+ Traduzione italiana (v. 16.08.2020) di bovirus e tonytogna
Greenshot - Uno straordinario strumento per copiare immagini dallo schermo
Chiudi
Si è verificato un errore inaspettato.
La buona notizia è che puoi aiutarci ad eliminarlo segnalandoci l'errore.
-Visita la pagina internet qui sotto, crea una nuova segnalazione errore e copia nella descrizione il
-contenuto preso dall'area di testo.
+Visita la pagina internet qui sotto, crea una nuova segnalazione errore e copia nella descrizione il contenuto preso dall'area di testo.
Aggiungi un riepilogo significativo e includi qualsiasi informazione tu consideri possa esserci d'aiuto per risolvere il problema.
Inoltre apprezzeremo molto, se prima di inserire la segnalazione, controllassi se esiste già una segnalazione per questo tipo di errore (puoi usare la ricerca)
Grazie :)
Errore
Annulla
- Si è verificato un errore inaspettato durante la scrittura negli Appunti.
-
+ Si è verificato un errore inaspettato durante la scrittura negli Appunti.
Nessuna immagine sugli Appunti.
- Greenshot non è riuscito a scrivere negli Appunti poiché il processo {0} teneva l'accesso bloccato.
-
+ Greenshot non è riuscito a scrivere negli Appunti poiché il processo {0} teneva l'accesso bloccato.
BMO (Bitmap Windows)
DIB (Device independent Bitmap)
HTML
@@ -236,7 +233,6 @@ Correggi la maschera noem file e riprova.
Generali
Cattura Internet Explorer
Qualità JPEG
- Impostazioni JPEG
Lingua
I parametri racchiusi tra % verranno automaticamente sostituiti:
${YYYY} anno, 4 numeri
@@ -301,7 +297,7 @@ In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono
Mantieni trasparenza
Automaticamente
Usa i colori predefiniti
- Come visualizzata
+ Come visualizzata
Intensità ombra
@@ -313,6 +309,7 @@ In alternativa alle scorciatoie di tastiera, tutte le funzioni di Greenshot sono
Impostazioni bordi strappati
Dimensione dentellatura
Intervallo verticale dentellatura
+ Strappo su tutti i lati
Strappo lato sinistro
Strappo lato destro
Strappo lato in alto
From f8f4584778f69d93779d0a3cc53a5df4e3cdc769 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Sun, 16 Aug 2020 10:36:48 +0200
Subject: [PATCH 056/224] Update English language
@Lakritzator
Add strings for "about_translation" (useful for translator).
This string available in other languages.
Please merge.
---
Greenshot/Languages/language-en-US.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Greenshot/Languages/language-en-US.xml b/Greenshot/Languages/language-en-US.xml
index 319871fa4..b052785ec 100644
--- a/Greenshot/Languages/language-en-US.xml
+++ b/Greenshot/Languages/language-en-US.xml
@@ -9,6 +9,7 @@
Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
About Greenshot
+ Info about translation
Greenshot - the revolutionary screenshot utility
Close
Sorry, an unexpected error occured.
From af0bc8327aa7cf479c84af50210689bd36a92866 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Sun, 16 Aug 2020 20:36:51 +0200
Subject: [PATCH 057/224] Update Italian language (removed double string
editor_image_shadow) (#245) [skip ci]
---
Greenshot/Languages/language-it-IT.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index 9693dd080..2d9fc43e0 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -153,7 +153,6 @@ Controlla i permessi di accesso per '{0}'.
Seleziona tutto
Stampa inviata a '{0}'.
Ombra
- Ombra
Immagine copiata negli Appunti.
Spessore linea
Gestione immagini di Greenshot
From d8aeab5514802b8bd2aa550198264e0ca6ad10aa Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Sun, 16 Aug 2020 20:37:43 +0200
Subject: [PATCH 058/224] Update installer script (#243) [skip ci]
Add changes to have icon description for Readme/License multi-language
Add Italian translation for the icon descriptions.
---
Greenshot/releases/innosetup/setup.iss | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index 38636fce7..7735af213 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -190,8 +190,8 @@ Root: HKLM; Subkey: Software\Classes\Greenshot\shell\open\command; ValueType: st
[Icons]
Name: {group}\{#ExeName}; Filename: {app}\{#ExeName}.exe; WorkingDir: {app}; AppUserModelID: "{#ExeName}"
Name: {group}\{cm:UninstallIconDescription} {#ExeName}; Filename: {uninstallexe}; WorkingDir: {app};
-Name: {group}\Readme.txt; Filename: {app}\readme.txt; WorkingDir: {app}
-Name: {group}\License.txt; Filename: {app}\license.txt; WorkingDir: {app}
+Name: {group}\{cm:ShowReadme}; Filename: {app}\readme.txt; WorkingDir: {app}
+Name: {group}\{cm:ShowLicense}; Filename: {app}\license.txt; WorkingDir: {app}
[Languages]
Name: en; MessagesFile: compiler:Default.isl
@@ -269,6 +269,8 @@ en.startgreenshot=Start {#ExeName}
en.startup=Start {#ExeName} with Windows start
en.win10=Windows 10 plug-in
en.UninstallIconDescription=Uninstall
+en.ShowLicense=Show licenze
+en.ShowReadme=how Readme
de.confluence=Confluence Plug-in
de.default=Standard installation
@@ -339,6 +341,8 @@ it.startgreenshot=Esegui {#ExeName}
it.startup=Esegui {#ExeName} all''avvio di Windows
it.win10=Plugin Windows 10
it.UninstallIconDescription=Disinstalla
+it.ShowLicense=Visualizza licenza (in inglese)
+it.ShowReadme=Visualizza Readme (in inglese)
it.dexfranconia=Fräncofono (Tedesco)
it.arSY=Arabo (Siria)
it.caCA=Catalano
From 94c778d82cdd7866c1789bb16fd98244a42b89b5 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 23 Oct 2020 00:28:50 +0200
Subject: [PATCH 059/224] Improve DPI support (#254)
* Improving the DPI handling for most forms, there are still issues with:
* the AboutForm.Designer.cs where the title with the version scales differently.
* the destination picker doesn't seem to scale the font correctly.
Some parts are not tested yet...
* Solved the issue with the destination picker font, and some other small issues.
There still is an issue when using Powertoys (the feature which is experimental), that the capture is somehow skipping.
---
Greenshot/App.config | 5 +-
Greenshot/Forms/AboutForm.Designer.cs | 9 ++-
Greenshot/Forms/CaptureForm.Designer.cs | 4 +-
.../Forms/DropShadowSettingsForm.Designer.cs | 8 +--
Greenshot/Forms/ImageEditorForm.Designer.cs | 10 ++-
Greenshot/Forms/ImageEditorForm.cs | 12 ++--
Greenshot/Forms/MainForm.Designer.cs | 22 +++---
Greenshot/Forms/MainForm.cs | 9 ++-
.../Forms/MovableShowColorForm.Designer.cs | 9 +--
.../Forms/PrintOptionsDialog.Designer.cs | 13 ----
.../Forms/ResizeSettingsForm.Designer.cs | 7 +-
Greenshot/Forms/SettingsForm.Designer.cs | 19 ------
.../Forms/TornEdgeSettingsForm.Designer.cs | 13 +---
Greenshot/GreenshotMain.cs | 8 +--
Greenshot/Helpers/CaptureHelper.cs | 6 +-
.../Forms/SettingsForm.Designer.cs | 1 -
.../Forms/SettingsForm.Designer.cs | 1 -
.../SettingsForm.Designer.cs | 4 +-
.../SettingsFormDetail.Designer.cs | 4 +-
.../Forms/SettingsForm.Designer.cs | 5 --
.../Forms/ImgurHistory.Designer.cs | 7 +-
.../Forms/SettingsForm.Designer.cs | 2 -
GreenshotImgurPlugin/ImgurUtils.cs | 15 ++--
.../Forms/JiraForm.Designer.cs | 5 --
.../Forms/SettingsForm.Designer.cs | 1 -
.../Forms/SettingsForm.Designer.cs | 1 -
.../Controls/BackgroundForm.Designer.cs | 6 +-
GreenshotPlugin/Controls/GreenshotForm.cs | 26 +++----
.../Controls/OAuthLoginForm.Designer.cs | 4 +-
.../Controls/PleaseWaitForm.Designer.cs | 6 +-
.../Controls/QualityDialog.Designer.cs | 3 +-
GreenshotPlugin/Core/AbstractDestination.cs | 19 ++++--
GreenshotPlugin/Core/DpiHelper.cs | 26 +++++--
GreenshotPlugin/Core/OAuthHelper.cs | 68 ++++++++++++++-----
GreenshotPlugin/Core/WindowDetails.cs | 54 ++++++++-------
GreenshotPlugin/Interfaces/IDestination.cs | 12 ++--
GreenshotPlugin/UnmanagedHelpers/User32.cs | 8 ++-
37 files changed, 216 insertions(+), 216 deletions(-)
diff --git a/Greenshot/App.config b/Greenshot/App.config
index 61ebd6224..f15ae706e 100644
--- a/Greenshot/App.config
+++ b/Greenshot/App.config
@@ -4,7 +4,10 @@
-
+
+
+
+
diff --git a/Greenshot/Forms/AboutForm.Designer.cs b/Greenshot/Forms/AboutForm.Designer.cs
index f5018e313..1b35f8699 100644
--- a/Greenshot/Forms/AboutForm.Designer.cs
+++ b/Greenshot/Forms/AboutForm.Designer.cs
@@ -67,7 +67,7 @@ namespace Greenshot.Forms {
//
// lblTitle
//
- this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblTitle.Font = new System.Drawing.Font(System.Drawing.FontFamily.GenericSansSerif, 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblTitle.Location = new System.Drawing.Point(108, 12);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(263, 19);
@@ -195,8 +195,11 @@ namespace Greenshot.Forms {
//
// AboutForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ //this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96, 96);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+
this.ClientSize = new System.Drawing.Size(530, 293);
this.Controls.Add(this.lblTranslation);
this.Controls.Add(this.pictureBox1);
diff --git a/Greenshot/Forms/CaptureForm.Designer.cs b/Greenshot/Forms/CaptureForm.Designer.cs
index 124a34d3e..ee3b43b99 100644
--- a/Greenshot/Forms/CaptureForm.Designer.cs
+++ b/Greenshot/Forms/CaptureForm.Designer.cs
@@ -55,8 +55,8 @@ namespace Greenshot.Forms {
//
// CaptureForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(0, 0);
this.Cursor = System.Windows.Forms.Cursors.Cross;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
diff --git a/Greenshot/Forms/DropShadowSettingsForm.Designer.cs b/Greenshot/Forms/DropShadowSettingsForm.Designer.cs
index 5791dee14..ba8e7b3bc 100644
--- a/Greenshot/Forms/DropShadowSettingsForm.Designer.cs
+++ b/Greenshot/Forms/DropShadowSettingsForm.Designer.cs
@@ -105,7 +105,6 @@ namespace Greenshot.Forms {
//
// label3
//
- this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(153, 35);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(14, 13);
@@ -166,7 +165,6 @@ namespace Greenshot.Forms {
//
// labelDarkness
//
- this.labelDarkness.AutoSize = true;
this.labelDarkness.LanguageKey = "editor_dropshadow_darkness";
this.labelDarkness.Location = new System.Drawing.Point(12, 73);
this.labelDarkness.Name = "labelDarkness";
@@ -175,7 +173,6 @@ namespace Greenshot.Forms {
//
// labelOffset
//
- this.labelOffset.AutoSize = true;
this.labelOffset.LanguageKey = "editor_dropshadow_offset";
this.labelOffset.Location = new System.Drawing.Point(12, 35);
this.labelOffset.Name = "labelOffset";
@@ -184,7 +181,6 @@ namespace Greenshot.Forms {
//
// labelThickness
//
- this.labelThickness.AutoSize = true;
this.labelThickness.LanguageKey = "editor_dropshadow_thickness";
this.labelThickness.Location = new System.Drawing.Point(12, 9);
this.labelThickness.Name = "labelThickness";
@@ -194,8 +190,8 @@ namespace Greenshot.Forms {
// DropShadowSettingsForm
//
this.AcceptButton = this.buttonOK;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(230, 154);
this.ControlBox = false;
diff --git a/Greenshot/Forms/ImageEditorForm.Designer.cs b/Greenshot/Forms/ImageEditorForm.Designer.cs
index 04da3d0a0..cce905007 100644
--- a/Greenshot/Forms/ImageEditorForm.Designer.cs
+++ b/Greenshot/Forms/ImageEditorForm.Designer.cs
@@ -231,8 +231,8 @@ namespace Greenshot {
//
// topToolStripContainer
//
- this.topToolStripContainer.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
- this.topToolStripContainer.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.topToolStripContainer.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.topToolStripContainer.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
//
// topToolStripContainer.BottomToolStripPanel
//
@@ -1037,7 +1037,6 @@ namespace Greenshot {
//
// propertiesToolStrip
//
- this.propertiesToolStrip.AutoSize = false;
this.propertiesToolStrip.ClickThrough = true;
this.propertiesToolStrip.ImageScalingSize = coreConfiguration.ScaledIconSize;
this.propertiesToolStrip.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1225,7 +1224,6 @@ namespace Greenshot {
// fontFamilyComboBox
//
this.fontFamilyComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.fontFamilyComboBox.AutoSize = false;
this.fontFamilyComboBox.MaxDropDownItems = 20;
this.fontFamilyComboBox.Name = "fontFamilyComboBox";
this.fontFamilyComboBox.Size = new System.Drawing.Size(200, 20);
@@ -1815,8 +1813,8 @@ namespace Greenshot {
//
// ImageEditorForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(785, 485);
this.Controls.Add(this.topToolStripContainer);
this.KeyPreview = true;
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index ab7d037f7..6e19df179 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -102,13 +102,12 @@ namespace Greenshot {
propertiesToolStrip.ImageScalingSize = newSize;
propertiesToolStrip.MinimumSize = new Size(150, newSize.Height + 10);
- _surface.AdjustToDpi(dpi);
+ _surface?.AdjustToDpi(dpi);
+ UpdateUi();
}
public ImageEditorForm(ISurface iSurface, bool outputMade)
{
- // Make sure we change the icon size depending on the scaling
- DpiChanged += AdjustToDpi;
EditorList.Add(this);
//
@@ -116,6 +115,8 @@ namespace Greenshot {
//
ManualLanguageApply = true;
InitializeComponent();
+ // Make sure we change the icon size depending on the scaling
+ DpiChanged += AdjustToDpi;
Load += delegate {
var thread = new Thread(AddDestinations)
{
@@ -236,7 +237,10 @@ namespace Greenshot {
MouseWheel += PanelMouseWheel;
// Make sure the value is set correctly when starting
- counterUpDown.Value = Surface.CounterStart;
+ if (Surface != null)
+ {
+ counterUpDown.Value = Surface.CounterStart;
+ }
ApplyLanguage();
}
diff --git a/Greenshot/Forms/MainForm.Designer.cs b/Greenshot/Forms/MainForm.Designer.cs
index f94f4b87d..751d43452 100644
--- a/Greenshot/Forms/MainForm.Designer.cs
+++ b/Greenshot/Forms/MainForm.Designer.cs
@@ -50,31 +50,30 @@ namespace Greenshot {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.contextmenu_capturearea = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
+ this.contextmenu_capturearea = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_capturelastregion = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_capturewindow = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_capturefullscreen = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_captureie = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
- this.toolStripListCaptureSeparator = new System.Windows.Forms.ToolStripSeparator();
this.contextmenu_capturewindowfromlist = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_captureiefromlist = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
- this.toolStripOtherSourcesSeparator = new System.Windows.Forms.ToolStripSeparator();
this.contextmenu_captureclipboard = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_openfile = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
- this.toolStripOpenFolderSeparator = new System.Windows.Forms.ToolStripSeparator();
this.contextmenu_openrecentcapture = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
- this.toolStripPluginSeparator = new System.Windows.Forms.ToolStripSeparator();
this.contextmenu_quicksettings = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_settings = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
- this.toolStripMiscSeparator = new System.Windows.Forms.ToolStripSeparator();
this.contextmenu_help = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_donate = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.contextmenu_about = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
+ this.contextmenu_exit = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
+ this.toolStripListCaptureSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripOtherSourcesSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripOpenFolderSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripPluginSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.toolStripMiscSeparator = new System.Windows.Forms.ToolStripSeparator();
this.toolStripCloseSeparator = new System.Windows.Forms.ToolStripSeparator();
- this.contextmenu_exit = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
- this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
- this.contextMenu.SuspendLayout();
- this.SuspendLayout();
+ this.contextMenu.SuspendLayout();
+ this.SuspendLayout();
//
// contextMenu
//
@@ -250,10 +249,11 @@ namespace Greenshot {
//
// notifyIcon
//
+ this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.notifyIcon.ContextMenuStrip = this.contextMenu;
this.notifyIcon.Text = "Greenshot";
this.notifyIcon.MouseUp += new System.Windows.Forms.MouseEventHandler(this.NotifyIconClickTest);
- //
+ //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index b96211a97..e7eed651e 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -245,7 +245,7 @@ namespace Greenshot {
return;
}
// Make sure we can use forms
- WindowsFormsHost.EnableWindowsFormsInterop();
+ WindowsFormsHost.EnableWindowsFormsInterop();
// BUG-1809: Add message filter, to filter out all the InputLangChanged messages which go to a target control with a handle > 32 bit.
Application.AddMessageFilter(new WmInputLangChangeRequestFilter());
@@ -744,7 +744,10 @@ namespace Greenshot {
}
- private void ContextMenuOpening(object sender, CancelEventArgs e) {
+ private void ContextMenuOpening(object sender, CancelEventArgs e)
+ {
+ var factor = DeviceDpi / 96f;
+ contextMenu.Scale(new SizeF(factor,factor));
contextmenu_captureclipboard.Enabled = ClipboardHelper.ContainsImage();
contextmenu_capturelastregion.Enabled = coreConfiguration.LastCapturedRegion != Rectangle.Empty;
@@ -1025,7 +1028,7 @@ namespace Greenshot {
/// EventArgs
private void Contextmenu_DonateClick(object sender, EventArgs e) {
BeginInvoke((MethodInvoker)delegate {
- Process.Start("http://getgreenshot.org/support/?version=" + Assembly.GetEntryAssembly().GetName().Version);
+ Process.Start("http://getgreenshot.org/support/?version=" + EnvironmentInfo.GetGreenshotVersion(true));
});
}
diff --git a/Greenshot/Forms/MovableShowColorForm.Designer.cs b/Greenshot/Forms/MovableShowColorForm.Designer.cs
index 811772d0b..4f614842a 100644
--- a/Greenshot/Forms/MovableShowColorForm.Designer.cs
+++ b/Greenshot/Forms/MovableShowColorForm.Designer.cs
@@ -52,7 +52,6 @@ namespace Greenshot.Forms
//
// label1
//
- this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(40, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(37, 13);
@@ -69,7 +68,6 @@ namespace Greenshot.Forms
//
// label2
//
- this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(2, 37);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(33, 13);
@@ -92,7 +90,6 @@ namespace Greenshot.Forms
//
// label4
//
- this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(2, 50);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(42, 13);
@@ -108,7 +105,6 @@ namespace Greenshot.Forms
//
// label6
//
- this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(2, 63);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(34, 13);
@@ -124,7 +120,6 @@ namespace Greenshot.Forms
//
// label5
//
- this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(2, 76);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(40, 13);
@@ -156,8 +151,8 @@ namespace Greenshot.Forms
//
this.Visible = false;
this.Location = new System.Drawing.Point(-10000,-10000);
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(100, 100);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
diff --git a/Greenshot/Forms/PrintOptionsDialog.Designer.cs b/Greenshot/Forms/PrintOptionsDialog.Designer.cs
index 990fedc5b..43d40c06e 100644
--- a/Greenshot/Forms/PrintOptionsDialog.Designer.cs
+++ b/Greenshot/Forms/PrintOptionsDialog.Designer.cs
@@ -68,7 +68,6 @@ namespace Greenshot.Forms
//
// checkbox_dontaskagain
//
- this.checkbox_dontaskagain.AutoSize = true;
this.checkbox_dontaskagain.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.LanguageKey = "printoptions_dontaskagain";
@@ -82,7 +81,6 @@ namespace Greenshot.Forms
//
// checkboxAllowShrink
//
- this.checkboxAllowShrink.AutoSize = true;
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
@@ -97,7 +95,6 @@ namespace Greenshot.Forms
//
// checkboxAllowEnlarge
//
- this.checkboxAllowEnlarge.AutoSize = true;
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
@@ -112,7 +109,6 @@ namespace Greenshot.Forms
//
// checkboxAllowCenter
//
- this.checkboxAllowCenter.AutoSize = true;
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
@@ -127,7 +123,6 @@ namespace Greenshot.Forms
//
// checkboxAllowRotate
//
- this.checkboxAllowRotate.AutoSize = true;
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
@@ -155,7 +150,6 @@ namespace Greenshot.Forms
//
// checkboxDateTime
//
- this.checkboxDateTime.AutoSize = true;
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
@@ -182,7 +176,6 @@ namespace Greenshot.Forms
//
// checkboxPrintInverted
//
- this.checkboxPrintInverted.AutoSize = true;
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
@@ -197,7 +190,6 @@ namespace Greenshot.Forms
//
// radioBtnGrayScale
//
- this.radioBtnGrayScale.AutoSize = true;
this.radioBtnGrayScale.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnGrayScale.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale";
@@ -212,7 +204,6 @@ namespace Greenshot.Forms
//
// radioBtnMonochrome
//
- this.radioBtnMonochrome.AutoSize = true;
this.radioBtnMonochrome.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnMonochrome.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome";
@@ -227,7 +218,6 @@ namespace Greenshot.Forms
//
// groupBoxPrintLayout
//
- this.groupBoxPrintLayout.AutoSize = true;
this.groupBoxPrintLayout.Controls.Add(this.checkboxDateTime);
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowShrink);
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowEnlarge);
@@ -243,7 +233,6 @@ namespace Greenshot.Forms
//
// groupBoxColors
//
- this.groupBoxColors.AutoSize = true;
this.groupBoxColors.Controls.Add(this.checkboxPrintInverted);
this.groupBoxColors.Controls.Add(this.radioBtnColorPrint);
this.groupBoxColors.Controls.Add(this.radioBtnGrayScale);
@@ -258,7 +247,6 @@ namespace Greenshot.Forms
//
// radioBtnColorPrint
//
- this.radioBtnColorPrint.AutoSize = true;
this.radioBtnColorPrint.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnColorPrint.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnColorPrint.LanguageKey = "printoptions_printcolor";
@@ -274,7 +262,6 @@ namespace Greenshot.Forms
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
- this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(355, 390);
this.Controls.Add(this.groupBoxColors);
this.Controls.Add(this.groupBoxPrintLayout);
diff --git a/Greenshot/Forms/ResizeSettingsForm.Designer.cs b/Greenshot/Forms/ResizeSettingsForm.Designer.cs
index 0cf811fbe..f6a7fad48 100644
--- a/Greenshot/Forms/ResizeSettingsForm.Designer.cs
+++ b/Greenshot/Forms/ResizeSettingsForm.Designer.cs
@@ -76,7 +76,6 @@ namespace Greenshot.Forms {
//
// checkbox_aspectratio
//
- this.checkbox_aspectratio.AutoSize = true;
this.checkbox_aspectratio.LanguageKey = "editor_resize_aspectratio";
this.checkbox_aspectratio.Location = new System.Drawing.Point(22, 64);
this.checkbox_aspectratio.Name = "checkbox_aspectratio";
@@ -86,7 +85,6 @@ namespace Greenshot.Forms {
//
// label_width
//
- this.label_width.AutoSize = true;
this.label_width.LanguageKey = "editor_resize_width";
this.label_width.Location = new System.Drawing.Point(19, 15);
this.label_width.Name = "label_width";
@@ -95,7 +93,6 @@ namespace Greenshot.Forms {
//
// label_height
//
- this.label_height.AutoSize = true;
this.label_height.LanguageKey = "editor_resize_height";
this.label_height.Location = new System.Drawing.Point(19, 38);
this.label_height.Name = "label_height";
@@ -140,8 +137,8 @@ namespace Greenshot.Forms {
// ResizeSettingsForm
//
this.AcceptButton = this.buttonOK;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(244, 122);
this.ControlBox = false;
diff --git a/Greenshot/Forms/SettingsForm.Designer.cs b/Greenshot/Forms/SettingsForm.Designer.cs
index 473463a1e..80cbd9437 100644
--- a/Greenshot/Forms/SettingsForm.Designer.cs
+++ b/Greenshot/Forms/SettingsForm.Designer.cs
@@ -705,7 +705,6 @@ namespace Greenshot {
//
// colorButton_window_background
//
- this.colorButton_window_background.AutoSize = true;
this.colorButton_window_background.Image = ((System.Drawing.Image)(resources.GetObject("colorButton_window_background.Image")));
this.colorButton_window_background.Location = new System.Drawing.Point(374, 37);
this.colorButton_window_background.Name = "colorButton_window_background";
@@ -716,7 +715,6 @@ namespace Greenshot {
//
// radiobuttonWindowCapture
//
- this.radiobuttonWindowCapture.AutoSize = true;
this.radiobuttonWindowCapture.LanguageKey = "settings_window_capture_mode";
this.radiobuttonWindowCapture.Location = new System.Drawing.Point(11, 44);
this.radiobuttonWindowCapture.Name = "radiobuttonWindowCapture";
@@ -727,7 +725,6 @@ namespace Greenshot {
//
// radiobuttonInteractiveCapture
//
- this.radiobuttonInteractiveCapture.AutoSize = true;
this.radiobuttonInteractiveCapture.LanguageKey = "settings_capture_windows_interactive";
this.radiobuttonInteractiveCapture.Location = new System.Drawing.Point(11, 20);
this.radiobuttonInteractiveCapture.Name = "radiobuttonInteractiveCapture";
@@ -868,7 +865,6 @@ namespace Greenshot {
//
// groupBoxColors
//
- this.groupBoxColors.AutoSize = true;
this.groupBoxColors.Controls.Add(this.checkboxPrintInverted);
this.groupBoxColors.Controls.Add(this.radioBtnColorPrint);
this.groupBoxColors.Controls.Add(this.radioBtnGrayScale);
@@ -882,7 +878,6 @@ namespace Greenshot {
//
// checkboxPrintInverted
//
- this.checkboxPrintInverted.AutoSize = true;
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
@@ -896,7 +891,6 @@ namespace Greenshot {
//
// radioBtnColorPrint
//
- this.radioBtnColorPrint.AutoSize = true;
this.radioBtnColorPrint.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnColorPrint.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnColorPrint.LanguageKey = "printoptions_printcolor";
@@ -910,7 +904,6 @@ namespace Greenshot {
//
// radioBtnGrayScale
//
- this.radioBtnGrayScale.AutoSize = true;
this.radioBtnGrayScale.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnGrayScale.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale";
@@ -925,7 +918,6 @@ namespace Greenshot {
//
// radioBtnMonochrome
//
- this.radioBtnMonochrome.AutoSize = true;
this.radioBtnMonochrome.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnMonochrome.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome";
@@ -939,7 +931,6 @@ namespace Greenshot {
//
// groupBoxPrintLayout
//
- this.groupBoxPrintLayout.AutoSize = true;
this.groupBoxPrintLayout.Controls.Add(this.checkboxDateTime);
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowShrink);
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowEnlarge);
@@ -954,7 +945,6 @@ namespace Greenshot {
//
// checkboxDateTime
//
- this.checkboxDateTime.AutoSize = true;
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
@@ -968,7 +958,6 @@ namespace Greenshot {
//
// checkboxAllowShrink
//
- this.checkboxAllowShrink.AutoSize = true;
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
@@ -982,7 +971,6 @@ namespace Greenshot {
//
// checkboxAllowEnlarge
//
- this.checkboxAllowEnlarge.AutoSize = true;
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
@@ -996,7 +984,6 @@ namespace Greenshot {
//
// checkboxAllowRotate
//
- this.checkboxAllowRotate.AutoSize = true;
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
@@ -1010,7 +997,6 @@ namespace Greenshot {
//
// checkboxAllowCenter
//
- this.checkboxAllowCenter.AutoSize = true;
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
@@ -1075,7 +1061,6 @@ namespace Greenshot {
// button_pluginconfigure
//
this.button_pluginconfigure.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.button_pluginconfigure.AutoSize = true;
this.button_pluginconfigure.Enabled = false;
this.button_pluginconfigure.LanguageKey = "settings_configureplugin";
this.button_pluginconfigure.Location = new System.Drawing.Point(6, 285);
@@ -1164,7 +1149,6 @@ namespace Greenshot {
//
// label_counter
//
- this.label_counter.AutoSize = true;
this.label_counter.LanguageKey = "expertsettings_counter";
this.label_counter.Location = new System.Drawing.Point(7, 285);
this.label_counter.Name = "label_counter";
@@ -1181,7 +1165,6 @@ namespace Greenshot {
//
// label_footerpattern
//
- this.label_footerpattern.AutoSize = true;
this.label_footerpattern.LanguageKey = "expertsettings_footerpattern";
this.label_footerpattern.Location = new System.Drawing.Point(7, 259);
this.label_footerpattern.Name = "label_footerpattern";
@@ -1229,7 +1212,6 @@ namespace Greenshot {
//
// label_clipboardformats
//
- this.label_clipboardformats.AutoSize = true;
this.label_clipboardformats.LanguageKey = "expertsettings_clipboardformats";
this.label_clipboardformats.Location = new System.Drawing.Point(7, 39);
this.label_clipboardformats.Name = "label_clipboardformats";
@@ -1273,7 +1255,6 @@ namespace Greenshot {
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
- this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(451, 431);
this.Controls.Add(this.tabcontrol);
this.Controls.Add(this.settings_confirm);
diff --git a/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs b/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
index c14ed7557..5320e17de 100644
--- a/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
+++ b/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
@@ -123,7 +123,6 @@ namespace Greenshot.Forms {
//
// label3
//
- this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(153, 63);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(12, 13);
@@ -184,7 +183,6 @@ namespace Greenshot.Forms {
//
// labelDarkness
//
- this.labelDarkness.AutoSize = true;
this.labelDarkness.LanguageKey = "editor_dropshadow_darkness";
this.labelDarkness.Location = new System.Drawing.Point(12, 97);
this.labelDarkness.Name = "labelDarkness";
@@ -194,7 +192,6 @@ namespace Greenshot.Forms {
//
// labelOffset
//
- this.labelOffset.AutoSize = true;
this.labelOffset.LanguageKey = "editor_dropshadow_offset";
this.labelOffset.Location = new System.Drawing.Point(12, 63);
this.labelOffset.Name = "labelOffset";
@@ -203,7 +200,6 @@ namespace Greenshot.Forms {
//
// labelThickness
//
- this.labelThickness.AutoSize = true;
this.labelThickness.LanguageKey = "editor_dropshadow_thickness";
this.labelThickness.Location = new System.Drawing.Point(12, 37);
this.labelThickness.Name = "labelThickness";
@@ -234,7 +230,6 @@ namespace Greenshot.Forms {
//
// label_toothsize
//
- this.label_toothsize.AutoSize = true;
this.label_toothsize.LanguageKey = "editor_tornedge_toothsize";
this.label_toothsize.Location = new System.Drawing.Point(12, 140);
this.label_toothsize.Name = "label_toothsize";
@@ -243,7 +238,6 @@ namespace Greenshot.Forms {
//
// label_horizontaltoothrange
//
- this.label_horizontaltoothrange.AutoSize = true;
this.label_horizontaltoothrange.LanguageKey = "editor_tornedge_horizontaltoothrange";
this.label_horizontaltoothrange.Location = new System.Drawing.Point(12, 166);
this.label_horizontaltoothrange.Name = "label_horizontaltoothrange";
@@ -273,7 +267,6 @@ namespace Greenshot.Forms {
//
// labelVerticaltoothrange
//
- this.labelVerticaltoothrange.AutoSize = true;
this.labelVerticaltoothrange.LanguageKey = "editor_tornedge_verticaltoothrange";
this.labelVerticaltoothrange.Location = new System.Drawing.Point(12, 192);
this.labelVerticaltoothrange.Name = "labelVerticaltoothrange";
@@ -351,7 +344,6 @@ namespace Greenshot.Forms {
//
// shadowCheckbox
//
- this.shadowCheckbox.AutoSize = true;
this.shadowCheckbox.LanguageKey = "editor_tornedge_shadow";
this.shadowCheckbox.Location = new System.Drawing.Point(12, 12);
this.shadowCheckbox.Name = "shadowCheckbox";
@@ -362,7 +354,6 @@ namespace Greenshot.Forms {
//
// all
//
- this.all.AutoSize = true;
this.all.LanguageKey = "editor_tornedge_all";
this.all.Location = new System.Drawing.Point(251, 12);
this.all.Name = "all";
@@ -374,8 +365,8 @@ namespace Greenshot.Forms {
// TornEdgeSettingsForm
//
this.AcceptButton = this.buttonOK;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(502, 223);
this.ControlBox = false;
diff --git a/Greenshot/GreenshotMain.cs b/Greenshot/GreenshotMain.cs
index b6f448c25..6a993d99b 100644
--- a/Greenshot/GreenshotMain.cs
+++ b/Greenshot/GreenshotMain.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs
index d8a617995..156470802 100644
--- a/Greenshot/Helpers/CaptureHelper.cs
+++ b/Greenshot/Helpers/CaptureHelper.cs
@@ -846,7 +846,7 @@ namespace Greenshot.Helpers {
// Restore the window making sure it's visible!
windowToCapture.Restore();
} else {
- windowToCapture.ToForeground(false);
+ windowToCapture.ToForeground();
}
tmpCapture = windowToCapture.CaptureGdiWindow(captureForWindow);
if (tmpCapture != null) {
@@ -941,7 +941,7 @@ namespace Greenshot.Helpers {
}
private void SetDpi() {
- // Workaround for proble with DPI retrieval, the FromHwnd activates the window...
+ // Workaround for problem with DPI retrieval, the FromHwnd activates the window...
WindowDetails previouslyActiveWindow = WindowDetails.GetActiveWindow();
// Workaround for changed DPI settings in Windows 7
var mainForm = SimpleServiceProvider.Current.GetInstance();
@@ -950,7 +950,7 @@ namespace Greenshot.Helpers {
_capture.CaptureDetails.DpiY = graphics.DpiY;
}
// Set previouslyActiveWindow as foreground window
- previouslyActiveWindow?.ToForeground(false);
+ previouslyActiveWindow?.ToForeground();
if (_capture.CaptureDetails != null) {
((Bitmap) _capture.Image)?.SetResolution(_capture.CaptureDetails.DpiX, _capture.CaptureDetails.DpiY);
}
diff --git a/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs b/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
index dc7991f8d..385452002 100644
--- a/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
@@ -109,7 +109,6 @@ namespace GreenshotBoxPlugin {
// checkboxAfterUploadLinkToClipBoard
//
this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "box.label_AfterUploadLinkToClipBoard";
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(208, 45);
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
diff --git a/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs b/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs
index 3e8226dc9..80c0009b1 100644
--- a/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs
@@ -106,7 +106,6 @@ namespace GreenshotDropboxPlugin {
//
// checkboxAfterUploadLinkToClipBoard
//
- this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "dropbox.label_AfterUploadLinkToClipBoard";
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(116, 37);
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
diff --git a/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs b/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs
index 17df962df..0a7ed7d7f 100644
--- a/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs
+++ b/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs
@@ -130,8 +130,8 @@ namespace GreenshotExternalCommandPlugin {
// SettingsForm
//
this.AcceptButton = this.buttonOk;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(365, 208);
this.Controls.Add(this.button_edit);
diff --git a/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs b/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs
index 200bd7a30..028efa2cd 100644
--- a/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs
+++ b/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs
@@ -168,8 +168,8 @@ namespace GreenshotExternalCommandPlugin {
// SettingsFormDetail
//
this.AcceptButton = this.buttonOk;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(360, 172);
diff --git a/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs b/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
index 98881585e..498e37d18 100644
--- a/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
@@ -105,7 +105,6 @@ namespace GreenshotFlickrPlugin {
//
// checkBoxPublic
//
- this.checkBoxPublic.AutoSize = true;
this.checkBoxPublic.LanguageKey = "flickr.public";
this.checkBoxPublic.Location = new System.Drawing.Point(174, 88);
this.checkBoxPublic.Name = "checkBoxPublic";
@@ -117,7 +116,6 @@ namespace GreenshotFlickrPlugin {
//
// checkBoxFamily
//
- this.checkBoxFamily.AutoSize = true;
this.checkBoxFamily.LanguageKey = "flickr.family";
this.checkBoxFamily.Location = new System.Drawing.Point(265, 88);
this.checkBoxFamily.Name = "checkBoxFamily";
@@ -129,7 +127,6 @@ namespace GreenshotFlickrPlugin {
//
// checkBoxFriend
//
- this.checkBoxFriend.AutoSize = true;
this.checkBoxFriend.LanguageKey = "flickr.friend";
this.checkBoxFriend.Location = new System.Drawing.Point(350, 88);
this.checkBoxFriend.Name = "checkBoxFriend";
@@ -170,7 +167,6 @@ namespace GreenshotFlickrPlugin {
//
// checkboxAfterUploadLinkToClipBoard
//
- this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "flickr.label_AfterUploadLinkToClipBoard";
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(173, 116);
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
@@ -182,7 +178,6 @@ namespace GreenshotFlickrPlugin {
//
// checkBox_hiddenfromsearch
//
- this.checkBox_hiddenfromsearch.AutoSize = true;
this.checkBox_hiddenfromsearch.LanguageKey = "flickr.label_HiddenFromSearch";
this.checkBox_hiddenfromsearch.Location = new System.Drawing.Point(174, 60);
this.checkBox_hiddenfromsearch.Name = "checkBox_hiddenfromsearch";
diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs
index 6e9b286ae..5b38b0e65 100644
--- a/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs
+++ b/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs
@@ -87,7 +87,6 @@ namespace GreenshotImgurPlugin
// deleteButton
//
this.deleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.deleteButton.AutoSize = true;
this.deleteButton.Location = new System.Drawing.Point(109, 272);
this.deleteButton.Name = "deleteButton";
this.deleteButton.Size = new System.Drawing.Size(75, 23);
@@ -99,7 +98,6 @@ namespace GreenshotImgurPlugin
// openButton
//
this.openButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.openButton.AutoSize = true;
this.openButton.Location = new System.Drawing.Point(109, 305);
this.openButton.Name = "openButton";
this.openButton.Size = new System.Drawing.Size(75, 23);
@@ -122,7 +120,6 @@ namespace GreenshotImgurPlugin
// clipboardButton
//
this.clipboardButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.clipboardButton.AutoSize = true;
this.clipboardButton.Location = new System.Drawing.Point(109, 338);
this.clipboardButton.Name = "clipboardButton";
this.clipboardButton.Size = new System.Drawing.Size(129, 23);
@@ -144,8 +141,8 @@ namespace GreenshotImgurPlugin
//
// ImgurHistory
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(534, 372);
this.Controls.Add(this.clearHistoryButton);
this.Controls.Add(this.clipboardButton);
diff --git a/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs b/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs
index 4888dc356..788597c39 100644
--- a/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs
@@ -109,7 +109,6 @@ namespace GreenshotImgurPlugin {
//
// checkbox_anonymous_access
//
- this.checkbox_anonymous_access.AutoSize = true;
this.checkbox_anonymous_access.LanguageKey = "imgur.anonymous_access";
this.checkbox_anonymous_access.Location = new System.Drawing.Point(15, 38);
this.checkbox_anonymous_access.Name = "checkbox_anonymous_access";
@@ -121,7 +120,6 @@ namespace GreenshotImgurPlugin {
//
// checkbox_usepagelink
//
- this.checkbox_usepagelink.AutoSize = true;
this.checkbox_usepagelink.LanguageKey = "imgur.use_page_link";
this.checkbox_usepagelink.Location = new System.Drawing.Point(15, 57);
this.checkbox_usepagelink.Name = "checkbox_usepagelink";
diff --git a/GreenshotImgurPlugin/ImgurUtils.cs b/GreenshotImgurPlugin/ImgurUtils.cs
index 817ff44fa..a38c12b95 100644
--- a/GreenshotImgurPlugin/ImgurUtils.cs
+++ b/GreenshotImgurPlugin/ImgurUtils.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -171,12 +171,11 @@ namespace GreenshotImgurPlugin {
{
AuthUrlPattern = AuthUrlPattern,
TokenUrl = TokenUrl,
- RedirectUrl = "https://imgur.com",
+ RedirectUrl = "https://getgreenshot.org/oauth/imgur",
CloudServiceName = "Imgur",
ClientId = ImgurCredentials.CONSUMER_KEY,
ClientSecret = ImgurCredentials.CONSUMER_SECRET,
- AuthorizeMode = OAuth2AuthorizeMode.EmbeddedBrowser,
- BrowserSize = new Size(680, 880),
+ AuthorizeMode = OAuth2AuthorizeMode.OutOfBoundAuto,
RefreshToken = Config.RefreshToken,
AccessToken = Config.AccessToken,
AccessTokenExpires = Config.AccessTokenExpires
@@ -280,7 +279,7 @@ namespace GreenshotImgurPlugin {
///
public static void DeleteImgurImage(ImgurInfo imgurInfo) {
Log.InfoFormat("Deleting Imgur image for {0}", imgurInfo.DeleteHash);
-
+
try {
string url = Config.ImgurApi3Url + "/image/" + imgurInfo.DeleteHash + ".xml";
HttpWebRequest webRequest = NetworkHelper.CreateWebRequest(url, HTTPMethod.DELETE);
diff --git a/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs b/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
index 12e85ca40..ac718241e 100644
--- a/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
+++ b/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
@@ -71,7 +71,6 @@ namespace GreenshotJiraPlugin.Forms {
//
// label_jirafilter
//
- this.label_jirafilter.AutoSize = true;
this.label_jirafilter.Location = new System.Drawing.Point(14, 14);
this.label_jirafilter.Name = "label_jirafilter";
this.label_jirafilter.Size = new System.Drawing.Size(52, 13);
@@ -80,7 +79,6 @@ namespace GreenshotJiraPlugin.Forms {
//
// label_jira
//
- this.label_jira.AutoSize = true;
this.label_jira.Location = new System.Drawing.Point(14, 41);
this.label_jira.Name = "label_jira";
this.label_jira.Size = new System.Drawing.Size(30, 13);
@@ -127,7 +125,6 @@ namespace GreenshotJiraPlugin.Forms {
// label_filename
//
this.label_filename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label_filename.AutoSize = true;
this.label_filename.Location = new System.Drawing.Point(14, 222);
this.label_filename.Name = "label_filename";
this.label_filename.Size = new System.Drawing.Size(49, 13);
@@ -137,7 +134,6 @@ namespace GreenshotJiraPlugin.Forms {
// label_comment
//
this.label_comment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label_comment.AutoSize = true;
this.label_comment.Location = new System.Drawing.Point(14, 248);
this.label_comment.Name = "label_comment";
this.label_comment.Size = new System.Drawing.Size(51, 13);
@@ -167,7 +163,6 @@ namespace GreenshotJiraPlugin.Forms {
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 274);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 13);
diff --git a/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs b/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs
index 4cd900c68..a7dcc758e 100644
--- a/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs
@@ -96,7 +96,6 @@ namespace GreenshotPhotobucketPlugin {
//
// checkbox_usepagelink
//
- this.checkbox_usepagelink.AutoSize = true;
this.checkbox_usepagelink.LanguageKey = "photobucket.use_page_link";
this.checkbox_usepagelink.Location = new System.Drawing.Point(15, 43);
this.checkbox_usepagelink.Name = "checkbox_usepagelink";
diff --git a/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs b/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
index 41cb346f9..0d2447e41 100644
--- a/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
@@ -108,7 +108,6 @@ namespace GreenshotPicasaPlugin {
// checkboxAfterUploadLinkToClipBoard
//
this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "picasa.label_AfterUploadLinkToClipBoard";
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(197, 50);
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
diff --git a/GreenshotPlugin/Controls/BackgroundForm.Designer.cs b/GreenshotPlugin/Controls/BackgroundForm.Designer.cs
index bef6439b5..fbfee52bd 100644
--- a/GreenshotPlugin/Controls/BackgroundForm.Designer.cs
+++ b/GreenshotPlugin/Controls/BackgroundForm.Designer.cs
@@ -55,7 +55,6 @@ namespace GreenshotPlugin.Controls
//
// label_pleasewait
//
- this.label_pleasewait.AutoSize = true;
this.label_pleasewait.Dock = System.Windows.Forms.DockStyle.Fill;
this.label_pleasewait.Location = new System.Drawing.Point(0, 0);
this.label_pleasewait.Name = "label_pleasewait";
@@ -73,9 +72,8 @@ namespace GreenshotPlugin.Controls
//
// BackgroundForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoSize = true;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(169, 52);
this.ControlBox = true;
this.Controls.Add(this.label_pleasewait);
diff --git a/GreenshotPlugin/Controls/GreenshotForm.cs b/GreenshotPlugin/Controls/GreenshotForm.cs
index a7926095f..1f6ce5675 100644
--- a/GreenshotPlugin/Controls/GreenshotForm.cs
+++ b/GreenshotPlugin/Controls/GreenshotForm.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -101,10 +101,10 @@ namespace GreenshotPlugin.Controls {
_designTimeToolStripItems = new Dictionary();
try {
ITypeResolutionService typeResService = GetService(typeof(ITypeResolutionService)) as ITypeResolutionService;
-
+
// Add a hard-path if you are using SharpDevelop
// Language.AddLanguageFilePath(@"C:\Greenshot\Greenshot\Languages");
-
+
// this "type"
Assembly currentAssembly = GetType().Assembly;
if (typeResService != null)
@@ -209,11 +209,11 @@ namespace GreenshotPlugin.Controls {
}
private void ClearChangeNotifications() {
- // The m_changeService value is null when not in design mode,
- // as the IComponentChangeService is only available at design time.
+ // The m_changeService value is null when not in design mode,
+ // as the IComponentChangeService is only available at design time.
m_changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
- // Clear our the component change events to prepare for re-siting.
+ // Clear our the component change events to prepare for re-siting.
if (m_changeService != null) {
m_changeService.ComponentChanged -= OnComponentChanged;
m_changeService.ComponentAdded -= OnComponentAdded;
@@ -335,7 +335,7 @@ namespace GreenshotPlugin.Controls {
}
}
}
-
+
///
/// Helper method to cache the fieldinfo values, so we don't need to reflect all the time!
///
@@ -379,8 +379,8 @@ namespace GreenshotPlugin.Controls {
ApplyLanguage(applyToControl);
}
}
-
- if (DesignMode) {
+
+ if (DesignMode) {
foreach (Control designControl in _designTimeControls.Values) {
ApplyLanguage(designControl);
}
@@ -514,7 +514,7 @@ namespace GreenshotPlugin.Controls {
iniValue.Value = comboxBox.GetSelectedEnum();
iniDirty = true;
}
-
+
}
}
}
diff --git a/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs b/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs
index 572829a76..e8ca384a2 100644
--- a/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs
+++ b/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs
@@ -70,8 +70,8 @@ namespace GreenshotPlugin.Controls {
//
// OAuthLoginForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(595, 315);
this.Controls.Add(this._browser);
this.Controls.Add(this._addressTextBox);
diff --git a/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs b/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs
index d287b3dde..c308b4b07 100644
--- a/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs
+++ b/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs
@@ -50,7 +50,6 @@ namespace GreenshotPlugin.Controls {
//
// label_pleasewait
//
- this.label_pleasewait.AutoSize = true;
this.label_pleasewait.Dock = System.Windows.Forms.DockStyle.Fill;
this.label_pleasewait.Location = new System.Drawing.Point(0, 0);
this.label_pleasewait.Name = "label_pleasewait";
@@ -77,9 +76,8 @@ namespace GreenshotPlugin.Controls {
//
// PleaseWaitForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoSize = true;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(169, 76);
this.Controls.Add(this.cancelButton);
diff --git a/GreenshotPlugin/Controls/QualityDialog.Designer.cs b/GreenshotPlugin/Controls/QualityDialog.Designer.cs
index cf10c3a2e..eaf714d06 100644
--- a/GreenshotPlugin/Controls/QualityDialog.Designer.cs
+++ b/GreenshotPlugin/Controls/QualityDialog.Designer.cs
@@ -108,7 +108,6 @@ namespace GreenshotPlugin.Controls {
//
// checkBox_reduceColors
//
- this.checkBox_reduceColors.AutoSize = true;
this.checkBox_reduceColors.Location = new System.Drawing.Point(12, 11);
this.checkBox_reduceColors.Name = "checkBox_reduceColors";
this.checkBox_reduceColors.Size = new System.Drawing.Size(95, 17);
@@ -116,7 +115,7 @@ namespace GreenshotPlugin.Controls {
this.checkBox_reduceColors.Text = "settings_reducecolors";
this.checkBox_reduceColors.UseVisualStyleBackColor = true;
//
- // QualityDialog
+ // QualityDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
diff --git a/GreenshotPlugin/Core/AbstractDestination.cs b/GreenshotPlugin/Core/AbstractDestination.cs
index 886dd5dab..ba9878c23 100644
--- a/GreenshotPlugin/Core/AbstractDestination.cs
+++ b/GreenshotPlugin/Core/AbstractDestination.cs
@@ -155,10 +155,16 @@ namespace GreenshotPlugin.Core {
TopLevel = true
};
- menu.Opened += (sender, args) =>
- {
- var scaledIconSize = DpiHelper.ScaleWithDpi(CoreConfig.IconSize, DpiHelper.GetDpi(menu.Handle));
- menu.ImageScalingSize = scaledIconSize;
+ menu.Opening += (sender, args) =>
+ {
+ // find the DPI settings for the screen where this is going to land
+ var screenDpi = DpiHelper.GetDpi(menu.Location);
+ var scaledIconSize = DpiHelper.ScaleWithDpi(CoreConfig.IconSize, screenDpi);
+ menu.SuspendLayout();
+ var fontSize = DpiHelper.ScaleWithDpi(12f, screenDpi);
+ menu.Font = new Font(FontFamily.GenericSansSerif, fontSize, FontStyle.Regular, GraphicsUnit.Pixel);
+ menu.ImageScalingSize = scaledIconSize;
+ menu.ResumeLayout();
};
menu.Closing += delegate(object source, ToolStripDropDownClosingEventArgs eventArgs) {
@@ -191,7 +197,10 @@ namespace GreenshotPlugin.Core {
menu.MouseEnter += delegate
{
// in case the menu has been unfocused, focus again so that dropdown menus will still open on mouseenter
- if(!menu.ContainsFocus) menu.Focus();
+ if (!menu.ContainsFocus)
+ {
+ menu.Focus();
+ }
};
foreach (IDestination destination in destinations) {
// Fix foreach loop variable for the delegate
diff --git a/GreenshotPlugin/Core/DpiHelper.cs b/GreenshotPlugin/Core/DpiHelper.cs
index 171cf19ee..991f2897e 100644
--- a/GreenshotPlugin/Core/DpiHelper.cs
+++ b/GreenshotPlugin/Core/DpiHelper.cs
@@ -453,6 +453,24 @@ namespace GreenshotPlugin.Core
}
}
+ ///
+ /// Return the DPI for the screen which the location is located on
+ ///
+ /// POINT
+ /// uint
+ public static uint GetDpi(POINT location)
+ {
+ RECT rect = new RECT(location.X, location.Y, 1,1);
+ IntPtr hMonitor = User32.MonitorFromRect(ref rect, User32.MONITOR_DEFAULTTONEAREST);
+ var result = GetDpiForMonitor(hMonitor, MonitorDpiType.EffectiveDpi, out var dpiX, out var dpiY);
+ if (result.Succeeded())
+ {
+ return dpiX;
+ }
+ return DefaultScreenDpi;
+ }
+
+
///
/// Retrieve the DPI value for the supplied window handle
///
@@ -476,7 +494,8 @@ namespace GreenshotPlugin.Core
{
var hMonitor = User32.MonitorFromWindow(hWnd, MonitorFrom.DefaultToNearest);
// ReSharper disable once UnusedVariable
- if (GetDpiForMonitor(hMonitor, MonitorDpiType.EffectiveDpi, out var dpiX, out var dpiY))
+ var result = GetDpiForMonitor(hMonitor, MonitorDpiType.EffectiveDpi, out var dpiX, out var dpiY);
+ if (result.Succeeded())
{
return dpiX;
}
@@ -544,9 +563,8 @@ namespace GreenshotPlugin.Core
/// out int for the horizontal dpi
/// out int for the vertical dpi
/// true if all okay
- [DllImport("shcore")]
- [return: MarshalAs(UnmanagedType.Bool)]
- private static extern bool GetDpiForMonitor(IntPtr hMonitor, MonitorDpiType dpiType, out uint dpiX, out uint dpiY);
+ [DllImport("shcore.dll", SetLastError = true)]
+ private static extern HResult GetDpiForMonitor(IntPtr hMonitor, MonitorDpiType dpiType, out uint dpiX, out uint dpiY);
///
/// See EnableNonClientDpiScaling function
diff --git a/GreenshotPlugin/Core/OAuthHelper.cs b/GreenshotPlugin/Core/OAuthHelper.cs
index 3908a6702..ce059189f 100644
--- a/GreenshotPlugin/Core/OAuthHelper.cs
+++ b/GreenshotPlugin/Core/OAuthHelper.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -32,6 +32,8 @@ using System.Net.Sockets;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
+using System.Windows.Forms;
+using GreenshotPlugin.Hooking;
namespace GreenshotPlugin.Core {
///
@@ -41,16 +43,17 @@ namespace GreenshotPlugin.Core {
HMACSHA1,
PLAINTEXT,
}
-
+
///
- /// Specify the autorize mode that is used to get the token from the cloud service.
+ /// Specify the authorize mode that is used to get the token from the cloud service.
///
public enum OAuth2AuthorizeMode {
- Unknown, // Will give an exception, caller needs to specify another value
- LocalServer, // Will specify a redirect URL to http://localhost:port/authorize, while having a HttpListener
- MonitorTitle, // Not implemented yet: Will monitor for title changes
- Pin, // Not implemented yet: Will ask the user to enter the shown PIN
- EmbeddedBrowser // Will open into an embedded _browser (OAuthLoginForm), and catch the redirect
+ Unknown, // Will give an exception, caller needs to specify another value
+ LocalServer, // Will specify a redirect URL to http://localhost:port/authorize, while having a HttpListener
+ MonitorTitle, // Not implemented yet: Will monitor for title changes
+ Pin, // Not implemented yet: Will ask the user to enter the shown PIN
+ EmbeddedBrowser, // Will open into an embedded _browser (OAuthLoginForm), and catch the redirect
+ OutOfBoundAuto
}
///
@@ -211,7 +214,7 @@ namespace GreenshotPlugin.Core {
//
// List of know and used oauth parameters' names
- //
+ //
protected const string OAUTH_CONSUMER_KEY_KEY = "oauth_consumer_key";
protected const string OAUTH_CALLBACK_KEY = "oauth_callback";
protected const string OAUTH_VERSION_KEY = "oauth_version";
@@ -395,7 +398,7 @@ namespace GreenshotPlugin.Core {
}
///
- /// Generate the timestamp for the signature
+ /// Generate the timestamp for the signature
///
///
public static string GenerateTimeStamp() {
@@ -472,7 +475,7 @@ namespace GreenshotPlugin.Core {
///
/// Get the access token
///
- /// The access token.
+ /// The access token.
private string GetAccessToken() {
if (string.IsNullOrEmpty(Token) || (CheckVerifier && string.IsNullOrEmpty(Verifier))) {
Exception e = new Exception("The request token and verifier were not set");
@@ -1121,12 +1124,43 @@ Greenshot received information from CloudServiceName. You can close this browser
{
OAuth2AuthorizeMode.LocalServer => AuthenticateViaLocalServer(settings),
OAuth2AuthorizeMode.EmbeddedBrowser => AuthenticateViaEmbeddedBrowser(settings),
- _ => throw new NotImplementedException($"Authorize mode '{settings.AuthorizeMode}' is not 'yet' implemented."),
+ OAuth2AuthorizeMode.OutOfBoundAuto => AuthenticateViaDefaultBrowser(settings),
+ _ => throw new NotImplementedException($"Authorize mode '{settings.AuthorizeMode}' is not 'yet' implemented."),
};
return completed;
}
- ///
+ ///
+ /// Authenticate via the default browser
+ /// If this works, return the code
+ ///
+ /// OAuth2Settings with the Auth / Token url etc
+ /// true if completed, false if canceled
+ private static bool AuthenticateViaDefaultBrowser(OAuth2Settings settings)
+ {
+ var monitor = new WindowsTitleMonitor();
+
+ string[] code = new string[1];
+ monitor.TitleChangeEvent += args =>
+ {
+ if (args.Title.Contains(settings.State))
+ {
+ code[0] = args.Title;
+ settings.Code = args.Title;
+ }
+ };
+ using (var process = Process.Start(settings.FormattedAuthUrl))
+ {
+ while (string.IsNullOrEmpty(code[0]))
+ {
+ Application.DoEvents();
+ }
+ };
+
+ return true;
+ }
+
+ ///
/// Authenticate via an embedded browser
/// If this works, return the code
///
@@ -1192,7 +1226,7 @@ Greenshot received information from CloudServiceName. You can close this browser
}
///
- /// Check and authenticate or refresh tokens
+ /// Check and authenticate or refresh tokens
///
/// OAuth2Settings
public static void CheckAndAuthenticateOrRefresh(OAuth2Settings settings) {
diff --git a/GreenshotPlugin/Core/WindowDetails.cs b/GreenshotPlugin/Core/WindowDetails.cs
index 883c7aa1e..4fff18959 100644
--- a/GreenshotPlugin/Core/WindowDetails.cs
+++ b/GreenshotPlugin/Core/WindowDetails.cs
@@ -1137,46 +1137,50 @@ namespace GreenshotPlugin.Core
///
/// Set the window as foreground window
///
- /// hWnd of the window to bring to the foreground
- /// bool with true to use a trick to really bring the window to the foreground
- public static void ToForeground(IntPtr handle, bool workaround = true)
+ /// hWnd of the window to bring to the foreground
+ public static void ToForeground(IntPtr hWnd)
{
- var window = new WindowDetails(handle);
+ var foregroundWindow = User32.GetForegroundWindow();
+ if (hWnd == foregroundWindow)
+ {
+ return;
+ }
+
+ var window = new WindowDetails(hWnd);
// Nothing we can do if it's not visible!
if (!window.Visible)
{
return;
}
+
+ var threadId1 = User32.GetWindowThreadProcessId(foregroundWindow, IntPtr.Zero);
+ var threadId2 = User32.GetWindowThreadProcessId(hWnd, IntPtr.Zero);
+
+ // Show window in foreground.
+ if (threadId1 != threadId2)
+ {
+ User32.AttachThreadInput(threadId1, threadId2, 1);
+ User32.SetForegroundWindow(hWnd);
+ User32.AttachThreadInput(threadId1, threadId2, 0);
+ }
+ else
+ {
+ User32.SetForegroundWindow(hWnd);
+ }
+
+ User32.BringWindowToTop(hWnd);
+
if (window.Iconic)
{
window.Iconic = false;
- while (window.Iconic)
- {
- Application.DoEvents();
- }
}
- // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms633539(v=vs.85).aspx
- if (workaround)
- {
- const byte alt = 0xA4;
- const int extendedKey = 0x1;
- const int keyup = 0x2;
- // Simulate an "ALT" key press.
- User32.keybd_event(alt, 0x45, extendedKey | 0, 0);
- // Simulate an "ALT" key release.
- User32.keybd_event(alt, 0x45, extendedKey | keyup, 0);
- }
- // Show window in forground.
- User32.BringWindowToTop(handle);
- User32.SetForegroundWindow(handle);
}
///
/// Set the window as foreground window
///
- /// true to use a workaround, otherwise the window might only flash
- public void ToForeground(bool workaround = true) {
- ToForeground(Handle, workaround);
+ public void ToForeground() {
+ ToForeground(Handle);
}
///
diff --git a/GreenshotPlugin/Interfaces/IDestination.cs b/GreenshotPlugin/Interfaces/IDestination.cs
index 371d2b6b3..e4f39d796 100644
--- a/GreenshotPlugin/Interfaces/IDestination.cs
+++ b/GreenshotPlugin/Interfaces/IDestination.cs
@@ -1,20 +1,20 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
+ *
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
@@ -104,8 +104,8 @@ namespace GreenshotPlugin.Interfaces {
Keys EditorShortcutKeys {
get;
}
-
- ///
+
+ ///
/// Gets the dynamic destinations
///
IEnumerable DynamicDestinations();
diff --git a/GreenshotPlugin/UnmanagedHelpers/User32.cs b/GreenshotPlugin/UnmanagedHelpers/User32.cs
index 3c5a90a71..d6ae3acb1 100644
--- a/GreenshotPlugin/UnmanagedHelpers/User32.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/User32.cs
@@ -52,9 +52,6 @@ namespace GreenshotPlugin.UnmanagedHelpers {
public const int MONITOR_DEFAULTTONEAREST = 2;
public const int CURSOR_SHOWING = 0x00000001;
- [DllImport("user32", SetLastError = true)]
- public static extern bool keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
-
///
/// Determines whether the specified window handle identifies an existing window.
///
@@ -72,6 +69,11 @@ namespace GreenshotPlugin.UnmanagedHelpers {
public static extern bool IsWindowVisible(IntPtr hWnd);
[DllImport("user32", SetLastError = true)]
public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int processId);
+ [DllImport("user32", SetLastError = true)]
+ public static extern int GetWindowThreadProcessId(IntPtr hWnd, IntPtr processId);
+ [DllImport("user32")]
+ public static extern IntPtr AttachThreadInput(int idAttach, int idAttachTo, int fAttach);
+
[DllImport("user32", SetLastError = true)]
public static extern IntPtr GetParent(IntPtr hWnd);
[DllImport("user32", SetLastError = true)]
From ffdc685e802a43c9c360eba5916f775bc059cedd Mon Sep 17 00:00:00 2001
From: jklingen
Date: Sun, 1 Nov 2020 16:57:28 +0100
Subject: [PATCH 060/224] Add Explaining Comment for about_translation String
---
Greenshot/Languages/language-en-US.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Greenshot/Languages/language-en-US.xml b/Greenshot/Languages/language-en-US.xml
index b052785ec..1efcd15e9 100644
--- a/Greenshot/Languages/language-en-US.xml
+++ b/Greenshot/Languages/language-en-US.xml
@@ -9,7 +9,7 @@
Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
About Greenshot
- Info about translation
+
Greenshot - the revolutionary screenshot utility
Close
Sorry, an unexpected error occured.
From 633b31ec293997f40910733ffe25375ef369a4ac Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sat, 2 Jan 2021 21:53:47 +0100
Subject: [PATCH 061/224] THis fixes an exception when Greenshot is used via
wine.
---
GreenshotPlugin/Core/ImageHelper.cs | 57 +++++++++++++++++------------
1 file changed, 33 insertions(+), 24 deletions(-)
diff --git a/GreenshotPlugin/Core/ImageHelper.cs b/GreenshotPlugin/Core/ImageHelper.cs
index 8c31eaf4c..e5e5a1b60 100644
--- a/GreenshotPlugin/Core/ImageHelper.cs
+++ b/GreenshotPlugin/Core/ImageHelper.cs
@@ -1351,22 +1351,22 @@ namespace GreenshotPlugin.Core {
// Make sure both images have the same resolution
newImage.SetResolution(sourceImage.HorizontalResolution, sourceImage.VerticalResolution);
- using Graphics graphics = Graphics.FromImage(newImage);
- if (fromTransparentToNon)
- {
- // Rule 2: Make sure the background color is white
- graphics.Clear(Color.White);
- }
- // decide fastest copy method
- if (isAreaEqual)
- {
- graphics.DrawImageUnscaled(sourceImage, 0, 0);
- }
- else
- {
- graphics.DrawImage(sourceImage, 0, 0, sourceRect, GraphicsUnit.Pixel);
- }
- }
+ using Graphics graphics = Graphics.FromImage(newImage);
+ if (fromTransparentToNon)
+ {
+ // Rule 2: Make sure the background color is white
+ graphics.Clear(Color.White);
+ }
+ // decide fastest copy method
+ if (isAreaEqual)
+ {
+ graphics.DrawImageUnscaled(sourceImage, 0, 0);
+ }
+ else
+ {
+ graphics.DrawImage(sourceImage, 0, 0, sourceRect, GraphicsUnit.Pixel);
+ }
+ }
else
{
// Let GDI+ decide how to convert, need to test what is quicker...
@@ -1374,18 +1374,27 @@ namespace GreenshotPlugin.Core {
// Make sure both images have the same resolution
newImage.SetResolution(sourceImage.HorizontalResolution, sourceImage.VerticalResolution);
}
- // Clone property items (EXIF information etc)
- foreach (var propertyItem in sourceImage.PropertyItems)
+
+ // In WINE someone getting the PropertyItems doesn't work
+ try
{
- try
+ // Clone property items (EXIF information etc)
+ foreach (var propertyItem in sourceImage.PropertyItems)
{
- newImage.SetPropertyItem(propertyItem);
- }
- catch (Exception ex)
- {
- Log.Warn("Problem cloning a propertyItem.", ex);
+ try
+ {
+ newImage.SetPropertyItem(propertyItem);
+ }
+ catch (Exception innerEx)
+ {
+ Log.Warn("Problem cloning a propertyItem.", innerEx);
+ }
}
}
+ catch (Exception ex)
+ {
+ Log.Warn("Problem cloning a propertyItem.", ex);
+ }
return newImage;
}
From e174a9a36b382fb87b71899fac8cf35c6e061a27 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sat, 2 Jan 2021 21:54:48 +0100
Subject: [PATCH 062/224] Update of dependencies.
---
Directory.Build.props | 6 +++---
Greenshot/Greenshot.csproj | 2 +-
GreenshotJiraPlugin/GreenshotJiraPlugin.csproj | 3 ++-
GreenshotJiraPlugin/JiraConnector.cs | 4 ++--
GreenshotPlugin/GreenshotPlugin.csproj | 2 +-
5 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 1415521cf..520eb0976 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -8,7 +8,7 @@
https://github.com/greenshot/greenshot
https://www.gnu.org/licenses/gpl.html
GPL
- latest
+ 9
true
true
win10-x64;win10-x86;win-x64;win-x86
@@ -56,7 +56,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers
@@ -102,7 +102,7 @@
-
+
diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj
index 03b68dc1b..9419fb179 100644
--- a/Greenshot/Greenshot.csproj
+++ b/Greenshot/Greenshot.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
index 6901a31c5..2c4e72fe6 100644
--- a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
+++ b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
@@ -12,6 +12,7 @@
-
+
+
\ No newline at end of file
diff --git a/GreenshotJiraPlugin/JiraConnector.cs b/GreenshotJiraPlugin/JiraConnector.cs
index 163771019..b836ea560 100644
--- a/GreenshotJiraPlugin/JiraConnector.cs
+++ b/GreenshotJiraPlugin/JiraConnector.cs
@@ -29,8 +29,8 @@ using System.Windows.Forms;
using Dapplo.HttpExtensions;
using Dapplo.HttpExtensions.Extensions;
using Dapplo.Jira;
-using Dapplo.Jira.Converters;
using Dapplo.Jira.Entities;
+using Dapplo.Jira.SvgWinForms.Converters;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
@@ -241,7 +241,7 @@ namespace GreenshotJiraPlugin {
/// text
/// the visibility role
/// CancellationToken
- public async Task AddCommentAsync(string issueKey, string body, string visibility = null, CancellationToken cancellationToken = default)
+ public async Task AddCommentAsync(string issueKey, string body, Visibility visibility = null, CancellationToken cancellationToken = default)
{
await CheckCredentialsAsync(cancellationToken);
await _jiraClient.Issue.AddCommentAsync(issueKey, body, visibility, cancellationToken).ConfigureAwait(false);
diff --git a/GreenshotPlugin/GreenshotPlugin.csproj b/GreenshotPlugin/GreenshotPlugin.csproj
index 461aa6c84..3caa4a7c4 100644
--- a/GreenshotPlugin/GreenshotPlugin.csproj
+++ b/GreenshotPlugin/GreenshotPlugin.csproj
@@ -14,7 +14,7 @@
-
+
From 24c9b8fb36e30ae3a743ac94ce6daf7d00395e6e Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sun, 10 Jan 2021 10:33:53 +0100
Subject: [PATCH 063/224] This reduces the native code in favor of another
library so there is less to maintain.
---
Greenshot/Forms/MainForm.cs | 4 +-
Greenshot/Helpers/CaptureHelper.cs | 14 +-
.../Helpers/NotifyIconNotificationService.cs | 18 +-
Greenshot/Helpers/UpdateService.cs | 2 +-
.../Interfaces/INotificationService.cs | 12 +-
.../GreenshotWin10Plugin.csproj | 2 +-
.../Native/DesktopBridgeHelpers.cs | 53 ---
.../DesktopNotificationHistoryCompat.cs | 109 ------
.../DesktopNotificationManagerCompat.cs | 164 ---------
.../Native/GreenshotNotificationActivator.cs | 3 +-
.../Native/INotificationActivationCallback.cs | 35 --
.../Native/NotificationActivator.cs | 35 --
.../Native/NotificationUserInput.cs | 70 ----
.../Structs/NotificationUserInputData.cs | 30 --
.../ToastNotificationService.cs | 20 +-
README.md | 2 +-
appveyor12.yml | 89 -----
appveyor13.yml | 92 -----
build.ps1 | 343 ------------------
prebuild.ps1 | 53 ---
20 files changed, 42 insertions(+), 1108 deletions(-)
delete mode 100644 GreenshotWin10Plugin/Native/DesktopBridgeHelpers.cs
delete mode 100644 GreenshotWin10Plugin/Native/DesktopNotificationHistoryCompat.cs
delete mode 100644 GreenshotWin10Plugin/Native/DesktopNotificationManagerCompat.cs
delete mode 100644 GreenshotWin10Plugin/Native/INotificationActivationCallback.cs
delete mode 100644 GreenshotWin10Plugin/Native/NotificationActivator.cs
delete mode 100644 GreenshotWin10Plugin/Native/NotificationUserInput.cs
delete mode 100644 GreenshotWin10Plugin/Native/Structs/NotificationUserInputData.cs
delete mode 100644 appveyor12.yml
delete mode 100644 appveyor13.yml
delete mode 100644 build.ps1
delete mode 100644 prebuild.ps1
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index e7eed651e..61f5141bd 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -451,7 +451,7 @@ namespace Greenshot {
case CommandEnum.FirstLaunch:
LOG.Info("FirstLaunch: Created new configuration, showing balloon.");
var notifyIconClassicMessageHandler = SimpleServiceProvider.Current.GetInstance();
- notifyIconClassicMessageHandler.ShowInfoMessage(Language.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.RegionHotkey)), 2000, ShowSetting);
+ notifyIconClassicMessageHandler.ShowInfoMessage(Language.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.RegionHotkey)), TimeSpan.FromMinutes(10), ShowSetting);
break;
case CommandEnum.ReloadConfig:
LOG.Info("Reload requested");
@@ -901,7 +901,7 @@ namespace Greenshot {
}
private void ShowThumbnailOnEnter(object sender, EventArgs e) {
- if (!(sender is ToolStripMenuItem captureWindowItem)) return;
+ if (sender is not ToolStripMenuItem captureWindowItem) return;
WindowDetails window = captureWindowItem.Tag as WindowDetails;
if (_thumbnailForm == null) {
_thumbnailForm = new ThumbnailForm();
diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs
index 156470802..42f28e4ad 100644
--- a/Greenshot/Helpers/CaptureHelper.cs
+++ b/Greenshot/Helpers/CaptureHelper.cs
@@ -516,10 +516,10 @@ namespace Greenshot.Helpers {
///
/// SurfaceMessageEventArgs
private void OpenCaptureOnClick(SurfaceMessageEventArgs e) {
- var notifyIcon = SimpleServiceProvider.Current.GetInstance();
- if (!(notifyIcon.Tag is SurfaceMessageEventArgs eventArgs)) {
+ var notifyIcon = SimpleServiceProvider.Current.GetInstance();
+ if (notifyIcon.Tag is not SurfaceMessageEventArgs eventArgs) {
Log.Warn("OpenCaptureOnClick called without SurfaceMessageEventArgs");
- return;
+ return;
}
ISurface surface = eventArgs.Surface;
if (surface != null)
@@ -549,18 +549,18 @@ namespace Greenshot.Helpers {
var notifyIconClassicMessageHandler = SimpleServiceProvider.Current.GetInstance();
switch (eventArgs.MessageType) {
case SurfaceMessageTyp.Error:
- notifyIconClassicMessageHandler.ShowErrorMessage(eventArgs.Message, 10000);
+ notifyIconClassicMessageHandler.ShowErrorMessage(eventArgs.Message, TimeSpan.FromHours(1));
break;
case SurfaceMessageTyp.Info:
- notifyIconClassicMessageHandler.ShowInfoMessage(eventArgs.Message, 10000, () =>
- {
+ notifyIconClassicMessageHandler.ShowInfoMessage(eventArgs.Message, TimeSpan.FromHours(1), () =>
+ {
Log.Info("Clicked!");
});
break;
case SurfaceMessageTyp.FileSaved:
case SurfaceMessageTyp.UploadedUri:
// Show a balloon and register an event handler to open the "capture" for if someone clicks the balloon.
- notifyIconClassicMessageHandler.ShowInfoMessage(eventArgs.Message, 10000, () => OpenCaptureOnClick(eventArgs));
+ notifyIconClassicMessageHandler.ShowInfoMessage(eventArgs.Message, TimeSpan.FromHours(1), () => OpenCaptureOnClick(eventArgs));
break;
}
}
diff --git a/Greenshot/Helpers/NotifyIconNotificationService.cs b/Greenshot/Helpers/NotifyIconNotificationService.cs
index e5d49a643..7398a7890 100644
--- a/Greenshot/Helpers/NotifyIconNotificationService.cs
+++ b/Greenshot/Helpers/NotifyIconNotificationService.cs
@@ -46,10 +46,10 @@ namespace Greenshot.Helpers
/// This will show a warning message to the user
///
/// string
- ///
+ /// TimeSpan
/// Action called if the user clicks the notification
/// Action
- public void ShowWarningMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ public void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null)
{
ShowMessage(message, timeout, ToolTipIcon.Warning, onClickAction, onClosedAction);
}
@@ -58,10 +58,10 @@ namespace Greenshot.Helpers
/// This will show an error message to the user
///
/// string
- ///
+ /// TimeSpan
/// Action called if the user clicks the notification
/// Action
- public void ShowErrorMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ public void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null)
{
ShowMessage(message, timeout, ToolTipIcon.Error, onClickAction, onClosedAction);
}
@@ -70,10 +70,10 @@ namespace Greenshot.Helpers
/// This will show an info message to the user
///
/// string
- /// int
+ /// TimeSpan
/// Action called if the user clicks the notification
/// Action
- public void ShowInfoMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ public void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null)
{
ShowMessage(message, timeout, ToolTipIcon.Info, onClickAction, onClosedAction);
}
@@ -82,11 +82,11 @@ namespace Greenshot.Helpers
/// This will show a message to the user
///
/// string
- /// int
+ /// TimeSpan
/// ToolTipIcon
/// Action
/// Action
- private void ShowMessage(string message, int timeout, ToolTipIcon level, Action onClickAction = null, Action onClosedAction = null) {
+ private void ShowMessage(string message, TimeSpan? timeout = null, ToolTipIcon level = ToolTipIcon.Info, Action onClickAction = null, Action onClosedAction = null) {
// Do not inform the user if this is disabled
if (!CoreConfiguration.ShowTrayNotification)
{
@@ -128,7 +128,7 @@ namespace Greenshot.Helpers
_notifyIcon.BalloonTipClicked -= BalloonClickedHandler;
}
_notifyIcon.BalloonTipClosed += BalloonClosedHandler;
- _notifyIcon.ShowBalloonTip(timeout, @"Greenshot", message, level);
+ _notifyIcon.ShowBalloonTip(timeout.HasValue ? (int)timeout.Value.TotalMilliseconds : 5000, @"Greenshot", message, level);
}
}
}
diff --git a/Greenshot/Helpers/UpdateService.cs b/Greenshot/Helpers/UpdateService.cs
index d1f755472..ceb3488be 100644
--- a/Greenshot/Helpers/UpdateService.cs
+++ b/Greenshot/Helpers/UpdateService.cs
@@ -198,7 +198,7 @@ namespace Greenshot.Helpers
{
var notificationService = SimpleServiceProvider.Current.GetInstance();
var message = Language.GetFormattedString(LangKey.update_found, newVersion.ToString());
- notificationService.ShowInfoMessage(message, 10000, () => Process.Start(Downloads.AbsoluteUri));
+ notificationService.ShowInfoMessage(message, TimeSpan.FromHours(1), () => Process.Start(Downloads.AbsoluteUri));
}
///
diff --git a/GreenshotPlugin/Interfaces/INotificationService.cs b/GreenshotPlugin/Interfaces/INotificationService.cs
index 922d718ba..c1342b5e4 100644
--- a/GreenshotPlugin/Interfaces/INotificationService.cs
+++ b/GreenshotPlugin/Interfaces/INotificationService.cs
@@ -32,27 +32,27 @@ namespace GreenshotPlugin.Interfaces
/// This will show a warning message to the user
///
/// string
- ///
+ /// TimeSpan
/// Action called if the user clicks the notification
/// Action
- void ShowWarningMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null);
+ void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null);
///
/// This will show an error message to the user
///
/// string
- ///
+ /// TimeSpan
/// Action called if the user clicks the notification
/// Action
- void ShowErrorMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null);
+ void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null);
///
/// This will show an info message to the user
///
/// string
- /// int
+ /// TimeSpan
/// Action called if the user clicks the notification
/// Action
- void ShowInfoMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null);
+ void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null);
}
}
\ No newline at end of file
diff --git a/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj b/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj
index a17df050e..00229a0ab 100644
--- a/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj
+++ b/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/GreenshotWin10Plugin/Native/DesktopBridgeHelpers.cs b/GreenshotWin10Plugin/Native/DesktopBridgeHelpers.cs
deleted file mode 100644
index 0c7728ee0..000000000
--- a/GreenshotWin10Plugin/Native/DesktopBridgeHelpers.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using System.Runtime.InteropServices;
-using System.Text;
-using GreenshotPlugin.Core;
-
-namespace GreenshotWin10Plugin.Native
-{
- ///
- /// Code from https://github.com/qmatteoq/DesktopBridgeHelpers/edit/master/DesktopBridge.Helpers/Helpers.cs
- ///
- public static class DesktopBridgeHelpers
- {
- const long AppModelErrorNoPackage = 15700L;
-
- [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
- static extern int GetCurrentPackageFullName(ref int packageFullNameLength, StringBuilder packageFullName);
-
- private static bool? _isRunningAsUwp;
- public static bool IsRunningAsUwp()
- {
- if (_isRunningAsUwp != null) return _isRunningAsUwp.Value;
-
- if (WindowsVersion.IsWindows7OrLower)
- {
- _isRunningAsUwp = false;
- }
- else
- {
- int length = 0;
- StringBuilder sb = new StringBuilder(0);
- GetCurrentPackageFullName(ref length, sb);
-
- sb = new StringBuilder(length);
- int result = GetCurrentPackageFullName(ref length, sb);
-
- _isRunningAsUwp = result != AppModelErrorNoPackage;
- }
-
- return _isRunningAsUwp.Value;
- }
- }
-}
diff --git a/GreenshotWin10Plugin/Native/DesktopNotificationHistoryCompat.cs b/GreenshotWin10Plugin/Native/DesktopNotificationHistoryCompat.cs
deleted file mode 100644
index f536755ab..000000000
--- a/GreenshotWin10Plugin/Native/DesktopNotificationHistoryCompat.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using System.Collections.Generic;
-using Windows.UI.Notifications;
-
-namespace GreenshotWin10Plugin.Native
-{
- ///
- /// Manages the toast notifications for an app including the ability the clear all toast history and removing individual toasts.
- ///
- public sealed class DesktopNotificationHistoryCompat
- {
- private readonly string _applicationUserModelId;
- private readonly ToastNotificationHistory _history;
-
- ///
- /// Do not call this. Instead, call to obtain an instance.
- ///
- ///
- internal DesktopNotificationHistoryCompat(string applicationUserModelId)
- {
- _applicationUserModelId = applicationUserModelId;
- _history = ToastNotificationManager.History;
- }
-
- ///
- /// Removes all notifications sent by this app from action center.
- ///
- public void Clear()
- {
- if (_applicationUserModelId != null)
- {
- _history.Clear(_applicationUserModelId);
- }
- else
- {
- _history.Clear();
- }
- }
-
- ///
- /// Gets all notifications sent by this app that are currently still in Action Center.
- ///
- /// A collection of toasts.
- public IReadOnlyList GetHistory()
- {
- return _applicationUserModelId != null ? _history.GetHistory(_applicationUserModelId) : _history.GetHistory();
- }
-
- ///
- /// Removes an individual toast, with the specified tag label, from action center.
- ///
- /// The tag label of the toast notification to be removed.
- public void Remove(string tag)
- {
- if (_applicationUserModelId != null)
- {
- _history.Remove(tag, string.Empty, _applicationUserModelId);
- }
- else
- {
- _history.Remove(tag);
- }
- }
-
- ///
- /// Removes a toast notification from the action using the notification's tag and group labels.
- ///
- /// The tag label of the toast notification to be removed.
- /// The group label of the toast notification to be removed.
- public void Remove(string tag, string group)
- {
- if (_applicationUserModelId != null)
- {
- _history.Remove(tag, group, _applicationUserModelId);
- }
- else
- {
- _history.Remove(tag, group);
- }
- }
-
- ///
- /// Removes a group of toast notifications, identified by the specified group label, from action center.
- ///
- /// The group label of the toast notifications to be removed.
- public void RemoveGroup(string group)
- {
- if (_applicationUserModelId != null)
- {
- _history.RemoveGroup(group, _applicationUserModelId);
- }
- else
- {
- _history.RemoveGroup(group);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/GreenshotWin10Plugin/Native/DesktopNotificationManagerCompat.cs b/GreenshotWin10Plugin/Native/DesktopNotificationManagerCompat.cs
deleted file mode 100644
index a30c0ff3e..000000000
--- a/GreenshotWin10Plugin/Native/DesktopNotificationManagerCompat.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using Windows.UI.Notifications;
-
-namespace GreenshotWin10Plugin.Native
-{
- public static class DesktopNotificationManagerCompat
- {
- public const string TOAST_ACTIVATED_LAUNCH_ARG = "-ToastActivated";
-
- private static bool _registeredAumidAndComServer;
- private static string _applicationUserModelId;
- private static bool _registeredActivator;
-
- ///
- /// If not running under the Desktop Bridge, you must call this method to register your applicationUserModelId (AUMID) with the Compat library and to
- /// register your COM CLSID and EXE in LocalServer32 registry. Feel free to call this regardless, and we will no-op if running
- /// under Desktop Bridge. Call this upon application startup, before calling any other APIs.
- ///
- /// An applicationUserModelId (AUMID) that uniquely identifies your application.
- public static void RegisterAumidAndComServer(string applicationUserModelId) where T : NotificationActivator
- {
- if (string.IsNullOrWhiteSpace(applicationUserModelId))
- {
- throw new ArgumentException("You must provide an Application User Model Id (AUMID).", nameof(applicationUserModelId));
- }
-
- // If running as Desktop Bridge
- if (DesktopBridgeHelpers.IsRunningAsUwp())
- {
- // Clear the AUMID since Desktop Bridge doesn't use it, and then we're done.
- // Desktop Bridge apps are registered with platform through their manifest.
- // Their LocalServer32 key is also registered through their manifest.
- _applicationUserModelId = null;
- _registeredAumidAndComServer = true;
- return;
- }
-
- _applicationUserModelId = applicationUserModelId;
-
- string exePath = Process.GetCurrentProcess().MainModule?.FileName;
- if (exePath != null)
- {
- RegisterComServer(exePath);
- }
-
- _registeredAumidAndComServer = true;
- }
-
- ///
- /// Register the application an a com server
- ///
- /// type to register for
- /// string
- private static void RegisterComServer(string exePath) where T : NotificationActivator
- {
- // We register the EXE to start up when the notification is activated
- var guid = typeof(T).GUID;
- if (guid == null)
- {
- throw new ArgumentException("You must provide an Guid on your NotificationActivator.");
- }
- string regString = $"SOFTWARE\\Classes\\CLSID\\{{{guid}}}\\LocalServer32";
- using var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(regString);
-
- // Include a flag so we know this was a toast activation and should wait for COM to process
- // We also wrap EXE path in quotes for extra security
- key?.SetValue(null, '"' + exePath + '"' + " " + TOAST_ACTIVATED_LAUNCH_ARG);
- }
-
- ///
- /// Registers the activator type as a COM server client so that Windows can launch your activator.
- ///
- /// Your implementation of NotificationActivator. Must have GUID and ComVisible attributes on class.
- public static void RegisterActivator() where T : NotificationActivator
- {
- // Register type
- var regService = new RegistrationServices();
-
- regService.RegisterTypeForComClients(typeof(T), RegistrationClassContext.LocalServer, RegistrationConnectionType.MultipleUse);
-
- _registeredActivator = true;
- }
-
- ///
- /// Creates a toast notifier. You must have called first (and also if you're a classic Win32 app), or this will throw an exception.
- ///
- /// ToastNotifier
- public static ToastNotifier CreateToastNotifier()
- {
- EnsureRegistered();
-
- if (_applicationUserModelId != null)
- {
- // Non-Desktop Bridge
- return ToastNotificationManager.CreateToastNotifier(_applicationUserModelId);
- }
-
- // Desktop Bridge
- return ToastNotificationManager.CreateToastNotifier();
- }
-
- ///
- /// Gets the object. You must have called first (and also if you're a classic Win32 app), or this will throw an exception.
- ///
- public static DesktopNotificationHistoryCompat History
- {
- get
- {
- EnsureRegistered();
-
- return new DesktopNotificationHistoryCompat(_applicationUserModelId);
- }
- }
-
- ///
- /// Checks if the AUMID is correctly registered, if not this throws an exception
- ///
- private static void EnsureRegistered()
- {
- // If not registered AUMID yet
- if (!_registeredAumidAndComServer)
- {
- // Check if Desktop Bridge
- if (DesktopBridgeHelpers.IsRunningAsUwp())
- {
- // Implicitly registered, all good!
- _registeredAumidAndComServer = true;
- }
-
- else
- {
- // Otherwise, incorrect usage
- throw new Exception("You must call RegisterAumidAndComServer first.");
- }
- }
-
- // If not registered activator yet
- if (!_registeredActivator)
- {
- // Incorrect usage
- throw new Exception("You must call RegisterActivator first.");
- }
- }
-
- ///
- /// Gets a boolean representing whether http images can be used within toasts. This is true if running under Desktop Bridge.
- ///
- public static bool CanUseHttpImages => DesktopBridgeHelpers.IsRunningAsUwp();
- }
-}
\ No newline at end of file
diff --git a/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs b/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
index d2da5f4c9..a892e20f4 100644
--- a/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
+++ b/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
@@ -21,6 +21,7 @@
using System.Runtime.InteropServices;
using log4net;
+using Microsoft.Toolkit.Uwp.Notifications;
namespace GreenshotWin10Plugin.Native
{
@@ -28,7 +29,7 @@ namespace GreenshotWin10Plugin.Native
/// This implements the NotificationActivator
///
[ClassInterface(ClassInterfaceType.None)]
- [ComSourceInterfaces(typeof(INotificationActivationCallback))]
+ [ComSourceInterfaces(typeof(NotificationActivator.INotificationActivationCallback))]
[Guid("F48E86D3-E34C-4DB7-8F8F-9A0EA55F0D08"), ComVisible(true)]
public class GreenshotNotificationActivator : NotificationActivator
{
diff --git a/GreenshotWin10Plugin/Native/INotificationActivationCallback.cs b/GreenshotWin10Plugin/Native/INotificationActivationCallback.cs
deleted file mode 100644
index 59dd61443..000000000
--- a/GreenshotWin10Plugin/Native/INotificationActivationCallback.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using System.Runtime.InteropServices;
-using GreenshotWin10Plugin.Native.Structs;
-
-namespace GreenshotWin10Plugin.Native
-{
- ///
- /// This is the interface which allows your notifications to be clicked, which active the application
- ///
- [ComImport, Guid("53E31837-6600-4A81-9395-75CFFE746F94"),
- ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- public interface INotificationActivationCallback
- {
- void Activate(
- [In, MarshalAs(UnmanagedType.LPWStr)]
- string appUserModelId,
- [In, MarshalAs(UnmanagedType.LPWStr)]
- string invokedArgs,
- [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)]
- NotificationUserInputData[] data,
- [In, MarshalAs(UnmanagedType.U4)]
- uint dataCount);
- }
-}
diff --git a/GreenshotWin10Plugin/Native/NotificationActivator.cs b/GreenshotWin10Plugin/Native/NotificationActivator.cs
deleted file mode 100644
index bedf3f5f4..000000000
--- a/GreenshotWin10Plugin/Native/NotificationActivator.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using GreenshotWin10Plugin.Native.Structs;
-
-namespace GreenshotWin10Plugin.Native
-{
- ///
- /// Apps must implement this activator to handle notification activation.
- ///
- public abstract class NotificationActivator : INotificationActivationCallback
- {
- public void Activate(string appUserModelId, string invokedArgs, NotificationUserInputData[] data, uint dataCount)
- {
- OnActivated(invokedArgs, new NotificationUserInput(data), appUserModelId);
- }
-
- ///
- /// This method will be called when the user clicks on a foreground or background activation on a toast. Parent app must implement this method.
- ///
- /// The arguments from the original notification. This is either the launch argument if the user clicked the body of your toast, or the arguments from a button on your toast.
- /// Text and selection values that the user entered in your toast.
- /// Your AUMID.
- public abstract void OnActivated(string arguments, NotificationUserInput userInput, string appUserModelId);
- }
-}
\ No newline at end of file
diff --git a/GreenshotWin10Plugin/Native/NotificationUserInput.cs b/GreenshotWin10Plugin/Native/NotificationUserInput.cs
deleted file mode 100644
index 57b184c70..000000000
--- a/GreenshotWin10Plugin/Native/NotificationUserInput.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using GreenshotWin10Plugin.Native.Structs;
-
-namespace GreenshotWin10Plugin.Native
-{
- ///
- /// Text and selection values that the user entered on your notification. The Key is the ID of the input, and the Value is what the user entered.
- ///
- public class NotificationUserInput : IReadOnlyDictionary
- {
- private readonly NotificationUserInputData[] _notificationUserInputData;
-
- internal NotificationUserInput(NotificationUserInputData[] notificationUserInputData)
- {
- _notificationUserInputData = notificationUserInputData;
- }
-
- public string this[string key] => _notificationUserInputData.First(i => i.Key == key).Value;
-
- public IEnumerable Keys => _notificationUserInputData.Select(i => i.Key);
-
- public IEnumerable Values => _notificationUserInputData.Select(i => i.Value);
-
- public int Count => _notificationUserInputData.Length;
-
- public bool ContainsKey(string key)
- {
- return _notificationUserInputData.Any(i => i.Key == key);
- }
-
- public IEnumerator> GetEnumerator()
- {
- return _notificationUserInputData.Select(i => new KeyValuePair(i.Key, i.Value)).GetEnumerator();
- }
-
- public bool TryGetValue(string key, out string value)
- {
- foreach (var item in _notificationUserInputData)
- {
- if (item.Key == key)
- {
- value = item.Value;
- return true;
- }
- }
-
- value = null;
- return false;
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
\ No newline at end of file
diff --git a/GreenshotWin10Plugin/Native/Structs/NotificationUserInputData.cs b/GreenshotWin10Plugin/Native/Structs/NotificationUserInputData.cs
deleted file mode 100644
index 357aaa378..000000000
--- a/GreenshotWin10Plugin/Native/Structs/NotificationUserInputData.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// ******************************************************************
-// Copyright (c) Microsoft. All rights reserved.
-// This code is licensed under the MIT License (MIT).
-// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
-// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
-// ******************************************************************
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace GreenshotWin10Plugin.Native.Structs
-{
- ///
- /// See NOTIFICATION_USER_INPUT_DATA structure
- ///
- [StructLayout(LayoutKind.Sequential), Serializable]
- public struct NotificationUserInputData
- {
- [MarshalAs(UnmanagedType.LPWStr)]
- public string Key;
-
- [MarshalAs(UnmanagedType.LPWStr)]
- public string Value;
- }
-}
diff --git a/GreenshotWin10Plugin/ToastNotificationService.cs b/GreenshotWin10Plugin/ToastNotificationService.cs
index 5f51d7fd6..4b41f6f61 100644
--- a/GreenshotWin10Plugin/ToastNotificationService.cs
+++ b/GreenshotWin10Plugin/ToastNotificationService.cs
@@ -30,6 +30,7 @@ using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotWin10Plugin.Native;
using log4net;
+using Microsoft.Toolkit.Uwp.Notifications;
namespace GreenshotWin10Plugin
{
@@ -69,10 +70,10 @@ namespace GreenshotWin10Plugin
/// This creates the actual toast
///
/// string
- /// milliseconds until the toast timeouts
+ /// TimeSpan until the toast timeouts
/// Action called when clicked
/// Action called when the toast is closed
- private void ShowMessage(string message, int timeout, Action onClickAction, Action onClosedAction)
+ private void ShowMessage(string message, TimeSpan? timeout = default, Action onClickAction = null, Action onClosedAction = null)
{
// Do not inform the user if this is disabled
if (!CoreConfiguration.ShowTrayNotification)
@@ -118,7 +119,7 @@ namespace GreenshotWin10Plugin
var toast = new ToastNotification(toastXml)
{
// Windows 10 first with 1903: ExpiresOnReboot = true,
- ExpirationTime = timeout > 0 ? DateTimeOffset.Now.AddMilliseconds(timeout) : (DateTimeOffset?)null
+ ExpirationTime = timeout.HasValue ? DateTimeOffset.Now.Add(timeout.Value) : (DateTimeOffset?)null
};
void ToastActivatedHandler(ToastNotification toastNotification, object sender)
@@ -142,7 +143,11 @@ namespace GreenshotWin10Plugin
void ToastDismissedHandler(ToastNotification toastNotification, ToastDismissedEventArgs eventArgs)
{
- Log.Debug("Toast closed");
+ Log.Debug($"Toast closed with reason {eventArgs.Reason}");
+ if (eventArgs.Reason != ToastDismissalReason.UserCanceled)
+ {
+ return;
+ }
try
{
onClosedAction?.Invoke();
@@ -156,6 +161,7 @@ namespace GreenshotWin10Plugin
// Remove the other handler too
toast.Activated -= ToastActivatedHandler;
toast.Failed -= ToastOnFailed;
+
}
toast.Dismissed += ToastDismissedHandler;
toast.Failed += ToastOnFailed;
@@ -175,17 +181,17 @@ namespace GreenshotWin10Plugin
Log.Debug(sender.Content.GetXml());
}
- public void ShowWarningMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ public void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null)
{
ShowMessage(message, timeout, onClickAction, onClosedAction);
}
- public void ShowErrorMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ public void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null)
{
ShowMessage(message, timeout, onClickAction, onClosedAction);
}
- public void ShowInfoMessage(string message, int timeout, Action onClickAction = null, Action onClosedAction = null)
+ public void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null)
{
ShowMessage(message, timeout, onClickAction, onClosedAction);
}
diff --git a/README.md b/README.md
index 4f29e36a2..29ef417c7 100644
--- a/README.md
+++ b/README.md
@@ -21,4 +21,4 @@ Being easy to understand and configurable, Greenshot is an efficient tool for pr
About this repository
---------------------
-This repository is for Greenshot 1.2.10, which is a bugfix of 1.2.9.129
+This repository is for Greenshot 1.3
diff --git a/appveyor12.yml b/appveyor12.yml
deleted file mode 100644
index 112aff0be..000000000
--- a/appveyor12.yml
+++ /dev/null
@@ -1,89 +0,0 @@
-version: 1.2.10.{build}
-branches:
- only:
- - release/1.2.10
-skip_tags: true
-configuration: Release
-platform: Any CPU
-shallow_clone: true
-clone_depth: 1
-assembly_info:
- patch: true
- file: '**\AssemblyInfo.*'
- assembly_version: '{version}'
- assembly_file_version: '{version}'
- assembly_informational_version: '{version}-$(build_type)-$(APPVEYOR_REPO_COMMIT)'
-environment:
- credentials_box_client_id:
- secure: 8MKxTOowo2fat6cNXGbFfvn6typiEtmCKsrptrWiEFUEoKlT1DUn40iGNcIELRA1
- credentials_box_client_secret:
- secure: hJhzDVJuGd/WMnoSXhosvOM/1PGcYlKbtQjA6xyrmnmZcqCTMzqIdA6JXlo/V2Br
- credentials_dropbox_consumer_key:
- secure: Da/6KY1cu9CUM3iOqSpcUw==
- credentials_dropbox_consumer_secret:
- secure: KkyKyUY+buT/MZagXDP4cw==
- credentials_flickr_consumer_key:
- secure: fY8s0OkOMYwCjSZoL/6yZcP8xeT6J2EJLjbUMI5lAW42S5QT2U2B41KrmeP2NpnQ
- credentials_flickr_consumer_secret:
- secure: 9TthlljPHXWPkDDeG3uiFVJ9YJwHZOV0ZsojaIBBuvw=
- credentials_imgur_consumer_key:
- secure: XRTg1Ecs6ER9m4779CJAng==
- credentials_imgur_consumer_secret:
- secure: gcCp/gJF8vqmnCUPKyb04H8Oz9mWmiB00U5X7iI/DGr5mxjoCG1khc6/zn6aSSqn
- credentials_photobucket_consumer_key:
- secure: oo9GD1Y8dkrli6hMfnnYsw==
- credentials_photobucket_consumer_secret:
- secure: GiNPoe9klM/YkoHIA/YHqOYrIaYwSFK7Ph9m8jT9uPP1l6+Hd5K8dVMw5DNa50oG
- credentials_picasa_consumer_key:
- secure: bjKXhFZkDqaq98XBrz5oQKQfT8CLpuv2ZAiBIwkzloaAPUs97b5yx6h/xFaE4NLS
- credentials_picasa_consumer_secret:
- secure: yNptTpmJWypbu9alOQtetxU66drr2FKxoPflNgRJdag=
- build_type: RELEASE
- rsakey:
- secure: GNomwdlwZOCyd8d7xEWTnMVs1lpOeHvF+tlnvcbXGovLRtwAp2Ufu0r7paGY7BHGGkIs2WE7xUfyQ9UauVB+58JZ6fwVega8ucUgVJhl4x0QQNN2d6sULUhHfhuEHmxw+FDO/FxKFE6Lmf+ZRY+OGiw0wKIl4qD7mGRHcDQTipNEsTbau8HzqRVCdu3dx7pODC61DlsbO71xLF7UlqnmuZE+91Zz3V6AgaqE246n1499d6bXBYw1AH+8opNnKDFLnTHf7hUVcZn9mj6tKZXeTCuVUOr/SVQcgHKxlBlqzhfaEkxCR5GPtzQRqwDMxEycmFvj2wNP/sie6UEGhQxE4YMCc2OgqNOkpc5BbP/fxLr/SLFOEf1XXzTWCFMhsgpHx7TZbgQH26sa0rK/xaBRacZlwAaNk7V2nFZT7TebYEFy6zWNr9Y+IyeXIofj42XQTNXv8d8hyh+UYLByVEFYRf2DnActQkZQyNdWjZ+CxDV50QSZZs8FT3IIqraHYKsj2ITAN5LrUtWCi7bpNJL0UGo0EJiB2i0bp++tEAAwyrCljxI8d4bbGl/flHk/xd+ysQPnomndijeObjguEzqT8pyXZluSZhF+lI50mIDhMdtdAfMi5yn5RW7P6NWOSlC8xgQQgMZylsuSvRflKbEd/gsoDyEOnakNcdH2jekt9OD6GnuYM7iHkbMC89LBZ0VaHNGvCC+BQXdGUG7O9R3NthZcDXE7q7xbtGRB5ncVQDRfKoT5HVfiV6bSDrcfRODiuR59mZgiSYtZG+3kQWYUKn2wagvZKckGukA0SlOuTRCKZhgLcVHhWeRWeGE3iJ8K6BeHf2EgB8Qr6ayTyTUjBcn+u4qqWKgkvG4qRavlvrBSdMrAXWIKE8vSq1od0A2ZzP6+HCsrkuUR+HFfpE2dpjeckoa5vATQgyn8j5x11iIOB9HnT3YKbZ0aTU4rQgYMJXA/fPcgKDGkAPdgtGbQLssy/mwSdsXBYtMgEcs7vI9laR8Ik+NK2dbFHGFPnxS43WToGyKBxojt8SZbgPJXm22WRrN1+9AZvvhI7/mpZiEE7HWgNRClZYuqbfCMpelLGvVq832OLjelrWMJ0XBVNHnOw0p8qZKI1UpqQJXX1nL8j3JttEVHsfryIanM03kNDL0dX1VAKECKUMCVQ6i6tG4VWsR0C2JccPJ3PSoPgo5KMJhuZNaBoiPjZ2eaMREV6vUYbBYzrvdDQzUcE2stacREl4eJzGJ4GP5h08GQmIirGF/SCyZV1CadAbKZVjqb70XpIbE6NT/+84O82LZR4ui5KgTAv87lTZgvNJ7LxM7rRg1awj/iBxQeARNJxuPMPlk1CVx8Z3091UdL1K1avPKa85lCRwCkDKLcJPO9tlqi4dVjCrwpoCJkQMm3fbTl/BgHn00/RsnFZ2qfl5m2DyF+XuaOPauzsRdLUFAC4h44qoUuzRb4Pv6RFhN5CI4fddRKafNBHU9f69UCkO080/hIjTdj0+bpr4oNY4UEi80huyJY/c0iUPE8o48qBB8F3cW30SwhPmuphn4/18lB8GEwEPqoatmli4QRaDFUCUf9Hj0DEUqEAya/OHOW7/PvWcw/l/ZaIMUpOZ6q0xvPDAXokFRJAWzZhG7hNbWNEzQ3f/BjlYlYsBtMY0JUU8mH6YxwIzIGbHiLTBC0OglH0rDd5W+3NaUG9FZ//o9MAP5j2QqwSuFWXppbigh4zk+h17eJn5zhld7dtvOr+YmgYULj6NFIDKBZHUJdqLYScVzdc1p812FCCBcLmmw4RnwuF+RldHixTdy4UZ17T/hD4OLpWCINl9lUAficC0OFeLJLHxFW6Em8SCbZ3aUtFDIQD8oTqzUHZhGWYF2ukrOc8Dzm4FQ8xy3BhqfntTod1gwoilIirsP/z+GGMnTltkqiqK+gCmkVOfICwNFmHltZeJrmDQ4YU5abR09Yr1TaAk3CzWjV1XGBaf/oek0+tFkMOtZNdFRdlzLLE90PsZZFFnZhFBoNoOhYnMB9K2VqgEpJs0nXvF6qBOllptcpBYUYMzMdb0Ggu6m1d/phxuBuOsm+Xtr0Zw8Xd0vxIOQNDGsskCDIEUYWYajw2i66MmRPRyFEennXfLA0WIPpztXvfsrKjf42rjE3RukBsRff1Sci68cel4fGfmvj2y7gW0Tt
-before_build:
-- nuget restore
-- ps: .\prebuild.ps1
-build:
- project: greenshot.sln
- verbosity: normal
-after_build:
-- ps: .\build.ps1
-test: off
-artifacts:
-- path: Greenshot\releases\Greenshot*INSTALLER*.exe
- name: Installer
-- path: Greenshot\releases\Greenshot*paf.exe
- name: Portable
-- path: Greenshot\releases\Greenshot-NO*.zip
- name: Zip
-- path: Greenshot\releases\additional_files\readme.txt
- name: Readme
-- path: Greenshot\releases\Greenshot-DEBUGSYMBOLS*.zip
- name: DEBUGSYMBOLS
-deploy:
-- provider: GitHub
- tag: Greenshot-$(build_type)-$(APPVEYOR_BUILD_VERSION)
- description:
- auth_token:
- secure: 4sYcNGg7byBFtR7EkJHS8d3H3qP0u0LodlJWCV7g/4jEyv3vvVxqzh19zZ6Zgrf1
- prerelease: true
- draft: true
- on:
- build_type: /^(RC|UNSTABLE).*/
-- provider: GitHub
- tag: Greenshot-$(build_type)-$(APPVEYOR_BUILD_VERSION)
- auth_token:
- secure: 4sYcNGg7byBFtR7EkJHS8d3H3qP0u0LodlJWCV7g/4jEyv3vvVxqzh19zZ6Zgrf1
- prerelease: false
- draft: true
- on:
- build_type: RELEASE
-notifications:
-- provider: Email
- to:
- - robin@getgreenshot.org
- - jens@getgreenshot.org
- on_build_success: true
- on_build_failure: true
- on_build_status_changed: false
diff --git a/appveyor13.yml b/appveyor13.yml
deleted file mode 100644
index 01d1c6d3e..000000000
--- a/appveyor13.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-version: 1.3.0.{build}
-branches:
- only:
- - develop
-skip_tags: true
-configuration: Release
-platform: Any CPU
-shallow_clone: true
-assembly_info:
- patch: true
- file: '**\AssemblyInfo.*'
- assembly_version: '{version}'
- assembly_file_version: '{version}'
- assembly_informational_version: '{version}-$(build_type)-$(APPVEYOR_REPO_COMMIT)'
-environment:
- credentials_box_client_id:
- secure: 8MKxTOowo2fat6cNXGbFfvn6typiEtmCKsrptrWiEFUEoKlT1DUn40iGNcIELRA1
- credentials_box_client_secret:
- secure: hJhzDVJuGd/WMnoSXhosvOM/1PGcYlKbtQjA6xyrmnmZcqCTMzqIdA6JXlo/V2Br
- credentials_dropbox_consumer_key:
- secure: Da/6KY1cu9CUM3iOqSpcUw==
- credentials_dropbox_consumer_secret:
- secure: KkyKyUY+buT/MZagXDP4cw==
- credentials_flickr_consumer_key:
- secure: fY8s0OkOMYwCjSZoL/6yZcP8xeT6J2EJLjbUMI5lAW42S5QT2U2B41KrmeP2NpnQ
- credentials_flickr_consumer_secret:
- secure: 9TthlljPHXWPkDDeG3uiFVJ9YJwHZOV0ZsojaIBBuvw=
- credentials_imgur_consumer_key:
- secure: XRTg1Ecs6ER9m4779CJAng==
- credentials_imgur_consumer_secret:
- secure: gcCp/gJF8vqmnCUPKyb04H8Oz9mWmiB00U5X7iI/DGr5mxjoCG1khc6/zn6aSSqn
- credentials_photobucket_consumer_key:
- secure: oo9GD1Y8dkrli6hMfnnYsw==
- credentials_photobucket_consumer_secret:
- secure: GiNPoe9klM/YkoHIA/YHqOYrIaYwSFK7Ph9m8jT9uPP1l6+Hd5K8dVMw5DNa50oG
- credentials_picasa_consumer_key:
- secure: bjKXhFZkDqaq98XBrz5oQKQfT8CLpuv2ZAiBIwkzloaAPUs97b5yx6h/xFaE4NLS
- credentials_picasa_consumer_secret:
- secure: yNptTpmJWypbu9alOQtetxU66drr2FKxoPflNgRJdag=
- build_type: ALPHA
-before_build:
- - nuget restore
- - ps: Build/prebuild.ps1
-build:
- project: greenshot.sln
- verbosity: normal
-after_build:
-- ps: Build/build.ps1
-test: off
-artifacts:
-- path: AssemblyDir\Greenshot*INSTALLER*.exe
- name: Installer
-- path: AssemblyDir\Greenshot*paf.exe
- name: Portable
-- path: AssemblyDir\Greenshot-NO*.zip
- name: Zip
-- path: Build\additional_files\readme.txt
- name: Readme
-- path: AssemblyDir\Greenshot-DEBUGSYMBOLS*.zip
- name: DEBUGSYMBOLS
-deploy:
-- provider: GitHub
- tag: Greenshot-$(build_type)-$(APPVEYOR_BUILD_VERSION)
- description:
- auth_token:
- secure: h0R+O/UoDM5Fy9XBfpRWLxFdR4a6CS+hDxr/MUeiRSviAmUsSlvsGSyOG6KiAVrL
- prerelease: true
- on:
- build_type: RELEASE_CANDIDATE
-- provider: GitHub
- tag: Greenshot-$(build_type)-$(APPVEYOR_BUILD_VERSION)
- description:
- auth_token:
- secure: h0R+O/UoDM5Fy9XBfpRWLxFdR4a6CS+hDxr/MUeiRSviAmUsSlvsGSyOG6KiAVrL
- prerelease: true
- on:
- build_type: BETA
-- provider: GitHub
- tag: Greenshot-$(build_type)-$(APPVEYOR_BUILD_VERSION)
- auth_token:
- secure: h0R+O/UoDM5Fy9XBfpRWLxFdR4a6CS+hDxr/MUeiRSviAmUsSlvsGSyOG6KiAVrL
- on:
- build_type: RELEASE
-notifications:
-- provider: Email
- to:
- - robin@getgreenshot.org
- - jens@getgreenshot.org
- - thomas@getgreenshot.org
- on_build_success: true
- on_build_failure: true
- on_build_status_changed: true
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
deleted file mode 100644
index 9bfcc6797..000000000
--- a/build.ps1
+++ /dev/null
@@ -1,343 +0,0 @@
-################################################################
-# Greenshot BUILD script, written for the Windows Power Shell
-# Assumes the installation of Microsoft .NET Framework 4.5
-################################################################
-# Greenshot - a free and open source screenshot tool
-# Copyright (C) 2007-2015 Thomas Braun, Jens Klingen, Robin Krom
-#
-# For more information see: http://getgreenshot.org/
-# The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 1 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-################################################################
-
-$version=$env:APPVEYOR_BUILD_VERSION
-if ( !$version ) {
- $version = "1.3.0.0"
-}
-
-$buildType=$env:build_type
-if ( !$buildType ) {
- $buildType = "local"
-}
-
-$gitcommit=$env:APPVEYOR_REPO_COMMIT
-if ( !$gitcommit ) {
- $gitcommit = "abcdefghijklmnopqrstuvwxy"
-}
-
-$gitcommit=$gitcommit.SubString(0, [math]::Min($gitcommit.Length, 7))
-$detailversion=$version + '-' + $gitcommit + " " + $buildType
-$release=(([version]$version).build) % 2 -eq 1
-$fileversion=$version + "-" + $buildType
-
-Write-Host "Building Greenshot $detailversion"
-
-# Create a MD5 string for the supplied filename
-Function MD5($filename) {
- $fileStream = new-object -TypeName System.IO.FileStream -ArgumentList "$filename", "Open", "Read", "Read"
- $MD5CryptoServiceProvider = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
- $hash = $MD5CryptoServiceProvider.ComputeHash($fileStream)
- return [System.BitConverter]::ToString($hash) -replace "-", ""
-}
-
-# Sign the specify file
-Function SignWithCertificate($filename) {
- Write-Host "Signing $filename"
- $signSha1Arguments = @('sign', '/debug', '/fd', 'sha1' , '/tr', 'http://time.certum.pl', '/td', 'sha1' , $filename)
- $signSha256Arguments = @('sign', '/debug', '/as', '/fd', 'sha256', '/tr', 'http://time.certum.pl', '/td', 'sha256', $filename)
-
- Start-Process -wait $env:SignTool -ArgumentList $signSha1Arguments -NoNewWindow
- Start-Process -wait $env:SignTool -ArgumentList $signSha256Arguments -NoNewWindow
-}
-
-# Sign the file with Signtool before they are packed in the installer / .zip etc
-Function SignBinaryFilesBeforeBuildingInstaller() {
- $sourcebase = "$(get-location)\Greenshot\bin\Release"
-
- $INCLUDE=@("*.exe", "*.gsp", "*.dll")
- Get-ChildItem -Path "$sourcebase" -Recurse -Include $INCLUDE -Exclude "log4net.dll" | foreach {
- SignWithCertificate($_)
- }
-}
-
-# Fill the templates
-Function FillTemplates {
- Write-Host "Filling templates for version $detailversion`n`n"
-
- Get-ChildItem . -recurse *.template |
- foreach {
- $oldfile = $_.FullName
- $newfile = $_.FullName -replace '\.template',''
- Write-Host "Modifying file : $oldfile to $newfile"
- # Read the file
- $template = Get-Content $oldfile
- # Create an empty array, this will contain the replaced lines
- $newtext = @()
- foreach ($line in $template) {
- $newtext += $line -replace "\@VERSION\@", $version -replace "\@DETAILVERSION\@", $detailversion -replace "\@FILEVERSION\@", $fileversion
- }
- # Write the new information to the file
- $newtext | Set-Content $newfile -encoding UTF8
- }
-}
-
-# Create the MD5 checksum file
-Function MD5Checksums {
- echo "MD5 Checksums:"
- $sourcebase = "$(get-location)\Greenshot\bin\Release"
-
- $INCLUDE=@("*.exe", "*.gsp", "*.dll")
- Get-ChildItem -Path "$sourcebase" -Recurse -Include $INCLUDE | foreach {
- $currentMD5 = MD5($_.fullname)
- $name = $_.Name
- echo "$name : $currentMD5"
- }
-}
-
-# This function creates the paf.exe
-Function PackagePortable {
- $sourcebase = "$(get-location)\Greenshot\bin\Release"
- $destbase = "$(get-location)\Greenshot\releases"
-
- # Only remove the paf we are going to create, to prevent adding but keeping the history
- if (Test-Path ("$destbase\GreenshotPortable-$version.paf.exe")) {
- Remove-Item "$destbase\GreenshotPortable-$version.paf.exe" -Confirm:$false
- }
- # Remove the directory to create the files in
- if (Test-Path ("$destbase\portabletmp")) {
- Remove-Item "$destbase\portabletmp" -recurse -Confirm:$false
- }
- Copy-Item -Path "$destbase\portable" -Destination "$destbase\portabletmp" -Recurse
-
- $INCLUDE=@("*.gsp", "*.dll", "*.exe", "*.config")
- Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach {
- $path = $_.fullname -replace ".*\\Plugins\\", "$destbase\portabletmp\App\Greenshot\Plugins\"
- New-Item -ItemType File -Path "$path" -Force | Out-Null
- Copy-Item -Path $_ -Destination "$path" -Force
- }
-
- $INCLUDE=@("help-*.html","language-*.xml")
- Get-ChildItem -Path "$(get-location)\Greenshot\Languages\" -Recurse -Include $INCLUDE -Exclude "*installer*","*website*" | foreach {
- $path = $_.fullname -replace ".*\\Languages\\", "$destbase\portabletmp\App\Greenshot\Languages\"
- New-Item -ItemType File -Path "$path" -Force | Out-Null
- Copy-Item -Path $_ -Destination "$path" -Force
- }
- Copy-Item -Path "$sourcebase\Languages\Plugins\" -Destination "$destbase\portabletmp\App\Greenshot\Languages\Plugins\" -Recurse
-
- @( "$sourcebase\checksum.MD5",
- "$sourcebase\Greenshot.exe.config",
- "$sourcebase\GreenshotPlugin.dll",
- "$sourcebase\LinqBridge.dll",
- "$sourcebase\log4net.dll",
- "$sourcebase\log4net-portable.xml",
- "$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destbase\portabletmp\App\Greenshot\" }
-
- Copy-Item -Path "$sourcebase\Languages\help-en-US.html" -Destination "$destbase\portabletmp\help.html"
-
- Copy-Item -Path "$sourcebase\Greenshot.exe" -Destination "$destbase\portabletmp"
-
- Copy-Item -Path "$destbase\appinfo.ini" -Destination "$destbase\portabletmp\App\AppInfo\appinfo.ini"
-
- $portableOutput = "$(get-location)\portable"
- $portableInstaller = "$(get-location)\greenshot\tools\PortableApps.comInstaller\PortableApps.comInstaller.exe"
- $arguments = @("$destbase\portabletmp")
- Write-Host "Starting $portableInstaller $arguments"
- $portableResult = Start-Process -wait -PassThru "$portableInstaller" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$portableOutput.log" -RedirectStandardError "$portableOutput.error"
- Write-Host "Log output:"
- Get-Content "$portableOutput.log"| Write-Host
- if ($portableResult.ExitCode -ne 0) {
- Write-Host "Error output:"
- Get-Content "$portableOutput.error"| Write-Host
- exit -1
- }
- Start-Sleep -m 1500
- Remove-Item "$destbase\portabletmp" -Recurse -Confirm:$false
-
- # sign the .paf.exe
- $pafFiles = @("*.paf.exe")
- Get-ChildItem -Path "$destbase" -Recurse -Include $pafFiles | foreach {
- SignWithCertificate($_)
- }
-
- return
-}
-
-# This function creates the .zip
-Function PackageZip {
- $sourcebase = "$(get-location)\Greenshot\bin\Release"
- $destbase = "$(get-location)\Greenshot\releases"
- $destzip = "$destbase\NO-INSTALLER"
-
- # Only remove the zip we are going to create, to prevent adding but keeping the history
- if (Test-Path ("$destbase\Greenshot-NO-INSTALLER-$fileversion.zip")) {
- Remove-Item "$destbase\Greenshot-NO-INSTALLER-$fileversion.zip" -Confirm:$false
- }
- # Remove the directory to create the files in
- if (Test-Path ("$destzip")) {
- Remove-Item "$destzip" -recurse -Confirm:$false
- }
- New-Item -ItemType directory -Path "$destzip" | Out-Null
-
- echo ";dummy config, used to make greenshot store the configuration in this directory" | Set-Content "$destzip\greenshot.ini" -encoding UTF8
- echo ";In this file you should add your default settings" | Set-Content "$destzip\greenshot-defaults.ini" -encoding UTF8
- echo ";In this file you should add your fixed settings" | Set-Content "$destzip\greenshot-fixed.ini" -encoding UTF8
-
- $INCLUDE=@("*.gsp", "*.dll", "*.exe", "*.config")
- Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach {
- $path = $_.fullname -replace ".*\\Plugins\\", "$destzip\Plugins\"
- New-Item -ItemType File -Path "$path" -Force | Out-Null
- Copy-Item -Path $_ -Destination "$path" -Force
- }
-
- $INCLUDE=@("help-*.html","language-*.xml")
- Get-ChildItem -Path "$(get-location)\Greenshot\Languages\" -Recurse -Include $INCLUDE -Exclude "*installer*","*website*" | foreach {
- $path = $_.fullname -replace ".*\\Languages\\", "$destzip\Languages\"
- New-Item -ItemType File -Path "$path" -Force | Out-Null
- Copy-Item -Path $_ -Destination "$path" -Force
- }
- Copy-Item -Path "$sourcebase\Languages\Plugins\" -Destination "$destzip\Languages\Plugins\" -Recurse
-
- @( "$sourcebase\checksum.MD5",
- "$sourcebase\Greenshot.exe",
- "$sourcebase\Greenshot.exe.config",
- "$sourcebase\GreenshotPlugin.dll",
- "$sourcebase\LinqBridge.dll",
- "$sourcebase\log4net.dll",
- "$(get-location)\Greenshot\log4net-zip.xml"
- "$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destzip\" }
-
- Rename-Item "$destzip\log4net-zip.xml" "$destzip\log4net.xml"
-
- $zipOutput = "$(get-location)\zip"
- $zip7 = "$(get-location)\greenshot\tools\7zip\7za.exe"
- $arguments = @('a', '-mx9', '-tzip', '-r', "$destbase\Greenshot-NO-INSTALLER-$fileversion.zip", "$destzip\*")
- Write-Host "Starting $zip7 $arguments"
- $zipResult = Start-Process -wait -PassThru "$zip7" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$zipOutput.log" -RedirectStandardError "$zipOutput.error"
- Write-Host "Log output:"
- Get-Content "$zipOutput.log"| Write-Host
- if ($zipResult.ExitCode -ne 0) {
- Write-Host "Error output:"
- Get-Content "$zipOutput.error"| Write-Host
- exit -1
- }
- Start-Sleep -m 1500
- Remove-Item "$destzip" -Recurse -Confirm:$false
- return
-}
-
-# This function creates the debug symbols .zip
-Function PackageDbgSymbolsZip {
- $sourcebase = "$(get-location)\Greenshot\bin\Release"
- $destbase = "$(get-location)\Greenshot\releases"
- $destdbgzip = "$destbase\DEBUGSYMBOLS"
-
- # Only remove the zip we are going to create, to prevent adding but keeping the history
- if (Test-Path ("$destbase\Greenshot-DEBUGSYMBOLS-$fileversion.zip")) {
- Remove-Item "$destbase\Greenshot-DEBUGSYMBOLS-$fileversion.zip" -Confirm:$false
- }
- # Remove the directory to create the files in
- if (Test-Path ("$destdbgzip")) {
- Remove-Item "$destdbgzip" -recurse -Confirm:$false
- }
- New-Item -ItemType directory -Path "$destdbgzip" | Out-Null
-
- $INCLUDE=@("*.pdb")
- Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach {
- $path = $_.fullname -replace ".*\\Plugins\\", "$destdbgzip\Plugins\"
- New-Item -ItemType File -Path "$path" -Force | Out-Null
- Copy-Item -Path $_ -Destination "$path" -Force
- }
-
- @( "$sourcebase\*.pdb") | foreach { Copy-Item $_ "$destdbgzip\" }
-
- $zipOutput = "$(get-location)\dbgzip"
- $zip7 = "$(get-location)\greenshot\tools\7zip\7za.exe"
- $arguments = @('a', '-mx9', '-tzip', '-r', "$destbase\Greenshot-DEBUGSYMBOLS-$fileversion.zip", "$destdbgzip\*")
- Write-Host "Starting $zip7 $arguments"
- $zipResult = Start-Process -wait -PassThru "$zip7" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$zipOutput.log" -RedirectStandardError "$zipOutput.error"
- Write-Host "Log output:"
- Get-Content "$zipOutput.log"| Write-Host
- if ($zipResult.ExitCode -ne 0) {
- Write-Host "Error output:"
- Get-Content "$zipOutput.error"| Write-Host
- exit -1
- }
- Start-Sleep -m 1500
- Remove-Item "$destdbgzip" -Recurse -Confirm:$false
- return
-}
-
-# This function creates the installer
-Function PackageInstaller {
- $setupOutput = "$(get-location)\setup"
- $innoSetup = "$(get-location)\packages\Tools.InnoSetup.5.5.9\tools\ISCC.exe"
- $innoSetupFile = "$(get-location)\greenshot\releases\innosetup\setup.iss"
- Write-Host "Starting $innoSetup $innoSetupFile"
- $arguments = @("/Qp /SSignTool=""$env:SignTool `$p""", $innoSetupFile)
- $setupResult = Start-Process -wait -PassThru "$innoSetup" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$setupOutput.log" -RedirectStandardError "$setupOutput.error"
- Write-Host "Log output:"
- Get-Content "$setupOutput.log"| Write-Host
- if ($setupResult.ExitCode -ne 0) {
- Write-Host "Error output:"
- Get-Content "$setupOutput.error"| Write-Host
- exit -1
- }
- return
-}
-
-# This function tags the current
-Function TagCode {
- Write-Host "Add remote via git, so SSH key works"
- git remote add tagorigin git@bitbucket.org:greenshot/greenshot.git
- Write-Host "Setting id_rsa with the content from environment rsakey so we can push a tag"
- # Write the RSA key contents from the AppVeyor rsakey UI ENV variable to the private key file
- $key = $env:rsakey
- $fileContent = "-----BEGIN RSA PRIVATE KEY-----" + "`n"
- for ($i = 0; $i -lt $key.Length / 64; $i++) {
- $min = [math]::min(64, $key.Length - ($i * 64));
- $fileContent += $key.substring($i*64, $min) + "`n";
- }
- $fileContent += "-----END RSA PRIVATE KEY-----" + "`n"
- Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
- git config --global user.email "getgreenshot@gmail.com"
- git config --global user.name "Greenshot-AppVeyor"
- Write-Host "Tagging repo with $fileversion"
- git tag -a $fileversion -m 'Build from AppVeyor'
- Write-Host "Pushing tag $fileversion to remote"
- git push tagorigin $fileversion
- return
-}
-
-FillTemplates
-
-echo "Signing executables"
-SignBinaryFilesBeforeBuildingInstaller
-
-# This must be after the signing, otherwise they would be different.
-echo "Generating MD5"
-MD5Checksums | Set-Content "$(get-location)\Greenshot\bin\Release\checksum.MD5" -encoding UTF8
-
-echo "Generating Installer"
-PackageInstaller
-
-echo "Generating ZIP"
-PackageZip
-
-echo "Generating Portable"
-PackagePortable
-
-echo "Generating Debug Symbols ZIP"
-PackageDbgSymbolsZip
-
diff --git a/prebuild.ps1 b/prebuild.ps1
deleted file mode 100644
index 6d1333950..000000000
--- a/prebuild.ps1
+++ /dev/null
@@ -1,53 +0,0 @@
-################################################################
-# Greenshot PRE-BUILD script, written for the Windows Power Shell
-# Assumes the installation of Microsoft .NET Framework 4.5
-################################################################
-# Greenshot - a free and open source screenshot tool
-# Copyright (C) 2007-2016 Thomas Braun, Jens Klingen, Robin Krom
-#
-# For more information see: http://getgreenshot.org/
-# The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 1 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-################################################################
-
-# Fill the credentials
-Function FillCredentials {
- Write-Host "Filling credentials with Environment variable values`n`n"
- Get-ChildItem . -recurse *Credentials.cs | foreach {
- $template = Get-Content $_.FullName
- # Create an empty array, this will contain the replaced lines
- $newtext = @()
- foreach ($line in $template) {
- get-childitem -path env:credentials_* | foreach {
- $varname=$_.Name
- $varvalue=$_.Value
- $line = $line -replace "\@$varname\@", $varvalue
- }
- $newtext += $line
- }
- # Write the new information to the file
- Write-Host "Updating $_"
- $newtext | Set-Content $_.FullName -encoding UTF8
- }
-}
-
-FillCredentials
-
-# Write the certificate to a file
-[System.Convert]::FromBase64String($env:Certificate) | set-content "greenshot.pfx" -encoding byte
-# Decode password to secure string
-$password = ConvertTo-SecureString $env:CertificatePassword -AsPlainText -Force
-# Import pfx
-Import-PfxCertificate -FilePath .\Greenshot.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $password
From 328e7e569d8327bce20ec887d6d64b669cdfbcba Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sat, 23 Jan 2021 23:41:22 +0100
Subject: [PATCH 064/224] BUG-2693: This should fix an issue where Greenshot
doesn't detect a MAPI client, we weren't looking at the 32 bit location.
---
GreenshotPlugin/Core/EmailConfigHelper.cs | 50 +++++------------
GreenshotPlugin/Core/RegistryHelper.cs | 66 +++++++++++++++++++++++
2 files changed, 80 insertions(+), 36 deletions(-)
create mode 100644 GreenshotPlugin/Core/RegistryHelper.cs
diff --git a/GreenshotPlugin/Core/EmailConfigHelper.cs b/GreenshotPlugin/Core/EmailConfigHelper.cs
index 7da960b09..bbd816e96 100644
--- a/GreenshotPlugin/Core/EmailConfigHelper.cs
+++ b/GreenshotPlugin/Core/EmailConfigHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,46 +18,25 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System.IO;
-using Microsoft.Win32;
namespace GreenshotPlugin.Core {
///
/// Description of EmailConfigHelper.
///
public static class EmailConfigHelper {
- private const string OutlookPathKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE";
- private const string MapiClientKey = @"SOFTWARE\Clients\Mail";
- private const string MapiLocationKey = @"SOFTWARE\Microsoft\Windows Messaging Subsystem";
- private const string MapiKey = @"MAPI";
- public static string GetMapiClient() {
- using (RegistryKey key = Registry.CurrentUser.OpenSubKey(MapiClientKey, false)) {
- if (key != null) {
- return (string)key.GetValue(string.Empty);
- }
- }
- using (RegistryKey key = Registry.LocalMachine.OpenSubKey(MapiClientKey, false))
- {
- return (string) key?.GetValue(string.Empty);
- }
- }
-
- public static bool HasMapi()
- {
- using RegistryKey key = Registry.LocalMachine.OpenSubKey(MapiLocationKey, false);
- return key != null && "1".Equals(key.GetValue(MapiKey, "0"));
- }
+ public static string GetMapiClient() => RegistryHelper.ReadLocalMachineSoftwareKey(@"Clients\Mail");
- public static string GetOutlookExePath() {
- using (RegistryKey key = Registry.LocalMachine.OpenSubKey(OutlookPathKey, false)) {
- if (key != null) {
- // "" is the default key, which should point to the outlook location
- return (string)key.GetValue(string.Empty);
- }
- }
- return null;
+ public static bool HasMapi()
+ {
+ var value = RegistryHelper.ReadLocalMachineSoftwareKey(@"Microsoft\Windows Messaging Subsystem", "MAPI", "0");
+ return "1".Equals(value);
+
}
+
+ public static string GetOutlookExePath() => RegistryHelper.ReadLocalMachineSoftwareKey(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
///
/// Check if Outlook is installed
@@ -65,12 +44,11 @@ namespace GreenshotPlugin.Core {
/// Returns true if outlook is installed
public static bool HasOutlook() {
string outlookPath = GetOutlookExePath();
- if (outlookPath != null) {
- if (File.Exists(outlookPath)) {
- return true;
- }
+ if (outlookPath == null)
+ {
+ return false;
}
- return false;
+ return File.Exists(outlookPath);
}
}
}
diff --git a/GreenshotPlugin/Core/RegistryHelper.cs b/GreenshotPlugin/Core/RegistryHelper.cs
new file mode 100644
index 000000000..e5f068ab4
--- /dev/null
+++ b/GreenshotPlugin/Core/RegistryHelper.cs
@@ -0,0 +1,66 @@
+/*
+ * Greenshot - a free and open source screenshot tool
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
+ *
+ * For more information see: http://getgreenshot.org/
+ * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+using System;
+using Microsoft.Win32;
+
+namespace GreenshotPlugin.Core
+{
+ ///
+ /// A helper class for accessing the registry
+ ///
+ public static class RegistryHelper
+ {
+ ///
+ /// Retrieve a registry value
+ ///
+ /// string with the name of the key
+ /// string with the name of the value below the key, null will retrieve the default
+ /// string with the default value to return
+ /// string with the value
+ public static string ReadLocalMachineSoftwareKey(string keyName, string value = null, string defaultValue = null)
+ {
+ string result = null;
+ value ??= string.Empty;
+ if (Environment.Is64BitOperatingSystem)
+ {
+ using var key = Registry.LocalMachine.OpenSubKey($@"SOFTWARE\{keyName}", false);
+
+ if (key != null)
+ {
+ result = (string)key.GetValue(value, defaultValue);
+ }
+ }
+
+ if (string.IsNullOrEmpty(result))
+ {
+ using var key = Registry.LocalMachine.OpenSubKey($@"SOFTWARE\wow6432node\{keyName}", false);
+
+ if (key != null)
+ {
+ result = (string)key.GetValue(value, defaultValue);
+ }
+ }
+
+ return result;
+ }
+ }
+}
From 2733c6cf2651e3d3fbe7e677762df3cc7bae2838 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Wed, 27 Jan 2021 23:50:22 +0100
Subject: [PATCH 065/224] Fixed an issue with the build, where
MSBuild.Community.Tasks.Targets wasn't found. Also improved the registry
reading for the MAPI control.
---
Directory.Build.props | 9 ++++++---
Greenshot/Greenshot.csproj | 7 +++++++
Greenshot/Helpers/MailHelper.cs | 14 +++++++-------
GreenshotJiraPlugin/GreenshotJiraPlugin.csproj | 4 ++--
GreenshotPlugin/Core/EmailConfigHelper.cs | 7 ++++---
...{RegistryHelper.cs => RegistryKeyExtensions.cs} | 9 +++++----
GreenshotPlugin/GreenshotPlugin.csproj | 4 ++--
7 files changed, 33 insertions(+), 21 deletions(-)
rename GreenshotPlugin/Core/{RegistryHelper.cs => RegistryKeyExtensions.cs} (82%)
diff --git a/Directory.Build.props b/Directory.Build.props
index 520eb0976..ce53be91e 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -102,11 +102,14 @@
-
-
+
+
+
+ $(userprofile)\.nuget\packages\msbuildtasks\1.5.0.235\tools\
+
-
+
diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj
index 9419fb179..630501ce8 100644
--- a/Greenshot/Greenshot.csproj
+++ b/Greenshot/Greenshot.csproj
@@ -46,6 +46,13 @@
Always
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
diff --git a/Greenshot/Helpers/MailHelper.cs b/Greenshot/Helpers/MailHelper.cs
index d3daaf446..a78799eae 100644
--- a/Greenshot/Helpers/MailHelper.cs
+++ b/Greenshot/Helpers/MailHelper.cs
@@ -174,7 +174,7 @@ namespace Greenshot.Helpers {
///
public void ShowDialog() {
// Create the mail message in an STA thread
- var thread = new Thread(_ShowMail)
+ var thread = new Thread(ShowMail)
{
IsBackground = true,
Name = "Create MAPI mail"
@@ -202,7 +202,7 @@ namespace Greenshot.Helpers {
///
/// Sends the mail message.
///
- private void _ShowMail() {
+ private void ShowMail() {
var message = new MapiHelperInterop.MapiMessage();
using var interopRecipients = Recipients.GetInteropRepresentation();
@@ -215,7 +215,7 @@ namespace Greenshot.Helpers {
// Check if we need to add attachments
if (Files.Count > 0) {
// Add attachments
- message.Files = _AllocAttachments(out message.FileCount);
+ message.Files = AllocAttachments(out message.FileCount);
}
// Signal the creating thread (make the remaining code async)
@@ -227,7 +227,7 @@ namespace Greenshot.Helpers {
if (Files.Count > 0) {
// Deallocate the files
- _DeallocFiles(message);
+ DeallocFiles(message);
}
MAPI_CODES errorCode = (MAPI_CODES)Enum.ToObject(typeof(MAPI_CODES), error);
@@ -245,14 +245,14 @@ namespace Greenshot.Helpers {
return;
}
Recipients = new RecipientCollection();
- _ShowMail();
+ ShowMail();
}
///
/// Deallocates the files in a message.
///
/// The message to deallocate the files from.
- private void _DeallocFiles(MapiHelperInterop.MapiMessage message) {
+ private void DeallocFiles(MapiHelperInterop.MapiMessage message) {
if (message.Files != IntPtr.Zero) {
Type fileDescType = typeof(MapiFileDescriptor);
int fsize = Marshal.SizeOf(fileDescType);
@@ -274,7 +274,7 @@ namespace Greenshot.Helpers {
///
///
///
- private IntPtr _AllocAttachments(out int fileCount) {
+ private IntPtr AllocAttachments(out int fileCount) {
fileCount = 0;
if (Files == null) {
return IntPtr.Zero;
diff --git a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
index 2c4e72fe6..d37465111 100644
--- a/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
+++ b/GreenshotJiraPlugin/GreenshotJiraPlugin.csproj
@@ -12,7 +12,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/GreenshotPlugin/Core/EmailConfigHelper.cs b/GreenshotPlugin/Core/EmailConfigHelper.cs
index bbd816e96..354f02c33 100644
--- a/GreenshotPlugin/Core/EmailConfigHelper.cs
+++ b/GreenshotPlugin/Core/EmailConfigHelper.cs
@@ -20,6 +20,7 @@
*/
using System.IO;
+using Microsoft.Win32;
namespace GreenshotPlugin.Core {
///
@@ -27,16 +28,16 @@ namespace GreenshotPlugin.Core {
///
public static class EmailConfigHelper {
- public static string GetMapiClient() => RegistryHelper.ReadLocalMachineSoftwareKey(@"Clients\Mail");
+ public static string GetMapiClient() => Registry.LocalMachine.ReadKey64Or32(@"Clients\Mail");
public static bool HasMapi()
{
- var value = RegistryHelper.ReadLocalMachineSoftwareKey(@"Microsoft\Windows Messaging Subsystem", "MAPI", "0");
+ var value = Registry.LocalMachine.ReadKey64Or32(@"Microsoft\Windows Messaging Subsystem", "MAPI", "0");
return "1".Equals(value);
}
- public static string GetOutlookExePath() => RegistryHelper.ReadLocalMachineSoftwareKey(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
+ public static string GetOutlookExePath() => Registry.LocalMachine.ReadKey64Or32(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
///
/// Check if Outlook is installed
diff --git a/GreenshotPlugin/Core/RegistryHelper.cs b/GreenshotPlugin/Core/RegistryKeyExtensions.cs
similarity index 82%
rename from GreenshotPlugin/Core/RegistryHelper.cs
rename to GreenshotPlugin/Core/RegistryKeyExtensions.cs
index e5f068ab4..73fd66a47 100644
--- a/GreenshotPlugin/Core/RegistryHelper.cs
+++ b/GreenshotPlugin/Core/RegistryKeyExtensions.cs
@@ -27,22 +27,23 @@ namespace GreenshotPlugin.Core
///
/// A helper class for accessing the registry
///
- public static class RegistryHelper
+ public static class RegistryKeyExtensions
{
///
/// Retrieve a registry value
///
+ /// RegistryKey like Registry.LocalMachine
/// string with the name of the key
/// string with the name of the value below the key, null will retrieve the default
/// string with the default value to return
/// string with the value
- public static string ReadLocalMachineSoftwareKey(string keyName, string value = null, string defaultValue = null)
+ public static string ReadKey64Or32(this RegistryKey registryKey, string keyName, string value = null, string defaultValue = null)
{
string result = null;
value ??= string.Empty;
if (Environment.Is64BitOperatingSystem)
{
- using var key = Registry.LocalMachine.OpenSubKey($@"SOFTWARE\{keyName}", false);
+ using var key = registryKey.OpenSubKey($@"SOFTWARE\{keyName}", false);
if (key != null)
{
@@ -52,7 +53,7 @@ namespace GreenshotPlugin.Core
if (string.IsNullOrEmpty(result))
{
- using var key = Registry.LocalMachine.OpenSubKey($@"SOFTWARE\wow6432node\{keyName}", false);
+ using var key = registryKey.OpenSubKey($@"SOFTWARE\wow6432node\{keyName}", false);
if (key != null)
{
diff --git a/GreenshotPlugin/GreenshotPlugin.csproj b/GreenshotPlugin/GreenshotPlugin.csproj
index 3caa4a7c4..29371bcfd 100644
--- a/GreenshotPlugin/GreenshotPlugin.csproj
+++ b/GreenshotPlugin/GreenshotPlugin.csproj
@@ -13,9 +13,9 @@
-
+
-
+
From 5103cb5da6a3b5740c469563b1462950fa893b92 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 28 Jan 2021 08:20:13 +0100
Subject: [PATCH 066/224] Trying to get MSBuild.Community.Tasks working in the
CI Pipeline, also removed "mixed" as a target platform.
---
Directory.Build.props | 14 ++++++---
Greenshot.sln | 43 ----------------------------
GreenshotJiraPlugin/JiraConnector.cs | 2 +-
azure-pipelines.yml | 4 +++
4 files changed, 15 insertions(+), 48 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index ce53be91e..78cd56c7b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -102,14 +102,20 @@
+
-
- $(userprofile)\.nuget\packages\msbuildtasks\1.5.0.235\tools\
+
+ $(PkgTools_MSBuildTasks)
-
-
+
+ $(userprofile)\.nuget\packages\msbuildtasks\1.5.0.235\tools\
+
+
+ $(MSBuildExtensionsPath)\MSBuildCommunityTasks\
+
+
diff --git a/Greenshot.sln b/Greenshot.sln
index 6b3723f7a..27df62d85 100644
--- a/Greenshot.sln
+++ b/Greenshot.sln
@@ -54,172 +54,129 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|x86.ActiveCfg = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|x86.Build.0 = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|Any CPU.Build.0 = Release|Any CPU
- {CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|x86.ActiveCfg = Release|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|x86.Build.0 = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|x86.Build.0 = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|Any CPU.Build.0 = Release|Any CPU
- {5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|x86.ActiveCfg = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|x86.Build.0 = Release|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|x86.ActiveCfg = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|x86.Build.0 = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|Any CPU.Build.0 = Release|Any CPU
- {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|x86.ActiveCfg = Release|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|x86.Build.0 = Release|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|x86.Build.0 = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|Any CPU.Build.0 = Release|Any CPU
- {C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|x86.ActiveCfg = Release|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|x86.Build.0 = Release|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|x86.ActiveCfg = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|x86.Build.0 = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|Any CPU.Build.0 = Release|Any CPU
- {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|x86.ActiveCfg = Release|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|x86.Build.0 = Release|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|x86.ActiveCfg = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|x86.Build.0 = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|Any CPU.Build.0 = Release|Any CPU
- {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.ActiveCfg = Release|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.Build.0 = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.ActiveCfg = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.Build.0 = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.Build.0 = Release|Any CPU
- {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.ActiveCfg = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.Build.0 = Release|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|x86.ActiveCfg = Debug|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|x86.Build.0 = Debug|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Any CPU.Build.0 = Release|Any CPU
- {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|x86.ActiveCfg = Release|Any CPU
{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|x86.Build.0 = Release|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|x86.ActiveCfg = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|x86.Build.0 = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Release|Any CPU.Build.0 = Release|Any CPU
- {697CF066-9077-4F22-99D9-D989CCE7282B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Release|x86.ActiveCfg = Release|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Release|x86.Build.0 = Release|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Debug|x86.ActiveCfg = Debug|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Debug|x86.Build.0 = Debug|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Release|Any CPU.Build.0 = Release|Any CPU
- {AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Release|x86.ActiveCfg = Release|Any CPU
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Release|x86.Build.0 = Release|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|x86.ActiveCfg = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|x86.Build.0 = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|Any CPU.Build.0 = Release|Any CPU
- {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|x86.ActiveCfg = Release|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|x86.Build.0 = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|x86.ActiveCfg = Debug|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|x86.Build.0 = Debug|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Any CPU.Build.0 = Release|Any CPU
- {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.ActiveCfg = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.Build.0 = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.ActiveCfg = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.Build.0 = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.Build.0 = Release|Any CPU
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.ActiveCfg = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.Build.0 = Release|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|x86.ActiveCfg = Debug|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|x86.Build.0 = Debug|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|Any CPU.Build.0 = Release|Any CPU
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|x86.ActiveCfg = Release|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|x86.Build.0 = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|x86.ActiveCfg = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|x86.Build.0 = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|Any CPU.Build.0 = Release|Any CPU
- {9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|x86.ActiveCfg = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
diff --git a/GreenshotJiraPlugin/JiraConnector.cs b/GreenshotJiraPlugin/JiraConnector.cs
index b836ea560..841a240d1 100644
--- a/GreenshotJiraPlugin/JiraConnector.cs
+++ b/GreenshotJiraPlugin/JiraConnector.cs
@@ -210,7 +210,7 @@ namespace GreenshotJiraPlugin {
await CheckCredentialsAsync(cancellationToken);
try
{
- return await _jiraClient.Issue.GetAsync(issueKey, cancellationToken).ConfigureAwait(false);
+ return await _jiraClient.Issue.GetAsync(issueKey, cancellationToken: cancellationToken).ConfigureAwait(false);
}
catch
{
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 5043dd397..2b613130b 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -37,6 +37,10 @@ stages:
restoreSolution: '$(solution)'
feedsToUse: config
+ - powershell: |
+ choco install msbuild.communitytasks
+ displayName: 'Installing MSBuild community tasks'
+
- task: MSBuild@1
displayName: Generate templates
inputs:
From 5f242a79c8259124d930b98fa5d3744c863aafa7 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 28 Jan 2021 08:23:31 +0100
Subject: [PATCH 067/224] Changed the order of the installation of the MSBuild
Tasks, otherwise this will certainly not work.
---
azure-pipelines.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 2b613130b..329355afa 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -30,6 +30,10 @@ stages:
steps:
- task: NuGetToolInstaller@1
+ - powershell: |
+ choco install msbuild.communitytasks
+ displayName: 'Installing MSBuild community tasks'
+
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
@@ -37,10 +41,6 @@ stages:
restoreSolution: '$(solution)'
feedsToUse: config
- - powershell: |
- choco install msbuild.communitytasks
- displayName: 'Installing MSBuild community tasks'
-
- task: MSBuild@1
displayName: Generate templates
inputs:
From 6831505ead092c07652a3edcd4c0ff01bd0c9b30 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 28 Jan 2021 09:12:55 +0100
Subject: [PATCH 068/224] Added Directory.Build.targets, this seems to help to
import the target correctly. Removed chocolatey package again, as this seems
to be the more stable approach (let's see if the build runs...)
---
Directory.Build.props | 20 +--
Directory.Build.targets | 9 +
GreenshotConfluencePlugin/Confluence.cs | 4 +-
.../ConfluenceDestination.cs | 3 +-
GreenshotConfluencePlugin/ConfluencePlugin.cs | 4 +-
GreenshotConfluencePlugin/ConfluenceUtils.cs | 12 +-
.../Forms/ConfluenceConfigurationForm.xaml | 24 +--
.../Forms/ConfluenceConfigurationForm.xaml.cs | 2 +-
.../Forms/ConfluencePagePicker.xaml | 2 +-
.../Forms/ConfluencePagePicker.xaml.cs | 3 +-
.../Forms/ConfluenceSearch.xaml | 11 +-
.../Forms/ConfluenceSearch.xaml.cs | 10 +-
.../Forms/ConfluenceTreePicker.xaml | 6 +-
.../Forms/ConfluenceTreePicker.xaml.cs | 25 ++-
.../Forms/ConfluenceUpload.xaml | 18 +-
.../Forms/ConfluenceUpload.xaml.cs | 30 ++--
.../Forms/ListViewColumnSorter.cs | 162 +++++++++---------
.../Support/ITranslationProvider.cs | 2 +-
.../Support/LanguageChangedEventManager.cs | 2 +-
.../Support/LanguageXMLTranslationProvider.cs | 2 +-
.../Support/TranslateExtension.cs | 2 +-
.../Support/TranslationData.cs | 2 +-
.../Support/TranslationManager.cs | 2 +-
azure-pipelines.yml | 4 -
24 files changed, 175 insertions(+), 186 deletions(-)
create mode 100644 Directory.Build.targets
diff --git a/Directory.Build.props b/Directory.Build.props
index 78cd56c7b..b1f50e7b1 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -18,6 +18,7 @@
true
net472
Off
+ true
@@ -102,25 +103,10 @@
-
-
+
+
-
- $(PkgTools_MSBuildTasks)
-
-
- $(userprofile)\.nuget\packages\msbuildtasks\1.5.0.235\tools\
-
-
- $(MSBuildExtensionsPath)\MSBuildCommunityTasks\
-
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GreenshotConfluencePlugin/Confluence.cs b/GreenshotConfluencePlugin/Confluence.cs
index 3ccfce630..69833cb77 100644
--- a/GreenshotConfluencePlugin/Confluence.cs
+++ b/GreenshotConfluencePlugin/Confluence.cs
@@ -18,15 +18,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System;
using System.Collections.Generic;
using System.Windows.Forms;
-using GreenshotConfluencePlugin;
using GreenshotConfluencePlugin.confluence;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
-namespace Confluence {
+namespace GreenshotConfluencePlugin {
public class Page {
public Page(RemotePage page) {
Id = page.id;
diff --git a/GreenshotConfluencePlugin/ConfluenceDestination.cs b/GreenshotConfluencePlugin/ConfluenceDestination.cs
index 63bf60f01..7403495e2 100644
--- a/GreenshotConfluencePlugin/ConfluenceDestination.cs
+++ b/GreenshotConfluencePlugin/ConfluenceDestination.cs
@@ -25,7 +25,6 @@ using System.Drawing;
using System.IO;
using System.Threading;
using System.Windows;
-using Confluence;
using GreenshotPlugin.Controls;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
@@ -129,7 +128,7 @@ namespace GreenshotConfluencePlugin {
bool openPage = (_page == null) && ConfluenceConfig.OpenPageAfterUpload;
string filename = FilenameHelper.GetFilenameWithoutExtensionFromPattern(CoreConfig.OutputFileFilenamePattern, captureDetails);
if (selectedPage == null) {
- ConfluenceUpload confluenceUpload = new ConfluenceUpload(filename);
+ Forms.ConfluenceUpload confluenceUpload = new Forms.ConfluenceUpload(filename);
bool? dialogResult = confluenceUpload.ShowDialog();
if (dialogResult.HasValue && dialogResult.Value) {
selectedPage = confluenceUpload.SelectedPage;
diff --git a/GreenshotConfluencePlugin/ConfluencePlugin.cs b/GreenshotConfluencePlugin/ConfluencePlugin.cs
index 78680f24a..2f5ea3539 100644
--- a/GreenshotConfluencePlugin/ConfluencePlugin.cs
+++ b/GreenshotConfluencePlugin/ConfluencePlugin.cs
@@ -19,14 +19,14 @@
* along with this program. If not, see .
*/
-using Confluence;
using GreenshotPlugin.Core;
using System;
using System.Windows;
+using GreenshotConfluencePlugin.Forms;
+using GreenshotConfluencePlugin.Support;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Plugin;
-using TranslationByMarkupExtension;
namespace GreenshotConfluencePlugin {
///
diff --git a/GreenshotConfluencePlugin/ConfluenceUtils.cs b/GreenshotConfluencePlugin/ConfluenceUtils.cs
index 7c9e84b00..9b3394cc7 100644
--- a/GreenshotConfluencePlugin/ConfluenceUtils.cs
+++ b/GreenshotConfluencePlugin/ConfluenceUtils.cs
@@ -33,8 +33,8 @@ namespace GreenshotConfluencePlugin {
public class ConfluenceUtils {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceUtils));
- public static List GetCurrentPages() {
- List pages = new List();
+ public static List GetCurrentPages() {
+ List pages = new List();
Regex pageIdRegex = new Regex(@"pageId=(\d+)");
Regex spacePageRegex = new Regex(@"\/display\/([^\/]+)\/([^#]+)");
foreach(string browserurl in GetBrowserUrls()) {
@@ -50,7 +50,7 @@ namespace GreenshotConfluencePlugin {
long pageId = long.Parse(pageIdMatch[0].Groups[1].Value);
try {
bool pageDouble = false;
- foreach(Confluence.Page page in pages) {
+ foreach(Page page in pages) {
if (page.Id == pageId) {
pageDouble = true;
LOG.DebugFormat("Skipping double page with ID {0}", pageId);
@@ -58,7 +58,7 @@ namespace GreenshotConfluencePlugin {
}
}
if (!pageDouble) {
- Confluence.Page page = ConfluencePlugin.ConfluenceConnector.GetPage(pageId);
+ Page page = ConfluencePlugin.ConfluenceConnector.GetPage(pageId);
LOG.DebugFormat("Adding page {0}", page.Title);
pages.Add(page);
}
@@ -82,7 +82,7 @@ namespace GreenshotConfluencePlugin {
}
try {
bool pageDouble = false;
- foreach(Confluence.Page page in pages) {
+ foreach(Page page in pages) {
if (page.Title.Equals(title)) {
LOG.DebugFormat("Skipping double page with title {0}", title);
pageDouble = true;
@@ -90,7 +90,7 @@ namespace GreenshotConfluencePlugin {
}
}
if (!pageDouble) {
- Confluence.Page page = ConfluencePlugin.ConfluenceConnector.GetPage(space, title);
+ Page page = ConfluencePlugin.ConfluenceConnector.GetPage(space, title);
LOG.DebugFormat("Adding page {0}", page.Title);
pages.Add(page);
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml b/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml
index b22e55d9b..c6b6b48a6 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml
@@ -1,33 +1,33 @@
-
+ xmlns:gsc="clr-namespace:GreenshotPlugin.Core;assembly=GreenshotPlugin"
+ xmlns:support="clr-namespace:GreenshotConfluencePlugin.Support"
+ Title="{support:Translate plugin_settings}" SizeToContent="WidthAndHeight" ResizeMode="NoResize" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
-
-
-
+
+
+
-
+
-
+
-
+
-
-
+
+
\ No newline at end of file
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs
index ca662b316..8545d91a0 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs
@@ -21,7 +21,7 @@
using System.Windows;
-namespace GreenshotConfluencePlugin {
+namespace GreenshotConfluencePlugin.Forms {
///
/// Interaction logic for ConfluenceConfigurationForm.xaml
///
diff --git a/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml b/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml
index 6455e86b5..e9ae3f97b 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml
+++ b/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml
@@ -1,4 +1,4 @@
-
diff --git a/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs
index 9d52f49e9..7ce72fd4f 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs
@@ -19,10 +19,9 @@
* along with this program. If not, see .
*/
-using Confluence;
using System.Collections.Generic;
-namespace GreenshotConfluencePlugin {
+namespace GreenshotConfluencePlugin.Forms {
///
/// Interaction logic for ConfluencePagePicker.xaml
///
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml
index e30f9ab6e..073a437fe 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml
@@ -1,8 +1,9 @@
-
+ xmlns:support="clr-namespace:GreenshotConfluencePlugin.Support"
+ Loaded="Page_Loaded">
@@ -16,9 +17,9 @@
-
-
-
+
+
+
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs
index 1b5c3877e..e30ed9dc4 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs
@@ -25,15 +25,15 @@ using System.Linq;
using System.Windows;
using GreenshotPlugin.IniFile;
-namespace GreenshotConfluencePlugin {
+namespace GreenshotConfluencePlugin.Forms {
public partial class ConfluenceSearch
{
private static readonly ConfluenceConfiguration ConfluenceConfig = IniConfig.GetIniSection();
private readonly ConfluenceUpload _confluenceUpload;
- public IEnumerable Spaces => _confluenceUpload.Spaces;
+ public IEnumerable Spaces => _confluenceUpload.Spaces;
- public ObservableCollection Pages { get; } = new ObservableCollection();
+ public ObservableCollection Pages { get; } = new ObservableCollection();
public ConfluenceSearch(ConfluenceUpload confluenceUpload) {
_confluenceUpload = confluenceUpload;
@@ -56,7 +56,7 @@ namespace GreenshotConfluencePlugin {
private void SelectionChanged() {
if (PageListView.HasItems && PageListView.SelectedItems.Count > 0) {
- _confluenceUpload.SelectedPage = (Confluence.Page)PageListView.SelectedItem;
+ _confluenceUpload.SelectedPage = (Page)PageListView.SelectedItem;
} else {
_confluenceUpload.SelectedPage = null;
}
@@ -86,7 +86,7 @@ namespace GreenshotConfluencePlugin {
SelectionChanged();
}
- private void searchText_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) {
+ private void SearchText_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) {
Search.IsEnabled = !string.IsNullOrEmpty(searchText.Text);
}
}
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml b/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml
index 97352d47e..4ca2a11ad 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml
@@ -1,8 +1,8 @@
-
+ FontSize="18" FontWeight="Bold" Foreground="#7EFFFFFF" Text="{support:Translate loading}"/>
\ No newline at end of file
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs
index 78fb2235d..b154ad357 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs
@@ -27,10 +27,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
-using Confluence;
-using Page = Confluence.Page;
-
-namespace GreenshotConfluencePlugin {
+namespace GreenshotConfluencePlugin.Forms {
///
/// Interaction logic for ConfluenceTreePicker.xaml
///
@@ -47,10 +44,10 @@ namespace GreenshotConfluencePlugin {
InitializeComponent();
}
- private void pageTreeViewItem_DoubleClick(object sender, MouseButtonEventArgs eventArgs) {
+ private void PageTreeViewItem_DoubleClick(object sender, MouseButtonEventArgs eventArgs) {
Log.Debug("spaceTreeViewItem_MouseLeftButtonDown is called!");
TreeViewItem clickedItem = eventArgs.Source as TreeViewItem;
- if (!(clickedItem?.Tag is Page page)) {
+ if (clickedItem?.Tag is not Page page) {
return;
}
if (clickedItem.HasItems)
@@ -70,20 +67,20 @@ namespace GreenshotConfluencePlugin {
Tag = childPage
};
clickedItem.Items.Add(pageTreeViewItem);
- pageTreeViewItem.PreviewMouseDoubleClick += pageTreeViewItem_DoubleClick;
- pageTreeViewItem.PreviewMouseLeftButtonDown += pageTreeViewItem_Click;
+ pageTreeViewItem.PreviewMouseDoubleClick += PageTreeViewItem_DoubleClick;
+ pageTreeViewItem.PreviewMouseLeftButtonDown += PageTreeViewItem_Click;
}
ShowBusy.Visibility = Visibility.Collapsed;
}));
}) { Name = "Loading childpages for confluence page " + page.Title }.Start();
}
- private void pageTreeViewItem_Click(object sender, MouseButtonEventArgs eventArgs) {
+ private void PageTreeViewItem_Click(object sender, MouseButtonEventArgs eventArgs) {
Log.Debug("pageTreeViewItem_PreviewMouseDoubleClick is called!");
- if (!(eventArgs.Source is TreeViewItem clickedItem)) {
+ if (eventArgs.Source is not TreeViewItem clickedItem) {
return;
}
- Confluence.Page page = clickedItem.Tag as Confluence.Page;
+ Page page = clickedItem.Tag as Page;
_confluenceUpload.SelectedPage = page;
if (page != null) {
Log.Debug("Page selected: " + page.Title);
@@ -107,14 +104,14 @@ namespace GreenshotConfluencePlugin {
// Get homepage
try {
- Confluence.Page page = _confluenceConnector.GetSpaceHomepage(space);
+ Page page = _confluenceConnector.GetSpaceHomepage(space);
TreeViewItem pageTreeViewItem = new TreeViewItem
{
Header = page.Title,
Tag = page
};
- pageTreeViewItem.PreviewMouseDoubleClick += pageTreeViewItem_DoubleClick;
- pageTreeViewItem.PreviewMouseLeftButtonDown += pageTreeViewItem_Click;
+ pageTreeViewItem.PreviewMouseDoubleClick += PageTreeViewItem_DoubleClick;
+ pageTreeViewItem.PreviewMouseLeftButtonDown += PageTreeViewItem_Click;
spaceTreeViewItem.Items.Add(pageTreeViewItem);
ConfluenceTreeView.Items.Add(spaceTreeViewItem);
} catch (Exception ex) {
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml b/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml
index aa97142a6..f6ec6f13a 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml
@@ -1,17 +1,17 @@
-
+ xmlns:support="clr-namespace:GreenshotConfluencePlugin.Support"
+ Title="{support:Translate upload_menu_item}" Height="640" Width="500" Icon="/GreenshotConfluencePlugin;component/Images/Confluence.ico">
-
+
-
+
-
+
@@ -23,12 +23,12 @@
-
+
-
-
+
+
\ No newline at end of file
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs
index 76c82b2df..86c5ff4e4 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs
@@ -18,23 +18,23 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows;
-using System.Windows.Controls;
-namespace GreenshotConfluencePlugin {
+namespace GreenshotConfluencePlugin.Forms {
///
/// Interaction logic for ConfluenceUpload.xaml
///
public partial class ConfluenceUpload : Window {
- private Page _pickerPage;
- public Page PickerPage {
+ private System.Windows.Controls.Page _pickerPage;
+ public System.Windows.Controls.Page PickerPage {
get {
if (_pickerPage == null) {
- List pages = ConfluenceUtils.GetCurrentPages();
+ List pages = ConfluenceUtils.GetCurrentPages();
if (pages != null && pages.Count > 0) {
_pickerPage = new ConfluencePagePicker(this, pages);
}
@@ -43,21 +43,19 @@ namespace GreenshotConfluencePlugin {
}
}
- private Page _searchPage;
- public Page SearchPage {
+ private System.Windows.Controls.Page _searchPage;
+ public System.Windows.Controls.Page SearchPage {
get { return _searchPage ??= new ConfluenceSearch(this); }
}
- private Page _browsePage;
- public Page BrowsePage {
+ private System.Windows.Controls.Page _browsePage;
+ public System.Windows.Controls.Page BrowsePage {
get { return _browsePage ??= new ConfluenceTreePicker(this); }
}
- private Confluence.Page _selectedPage;
- public Confluence.Page SelectedPage {
- get {
- return _selectedPage;
- }
+ private Page _selectedPage;
+ public Page SelectedPage {
+ get => _selectedPage;
set {
_selectedPage = value;
Upload.IsEnabled = _selectedPage != null;
@@ -75,8 +73,8 @@ namespace GreenshotConfluencePlugin {
}
private static DateTime _lastLoad = DateTime.Now;
- private static IList _spaces;
- public IList Spaces {
+ private static IList _spaces;
+ public IList Spaces {
get {
UpdateSpaces();
while (_spaces == null) {
diff --git a/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs b/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
index fa3d4e027..85b380840 100644
--- a/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
+++ b/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
@@ -18,92 +18,96 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System.Collections;
using System.Windows.Forms;
-///
-/// This class is an implementation of the 'IComparer' interface.
-///
-public class ListViewColumnSorter : IComparer {
+namespace GreenshotConfluencePlugin.Forms
+{
///
- /// Specifies the column to be sorted
+ /// This class is an implementation of the 'IComparer' interface.
///
- private int _columnToSort;
- ///
- /// Specifies the order in which to sort (i.e. 'Ascending').
- ///
- private SortOrder _orderOfSort;
- ///
- /// Case insensitive comparer object
- ///
- private readonly CaseInsensitiveComparer _objectCompare;
+ public class ListViewColumnSorter : IComparer {
+ ///
+ /// Specifies the column to be sorted
+ ///
+ private int _columnToSort;
+ ///
+ /// Specifies the order in which to sort (i.e. 'Ascending').
+ ///
+ private SortOrder _orderOfSort;
+ ///
+ /// Case insensitive comparer object
+ ///
+ private readonly CaseInsensitiveComparer _objectCompare;
- ///
- /// Class constructor. Initializes various elements
- ///
- public ListViewColumnSorter() {
- // Initialize the column to '0'
- _columnToSort = 0;
+ ///
+ /// Class constructor. Initializes various elements
+ ///
+ public ListViewColumnSorter() {
+ // Initialize the column to '0'
+ _columnToSort = 0;
- // Initialize the sort order to 'none'
- _orderOfSort = SortOrder.None;
+ // Initialize the sort order to 'none'
+ _orderOfSort = SortOrder.None;
+
+ // Initialize the CaseInsensitiveComparer object
+ _objectCompare = new CaseInsensitiveComparer();
+ }
+
+ ///
+ /// This method is inherited from the IComparer interface. It compares the two objects passed using a case insensitive comparison.
+ ///
+ /// First object to be compared
+ /// Second object to be compared
+ /// The result of the comparison. "0" if equal, negative if 'x' is less than 'y' and positive if 'x' is greater than 'y'
+ public int Compare(object x, object y) {
+ int compareResult;
+ ListViewItem listviewX, listviewY;
+
+ // Cast the objects to be compared to ListViewItem objects
+ listviewX = (ListViewItem)x;
+ listviewY = (ListViewItem)y;
+
+ // Compare the two items
+ compareResult = _objectCompare.Compare(listviewX.SubItems[_columnToSort].Text, listviewY.SubItems[_columnToSort].Text);
+
+ // Calculate correct return value based on object comparison
+ if (_orderOfSort == SortOrder.Ascending) {
+ // Ascending sort is selected, return normal result of compare operation
+ return compareResult;
+ } else if (_orderOfSort == SortOrder.Descending) {
+ // Descending sort is selected, return negative result of compare operation
+ return (-compareResult);
+ } else {
+ // Return '0' to indicate they are equal
+ return 0;
+ }
+ }
+
+ ///
+ /// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
+ ///
+ public int SortColumn {
+ set {
+ _columnToSort = value;
+ }
+ get {
+ return _columnToSort;
+ }
+ }
+
+ ///
+ /// Gets or sets the order of sorting to apply (for example, 'Ascending' or 'Descending').
+ ///
+ public SortOrder Order {
+ set {
+ _orderOfSort = value;
+ }
+ get {
+ return _orderOfSort;
+ }
+ }
- // Initialize the CaseInsensitiveComparer object
- _objectCompare = new CaseInsensitiveComparer();
}
-
- ///
- /// This method is inherited from the IComparer interface. It compares the two objects passed using a case insensitive comparison.
- ///
- /// First object to be compared
- /// Second object to be compared
- /// The result of the comparison. "0" if equal, negative if 'x' is less than 'y' and positive if 'x' is greater than 'y'
- public int Compare(object x, object y) {
- int compareResult;
- ListViewItem listviewX, listviewY;
-
- // Cast the objects to be compared to ListViewItem objects
- listviewX = (ListViewItem)x;
- listviewY = (ListViewItem)y;
-
- // Compare the two items
- compareResult = _objectCompare.Compare(listviewX.SubItems[_columnToSort].Text, listviewY.SubItems[_columnToSort].Text);
-
- // Calculate correct return value based on object comparison
- if (_orderOfSort == SortOrder.Ascending) {
- // Ascending sort is selected, return normal result of compare operation
- return compareResult;
- } else if (_orderOfSort == SortOrder.Descending) {
- // Descending sort is selected, return negative result of compare operation
- return (-compareResult);
- } else {
- // Return '0' to indicate they are equal
- return 0;
- }
- }
-
- ///
- /// Gets or sets the number of the column to which to apply the sorting operation (Defaults to '0').
- ///
- public int SortColumn {
- set {
- _columnToSort = value;
- }
- get {
- return _columnToSort;
- }
- }
-
- ///
- /// Gets or sets the order of sorting to apply (for example, 'Ascending' or 'Descending').
- ///
- public SortOrder Order {
- set {
- _orderOfSort = value;
- }
- get {
- return _orderOfSort;
- }
- }
-
}
diff --git a/GreenshotConfluencePlugin/Support/ITranslationProvider.cs b/GreenshotConfluencePlugin/Support/ITranslationProvider.cs
index 79efd538c..02180f036 100644
--- a/GreenshotConfluencePlugin/Support/ITranslationProvider.cs
+++ b/GreenshotConfluencePlugin/Support/ITranslationProvider.cs
@@ -1,4 +1,4 @@
-namespace TranslationByMarkupExtension {
+namespace GreenshotConfluencePlugin.Support {
public interface ITranslationProvider {
///
/// Translates the specified key.
diff --git a/GreenshotConfluencePlugin/Support/LanguageChangedEventManager.cs b/GreenshotConfluencePlugin/Support/LanguageChangedEventManager.cs
index 8fe9289d3..c9fb55704 100644
--- a/GreenshotConfluencePlugin/Support/LanguageChangedEventManager.cs
+++ b/GreenshotConfluencePlugin/Support/LanguageChangedEventManager.cs
@@ -1,7 +1,7 @@
using System;
using System.Windows;
-namespace TranslationByMarkupExtension
+namespace GreenshotConfluencePlugin.Support
{
public class LanguageChangedEventManager : WeakEventManager
{
diff --git a/GreenshotConfluencePlugin/Support/LanguageXMLTranslationProvider.cs b/GreenshotConfluencePlugin/Support/LanguageXMLTranslationProvider.cs
index 3b23c0d58..23dbc4fc1 100644
--- a/GreenshotConfluencePlugin/Support/LanguageXMLTranslationProvider.cs
+++ b/GreenshotConfluencePlugin/Support/LanguageXMLTranslationProvider.cs
@@ -1,6 +1,6 @@
using GreenshotPlugin.Core;
-namespace TranslationByMarkupExtension {
+namespace GreenshotConfluencePlugin.Support {
///
///
///
diff --git a/GreenshotConfluencePlugin/Support/TranslateExtension.cs b/GreenshotConfluencePlugin/Support/TranslateExtension.cs
index c581efc77..3730e7baa 100644
--- a/GreenshotConfluencePlugin/Support/TranslateExtension.cs
+++ b/GreenshotConfluencePlugin/Support/TranslateExtension.cs
@@ -2,7 +2,7 @@
using System.Windows.Data;
using System.Windows.Markup;
-namespace TranslationByMarkupExtension
+namespace GreenshotConfluencePlugin.Support
{
///
/// The Translate Markup extension returns a binding to a TranslationData
diff --git a/GreenshotConfluencePlugin/Support/TranslationData.cs b/GreenshotConfluencePlugin/Support/TranslationData.cs
index e659a0be3..0b6371505 100644
--- a/GreenshotConfluencePlugin/Support/TranslationData.cs
+++ b/GreenshotConfluencePlugin/Support/TranslationData.cs
@@ -2,7 +2,7 @@
using System.ComponentModel;
using System.Windows;
-namespace TranslationByMarkupExtension {
+namespace GreenshotConfluencePlugin.Support {
public class TranslationData : IWeakEventListener, INotifyPropertyChanged {
private readonly string _key;
diff --git a/GreenshotConfluencePlugin/Support/TranslationManager.cs b/GreenshotConfluencePlugin/Support/TranslationManager.cs
index d11d36cd5..241cce868 100644
--- a/GreenshotConfluencePlugin/Support/TranslationManager.cs
+++ b/GreenshotConfluencePlugin/Support/TranslationManager.cs
@@ -1,6 +1,6 @@
using System;
-namespace TranslationByMarkupExtension {
+namespace GreenshotConfluencePlugin.Support {
public class TranslationManager {
private static TranslationManager _translationManager;
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 329355afa..5043dd397 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -30,10 +30,6 @@ stages:
steps:
- task: NuGetToolInstaller@1
- - powershell: |
- choco install msbuild.communitytasks
- displayName: 'Installing MSBuild community tasks'
-
- task: NuGetCommand@2
displayName: NuGet restore
inputs:
From 5899d97ec2c4cc65af35dedb0f280c441e7438c1 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 28 Jan 2021 21:49:02 +0100
Subject: [PATCH 069/224] Another try to fix the build.
---
Directory.Build.props | 2 +-
Directory.Build.targets | 6 +++++-
azure-pipelines.yml | 13 ++-----------
3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index b1f50e7b1..c87c75734 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -104,7 +104,7 @@
-
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index e84907085..f2ce406a1 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,6 +1,10 @@
-
+
+ $(PkgMSBuildTasks)\tools\
+
+
+
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 5043dd397..21d640496 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -28,22 +28,13 @@ stages:
vmImage: 'Windows-latest'
steps:
- - task: NuGetToolInstaller@1
-
- - task: NuGetCommand@2
- displayName: NuGet restore
- inputs:
- command: 'restore'
- restoreSolution: '$(solution)'
- feedsToUse: config
-
- task: MSBuild@1
- displayName: Generate templates
+ displayName: Restore nuget packages and generate credential templates
inputs:
solution: '$(solution)'
platform: $(buildPlatform)
configuration: $(buildConfiguration)
- msbuildArguments: '/t:PrepareForBuild'
+ msbuildArguments: '/restore /t:PrepareForBuild'
- task: MSBuild@1
displayName: Build and package
From e5019bbb9d3fcf0936b77a610a47a9aaa82d7629 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Sun, 31 Jan 2021 20:34:56 +0100
Subject: [PATCH 070/224] A fix for a bug reported in #258, there still was a
DLL missing. [skip ci]
---
Greenshot/releases/innosetup/setup.iss | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Greenshot/releases/innosetup/setup.iss b/Greenshot/releases/innosetup/setup.iss
index 7735af213..3195d1f55 100644
--- a/Greenshot/releases/innosetup/setup.iss
+++ b/Greenshot/releases/innosetup/setup.iss
@@ -85,7 +85,7 @@ Source: {#BaseDir}\GreenshotOCRCommand\{#BinDir}\GreenshotOCRCommand.exe; DestDi
Source: {#BaseDir}\GreenshotOCRCommand\{#BinDir}\GreenshotOCRCommand.exe.config; DestDir: {app}\Plugins\GreenshotOCRPlugin; Components: plugins\ocr; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
;JIRA Plugin
Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\GreenshotJiraPlugin.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
-Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\Dapplo.Jira.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
+Source: {#BaseDir}\GreenshotJiraPlugin\{#BinDir}\Dapplo.Jira*.dll; DestDir: {app}\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
Source: {#BaseDir}\GreenshotJiraPlugin\Languages\language_jira*.xml; DestDir: {app}\Languages\Plugins\GreenshotJiraPlugin; Components: plugins\jira; Flags: overwritereadonly ignoreversion replacesameversion;
;Imgur Plugin
Source: {#BaseDir}\GreenshotImgurPlugin\{#BinDir}\GreenshotImgurPlugin.dll; DestDir: {app}\Plugins\GreenshotImgurPlugin; Components: plugins\imgur; Flags: overwritereadonly recursesubdirs ignoreversion replacesameversion;
@@ -133,7 +133,7 @@ DefaultGroupName={#ExeName}
InfoBeforeFile=..\additional_files\readme.txt
LicenseFile=..\additional_files\license.txt
LanguageDetectionMethod=uilanguage
-MinVersion=6.1.7600
+MinVersion=6.1sp1
OutputBaseFilename={#ExeName}-INSTALLER-{#Version}-UNSTABLE
OutputDir=..\
PrivilegesRequired=lowest
From d9a6922310a3ebd04553cd7a90383f42b0b077be Mon Sep 17 00:00:00 2001
From: k41c <51283438+k41c@users.noreply.github.com>
Date: Fri, 19 Feb 2021 13:57:38 +0100
Subject: [PATCH 071/224] Update ImageEditorForm.cs
---
Greenshot/Forms/ImageEditorForm.cs | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 6e19df179..c67b434f0 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -898,13 +898,29 @@ namespace Greenshot {
}
}
}
-
+DateTime zoomStartTime = DateTime.Now;
///
/// This is a "work-around" for the MouseWheel event which doesn't get to the panel
///
///
///
private void PanelMouseWheel(object sender, MouseEventArgs e) {
+ if (System.Windows.Forms.Control.ModifierKeys.Equals(Keys.Control))
+ {
+ if (zoomStartTime.AddMilliseconds(100) < DateTime.Now) //waiting for next zoom step 100 ms
+ {
+ zoomStartTime = DateTime.Now;
+ if (e.Delta > 0)
+ {
+ ZoomInMenuItemClick(sender, e);
+ }
+ else if (e.Delta < 0)
+ {
+ ZoomOutMenuItemClick(sender, e);
+ }
+ }
+
+ }
panel1.Focus();
}
From a3e4f2f92e4db63bd622e92f3420997abc9223cb Mon Sep 17 00:00:00 2001
From: k41c <51283438+k41c@users.noreply.github.com>
Date: Fri, 19 Feb 2021 13:58:39 +0100
Subject: [PATCH 072/224] Update NonJumpingPanel.cs
---
Greenshot/Controls/NonJumpingPanel.cs | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/Greenshot/Controls/NonJumpingPanel.cs b/Greenshot/Controls/NonJumpingPanel.cs
index 51658a105..f8595c28a 100644
--- a/Greenshot/Controls/NonJumpingPanel.cs
+++ b/Greenshot/Controls/NonJumpingPanel.cs
@@ -38,16 +38,28 @@ namespace GreenshotPlugin.Controls {
///
/// MouseEventArgs
protected override void OnMouseWheel(MouseEventArgs e)
- {
- if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift)
- {
+ {//Check if Scrollbars available and CTRL key pressed -> Zoom IN OUT
+ if((VScroll || HScroll)&& (ModifierKeys & Keys.Control) == Keys.Control)
+ {
VScroll = false;
+ HScroll = false;
base.OnMouseWheel(e);
VScroll = true;
+ HScroll = true;
}
- else
- {
- base.OnMouseWheel(e);
+ else
+ {
+ //Vertical Scoll with SHIFT key pressed
+ if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift )
+ {
+ VScroll = false;
+ base.OnMouseWheel(e);
+ VScroll = true;
+ }
+ else
+ {
+ base.OnMouseWheel(e);
+ }
}
}
}
From ee9d1325b57a746371a56c476841ef69b9e975de Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 19 Feb 2021 23:06:41 +0100
Subject: [PATCH 073/224] Formatting fix
---
Greenshot/Controls/NonJumpingPanel.cs | 80 ++++++++++++++-------------
1 file changed, 42 insertions(+), 38 deletions(-)
diff --git a/Greenshot/Controls/NonJumpingPanel.cs b/Greenshot/Controls/NonJumpingPanel.cs
index f8595c28a..4d107da45 100644
--- a/Greenshot/Controls/NonJumpingPanel.cs
+++ b/Greenshot/Controls/NonJumpingPanel.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
*
@@ -22,45 +22,49 @@
using System.Drawing;
using System.Windows.Forms;
-namespace GreenshotPlugin.Controls {
- ///
- /// See: http://nickstips.wordpress.com/2010/03/03/c-panel-resets-scroll-position-after-focus-is-lost-and-regained/
- ///
- public class NonJumpingPanel : Panel {
- protected override Point ScrollToControl(Control activeControl) {
- // Returning the current location prevents the panel from
- // scrolling to the active control when the panel loses and regains focus
- return DisplayRectangle.Location;
- }
+namespace GreenshotPlugin.Controls
+{
+ ///
+ /// See: http://nickstips.wordpress.com/2010/03/03/c-panel-resets-scroll-position-after-focus-is-lost-and-regained/
+ ///
+ public class NonJumpingPanel : Panel
+ {
+ protected override Point ScrollToControl(Control activeControl)
+ {
+ // Returning the current location prevents the panel from
+ // scrolling to the active control when the panel loses and regains focus
+ return DisplayRectangle.Location;
+ }
- ///
- /// Add horizontal scrolling to the panel, when using the wheel and the shift key is pressed
- ///
- /// MouseEventArgs
- protected override void OnMouseWheel(MouseEventArgs e)
- {//Check if Scrollbars available and CTRL key pressed -> Zoom IN OUT
- if((VScroll || HScroll)&& (ModifierKeys & Keys.Control) == Keys.Control)
+ ///
+ /// Add horizontal scrolling to the panel, when using the wheel and the shift key is pressed
+ ///
+ /// MouseEventArgs
+ protected override void OnMouseWheel(MouseEventArgs e)
+ {
+ //Check if Scrollbars available and CTRL key pressed -> Zoom IN OUT
+ if ((VScroll || HScroll) && (ModifierKeys & Keys.Control) == Keys.Control)
{
- VScroll = false;
- HScroll = false;
- base.OnMouseWheel(e);
- VScroll = true;
- HScroll = true;
- }
+ VScroll = false;
+ HScroll = false;
+ base.OnMouseWheel(e);
+ VScroll = true;
+ HScroll = true;
+ }
else
{
- //Vertical Scoll with SHIFT key pressed
- if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift )
- {
- VScroll = false;
- base.OnMouseWheel(e);
- VScroll = true;
- }
- else
- {
- base.OnMouseWheel(e);
- }
- }
- }
- }
+ //Vertical Scoll with SHIFT key pressed
+ if (VScroll && (ModifierKeys & Keys.Shift) == Keys.Shift)
+ {
+ VScroll = false;
+ base.OnMouseWheel(e);
+ VScroll = true;
+ }
+ else
+ {
+ base.OnMouseWheel(e);
+ }
+ }
+ }
+ }
}
From c8ade4258b572ef1f8abe9acee21224c7dee6645 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 19 Feb 2021 23:12:15 +0100
Subject: [PATCH 074/224] Fixed formatting
---
Greenshot/Forms/ImageEditorForm.cs | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index c67b434f0..ece824bdb 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -66,6 +66,9 @@ namespace Greenshot {
// whether part of the editor controls are disabled depending on selected item(s)
private bool _controlsDisabledDueToConfirmable;
+ // Used for tracking the mouse scrollwheel changes
+ private DateTime _zoomStartTime = DateTime.Now;
+
///
/// All provided zoom values (in percents) in ascending order.
///
@@ -898,18 +901,24 @@ namespace Greenshot {
}
}
}
-DateTime zoomStartTime = DateTime.Now;
+
///
/// This is a "work-around" for the MouseWheel event which doesn't get to the panel
///
///
///
- private void PanelMouseWheel(object sender, MouseEventArgs e) {
+ ///
+ /// This is a "work-around" for the MouseWheel event which doesn't get to the panel
+ ///
+ ///
+ ///
+ private void PanelMouseWheel(object sender, MouseEventArgs e)
+ {
if (System.Windows.Forms.Control.ModifierKeys.Equals(Keys.Control))
- {
- if (zoomStartTime.AddMilliseconds(100) < DateTime.Now) //waiting for next zoom step 100 ms
- {
- zoomStartTime = DateTime.Now;
+ {
+ if (_zoomStartTime.AddMilliseconds(100) < DateTime.Now) //waiting for next zoom step 100 ms
+ {
+ _zoomStartTime = DateTime.Now;
if (e.Delta > 0)
{
ZoomInMenuItemClick(sender, e);
@@ -919,12 +928,12 @@ DateTime zoomStartTime = DateTime.Now;
ZoomOutMenuItemClick(sender, e);
}
}
-
- }
+
+ }
panel1.Focus();
}
- protected override bool ProcessKeyPreview(ref Message msg) {
+ protected override bool ProcessKeyPreview(ref Message msg) {
// disable default key handling if surface has requested a lock
if (!_surface.KeysLocked) {
return base.ProcessKeyPreview(ref msg);
From f116e5db54c0a8e2b92e1012b69d470651f3a303 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Mon, 1 Mar 2021 20:11:00 +0100
Subject: [PATCH 075/224] Place the funding and templates in the 1.3 as this
seems to be taken from the default branch. [skip ci]
---
.github/FUNDING.yml | 9 +++++
.github/ISSUE_TEMPLATE/bug_report.md | 33 +++++++++++++++++++
.../ISSUE_TEMPLATE/developer-bug-report.md | 33 +++++++++++++++++++
.../developer-feature-request.md | 22 +++++++++++++
.github/ISSUE_TEMPLATE/feature_request.md | 22 +++++++++++++
5 files changed, 119 insertions(+)
create mode 100644 .github/FUNDING.yml
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
create mode 100644 .github/ISSUE_TEMPLATE/developer-bug-report.md
create mode 100644 .github/ISSUE_TEMPLATE/developer-feature-request.md
create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 000000000..a7184f71b
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,9 @@
+# These are supported funding model platforms
+
+# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+github: lakritzator
+patreon: # Replace with a single Patreon username
+open_collective: greenshot
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+custom: https://getgreenshot.org/support/
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000..1f5ca2f11
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,33 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+This GitHub repository is for developers, if you want to report a bug for Greenshot as a user please do so in our JIRA issue system here: https://greenshot.atlassian.net/projects/BUGS/issues/filter=allopenissues
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Example steps to reproduce the behavior:
+1. Capture '....'
+2. Open Editor
+3. Add a line
+4. Resize
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Versions (please complete the following information):**
+ - Greenshot version
+ - Windows version
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/developer-bug-report.md b/.github/ISSUE_TEMPLATE/developer-bug-report.md
new file mode 100644
index 000000000..1ffa7da1e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/developer-bug-report.md
@@ -0,0 +1,33 @@
+---
+name: Developer Bug report
+about: Create a bug report to help us improve our code
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+This GitHub repository is for developers, if you want to report a bug for Greenshot as a user please do so in our JIRA issue system here: https://greenshot.atlassian.net/projects/BUGS/issues/filter=allopenissues
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Example steps to reproduce the behavior:
+1. Capture '....'
+2. Open Editor
+3. Add a line
+4. Resize
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Versions (please complete the following information):**
+ - Greenshot version
+ - Windows version
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/developer-feature-request.md b/.github/ISSUE_TEMPLATE/developer-feature-request.md
new file mode 100644
index 000000000..883534a57
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/developer-feature-request.md
@@ -0,0 +1,22 @@
+---
+name: Developer feature request
+about: Suggest an technical idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+This GitHub repository is for developers, if you want to request a feature for Greenshot as a user please do so in our JIRA issue system here: https://greenshot.atlassian.net/projects/FEATURE/issues/filter=allopenissues
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 000000000..64323a13d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,22 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+This GitHub repository is for developers, if you want to request a feature for Greenshot as a user please do so in our JIRA issue system here: https://greenshot.atlassian.net/projects/FEATURE/issues/filter=allopenissues
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
From aff8ba2109d80797ab81165f645919524eae4981 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Mon, 8 Mar 2021 22:08:12 +0100
Subject: [PATCH 076/224] Fixed copyright, fixed some spelling and updated some
of the code to a newer syntax.
---
.gitignore | 5 +-
Directory.Build.props | 2 +-
Greenshot.sln.DotSettings | 4 +
.../Configuration/EditorConfiguration.cs | 2 +-
Greenshot/Configuration/LanguageKeys.cs | 2 +-
Greenshot/Controls/BindableToolStripButton.cs | 2 +-
.../Controls/BindableToolStripComboBox.cs | 2 +-
.../BindableToolStripDropDownButton.cs | 2 +-
Greenshot/Controls/ColorButton.cs | 3 +-
...ontextMenuToolStripProfessionalRenderer.cs | 2 +-
.../CustomToolStripProfessionalRenderer.cs | 2 +-
Greenshot/Controls/FontFamilyComboBox.cs | 2 +-
Greenshot/Controls/MenuStripEx.cs | 2 +-
Greenshot/Controls/NonJumpingPanel.cs | 4 +-
Greenshot/Controls/Pipette.cs | 3 +-
Greenshot/Controls/ToolStripColorButton.cs | 3 +-
Greenshot/Controls/ToolStripEx.cs | 2 +-
Greenshot/Controls/ToolStripNumericUpDown.cs | 2 +-
.../Destinations/ClipboardDestination.cs | 2 +-
Greenshot/Destinations/EditorDestination.cs | 3 +-
Greenshot/Destinations/EmailDestination.cs | 2 +-
Greenshot/Destinations/FileDestination.cs | 3 +-
.../Destinations/FileWithDialogDestination.cs | 2 +-
Greenshot/Destinations/PickerDestination.cs | 2 +-
Greenshot/Destinations/PrinterDestination.cs | 2 +-
Greenshot/Drawing/Adorners/AbstractAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/MoveAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/ResizeAdorner.cs | 2 +-
Greenshot/Drawing/Adorners/TargetAdorner.cs | 2 +-
Greenshot/Drawing/ArrowContainer.cs | 2 +-
Greenshot/Drawing/CropContainer.cs | 21 +-
Greenshot/Drawing/CursorContainer.cs | 2 +-
Greenshot/Drawing/DrawableContainer.cs | 44 +--
Greenshot/Drawing/DrawableContainerList.cs | 3 +-
Greenshot/Drawing/EllipseContainer.cs | 2 +-
.../Drawing/Fields/AbstractFieldHolder.cs | 2 +-
.../Fields/AbstractFieldHolderWithChildren.cs | 2 +-
.../Binding/AbstractBindingConverter.cs | 2 +-
.../Fields/Binding/BidirectionalBinding.cs | 2 +-
.../DecimalDoublePercentageConverter.cs | 2 +-
.../Fields/Binding/DecimalFloatConverter.cs | 2 +-
.../Fields/Binding/DecimalIntConverter.cs | 2 +-
.../Fields/Binding/IBindingConverter.cs | 2 +-
.../Fields/Binding/IBindingValidator.cs | 2 +-
.../Fields/Binding/NotNullValidator.cs | 2 +-
Greenshot/Drawing/Fields/Field.cs | 2 +-
Greenshot/Drawing/Fields/FieldAggregator.cs | 2 +-
Greenshot/Drawing/Fields/FieldType.cs | 2 +-
Greenshot/Drawing/FilterContainer.cs | 2 +-
Greenshot/Drawing/Filters/AbstractFilter.cs | 2 +-
Greenshot/Drawing/Filters/BlurFilter.cs | 2 +-
Greenshot/Drawing/Filters/BrightnessFilter.cs | 2 +-
Greenshot/Drawing/Filters/GrayscaleFilter.cs | 2 +-
Greenshot/Drawing/Filters/HighlightFilter.cs | 2 +-
Greenshot/Drawing/Filters/IFilter.cs | 2 +-
Greenshot/Drawing/Filters/MagnifierFilter.cs | 2 +-
.../Drawing/Filters/PixelizationFilter.cs | 2 +-
Greenshot/Drawing/FreehandContainer.cs | 2 +-
Greenshot/Drawing/HighlightContainer.cs | 2 +-
Greenshot/Drawing/IconContainer.cs | 2 +-
Greenshot/Drawing/ImageContainer.cs | 2 +-
Greenshot/Drawing/LineContainer.cs | 2 +-
Greenshot/Drawing/ObfuscateContainer.cs | 2 +-
Greenshot/Drawing/Positions.cs | 2 +-
Greenshot/Drawing/RectangleContainer.cs | 2 +-
Greenshot/Drawing/RoundedRectangle.cs | 2 +-
Greenshot/Drawing/Surface.cs | 2 +-
Greenshot/Drawing/TextContainer.cs | 24 +-
Greenshot/Forms/AboutForm.Designer.cs | 2 +-
Greenshot/Forms/AboutForm.cs | 2 +-
Greenshot/Forms/AnimatingBaseForm.cs | 4 +-
Greenshot/Forms/BaseForm.cs | 4 +-
Greenshot/Forms/BugReportForm.Designer.cs | 2 +-
Greenshot/Forms/BugReportForm.cs | 2 +-
Greenshot/Forms/CaptureForm.Designer.cs | 2 +-
Greenshot/Forms/CaptureForm.cs | 2 +-
Greenshot/Forms/ColorDialog.Designer.cs | 4 +-
Greenshot/Forms/ColorDialog.cs | 8 +-
Greenshot/Forms/ColorPickerToolStripButton.cs | 10 +-
.../Forms/DropShadowSettingsForm.Designer.cs | 2 +-
Greenshot/Forms/DropShadowSettingsForm.cs | 2 +-
Greenshot/Forms/ImageEditorForm.Designer.cs | 8 +-
Greenshot/Forms/ImageEditorForm.cs | 5 +-
Greenshot/Forms/LanguageDialog.Designer.cs | 2 +-
Greenshot/Forms/LanguageDialog.cs | 2 +-
Greenshot/Forms/MainForm.Designer.cs | 4 +-
Greenshot/Forms/MainForm.cs | 21 +-
Greenshot/Forms/MovableShowColorForm.cs | 2 +-
.../Forms/PrintOptionsDialog.Designer.cs | 2 +-
Greenshot/Forms/PrintOptionsDialog.cs | 2 +-
.../Forms/ResizeSettingsForm.Designer.cs | 2 +-
Greenshot/Forms/ResizeSettingsForm.cs | 2 +-
Greenshot/Forms/SettingsForm.Designer.cs | 4 +-
Greenshot/Forms/SettingsForm.cs | 12 +-
Greenshot/Forms/ToolStripMenuSelectList.cs | 2 +-
.../Forms/TornEdgeSettingsForm.Designer.cs | 2 +-
Greenshot/Forms/TornEdgeSettingsForm.cs | 2 +-
Greenshot/GreenshotMain.cs | 13 +-
Greenshot/Help/HelpFileLoader.cs | 2 +-
Greenshot/Helpers/CaptureHelper.cs | 2 +-
Greenshot/Helpers/Colors.cs | 2 +-
Greenshot/Helpers/CopyData.cs | 42 +--
Greenshot/Helpers/DestinationHelper.cs | 2 +-
Greenshot/Helpers/Entities/UpdateFeed.cs | 2 +-
Greenshot/Helpers/EnvironmentInfo.cs | 10 +-
Greenshot/Helpers/GeometryHelper.cs | 2 +-
Greenshot/Helpers/GuiRectangle.cs | 2 +-
Greenshot/Helpers/IECaptureHelper.cs | 82 ++---
Greenshot/Helpers/IEInterop/IEContainer.cs | 2 +-
Greenshot/Helpers/MailHelper.cs | 302 ++++++++----------
.../Helpers/NotifyIconNotificationService.cs | 2 +-
Greenshot/Helpers/PluginHelper.cs | 2 +-
Greenshot/Helpers/PrintHelper.cs | 39 ++-
Greenshot/Helpers/ProcessorHelper.cs | 2 +-
Greenshot/Helpers/ResourceMutex.cs | 33 +-
Greenshot/Helpers/ScaleHelper.cs | 31 +-
Greenshot/Helpers/SoundHelper.cs | 2 +-
Greenshot/Helpers/StartupHelper.cs | 6 +-
Greenshot/Helpers/ToolStripItemEndisabler.cs | 24 +-
Greenshot/Helpers/UpdateService.cs | 2 +-
Greenshot/Helpers/WindowWrapper.cs | 32 --
Greenshot/Languages/language-ar-SY.xml | 2 +-
Greenshot/Languages/language-ca-CA.xml | 2 +-
Greenshot/Languages/language-cs-CZ.xml | 2 +-
Greenshot/Languages/language-de-DE.xml | 2 +-
.../Languages/language-de-x-franconia.xml | 2 +-
Greenshot/Languages/language-el-GR.xml | 2 +-
Greenshot/Languages/language-en-US.xml | 2 +-
Greenshot/Languages/language-es-ES.xml | 2 +-
Greenshot/Languages/language-et-EE.xml | 2 +-
Greenshot/Languages/language-fi-FI.xml | 2 +-
Greenshot/Languages/language-fr-FR.xml | 2 +-
Greenshot/Languages/language-fr-QC.xml | 2 +-
Greenshot/Languages/language-he-IL.xml | 2 +-
Greenshot/Languages/language-hu-HU.xml | 2 +-
Greenshot/Languages/language-id-ID.xml | 54 ++--
Greenshot/Languages/language-it-IT.xml | 2 +-
Greenshot/Languages/language-ja-JP.xml | 2 +-
Greenshot/Languages/language-kab-DZ.xml | 2 +-
Greenshot/Languages/language-ko-KR.xml | 2 +-
Greenshot/Languages/language-lt-LT.xml | 2 +-
Greenshot/Languages/language-nl-NL.xml | 2 +-
Greenshot/Languages/language-nn-NO.xml | 2 +-
Greenshot/Languages/language-pl-PL.xml | 2 +-
Greenshot/Languages/language-pt-BR.xml | 2 +-
Greenshot/Languages/language-pt-PT.xml | 2 +-
Greenshot/Languages/language-ru-RU.xml | 2 +-
Greenshot/Languages/language-sk-SK.xml | 2 +-
Greenshot/Languages/language-sl-SI.xml | 22 +-
Greenshot/Languages/language-sr-RS.xml | 2 +-
Greenshot/Languages/language-sv-SE.xml | 2 +-
Greenshot/Languages/language-tr-TR.xml | 2 +-
Greenshot/Languages/language-uk-UA.xml | 2 +-
Greenshot/Languages/language-vi-VN.xml | 2 +-
Greenshot/Languages/language-zh-CN.xml | 2 +-
Greenshot/Languages/language-zh-TW.xml | 2 +-
Greenshot/Memento/AddElementMemento.cs | 2 +-
Greenshot/Memento/AddElementsMemento.cs | 2 +-
Greenshot/Memento/ChangeFieldHolderMemento.cs | 19 +-
Greenshot/Memento/DeleteElementMemento.cs | 35 +-
Greenshot/Memento/DeleteElementsMemento.cs | 4 +-
.../DrawableContainerBoundsChangeMemento.cs | 23 +-
.../Memento/SurfaceBackgroundChangeMemento.cs | 25 +-
Greenshot/Memento/TextChangeMemento.cs | 30 +-
Greenshot/Processors/TitleFixProcessor.cs | 2 +-
.../releases/innosetup/scripts/products.pas | 2 +-
GreenshotBoxPlugin/BoxConfiguration.cs | 3 +-
GreenshotBoxPlugin/BoxDestination.cs | 2 +-
GreenshotBoxPlugin/BoxEntities.cs | 2 +-
GreenshotBoxPlugin/BoxPlugin.cs | 17 +-
GreenshotBoxPlugin/BoxUtils.cs | 2 +-
GreenshotBoxPlugin/Forms/BoxForm.cs | 2 +-
.../Forms/SettingsForm.Designer.cs | 4 +-
GreenshotBoxPlugin/Forms/SettingsForm.cs | 6 +-
.../GreenshotBoxPlugin.Credentials.template | 2 +-
GreenshotBoxPlugin/LanguageKeys.cs | 2 +-
GreenshotBoxPlugin/Properties/AssemblyInfo.cs | 2 +-
GreenshotConfluencePlugin/Confluence.cs | 2 +-
.../ConfluenceConfiguration.cs | 2 +-
.../ConfluenceDestination.cs | 2 +-
GreenshotConfluencePlugin/ConfluencePlugin.cs | 2 +-
GreenshotConfluencePlugin/ConfluenceUtils.cs | 2 +-
GreenshotConfluencePlugin/EnumDisplayer.cs | 2 +-
.../Forms/ConfluenceConfigurationForm.xaml.cs | 2 +-
.../Forms/ConfluencePagePicker.xaml.cs | 2 +-
.../Forms/ConfluenceSearch.xaml.cs | 2 +-
.../Forms/ConfluenceTreePicker.xaml.cs | 2 +-
.../Forms/ConfluenceUpload.xaml.cs | 2 +-
.../Forms/ListViewColumnSorter.cs | 2 +-
GreenshotConfluencePlugin/LanguageKeys.cs | 2 +-
GreenshotDropboxPlugin/DropboxDestination.cs | 2 +-
GreenshotDropboxPlugin/DropboxPlugin.cs | 2 +-
.../DropboxPluginConfiguration.cs | 3 +-
GreenshotDropboxPlugin/DropboxUtils.cs | 2 +-
GreenshotDropboxPlugin/Forms/DropboxForm.cs | 2 +-
.../Forms/SettingsForm.Designer.cs | 2 +-
GreenshotDropboxPlugin/Forms/SettingsForm.cs | 6 +-
...reenshotDropboxPlugin.Credentials.template | 2 +-
GreenshotDropboxPlugin/LanguageKeys.cs | 2 +-
.../Properties/AssemblyInfo.cs | 2 +-
.../ExternalCommandConfiguration.cs | 2 +-
.../ExternalCommandDestination.cs | 2 +-
.../ExternalCommandForm.cs | 2 +-
.../ExternalCommandPlugin.cs | 2 +-
GreenshotExternalCommandPlugin/IconCache.cs | 2 +-
.../SettingsForm.Designer.cs | 2 +-
.../SettingsForm.cs | 2 +-
.../SettingsFormDetail.Designer.cs | 2 +-
.../SettingsFormDetail.cs | 2 +-
GreenshotFlickrPlugin/FlickrConfiguration.cs | 3 +-
GreenshotFlickrPlugin/FlickrDestination.cs | 2 +-
GreenshotFlickrPlugin/FlickrPlugin.cs | 2 +-
GreenshotFlickrPlugin/FlickrUtils.cs | 2 +-
GreenshotFlickrPlugin/Forms/FlickrForm.cs | 2 +-
.../Forms/SettingsForm.Designer.cs | 4 +-
GreenshotFlickrPlugin/Forms/SettingsForm.cs | 6 +-
...GreenshotFlickrPlugin.Credentials.template | 2 +-
GreenshotFlickrPlugin/LanguageKeys.cs | 2 +-
.../Properties/AssemblyInfo.cs | 2 +-
GreenshotImgurPlugin/Forms/ImgurForm.cs | 4 +-
.../Forms/ImgurHistory.Designer.cs | 4 +-
GreenshotImgurPlugin/Forms/ImgurHistory.cs | 6 +-
.../Forms/SettingsForm.Designer.cs | 4 +-
GreenshotImgurPlugin/Forms/SettingsForm.cs | 5 +-
.../GreenshotImgurPlugin.Credentials.template | 2 +-
GreenshotImgurPlugin/ImgurConfiguration.cs | 3 +-
GreenshotImgurPlugin/ImgurDestination.cs | 2 +-
GreenshotImgurPlugin/ImgurInfo.cs | 2 +-
GreenshotImgurPlugin/ImgurPlugin.cs | 3 +-
GreenshotImgurPlugin/ImgurUtils.cs | 2 +-
GreenshotImgurPlugin/LanguageKeys.cs | 2 +-
.../Properties/AssemblyInfo.cs | 2 +-
GreenshotJiraPlugin/AsyncMemoryCache.cs | 2 +-
.../Forms/JiraForm.Designer.cs | 2 +-
GreenshotJiraPlugin/Forms/JiraForm.cs | 2 +-
GreenshotJiraPlugin/Forms/JiraFormBase.cs | 2 +-
.../Forms/SettingsForm.Designer.cs | 2 +-
GreenshotJiraPlugin/Forms/SettingsForm.cs | 2 +-
GreenshotJiraPlugin/IssueTypeBitmapCache.cs | 2 +-
GreenshotJiraPlugin/JiraConfiguration.cs | 2 +-
GreenshotJiraPlugin/JiraConnector.cs | 2 +-
GreenshotJiraPlugin/JiraDestination.cs | 2 +-
GreenshotJiraPlugin/JiraDetails.cs | 2 +-
GreenshotJiraPlugin/JiraEventArgs.cs | 2 +-
GreenshotJiraPlugin/JiraEventTypes.cs | 2 +-
GreenshotJiraPlugin/JiraMonitor.cs | 2 +-
GreenshotJiraPlugin/JiraPlugin.cs | 2 +-
GreenshotJiraPlugin/LanguageKeys.cs | 2 +-
GreenshotJiraPlugin/Log4NetLogger.cs | 2 +-
GreenshotOCRCommand/COMWrapper.cs | 5 +-
GreenshotOCRCommand/ComProgIdAttribute.cs | 4 +-
GreenshotOCRCommand/Modi/CompressionLevel.cs | 2 +-
GreenshotOCRCommand/Modi/FileFormat.cs | 4 +-
GreenshotOCRCommand/Modi/ICommon.cs | 2 +-
GreenshotOCRCommand/Modi/IDispatch.cs | 2 +-
GreenshotOCRCommand/Modi/IDocument.cs | 5 +-
GreenshotOCRCommand/Modi/IImage.cs | 2 +-
GreenshotOCRCommand/Modi/IImages.cs | 2 +-
GreenshotOCRCommand/Modi/ILayout.cs | 2 +-
GreenshotOCRCommand/Modi/IMiRect.cs | 2 +-
GreenshotOCRCommand/Modi/IMiRects.cs | 2 +-
GreenshotOCRCommand/Modi/IWord.cs | 2 +-
GreenshotOCRCommand/Modi/IWords.cs | 2 +-
GreenshotOCRCommand/Modi/ModiLanguage.cs | 2 +-
GreenshotOCRCommand/Program.cs | 3 +-
.../Properties/AssemblyInfo.cs | 2 +-
GreenshotOCRPlugin/ModiLanguage.cs | 2 +-
GreenshotOCRPlugin/OCRConfiguration.cs | 2 +-
GreenshotOCRPlugin/OCRDestination.cs | 2 +-
GreenshotOCRPlugin/OCRForm.cs | 2 +-
GreenshotOCRPlugin/OCRPlugin.cs | 2 +-
GreenshotOCRPlugin/SettingsForm.Designer.cs | 2 +-
GreenshotOCRPlugin/SettingsForm.cs | 8 +-
.../Destinations/ExcelDestination.cs | 2 +-
.../Destinations/OneNoteDestination.cs | 2 +-
.../Destinations/OutlookDestination.cs | 2 +-
.../Destinations/PowerpointDestination.cs | 2 +-
.../Destinations/WordDestination.cs | 2 +-
GreenshotOfficePlugin/OfficeConfiguration.cs | 2 +-
.../OfficeExport/Entities/OneNoteNotebook.cs | 2 +-
.../OfficeExport/Entities/OneNotePage.cs | 2 +-
.../OfficeExport/Entities/OneNoteSection.cs | 2 +-
.../OfficeExport/ExcelExporter.cs | 2 +-
.../OfficeExport/OneNoteExporter.cs | 2 +-
.../OfficeExport/OutlookEmailExporter.cs | 2 +-
.../OfficeExport/PowerpointExporter.cs | 2 +-
.../OfficeExport/WordExporter.cs | 2 +-
.../OfficeInterop/EmailFormat.cs | 2 +-
.../OfficeInterop/OfficeVersions.cs | 2 +-
GreenshotOfficePlugin/OfficePlugin.cs | 2 +-
.../Properties/AssemblyInfo.cs | 2 +-
.../Forms/PhotobucketForm.cs | 4 +-
.../Forms/SettingsForm.Designer.cs | 4 +-
.../Forms/SettingsForm.cs | 4 +-
...shotPhotobucketPlugin.Credentials.template | 2 +-
GreenshotPhotobucketPlugin/LanguageKeys.cs | 2 +-
.../PhotobucketConfiguration.cs | 3 +-
.../PhotobucketDestination.cs | 2 +-
GreenshotPhotobucketPlugin/PhotobucketInfo.cs | 2 +-
.../PhotobucketPlugin.cs | 2 +-
.../PhotobucketUtils.cs | 2 +-
.../Properties/AssemblyInfo.cs | 2 +-
GreenshotPicasaPlugin/Forms/PicasaForm.cs | 15 +-
.../Forms/SettingsForm.Designer.cs | 2 +-
GreenshotPicasaPlugin/Forms/SettingsForm.cs | 2 +-
...GreenshotPicasaPlugin.Credentials.template | 2 +-
GreenshotPicasaPlugin/PicasaConfiguration.cs | 1 +
.../Properties/AssemblyInfo.cs | 2 +-
GreenshotPlugin/Controls/AnimatingForm.cs | 2 +-
.../Controls/BackgroundForm.Designer.cs | 2 +-
GreenshotPlugin/Controls/BackgroundForm.cs | 2 +-
.../Controls/ExtendedWebBrowser.cs | 2 +-
.../Controls/FormWithoutActivation.cs | 2 +-
GreenshotPlugin/Controls/GreenshotButton.cs | 2 +-
GreenshotPlugin/Controls/GreenshotCheckBox.cs | 2 +-
.../Controls/GreenshotColumnSorter.cs | 2 +-
GreenshotPlugin/Controls/GreenshotComboBox.cs | 2 +-
GreenshotPlugin/Controls/GreenshotForm.cs | 2 +-
GreenshotPlugin/Controls/GreenshotGroupBox.cs | 2 +-
GreenshotPlugin/Controls/GreenshotLabel.cs | 2 +-
.../Controls/GreenshotRadioButton.cs | 2 +-
GreenshotPlugin/Controls/GreenshotTabPage.cs | 2 +-
GreenshotPlugin/Controls/GreenshotTextBox.cs | 2 +-
.../Controls/GreenshotToolDropDownButton.cs | 2 +-
.../Controls/GreenshotToolStripButton.cs | 2 +-
.../Controls/GreenshotToolStripLabel.cs | 2 +-
.../Controls/GreenshotToolStripMenuItem.cs | 2 +-
GreenshotPlugin/Controls/HotkeyControl.cs | 2 +-
.../Controls/IGreenshotConfigBindable.cs | 2 +-
.../Controls/IGreenshotLanguageBindable.cs | 2 +-
.../Controls/OAuthLoginForm.Designer.cs | 2 +-
GreenshotPlugin/Controls/OAuthLoginForm.cs | 2 +-
.../Controls/PleaseWaitForm.Designer.cs | 2 +-
GreenshotPlugin/Controls/PleaseWaitForm.cs | 2 +-
.../Controls/QualityDialog.Designer.cs | 2 +-
GreenshotPlugin/Controls/QualityDialog.cs | 2 +-
.../Controls/SaveImageFileDialog.cs | 2 +-
GreenshotPlugin/Controls/ThumbnailForm.cs | 2 +-
GreenshotPlugin/Core/AbstractDestination.cs | 2 +-
GreenshotPlugin/Core/AbstractProcessor.cs | 2 +-
GreenshotPlugin/Core/AccessibleHelper.cs | 4 +-
GreenshotPlugin/Core/AnimationHelpers.cs | 2 +-
GreenshotPlugin/Core/BinaryStructHelper.cs | 2 +-
GreenshotPlugin/Core/Cache.cs | 2 +-
GreenshotPlugin/Core/CaptureHandler.cs | 2 +-
GreenshotPlugin/Core/ClipboardHelper.cs | 2 +-
GreenshotPlugin/Core/CoreConfiguration.cs | 2 +-
GreenshotPlugin/Core/CredentialsHelper.cs | 6 +-
GreenshotPlugin/Core/DisplayKeyAttribute.cs | 2 +-
GreenshotPlugin/Core/EnumExtensions.cs | 2 +-
GreenshotPlugin/Core/Enums/HResult.cs | 2 +-
GreenshotPlugin/Core/EventDelay.cs | 2 +-
GreenshotPlugin/Core/FastBitmap.cs | 2 +-
GreenshotPlugin/Core/FilenameHelper.cs | 2 +-
GreenshotPlugin/Core/GreenshotResources.cs | 2 +-
GreenshotPlugin/Core/HResultExtensions.cs | 2 +-
GreenshotPlugin/Core/IEHelper.cs | 2 +-
GreenshotPlugin/Core/IImage.cs | 2 +-
GreenshotPlugin/Core/ImageHelper.cs | 2 +-
GreenshotPlugin/Core/ImageOutput.cs | 2 +-
GreenshotPlugin/Core/InterfaceUtils.cs | 2 +-
GreenshotPlugin/Core/Language.cs | 2 +-
GreenshotPlugin/Core/LogHelper.cs | 2 +-
GreenshotPlugin/Core/NetworkHelper.cs | 2 +-
GreenshotPlugin/Core/OAuthHelper.cs | 2 +-
GreenshotPlugin/Core/ObjectExtensions.cs | 2 +-
GreenshotPlugin/Core/PluginUtils.cs | 2 +-
GreenshotPlugin/Core/QuantizerHelper.cs | 2 +-
GreenshotPlugin/Core/StringExtensions.cs | 2 +-
GreenshotPlugin/Core/SvgImage.cs | 2 +-
GreenshotPlugin/Core/WindowCapture.cs | 4 +-
GreenshotPlugin/Core/WindowDetails.cs | 18 +-
GreenshotPlugin/Core/WindowsEnumerator.cs | 2 +-
.../Core/WmInputLangChangeRequestFilter.cs | 2 +-
GreenshotPlugin/Effects/AdjustEffect.cs | 2 +-
GreenshotPlugin/Effects/BorderEffect.cs | 2 +-
GreenshotPlugin/Effects/DropShadowEffect.cs | 2 +-
GreenshotPlugin/Effects/GrayscaleEffect.cs | 2 +-
GreenshotPlugin/Effects/IEffect.cs | 2 +-
GreenshotPlugin/Effects/InvertEffect.cs | 2 +-
GreenshotPlugin/Effects/MonochromeEffect.cs | 2 +-
GreenshotPlugin/Effects/ReduceColorsEffect.cs | 2 +-
GreenshotPlugin/Effects/ResizeCanvasEffect.cs | 2 +-
GreenshotPlugin/Effects/ResizeEffect.cs | 2 +-
GreenshotPlugin/Effects/RotateEffect.cs | 2 +-
GreenshotPlugin/Effects/TornEdgeEffect.cs | 2 +-
GreenshotPlugin/Hooking/WindowsEventHook.cs | 10 +-
.../Hooking/WindowsOpenCloseMonitor.cs | 2 +-
.../Hooking/WindowsTitleMonitor.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLBodyElement.cs | 2 +-
.../IEInterop/IHTMLCurrentStyle.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLDocument.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLDocument2.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLDocument3.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLDocument4.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLDocument5.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLElement.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLElement2.cs | 2 +-
.../IEInterop/IHTMLElementCollection.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLFrameBase.cs | 2 +-
.../IEInterop/IHTMLFramesCollection2.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLRect.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLScreen.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLScreen2.cs | 2 +-
.../IEInterop/IHTMLSelectionObject.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLStyle.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLTxtRange.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLWindow2.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLWindow3.cs | 2 +-
GreenshotPlugin/IEInterop/IHTMLWindow4.cs | 2 +-
GreenshotPlugin/IEInterop/IWebBrowser2.cs | 2 +-
GreenshotPlugin/IniFile/IniAttributes.cs | 2 +-
GreenshotPlugin/IniFile/IniConfig.cs | 2 +-
GreenshotPlugin/IniFile/IniReader.cs | 2 +-
GreenshotPlugin/IniFile/IniSection.cs | 2 +-
GreenshotPlugin/IniFile/IniValue.cs | 2 +-
GreenshotPlugin/Interfaces/CaptureMode.cs | 2 +-
.../Interfaces/Drawing/Adorners/IAdorner.cs | 2 +-
.../Interfaces/Drawing/Container.cs | 2 +-
GreenshotPlugin/Interfaces/Drawing/IField.cs | 2 +-
.../Interfaces/Drawing/IFieldholder.cs | 2 +-
.../Interfaces/Drawing/IMemento.cs | 2 +-
GreenshotPlugin/Interfaces/DrawingModes.cs | 2 +-
.../Interfaces/Forms/ImageEditor.cs | 2 +-
GreenshotPlugin/Interfaces/ICapture.cs | 2 +-
GreenshotPlugin/Interfaces/ICaptureDetails.cs | 2 +-
GreenshotPlugin/Interfaces/ICaptureElement.cs | 2 +-
GreenshotPlugin/Interfaces/IDestination.cs | 2 +-
.../Interfaces/INotificationService.cs | 2 +-
GreenshotPlugin/Interfaces/IProcessor.cs | 2 +-
GreenshotPlugin/Interfaces/ISurface.cs | 2 +-
.../Interfaces/Ocr/IOcrProvider.cs | 2 +-
.../Interfaces/Plugin/PluginAttribute.cs | 2 +-
.../Interfaces/ScreenCaptureMode.cs | 2 +-
.../Interfaces/SurfaceDrawingModeEventArgs.cs | 2 +-
.../SurfaceDrawingModeEventHandler.cs | 2 +-
.../Interfaces/SurfaceElementEventArgs.cs | 2 +-
.../Interfaces/SurfaceElementEventHandler.cs | 2 +-
.../Interfaces/SurfaceMessageEventArgs.cs | 2 +-
.../Interfaces/SurfaceMessageEventHandler.cs | 2 +-
.../Interfaces/SurfaceMessageTyp.cs | 2 +-
.../SurfaceSizeChangeEventHandler.cs | 2 +-
.../Interfaces/VerticalAlignment.cs | 2 +-
GreenshotPlugin/Interop/COMWrapper.cs | 2 +-
GreenshotPlugin/Interop/ComProgIdAttribute.cs | 2 +-
GreenshotPlugin/Interop/IAppVisibility.cs | 2 +-
GreenshotPlugin/Interop/IDispatch.cs | 2 +-
GreenshotPlugin/Interop/IOleCommandTarget.cs | 2 +-
GreenshotPlugin/Interop/IOleWindow.cs | 4 +-
GreenshotPlugin/Interop/IServiceProvider.cs | 2 +-
GreenshotPlugin/Interop/IUnknown.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/DWM.cs | 2 +-
.../UnmanagedHelpers/EnumWindowsProc.cs | 2 +-
.../Enums/DWMWINDOWATTRIBUTE.cs | 2 +-
.../UnmanagedHelpers/Enums/DWM_BB.cs | 2 +-
.../UnmanagedHelpers/Enums/DWM_BLURBEHIND.cs | 2 +-
.../Enums/DWM_THUMBNAIL_PROPERTIES.cs | 2 +-
.../UnmanagedHelpers/Enums/SYSCOLOR.cs | 2 +-
.../Enums/WindowStyleFlags.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/GDI32.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/GDIplus.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/Kernel32.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/PsAPI.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/Shell32.cs | 2 +-
.../UnmanagedHelpers/Structs/SIZE.cs | 2 +-
GreenshotPlugin/UnmanagedHelpers/User32.cs | 26 +-
GreenshotPlugin/UnmanagedHelpers/Win32.cs | 2 +-
.../UnmanagedHelpers/WinEventDelegate.cs | 4 +-
GreenshotPlugin/UnmanagedHelpers/WinMM.cs | 2 +-
.../Destinations/Win10OcrDestination.cs | 2 +-
.../Destinations/Win10ShareDestination.cs | 2 +-
GreenshotWin10Plugin/Internal/ShareInfo.cs | 2 +-
.../Native/GreenshotNotificationActivator.cs | 2 +-
.../Native/IDataTransferManagerInterOp.cs | 2 +-
.../Processors/Win10OcrProcessor.cs | 2 +-
.../ToastNotificationService.cs | 2 +-
GreenshotWin10Plugin/Win10OcrProvider.cs | 4 +-
GreenshotWin10Plugin/Win10Plugin.cs | 14 +-
478 files changed, 972 insertions(+), 1089 deletions(-)
create mode 100644 Greenshot.sln.DotSettings
delete mode 100644 Greenshot/Helpers/WindowWrapper.cs
diff --git a/.gitignore b/.gitignore
index 2f5969501..3afd2d7ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -211,4 +211,7 @@ _Pvt_Extensions/
ModelManifest.xml
# Greenshot credentials files
-*.credentials.cs
\ No newline at end of file
+*.credentials.cs
+
+# Rider files
+.idea
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index c87c75734..1a2e9d3a4 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,6 +1,6 @@
- Copyright © Greenshot 2004-2020
+ Copyright © Greenshot 2004-2021
Greenshot
https://getgreenshot.org/favicon.ico
https://github.com/greenshot/greenshot
diff --git a/Greenshot.sln.DotSettings b/Greenshot.sln.DotSettings
new file mode 100644
index 000000000..aecc39af3
--- /dev/null
+++ b/Greenshot.sln.DotSettings
@@ -0,0 +1,4 @@
+
+ True
+ True
+ True
\ No newline at end of file
diff --git a/Greenshot/Configuration/EditorConfiguration.cs b/Greenshot/Configuration/EditorConfiguration.cs
index 61bdc0733..019ea9ef6 100644
--- a/Greenshot/Configuration/EditorConfiguration.cs
+++ b/Greenshot/Configuration/EditorConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Configuration/LanguageKeys.cs b/Greenshot/Configuration/LanguageKeys.cs
index 08f982374..022f141f1 100644
--- a/Greenshot/Configuration/LanguageKeys.cs
+++ b/Greenshot/Configuration/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/BindableToolStripButton.cs b/Greenshot/Controls/BindableToolStripButton.cs
index 893264403..b44a1a31c 100644
--- a/Greenshot/Controls/BindableToolStripButton.cs
+++ b/Greenshot/Controls/BindableToolStripButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/BindableToolStripComboBox.cs b/Greenshot/Controls/BindableToolStripComboBox.cs
index e6e8ad105..3637f2380 100644
--- a/Greenshot/Controls/BindableToolStripComboBox.cs
+++ b/Greenshot/Controls/BindableToolStripComboBox.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/BindableToolStripDropDownButton.cs b/Greenshot/Controls/BindableToolStripDropDownButton.cs
index 4a04e1f23..4071d6b81 100644
--- a/Greenshot/Controls/BindableToolStripDropDownButton.cs
+++ b/Greenshot/Controls/BindableToolStripDropDownButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/ColorButton.cs b/Greenshot/Controls/ColorButton.cs
index 935729732..fe31d2e11 100644
--- a/Greenshot/Controls/ColorButton.cs
+++ b/Greenshot/Controls/ColorButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -24,6 +24,7 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using GreenshotPlugin.Controls;
+using ColorDialog = Greenshot.Forms.ColorDialog;
namespace Greenshot.Controls {
///
diff --git a/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs b/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs
index 5031f82bb..e5ebf5478 100644
--- a/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs
+++ b/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/CustomToolStripProfessionalRenderer.cs b/Greenshot/Controls/CustomToolStripProfessionalRenderer.cs
index cb851ea2f..d559d771b 100644
--- a/Greenshot/Controls/CustomToolStripProfessionalRenderer.cs
+++ b/Greenshot/Controls/CustomToolStripProfessionalRenderer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/FontFamilyComboBox.cs b/Greenshot/Controls/FontFamilyComboBox.cs
index dc5975be3..d37244eab 100644
--- a/Greenshot/Controls/FontFamilyComboBox.cs
+++ b/Greenshot/Controls/FontFamilyComboBox.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/MenuStripEx.cs b/Greenshot/Controls/MenuStripEx.cs
index ea973a791..31aa8f190 100644
--- a/Greenshot/Controls/MenuStripEx.cs
+++ b/Greenshot/Controls/MenuStripEx.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/NonJumpingPanel.cs b/Greenshot/Controls/NonJumpingPanel.cs
index 4d107da45..d5565c637 100644
--- a/Greenshot/Controls/NonJumpingPanel.cs
+++ b/Greenshot/Controls/NonJumpingPanel.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -22,7 +22,7 @@
using System.Drawing;
using System.Windows.Forms;
-namespace GreenshotPlugin.Controls
+namespace Greenshot.Controls
{
///
/// See: http://nickstips.wordpress.com/2010/03/03/c-panel-resets-scroll-position-after-focus-is-lost-and-regained/
diff --git a/Greenshot/Controls/Pipette.cs b/Greenshot/Controls/Pipette.cs
index bbe2b5686..ca7333d81 100644
--- a/Greenshot/Controls/Pipette.cs
+++ b/Greenshot/Controls/Pipette.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -25,6 +25,7 @@ using System.Windows.Forms;
using Greenshot.Forms;
using GreenshotPlugin.UnmanagedHelpers;
using GreenshotPlugin.UnmanagedHelpers.Enums;
+using ColorDialog = Greenshot.Forms.ColorDialog;
namespace Greenshot.Controls {
///
diff --git a/Greenshot/Controls/ToolStripColorButton.cs b/Greenshot/Controls/ToolStripColorButton.cs
index 706a54cf3..951e117fd 100644
--- a/Greenshot/Controls/ToolStripColorButton.cs
+++ b/Greenshot/Controls/ToolStripColorButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -24,6 +24,7 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using GreenshotPlugin.Controls;
+using ColorDialog = Greenshot.Forms.ColorDialog;
namespace Greenshot.Controls {
public class ToolStripColorButton : ToolStripButton, INotifyPropertyChanged, IGreenshotLanguageBindable {
diff --git a/Greenshot/Controls/ToolStripEx.cs b/Greenshot/Controls/ToolStripEx.cs
index b3f669fdd..7d2ca63ed 100644
--- a/Greenshot/Controls/ToolStripEx.cs
+++ b/Greenshot/Controls/ToolStripEx.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Controls/ToolStripNumericUpDown.cs b/Greenshot/Controls/ToolStripNumericUpDown.cs
index 2cb53314b..13652fc41 100644
--- a/Greenshot/Controls/ToolStripNumericUpDown.cs
+++ b/Greenshot/Controls/ToolStripNumericUpDown.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Destinations/ClipboardDestination.cs b/Greenshot/Destinations/ClipboardDestination.cs
index 9cfb0aec5..a1172ede4 100644
--- a/Greenshot/Destinations/ClipboardDestination.cs
+++ b/Greenshot/Destinations/ClipboardDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Destinations/EditorDestination.cs b/Greenshot/Destinations/EditorDestination.cs
index 09cce0f56..415607640 100644
--- a/Greenshot/Destinations/EditorDestination.cs
+++ b/Greenshot/Destinations/EditorDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -22,6 +22,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using Greenshot.Configuration;
+using Greenshot.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs
index abda77c7c..0ba93ff59 100644
--- a/Greenshot/Destinations/EmailDestination.cs
+++ b/Greenshot/Destinations/EmailDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Destinations/FileDestination.cs b/Greenshot/Destinations/FileDestination.cs
index 559d28135..d6e89c0d5 100644
--- a/Greenshot/Destinations/FileDestination.cs
+++ b/Greenshot/Destinations/FileDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -24,6 +24,7 @@ using System.IO;
using System.Windows.Forms;
using Greenshot.Configuration;
+using Greenshot.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.Controls;
using GreenshotPlugin.IniFile;
diff --git a/Greenshot/Destinations/FileWithDialogDestination.cs b/Greenshot/Destinations/FileWithDialogDestination.cs
index e211d14f7..b378f5f34 100644
--- a/Greenshot/Destinations/FileWithDialogDestination.cs
+++ b/Greenshot/Destinations/FileWithDialogDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Destinations/PickerDestination.cs b/Greenshot/Destinations/PickerDestination.cs
index 26f8fbfb5..e7ea94c83 100644
--- a/Greenshot/Destinations/PickerDestination.cs
+++ b/Greenshot/Destinations/PickerDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Destinations/PrinterDestination.cs b/Greenshot/Destinations/PrinterDestination.cs
index e2156256b..3a45268e2 100644
--- a/Greenshot/Destinations/PrinterDestination.cs
+++ b/Greenshot/Destinations/PrinterDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Adorners/AbstractAdorner.cs b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
index ecf0ce53d..5461b4df4 100644
--- a/Greenshot/Drawing/Adorners/AbstractAdorner.cs
+++ b/Greenshot/Drawing/Adorners/AbstractAdorner.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/Greenshot/Drawing/Adorners/MoveAdorner.cs b/Greenshot/Drawing/Adorners/MoveAdorner.cs
index 916d569f4..c8ef3ea22 100644
--- a/Greenshot/Drawing/Adorners/MoveAdorner.cs
+++ b/Greenshot/Drawing/Adorners/MoveAdorner.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/Greenshot/Drawing/Adorners/ResizeAdorner.cs b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
index d624add48..b2e7261a9 100644
--- a/Greenshot/Drawing/Adorners/ResizeAdorner.cs
+++ b/Greenshot/Drawing/Adorners/ResizeAdorner.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/Greenshot/Drawing/Adorners/TargetAdorner.cs b/Greenshot/Drawing/Adorners/TargetAdorner.cs
index 542657c14..e0d0bbf13 100644
--- a/Greenshot/Drawing/Adorners/TargetAdorner.cs
+++ b/Greenshot/Drawing/Adorners/TargetAdorner.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/Greenshot/Drawing/ArrowContainer.cs b/Greenshot/Drawing/ArrowContainer.cs
index 739f9d430..acfd1ad03 100644
--- a/Greenshot/Drawing/ArrowContainer.cs
+++ b/Greenshot/Drawing/ArrowContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/CropContainer.cs b/Greenshot/Drawing/CropContainer.cs
index 58cee17b1..da160f11e 100644
--- a/Greenshot/Drawing/CropContainer.cs
+++ b/Greenshot/Drawing/CropContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -57,12 +57,13 @@ namespace Greenshot.Drawing {
/// (we create a transparent brown over the complete picture)
///
public override Rectangle DrawingBounds {
- get {
- if (_parent?.Image is Image image) {
+ get
+ {
+ if (_parent?.Image is { } image) {
return new Rectangle(0, 0, image.Width, image.Height);
- } else {
- return Rectangle.Empty;
}
+
+ return Rectangle.Empty;
}
}
@@ -89,11 +90,9 @@ namespace Greenshot.Drawing {
g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top + cropRectangle.Height, imageSize.Width, imageSize.Height - (cropRectangle.Top + cropRectangle.Height)));
}
- public override bool HasContextMenu {
- get {
- // No context menu for the CropContainer
- return false;
- }
- }
+ ///
+ /// No context menu for the CropContainer
+ ///
+ public override bool HasContextMenu => false;
}
}
diff --git a/Greenshot/Drawing/CursorContainer.cs b/Greenshot/Drawing/CursorContainer.cs
index 5558508a8..15078bd76 100644
--- a/Greenshot/Drawing/CursorContainer.cs
+++ b/Greenshot/Drawing/CursorContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs
index 87b555914..60eb1e98d 100644
--- a/Greenshot/Drawing/DrawableContainer.cs
+++ b/Greenshot/Drawing/DrawableContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -98,8 +98,8 @@ namespace Greenshot.Drawing
[NonSerialized]
private PropertyChangedEventHandler _propertyChanged;
public event PropertyChangedEventHandler PropertyChanged {
- add { _propertyChanged += value; }
- remove{ _propertyChanged -= value; }
+ add => _propertyChanged += value;
+ remove => _propertyChanged -= value;
}
public IList Filters {
@@ -117,22 +117,18 @@ namespace Greenshot.Drawing
[NonSerialized]
internal Surface _parent;
public ISurface Parent {
- get { return _parent; }
- set { SwitchParent((Surface)value); }
+ get => _parent;
+ set => SwitchParent((Surface)value);
}
[NonSerialized]
private TargetAdorner _targetAdorner;
- public TargetAdorner TargetAdorner {
- get {
- return _targetAdorner;
- }
- }
+ public TargetAdorner TargetAdorner => _targetAdorner;
[NonSerialized]
private bool _selected;
public bool Selected {
- get {return _selected;}
+ get => _selected;
set {
_selected = value;
OnPropertyChanged("Selected");
@@ -142,18 +138,14 @@ namespace Greenshot.Drawing
[NonSerialized]
private EditStatus _status = EditStatus.UNDRAWN;
public EditStatus Status {
- get {
- return _status;
- }
- set {
- _status = value;
- }
+ get => _status;
+ set => _status = value;
}
private int left;
public int Left {
- get { return left; }
+ get => left;
set {
if (value == left) {
return;
@@ -164,7 +156,7 @@ namespace Greenshot.Drawing
private int top;
public int Top {
- get { return top; }
+ get => top;
set {
if (value == top) {
return;
@@ -175,7 +167,7 @@ namespace Greenshot.Drawing
private int width;
public int Width {
- get { return width; }
+ get => width;
set {
if (value == width) {
return;
@@ -186,7 +178,7 @@ namespace Greenshot.Drawing
private int height;
public int Height {
- get { return height; }
+ get => height;
set {
if (value == height) {
return;
@@ -196,9 +188,7 @@ namespace Greenshot.Drawing
}
public Point Location {
- get {
- return new Point(left, top);
- }
+ get => new Point(left, top);
set {
left = value.X;
top = value.Y;
@@ -330,11 +320,7 @@ namespace Greenshot.Drawing
Adorners.Add(new ResizeAdorner(this, Positions.MiddleRight));
}
- public bool hasFilters {
- get {
- return Filters.Count > 0;
- }
- }
+ public bool hasFilters => Filters.Count > 0;
public abstract void Draw(Graphics graphics, RenderMode renderMode);
diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs
index 666986002..a7107543e 100644
--- a/Greenshot/Drawing/DrawableContainerList.cs
+++ b/Greenshot/Drawing/DrawableContainerList.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -30,6 +30,7 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Threading;
using System.Windows.Forms;
+using Greenshot.Forms;
using GreenshotPlugin.Interfaces;
namespace Greenshot.Drawing {
diff --git a/Greenshot/Drawing/EllipseContainer.cs b/Greenshot/Drawing/EllipseContainer.cs
index c7a3985d6..b7d03ecfe 100644
--- a/Greenshot/Drawing/EllipseContainer.cs
+++ b/Greenshot/Drawing/EllipseContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/AbstractFieldHolder.cs b/Greenshot/Drawing/Fields/AbstractFieldHolder.cs
index 561501634..48dfd95f9 100644
--- a/Greenshot/Drawing/Fields/AbstractFieldHolder.cs
+++ b/Greenshot/Drawing/Fields/AbstractFieldHolder.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/AbstractFieldHolderWithChildren.cs b/Greenshot/Drawing/Fields/AbstractFieldHolderWithChildren.cs
index 636e708e4..bb6ae068c 100644
--- a/Greenshot/Drawing/Fields/AbstractFieldHolderWithChildren.cs
+++ b/Greenshot/Drawing/Fields/AbstractFieldHolderWithChildren.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/AbstractBindingConverter.cs b/Greenshot/Drawing/Fields/Binding/AbstractBindingConverter.cs
index ff3232d2f..a1ffd80c1 100644
--- a/Greenshot/Drawing/Fields/Binding/AbstractBindingConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/AbstractBindingConverter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/BidirectionalBinding.cs b/Greenshot/Drawing/Fields/Binding/BidirectionalBinding.cs
index 28a4bddf0..5a9652d5c 100644
--- a/Greenshot/Drawing/Fields/Binding/BidirectionalBinding.cs
+++ b/Greenshot/Drawing/Fields/Binding/BidirectionalBinding.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/DecimalDoublePercentageConverter.cs b/Greenshot/Drawing/Fields/Binding/DecimalDoublePercentageConverter.cs
index b1efb78f3..0ac7d02bb 100644
--- a/Greenshot/Drawing/Fields/Binding/DecimalDoublePercentageConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/DecimalDoublePercentageConverter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs b/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs
index 70581bc10..528af1c2e 100644
--- a/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/DecimalFloatConverter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs b/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs
index 693e532dd..6a8ff7e84 100644
--- a/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/DecimalIntConverter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/IBindingConverter.cs b/Greenshot/Drawing/Fields/Binding/IBindingConverter.cs
index 1a8fcefc3..cdb573470 100644
--- a/Greenshot/Drawing/Fields/Binding/IBindingConverter.cs
+++ b/Greenshot/Drawing/Fields/Binding/IBindingConverter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/IBindingValidator.cs b/Greenshot/Drawing/Fields/Binding/IBindingValidator.cs
index 146b91afb..d21b575a4 100644
--- a/Greenshot/Drawing/Fields/Binding/IBindingValidator.cs
+++ b/Greenshot/Drawing/Fields/Binding/IBindingValidator.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Binding/NotNullValidator.cs b/Greenshot/Drawing/Fields/Binding/NotNullValidator.cs
index 692254c37..5d15b6699 100644
--- a/Greenshot/Drawing/Fields/Binding/NotNullValidator.cs
+++ b/Greenshot/Drawing/Fields/Binding/NotNullValidator.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/Field.cs b/Greenshot/Drawing/Fields/Field.cs
index 798444625..f08033fd0 100644
--- a/Greenshot/Drawing/Fields/Field.cs
+++ b/Greenshot/Drawing/Fields/Field.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/FieldAggregator.cs b/Greenshot/Drawing/Fields/FieldAggregator.cs
index c22268091..6606a96b1 100644
--- a/Greenshot/Drawing/Fields/FieldAggregator.cs
+++ b/Greenshot/Drawing/Fields/FieldAggregator.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Fields/FieldType.cs b/Greenshot/Drawing/Fields/FieldType.cs
index 9976d24af..7531e5b27 100644
--- a/Greenshot/Drawing/Fields/FieldType.cs
+++ b/Greenshot/Drawing/Fields/FieldType.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/FilterContainer.cs b/Greenshot/Drawing/FilterContainer.cs
index 489e8e357..9ea6bc1a1 100644
--- a/Greenshot/Drawing/FilterContainer.cs
+++ b/Greenshot/Drawing/FilterContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/AbstractFilter.cs b/Greenshot/Drawing/Filters/AbstractFilter.cs
index 7c54545bd..419038d40 100644
--- a/Greenshot/Drawing/Filters/AbstractFilter.cs
+++ b/Greenshot/Drawing/Filters/AbstractFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/BlurFilter.cs b/Greenshot/Drawing/Filters/BlurFilter.cs
index 711c1d02b..79f617ac6 100644
--- a/Greenshot/Drawing/Filters/BlurFilter.cs
+++ b/Greenshot/Drawing/Filters/BlurFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/BrightnessFilter.cs b/Greenshot/Drawing/Filters/BrightnessFilter.cs
index 852aca9de..a43a68f67 100644
--- a/Greenshot/Drawing/Filters/BrightnessFilter.cs
+++ b/Greenshot/Drawing/Filters/BrightnessFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/GrayscaleFilter.cs b/Greenshot/Drawing/Filters/GrayscaleFilter.cs
index 4758d12bd..f66b29fba 100644
--- a/Greenshot/Drawing/Filters/GrayscaleFilter.cs
+++ b/Greenshot/Drawing/Filters/GrayscaleFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/HighlightFilter.cs b/Greenshot/Drawing/Filters/HighlightFilter.cs
index 36c574493..38b6a8ee7 100644
--- a/Greenshot/Drawing/Filters/HighlightFilter.cs
+++ b/Greenshot/Drawing/Filters/HighlightFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/IFilter.cs b/Greenshot/Drawing/Filters/IFilter.cs
index 91fdfe74d..8c3b5b23e 100644
--- a/Greenshot/Drawing/Filters/IFilter.cs
+++ b/Greenshot/Drawing/Filters/IFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/MagnifierFilter.cs b/Greenshot/Drawing/Filters/MagnifierFilter.cs
index 601d09967..68b033ef5 100644
--- a/Greenshot/Drawing/Filters/MagnifierFilter.cs
+++ b/Greenshot/Drawing/Filters/MagnifierFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Filters/PixelizationFilter.cs b/Greenshot/Drawing/Filters/PixelizationFilter.cs
index 7be7d47a6..dbf19d3f7 100644
--- a/Greenshot/Drawing/Filters/PixelizationFilter.cs
+++ b/Greenshot/Drawing/Filters/PixelizationFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/FreehandContainer.cs b/Greenshot/Drawing/FreehandContainer.cs
index c7d5cf1e8..0485f2ae5 100644
--- a/Greenshot/Drawing/FreehandContainer.cs
+++ b/Greenshot/Drawing/FreehandContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/HighlightContainer.cs b/Greenshot/Drawing/HighlightContainer.cs
index 858e1508b..788360004 100644
--- a/Greenshot/Drawing/HighlightContainer.cs
+++ b/Greenshot/Drawing/HighlightContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/IconContainer.cs b/Greenshot/Drawing/IconContainer.cs
index 013fb057f..b35ce28ff 100644
--- a/Greenshot/Drawing/IconContainer.cs
+++ b/Greenshot/Drawing/IconContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/ImageContainer.cs b/Greenshot/Drawing/ImageContainer.cs
index 0e23855bb..fee072aa1 100644
--- a/Greenshot/Drawing/ImageContainer.cs
+++ b/Greenshot/Drawing/ImageContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/LineContainer.cs b/Greenshot/Drawing/LineContainer.cs
index af73529d4..eac855644 100644
--- a/Greenshot/Drawing/LineContainer.cs
+++ b/Greenshot/Drawing/LineContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/ObfuscateContainer.cs b/Greenshot/Drawing/ObfuscateContainer.cs
index 07ea899ba..f1fdbf156 100644
--- a/Greenshot/Drawing/ObfuscateContainer.cs
+++ b/Greenshot/Drawing/ObfuscateContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Positions.cs b/Greenshot/Drawing/Positions.cs
index 847d08415..f7061d023 100644
--- a/Greenshot/Drawing/Positions.cs
+++ b/Greenshot/Drawing/Positions.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/Greenshot/Drawing/RectangleContainer.cs b/Greenshot/Drawing/RectangleContainer.cs
index 623e28b22..2e86fa509 100644
--- a/Greenshot/Drawing/RectangleContainer.cs
+++ b/Greenshot/Drawing/RectangleContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/RoundedRectangle.cs b/Greenshot/Drawing/RoundedRectangle.cs
index 8a519d1ed..a5d4ea6a0 100644
--- a/Greenshot/Drawing/RoundedRectangle.cs
+++ b/Greenshot/Drawing/RoundedRectangle.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs
index d7a4487fc..ed3118db6 100644
--- a/Greenshot/Drawing/Surface.cs
+++ b/Greenshot/Drawing/Surface.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index ddfb2918e..4cc369dda 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -67,25 +67,21 @@ namespace Greenshot.Drawing
// there is a binding on the following property!
public string Text
{
- get { return text; }
- set
- {
- ChangeText(value, true);
- }
+ get => text;
+ set => ChangeText(value, true);
}
internal void ChangeText(string newText, bool allowUndoable)
{
- if ((text == null && newText != null) || !string.Equals(text, newText))
+ if ((text != null || newText == null) && string.Equals(text, newText)) return;
+
+ if (makeUndoable && allowUndoable)
{
- if (makeUndoable && allowUndoable)
- {
- makeUndoable = false;
- _parent.MakeUndoable(new TextChangeMemento(this), false);
- }
- text = newText;
- OnPropertyChanged("Text");
+ makeUndoable = false;
+ _parent.MakeUndoable(new TextChangeMemento(this), false);
}
+ text = newText;
+ OnPropertyChanged("Text");
}
public TextContainer(Surface parent) : base(parent)
diff --git a/Greenshot/Forms/AboutForm.Designer.cs b/Greenshot/Forms/AboutForm.Designer.cs
index 1b35f8699..551f88671 100644
--- a/Greenshot/Forms/AboutForm.Designer.cs
+++ b/Greenshot/Forms/AboutForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/AboutForm.cs b/Greenshot/Forms/AboutForm.cs
index 0be368cbe..f3c67edd8 100644
--- a/Greenshot/Forms/AboutForm.cs
+++ b/Greenshot/Forms/AboutForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
-* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/AnimatingBaseForm.cs b/Greenshot/Forms/AnimatingBaseForm.cs
index db1c2b54d..5456ba037 100644
--- a/Greenshot/Forms/AnimatingBaseForm.cs
+++ b/Greenshot/Forms/AnimatingBaseForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -21,7 +21,7 @@
using GreenshotPlugin.Controls;
-namespace Greenshot {
+namespace Greenshot.Forms {
///
/// This class is only here to help in the Designer mode, so it's clear where the language files are
///
diff --git a/Greenshot/Forms/BaseForm.cs b/Greenshot/Forms/BaseForm.cs
index 392f37803..ffc0e86db 100644
--- a/Greenshot/Forms/BaseForm.cs
+++ b/Greenshot/Forms/BaseForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -21,7 +21,7 @@
using GreenshotPlugin.Controls;
-namespace Greenshot {
+namespace Greenshot.Forms {
///
/// This class is only here to help in the Designer mode, so it's clear where the language files are
///
diff --git a/Greenshot/Forms/BugReportForm.Designer.cs b/Greenshot/Forms/BugReportForm.Designer.cs
index 3b4c6afdb..2c5a7ae52 100644
--- a/Greenshot/Forms/BugReportForm.Designer.cs
+++ b/Greenshot/Forms/BugReportForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/BugReportForm.cs b/Greenshot/Forms/BugReportForm.cs
index f74aa431d..7c26e1b54 100644
--- a/Greenshot/Forms/BugReportForm.cs
+++ b/Greenshot/Forms/BugReportForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/CaptureForm.Designer.cs b/Greenshot/Forms/CaptureForm.Designer.cs
index ee3b43b99..9f36ebdb9 100644
--- a/Greenshot/Forms/CaptureForm.Designer.cs
+++ b/Greenshot/Forms/CaptureForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs
index bad4a0d24..bf21382e8 100644
--- a/Greenshot/Forms/CaptureForm.cs
+++ b/Greenshot/Forms/CaptureForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/ColorDialog.Designer.cs b/Greenshot/Forms/ColorDialog.Designer.cs
index 32330fb3a..d5060d8c0 100644
--- a/Greenshot/Forms/ColorDialog.Designer.cs
+++ b/Greenshot/Forms/ColorDialog.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace Greenshot {
+namespace Greenshot.Forms {
public partial class ColorDialog {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/Greenshot/Forms/ColorDialog.cs b/Greenshot/Forms/ColorDialog.cs
index bcf7e8889..f69c8f2fc 100644
--- a/Greenshot/Forms/ColorDialog.cs
+++ b/Greenshot/Forms/ColorDialog.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,17 +19,17 @@
* along with this program. If not, see .
*/
-using Greenshot.Configuration;
-using Greenshot.Controls;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Threading;
using System.Windows.Forms;
+using Greenshot.Configuration;
+using Greenshot.Controls;
using GreenshotPlugin.IniFile;
-namespace Greenshot {
+namespace Greenshot.Forms {
///
/// Description of ColorDialog.
///
diff --git a/Greenshot/Forms/ColorPickerToolStripButton.cs b/Greenshot/Forms/ColorPickerToolStripButton.cs
index 53816dca5..8f7730845 100644
--- a/Greenshot/Forms/ColorPickerToolStripButton.cs
+++ b/Greenshot/Forms/ColorPickerToolStripButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -20,12 +20,12 @@
*/
using System;
+using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
-using System.Diagnostics;
-namespace Greenshot
+namespace Greenshot.Forms
{
public delegate void ColorPickerEventHandler(object o, ColorPickerEventArgs e);
@@ -34,12 +34,12 @@ namespace Greenshot
private Color _color;
public Point Offset = new Point(0,0);
public event ColorPickerEventHandler ColorPicked;
- private readonly Greenshot.ColorDialog _cd;
+ private readonly ColorDialog _cd;
public ColorPickerToolStripButton()
{
- _cd = Greenshot.ColorDialog.GetInstance();
+ _cd = ColorDialog.GetInstance();
Click += ToolStripButton1Click;
}
diff --git a/Greenshot/Forms/DropShadowSettingsForm.Designer.cs b/Greenshot/Forms/DropShadowSettingsForm.Designer.cs
index ba8e7b3bc..0f7a89618 100644
--- a/Greenshot/Forms/DropShadowSettingsForm.Designer.cs
+++ b/Greenshot/Forms/DropShadowSettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/DropShadowSettingsForm.cs b/Greenshot/Forms/DropShadowSettingsForm.cs
index 2511a3328..4f7c413c7 100644
--- a/Greenshot/Forms/DropShadowSettingsForm.cs
+++ b/Greenshot/Forms/DropShadowSettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/ImageEditorForm.Designer.cs b/Greenshot/Forms/ImageEditorForm.Designer.cs
index cce905007..0db33a212 100644
--- a/Greenshot/Forms/ImageEditorForm.Designer.cs
+++ b/Greenshot/Forms/ImageEditorForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -21,7 +21,7 @@
using Greenshot.Controls;
-namespace Greenshot {
+namespace Greenshot.Forms {
partial class ImageEditorForm {
///
/// Designer variable used to keep track of non-visual components.
@@ -56,7 +56,7 @@ namespace Greenshot {
this.dimensionsLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
- this.panel1 = new GreenshotPlugin.Controls.NonJumpingPanel();
+ this.panel1 = new NonJumpingPanel();
this.toolsToolStrip = new Greenshot.Controls.ToolStripEx();
this.btnCursor = new GreenshotPlugin.Controls.GreenshotToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
@@ -1977,7 +1977,7 @@ namespace Greenshot {
private GreenshotPlugin.Controls.GreenshotToolStripButton btnRect;
private System.Windows.Forms.ToolStripContainer topToolStripContainer;
private Greenshot.Controls.ToolStripEx destinationsToolStrip;
- private GreenshotPlugin.Controls.NonJumpingPanel panel1;
+ private NonJumpingPanel panel1;
private Greenshot.Controls.ToolStripColorButton btnFillColor;
private Greenshot.Controls.ToolStripColorButton btnLineColor;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem autoCropToolStripMenuItem;
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index ece824bdb..a9fe79239 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -31,7 +31,6 @@ using Greenshot.Destinations;
using Greenshot.Drawing;
using Greenshot.Drawing.Fields;
using Greenshot.Drawing.Fields.Binding;
-using Greenshot.Forms;
using Greenshot.Help;
using Greenshot.Helpers;
using GreenshotPlugin.Controls;
@@ -45,7 +44,7 @@ using GreenshotPlugin.UnmanagedHelpers;
using GreenshotPlugin.UnmanagedHelpers.Structs;
using log4net;
-namespace Greenshot {
+namespace Greenshot.Forms {
///
/// Description of ImageEditorForm.
///
diff --git a/Greenshot/Forms/LanguageDialog.Designer.cs b/Greenshot/Forms/LanguageDialog.Designer.cs
index 6ae29249b..6ad4c0e60 100644
--- a/Greenshot/Forms/LanguageDialog.Designer.cs
+++ b/Greenshot/Forms/LanguageDialog.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/LanguageDialog.cs b/Greenshot/Forms/LanguageDialog.cs
index 7d6ba2f33..d78c36008 100644
--- a/Greenshot/Forms/LanguageDialog.cs
+++ b/Greenshot/Forms/LanguageDialog.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/MainForm.Designer.cs b/Greenshot/Forms/MainForm.Designer.cs
index 751d43452..281886180 100644
--- a/Greenshot/Forms/MainForm.Designer.cs
+++ b/Greenshot/Forms/MainForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace Greenshot {
+namespace Greenshot.Forms {
partial class MainForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index 61f5141bd..8ff531ca0 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -29,25 +29,24 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
+using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using Greenshot.Configuration;
-using Greenshot.Forms;
-using Greenshot.Help;
-using Greenshot.Helpers;
-using GreenshotPlugin.UnmanagedHelpers;
-using GreenshotPlugin.Controls;
-using GreenshotPlugin.Core;
using Greenshot.Destinations;
using Greenshot.Drawing;
-using log4net;
-using Timer = System.Timers.Timer;
-using System.Threading.Tasks;
+using Greenshot.Help;
+using Greenshot.Helpers;
+using GreenshotPlugin.Controls;
+using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Plugin;
+using GreenshotPlugin.UnmanagedHelpers;
+using log4net;
+using Timer = System.Timers.Timer;
-namespace Greenshot {
+namespace Greenshot.Forms {
///
/// Description of MainForm.
///
diff --git a/Greenshot/Forms/MovableShowColorForm.cs b/Greenshot/Forms/MovableShowColorForm.cs
index 22c40183f..fb8e7df5f 100644
--- a/Greenshot/Forms/MovableShowColorForm.cs
+++ b/Greenshot/Forms/MovableShowColorForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/PrintOptionsDialog.Designer.cs b/Greenshot/Forms/PrintOptionsDialog.Designer.cs
index 43d40c06e..0de6ca3a9 100644
--- a/Greenshot/Forms/PrintOptionsDialog.Designer.cs
+++ b/Greenshot/Forms/PrintOptionsDialog.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/PrintOptionsDialog.cs b/Greenshot/Forms/PrintOptionsDialog.cs
index b4a2de28e..7e1ae603c 100644
--- a/Greenshot/Forms/PrintOptionsDialog.cs
+++ b/Greenshot/Forms/PrintOptionsDialog.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/ResizeSettingsForm.Designer.cs b/Greenshot/Forms/ResizeSettingsForm.Designer.cs
index f6a7fad48..e7675bb57 100644
--- a/Greenshot/Forms/ResizeSettingsForm.Designer.cs
+++ b/Greenshot/Forms/ResizeSettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/ResizeSettingsForm.cs b/Greenshot/Forms/ResizeSettingsForm.cs
index 0d0aad23f..52bfb8d21 100644
--- a/Greenshot/Forms/ResizeSettingsForm.cs
+++ b/Greenshot/Forms/ResizeSettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/SettingsForm.Designer.cs b/Greenshot/Forms/SettingsForm.Designer.cs
index 80cbd9437..f0cb33f46 100644
--- a/Greenshot/Forms/SettingsForm.Designer.cs
+++ b/Greenshot/Forms/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace Greenshot {
+namespace Greenshot.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/Greenshot/Forms/SettingsForm.cs b/Greenshot/Forms/SettingsForm.cs
index 90fc1df51..7bd37e0ec 100644
--- a/Greenshot/Forms/SettingsForm.cs
+++ b/Greenshot/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -26,22 +26,20 @@ using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
+using System.Text.RegularExpressions;
using System.Windows.Forms;
-
using Greenshot.Configuration;
using Greenshot.Destinations;
using Greenshot.Helpers;
using GreenshotPlugin.Controls;
using GreenshotPlugin.Core;
-using System.Text.RegularExpressions;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Plugin;
using GreenshotPlugin.UnmanagedHelpers;
-using GreenshotPlugin.UnmanagedHelpers.Enums;
using log4net;
-namespace Greenshot {
+namespace Greenshot.Forms {
///
/// Description of SettingsForm.
///
@@ -453,9 +451,9 @@ namespace Greenshot {
}
// retrieve the set clipboard formats
- List clipboardFormats = new List();
+ var clipboardFormats = new List();
foreach (int index in listview_clipboardformats.CheckedIndices) {
- ListViewItem item = listview_clipboardformats.Items[index];
+ var item = listview_clipboardformats.Items[index];
if (item.Checked) {
clipboardFormats.Add((ClipboardFormat)item.Tag);
}
diff --git a/Greenshot/Forms/ToolStripMenuSelectList.cs b/Greenshot/Forms/ToolStripMenuSelectList.cs
index a109798f5..4ddfe7cdd 100644
--- a/Greenshot/Forms/ToolStripMenuSelectList.cs
+++ b/Greenshot/Forms/ToolStripMenuSelectList.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs b/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
index 5320e17de..f2692729f 100644
--- a/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
+++ b/Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Forms/TornEdgeSettingsForm.cs b/Greenshot/Forms/TornEdgeSettingsForm.cs
index 632d554ae..520f795b9 100644
--- a/Greenshot/Forms/TornEdgeSettingsForm.cs
+++ b/Greenshot/Forms/TornEdgeSettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/GreenshotMain.cs b/Greenshot/GreenshotMain.cs
index 6a993d99b..045478d6d 100644
--- a/Greenshot/GreenshotMain.cs
+++ b/Greenshot/GreenshotMain.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -22,6 +22,7 @@ using System;
using System.Globalization;
using System.Net;
using System.Reflection;
+using Greenshot.Forms;
// Remove AppendPrivatePath warning:
#pragma warning disable 0618
@@ -38,11 +39,11 @@ namespace Greenshot {
Assembly ayResult = null;
string sShortAssemblyName = args.Name.Split(',')[0];
Assembly[] ayAssemblies = AppDomain.CurrentDomain.GetAssemblies();
- foreach (Assembly ayAssembly in ayAssemblies) {
- if (sShortAssemblyName == ayAssembly.FullName.Split(',')[0]) {
- ayResult = ayAssembly;
- break;
- }
+ foreach (Assembly ayAssembly in ayAssemblies)
+ {
+ if (sShortAssemblyName != ayAssembly.FullName.Split(',')[0]) continue;
+ ayResult = ayAssembly;
+ break;
}
return ayResult;
}
diff --git a/Greenshot/Help/HelpFileLoader.cs b/Greenshot/Help/HelpFileLoader.cs
index 10c4c69bb..4dec29979 100644
--- a/Greenshot/Help/HelpFileLoader.cs
+++ b/Greenshot/Help/HelpFileLoader.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs
index 42f28e4ad..8b5d19bd7 100644
--- a/Greenshot/Helpers/CaptureHelper.cs
+++ b/Greenshot/Helpers/CaptureHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/Colors.cs b/Greenshot/Helpers/Colors.cs
index 0b30c7373..4588f4274 100644
--- a/Greenshot/Helpers/Colors.cs
+++ b/Greenshot/Helpers/Colors.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/CopyData.cs b/Greenshot/Helpers/CopyData.cs
index 2168c0736..3bbebc8b4 100644
--- a/Greenshot/Helpers/CopyData.cs
+++ b/Greenshot/Helpers/CopyData.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -158,11 +158,12 @@ namespace Greenshot.Helpers {
///
/// Clears up any resources associated with this object.
///
- protected virtual void Dispose(bool disposing) {
- if (disposing && _channels != null) {
- _channels.Clear();
- _channels = null;
- }
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposing || _channels == null) return;
+
+ _channels.Clear();
+ _channels = null;
}
///
@@ -249,10 +250,10 @@ namespace Greenshot.Helpers {
int i = 0;
foreach (CopyDataChannel cdc in Dictionary.Values) {
i++;
- if (i == index) {
- ret = cdc;
- break;
- }
+ if (i != index) continue;
+
+ ret = cdc;
+ break;
}
return ret;
}
@@ -337,14 +338,14 @@ namespace Greenshot.Helpers {
///
public class CopyDataChannel : IDisposable {
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
- private static extern IntPtr GetProp(IntPtr hwnd, string lpString);
+ private static extern IntPtr GetProp(IntPtr hWnd, string lpString);
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
- private static extern bool SetProp(IntPtr hwnd, string lpString, IntPtr hData);
+ private static extern bool SetProp(IntPtr hWnd, string lpString, IntPtr hData);
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
- private static extern IntPtr RemoveProp(IntPtr hwnd, string lpString);
+ private static extern IntPtr RemoveProp(IntPtr hWnd, string lpString);
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
- private static extern IntPtr SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, ref COPYDATASTRUCT lParam);
+ private static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, ref COPYDATASTRUCT lParam);
[StructLayout(LayoutKind.Sequential)]
private struct COPYDATASTRUCT {
@@ -460,13 +461,14 @@ namespace Greenshot.Helpers {
///
/// Clears up any resources associated with this channel.
///
- protected virtual void Dispose(bool disposing) {
- if (disposing) {
- if (ChannelName.Length > 0) {
- RemoveChannel();
- }
- ChannelName = string.Empty;
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposing) return;
+
+ if (ChannelName.Length > 0) {
+ RemoveChannel();
}
+ ChannelName = string.Empty;
}
///
diff --git a/Greenshot/Helpers/DestinationHelper.cs b/Greenshot/Helpers/DestinationHelper.cs
index 49cec43da..1169edb40 100644
--- a/Greenshot/Helpers/DestinationHelper.cs
+++ b/Greenshot/Helpers/DestinationHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/Entities/UpdateFeed.cs b/Greenshot/Helpers/Entities/UpdateFeed.cs
index a7a80afb8..280518fc8 100644
--- a/Greenshot/Helpers/Entities/UpdateFeed.cs
+++ b/Greenshot/Helpers/Entities/UpdateFeed.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/EnvironmentInfo.cs b/Greenshot/Helpers/EnvironmentInfo.cs
index 59caf857e..cc88802aa 100644
--- a/Greenshot/Helpers/EnvironmentInfo.cs
+++ b/Greenshot/Helpers/EnvironmentInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -209,18 +209,18 @@ namespace Greenshot.Helpers
}
}
}
- if (ex is ExternalException)
+ if (ex is ExternalException externalException)
{
// e.g. COMException
- report.AppendLine().AppendLine("ErrorCode: 0x" + (ex as ExternalException).ErrorCode.ToString("X"));
+ report.AppendLine().AppendLine("ErrorCode: 0x" + externalException.ErrorCode.ToString("X"));
}
report.AppendLine().AppendLine("Stack:").AppendLine(ex.StackTrace);
- if (ex is ReflectionTypeLoadException)
+ if (ex is ReflectionTypeLoadException reflectionTypeLoadException)
{
report.AppendLine().AppendLine("LoaderExceptions: ");
- foreach (Exception cbE in (ex as ReflectionTypeLoadException).LoaderExceptions)
+ foreach (Exception cbE in reflectionTypeLoadException.LoaderExceptions)
{
report.AppendLine(cbE.Message);
}
diff --git a/Greenshot/Helpers/GeometryHelper.cs b/Greenshot/Helpers/GeometryHelper.cs
index d8f2dd3fd..e20cf5035 100644
--- a/Greenshot/Helpers/GeometryHelper.cs
+++ b/Greenshot/Helpers/GeometryHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/GuiRectangle.cs b/Greenshot/Helpers/GuiRectangle.cs
index 770874e78..c24e591ec 100644
--- a/Greenshot/Helpers/GuiRectangle.cs
+++ b/Greenshot/Helpers/GuiRectangle.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/IECaptureHelper.cs b/Greenshot/Helpers/IECaptureHelper.cs
index cfe36a96b..f74403176 100644
--- a/Greenshot/Helpers/IECaptureHelper.cs
+++ b/Greenshot/Helpers/IECaptureHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -50,14 +50,14 @@ namespace Greenshot.Helpers {
// Helper method to activate a certain IE Tab
public static void ActivateIeTab(WindowDetails ieWindowDetails, int tabIndex) {
WindowDetails directUiWindowDetails = IEHelper.GetDirectUI(ieWindowDetails);
- if(directUiWindowDetails != null) {
- // Bring window to the front
- ieWindowDetails.Restore();
- // Get accessible
- Accessible ieAccessible = new Accessible(directUiWindowDetails.Handle);
- // Activate Tab
- ieAccessible.ActivateIETab(tabIndex);
- }
+ if (directUiWindowDetails == null) return;
+
+ // Bring window to the front
+ ieWindowDetails.Restore();
+ // Get accessible
+ Accessible ieAccessible = new Accessible(directUiWindowDetails.Handle);
+ // Activate Tab
+ ieAccessible.ActivateIETab(tabIndex);
}
///
@@ -68,14 +68,14 @@ namespace Greenshot.Helpers {
///
public static bool IsMostlyIeWindow(WindowDetails someWindow, int minimumPercentage) {
WindowDetails ieWindow = someWindow.GetChild("Internet Explorer_Server");
- if (ieWindow != null) {
- Rectangle wholeClient = someWindow.ClientRectangle;
- Rectangle partClient = ieWindow.ClientRectangle;
- int percentage = (int)(100*(float)(partClient.Width * partClient.Height) / (wholeClient.Width * wholeClient.Height));
- Log.InfoFormat("Window {0}, ie part {1}, percentage {2}", wholeClient, partClient, percentage);
- if (percentage > minimumPercentage) {
- return true;
- }
+ if (ieWindow == null) return false;
+
+ Rectangle wholeClient = someWindow.ClientRectangle;
+ Rectangle partClient = ieWindow.ClientRectangle;
+ int percentage = (int)(100*(float)(partClient.Width * partClient.Height) / (wholeClient.Width * wholeClient.Height));
+ Log.InfoFormat("Window {0}, ie part {1}, percentage {2}", wholeClient, partClient, percentage);
+ if (percentage > minimumPercentage) {
+ return true;
}
return false;
}
@@ -336,9 +336,8 @@ namespace Greenshot.Helpers {
/// window to use
/// ICapture with the content (if any)
public static ICapture CaptureIe(ICapture capture, WindowDetails windowToCapture) {
- if (windowToCapture == null) {
- windowToCapture = WindowDetails.GetActiveWindow();
- }
+ windowToCapture ??= WindowDetails.GetActiveWindow();
+
// Show backgroundform after retrieving the active window..
BackgroundForm backgroundForm = new BackgroundForm(Language.GetString(LangKey.contextmenu_captureie), Language.GetString(LangKey.wait_ie_capture));
backgroundForm.Show();
@@ -474,27 +473,28 @@ namespace Greenshot.Helpers {
continue;
}
// check if we need to move
- if (otherFrame.DestinationRectangle.IntersectsWith(currentFrame.DestinationRectangle) && !otherFrame.SourceRectangle.IntersectsWith(currentFrame.SourceRectangle)) {
- bool horizalResize = currentFrame.SourceSize.Width < currentFrame.DestinationSize.Width;
- bool verticalResize = currentFrame.SourceSize.Width < currentFrame.DestinationSize.Width;
- bool horizalMove = currentFrame.SourceLeft < currentFrame.DestinationLeft;
- bool verticalMove = currentFrame.SourceTop < currentFrame.DestinationTop;
- bool leftOf = currentFrame.SourceRight <= otherFrame.SourceLeft;
- bool belowOf = currentFrame.SourceBottom <= otherFrame.SourceTop;
+ if (!otherFrame.DestinationRectangle.IntersectsWith(currentFrame.DestinationRectangle) ||
+ otherFrame.SourceRectangle.IntersectsWith(currentFrame.SourceRectangle)) continue;
+
+ bool horizontalResize = currentFrame.SourceSize.Width < currentFrame.DestinationSize.Width;
+ bool verticalResize = currentFrame.SourceSize.Width < currentFrame.DestinationSize.Width;
+ bool horizontalMove = currentFrame.SourceLeft < currentFrame.DestinationLeft;
+ bool verticalMove = currentFrame.SourceTop < currentFrame.DestinationTop;
+ bool leftOf = currentFrame.SourceRight <= otherFrame.SourceLeft;
+ bool belowOf = currentFrame.SourceBottom <= otherFrame.SourceTop;
- if ((horizalResize || horizalMove) && leftOf) {
- // Current frame resized horizontally, so move other horizontally
- Log.DebugFormat("Moving Frame {0} horizontally to the right of {1}", otherFrame.Name, currentFrame.Name);
- otherFrame.DestinationLeft = currentFrame.DestinationRight;
- movedFrame = true;
- } else if ((verticalResize || verticalMove) && belowOf){
- // Current frame resized vertically, so move other vertically
- Log.DebugFormat("Moving Frame {0} vertically to the bottom of {1}", otherFrame.Name, currentFrame.Name);
- otherFrame.DestinationTop = currentFrame.DestinationBottom;
- movedFrame = true;
- } else {
- Log.DebugFormat("Frame {0} intersects with {1}", otherFrame.Name, currentFrame.Name);
- }
+ if ((horizontalResize || horizontalMove) && leftOf) {
+ // Current frame resized horizontally, so move other horizontally
+ Log.DebugFormat("Moving Frame {0} horizontally to the right of {1}", otherFrame.Name, currentFrame.Name);
+ otherFrame.DestinationLeft = currentFrame.DestinationRight;
+ movedFrame = true;
+ } else if ((verticalResize || verticalMove) && belowOf){
+ // Current frame resized vertically, so move other vertically
+ Log.DebugFormat("Moving Frame {0} vertically to the bottom of {1}", otherFrame.Name, currentFrame.Name);
+ otherFrame.DestinationTop = currentFrame.DestinationBottom;
+ movedFrame = true;
+ } else {
+ Log.DebugFormat("Frame {0} intersects with {1}", otherFrame.Name, currentFrame.Name);
}
}
}
@@ -504,7 +504,7 @@ namespace Greenshot.Helpers {
// Correct cursor location to be inside the window
capture.MoveMouseLocation(-documentContainer.ContentWindow.Location.X, -documentContainer.ContentWindow.Location.Y);
// See if the page has the correct size, as we capture the full frame content AND might have moved them
- // the normal pagesize will no longer be enough
+ // the normal pageSize will no longer be enough
foreach(DocumentContainer frameData in documentContainer.Frames) {
if (!movedMouse && frameData.SourceRectangle.Contains(capture.CursorLocation)) {
// Correct mouse cursor location for scrolled position (so it shows on the capture where it really was)
diff --git a/Greenshot/Helpers/IEInterop/IEContainer.cs b/Greenshot/Helpers/IEInterop/IEContainer.cs
index 56d83ff29..824cf3fa9 100644
--- a/Greenshot/Helpers/IEInterop/IEContainer.cs
+++ b/Greenshot/Helpers/IEInterop/IEContainer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/MailHelper.cs b/Greenshot/Helpers/MailHelper.cs
index a78799eae..5111ba2cf 100644
--- a/Greenshot/Helpers/MailHelper.cs
+++ b/Greenshot/Helpers/MailHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -76,20 +76,20 @@ namespace Greenshot.Helpers {
public static void SendImage(ISurface surface, ICaptureDetails captureDetails) {
string tmpFile = ImageOutput.SaveNamedTmpFile(surface, captureDetails, new SurfaceOutputSettings());
- if (tmpFile != null) {
- // Store the list of currently active windows, so we can make sure we show the email window later!
- var windowsBefore = WindowDetails.GetVisibleWindows();
- //bool isEmailSend = false;
- //if (EmailConfigHelper.HasOutlook() && (CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_HTML || CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_TXT)) {
- // isEmailSend = OutlookExporter.ExportToOutlook(tmpFile, captureDetails);
- //}
- if (/*!isEmailSend &&*/ EmailConfigHelper.HasMapi()) {
- // Fallback to MAPI
- // Send the email
- SendImage(tmpFile, captureDetails.Title);
- }
- WindowDetails.ActiveNewerWindows(windowsBefore);
+ if (tmpFile == null) return;
+
+ // Store the list of currently active windows, so we can make sure we show the email window later!
+ var windowsBefore = WindowDetails.GetVisibleWindows();
+ //bool isEmailSend = false;
+ //if (EmailConfigHelper.HasOutlook() && (CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_HTML || CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_TXT)) {
+ // isEmailSend = OutlookExporter.ExportToOutlook(tmpFile, captureDetails);
+ //}
+ if (/*!isEmailSend &&*/ EmailConfigHelper.HasMapi()) {
+ // Fallback to MAPI
+ // Send the email
+ SendImage(tmpFile, captureDetails.Title);
}
+ WindowDetails.ActiveNewerWindows(windowsBefore);
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
@@ -199,74 +199,83 @@ namespace Greenshot.Helpers {
_manualResetEvent?.Close();
}
- ///
- /// Sends the mail message.
- ///
- private void ShowMail() {
- var message = new MapiHelperInterop.MapiMessage();
+ ///
+ /// Sends the mail message.
+ ///
+ private void ShowMail()
+ {
+ while (true)
+ {
+ var message = new MapiHelperInterop.MapiMessage();
- using var interopRecipients = Recipients.GetInteropRepresentation();
- message.Subject = Subject;
- message.NoteText = Body;
+ using var interopRecipients = Recipients.GetInteropRepresentation();
+ message.Subject = Subject;
+ message.NoteText = Body;
- message.Recipients = interopRecipients.Handle;
- message.RecipientCount = Recipients.Count;
+ message.Recipients = interopRecipients.Handle;
+ message.RecipientCount = Recipients.Count;
- // Check if we need to add attachments
- if (Files.Count > 0) {
- // Add attachments
- message.Files = AllocAttachments(out message.FileCount);
- }
+ // Check if we need to add attachments
+ if (Files.Count > 0)
+ {
+ // Add attachments
+ message.Files = AllocAttachments(out message.FileCount);
+ }
- // Signal the creating thread (make the remaining code async)
- _manualResetEvent.Set();
+ // Signal the creating thread (make the remaining code async)
+ _manualResetEvent.Set();
- const int MAPI_DIALOG = 0x8;
- //const int MAPI_LOGON_UI = 0x1;
- int error = MapiHelperInterop.MAPISendMail(IntPtr.Zero, IntPtr.Zero, message, MAPI_DIALOG, 0);
+ const int MAPI_DIALOG = 0x8;
+ //const int MAPI_LOGON_UI = 0x1;
+ int error = MapiHelperInterop.MAPISendMail(IntPtr.Zero, IntPtr.Zero, message, MAPI_DIALOG, 0);
- if (Files.Count > 0) {
- // Deallocate the files
- DeallocFiles(message);
- }
- MAPI_CODES errorCode = (MAPI_CODES)Enum.ToObject(typeof(MAPI_CODES), error);
+ if (Files.Count > 0)
+ {
+ // Deallocate the files
+ DeallocFiles(message);
+ }
- // Check for error
- if (errorCode == MAPI_CODES.SUCCESS || errorCode == MAPI_CODES.USER_ABORT)
- {
- return;
- }
- string errorText = GetMapiError(errorCode);
- Log.Error("Error sending MAPI Email. Error: " + errorText + " (code = " + errorCode + ").");
- MessageBox.Show(errorText, "Mail (MAPI) destination", MessageBoxButtons.OK, MessageBoxIcon.Error);
- // Recover from bad settings, show again
- if (errorCode != MAPI_CODES.INVALID_RECIPS)
- {
- return;
- }
- Recipients = new RecipientCollection();
- ShowMail();
+ MAPI_CODES errorCode = (MAPI_CODES) Enum.ToObject(typeof(MAPI_CODES), error);
+
+ // Check for error
+ if (errorCode == MAPI_CODES.SUCCESS || errorCode == MAPI_CODES.USER_ABORT)
+ {
+ return;
+ }
+
+ string errorText = GetMapiError(errorCode);
+ Log.Error("Error sending MAPI Email. Error: " + errorText + " (code = " + errorCode + ").");
+ MessageBox.Show(errorText, "Mail (MAPI) destination", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ // Recover from bad settings, show again
+ if (errorCode != MAPI_CODES.INVALID_RECIPS)
+ {
+ return;
+ }
+
+ Recipients = new RecipientCollection();
+ }
}
- ///
+ ///
/// Deallocates the files in a message.
///
/// The message to deallocate the files from.
- private void DeallocFiles(MapiHelperInterop.MapiMessage message) {
- if (message.Files != IntPtr.Zero) {
- Type fileDescType = typeof(MapiFileDescriptor);
- int fsize = Marshal.SizeOf(fileDescType);
+ private void DeallocFiles(MapiHelperInterop.MapiMessage message)
+ {
+ if (message.Files == IntPtr.Zero) return;
+
+ Type fileDescType = typeof(MapiFileDescriptor);
+ int fsize = Marshal.SizeOf(fileDescType);
- // Get the ptr to the files
- IntPtr runptr = message.Files;
- // Release each file
- for (int i = 0; i < message.FileCount; i++) {
- Marshal.DestroyStructure(runptr, fileDescType);
- runptr = new IntPtr(runptr.ToInt64() + fsize);
- }
- // Release the file
- Marshal.FreeHGlobal(message.Files);
+ // Get the ptr to the files
+ IntPtr runptr = message.Files;
+ // Release each file
+ for (int i = 0; i < message.FileCount; i++) {
+ Marshal.DestroyStructure(runptr, fileDescType);
+ runptr = new IntPtr(runptr.ToInt64() + fsize);
}
+ // Release the file
+ Marshal.FreeHGlobal(message.Files);
}
///
@@ -337,93 +346,39 @@ namespace Greenshot.Helpers {
///
/// Logs any Mapi errors.
///
- private string GetMapiError(MAPI_CODES errorCode) {
-
- string error = string.Empty;
-
- switch (errorCode) {
- case MAPI_CODES.USER_ABORT:
- error = "User Aborted.";
- break;
- case MAPI_CODES.FAILURE:
- error = "MAPI Failure.";
- break;
- case MAPI_CODES.LOGIN_FAILURE:
- error = "Login Failure.";
- break;
- case MAPI_CODES.DISK_FULL:
- error = "MAPI Disk full.";
- break;
- case MAPI_CODES.INSUFFICIENT_MEMORY:
- error = "MAPI Insufficient memory.";
- break;
- case MAPI_CODES.BLK_TOO_SMALL:
- error = "MAPI Block too small.";
- break;
- case MAPI_CODES.TOO_MANY_SESSIONS:
- error = "MAPI Too many sessions.";
- break;
- case MAPI_CODES.TOO_MANY_FILES:
- error = "MAPI too many files.";
- break;
- case MAPI_CODES.TOO_MANY_RECIPIENTS:
- error = "MAPI too many recipients.";
- break;
- case MAPI_CODES.ATTACHMENT_NOT_FOUND:
- error = "MAPI Attachment not found.";
- break;
- case MAPI_CODES.ATTACHMENT_OPEN_FAILURE:
- error = "MAPI Attachment open failure.";
- break;
- case MAPI_CODES.ATTACHMENT_WRITE_FAILURE:
- error = "MAPI Attachment Write Failure.";
- break;
- case MAPI_CODES.UNKNOWN_RECIPIENT:
- error = "MAPI Unknown recipient.";
- break;
- case MAPI_CODES.BAD_RECIPTYPE:
- error = "MAPI Bad recipient type.";
- break;
- case MAPI_CODES.NO_MESSAGES:
- error = "MAPI No messages.";
- break;
- case MAPI_CODES.INVALID_MESSAGE:
- error = "MAPI Invalid message.";
- break;
- case MAPI_CODES.TEXT_TOO_LARGE:
- error = "MAPI Text too large.";
- break;
- case MAPI_CODES.INVALID_SESSION:
- error = "MAPI Invalid session.";
- break;
- case MAPI_CODES.TYPE_NOT_SUPPORTED:
- error = "MAPI Type not supported.";
- break;
- case MAPI_CODES.AMBIGUOUS_RECIPIENT:
- error = "MAPI Ambiguous recipient.";
- break;
- case MAPI_CODES.MESSAGE_IN_USE:
- error = "MAPI Message in use.";
- break;
- case MAPI_CODES.NETWORK_FAILURE:
- error = "MAPI Network failure.";
- break;
- case MAPI_CODES.INVALID_EDITFIELDS:
- error = "MAPI Invalid edit fields.";
- break;
- case MAPI_CODES.INVALID_RECIPS:
- error = "MAPI Invalid Recipients.";
- break;
- case MAPI_CODES.NOT_SUPPORTED:
- error = "MAPI Not supported.";
- break;
- case MAPI_CODES.NO_LIBRARY:
- error = "MAPI No Library.";
- break;
- case MAPI_CODES.INVALID_PARAMETER:
- error = "MAPI Invalid parameter.";
- break;
- }
+ private string GetMapiError(MAPI_CODES errorCode)
+ {
+ string error = errorCode switch
+ {
+ MAPI_CODES.USER_ABORT => "User Aborted.",
+ MAPI_CODES.FAILURE => "MAPI Failure.",
+ MAPI_CODES.LOGIN_FAILURE => "Login Failure.",
+ MAPI_CODES.DISK_FULL => "MAPI Disk full.",
+ MAPI_CODES.INSUFFICIENT_MEMORY => "MAPI Insufficient memory.",
+ MAPI_CODES.BLK_TOO_SMALL => "MAPI Block too small.",
+ MAPI_CODES.TOO_MANY_SESSIONS => "MAPI Too many sessions.",
+ MAPI_CODES.TOO_MANY_FILES => "MAPI too many files.",
+ MAPI_CODES.TOO_MANY_RECIPIENTS => "MAPI too many recipients.",
+ MAPI_CODES.ATTACHMENT_NOT_FOUND => "MAPI Attachment not found.",
+ MAPI_CODES.ATTACHMENT_OPEN_FAILURE => "MAPI Attachment open failure.",
+ MAPI_CODES.ATTACHMENT_WRITE_FAILURE => "MAPI Attachment Write Failure.",
+ MAPI_CODES.UNKNOWN_RECIPIENT => "MAPI Unknown recipient.",
+ MAPI_CODES.BAD_RECIPTYPE => "MAPI Bad recipient type.",
+ MAPI_CODES.NO_MESSAGES => "MAPI No messages.",
+ MAPI_CODES.INVALID_MESSAGE => "MAPI Invalid message.",
+ MAPI_CODES.TEXT_TOO_LARGE => "MAPI Text too large.",
+ MAPI_CODES.INVALID_SESSION => "MAPI Invalid session.",
+ MAPI_CODES.TYPE_NOT_SUPPORTED => "MAPI Type not supported.",
+ MAPI_CODES.AMBIGUOUS_RECIPIENT => "MAPI Ambiguous recipient.",
+ MAPI_CODES.MESSAGE_IN_USE => "MAPI Message in use.",
+ MAPI_CODES.NETWORK_FAILURE => "MAPI Network failure.",
+ MAPI_CODES.INVALID_EDITFIELDS => "MAPI Invalid edit fields.",
+ MAPI_CODES.INVALID_RECIPS => "MAPI Invalid Recipients.",
+ MAPI_CODES.NOT_SUPPORTED => "MAPI Not supported.",
+ MAPI_CODES.NO_LIBRARY => "MAPI No Library.",
+ MAPI_CODES.INVALID_PARAMETER => "MAPI Invalid parameter.",
+ _ => string.Empty
+ };
return error;
}
@@ -466,7 +421,7 @@ namespace Greenshot.Helpers {
}
[DllImport("MAPI32.DLL", SetLastError = true, CharSet=CharSet.Ansi)]
- public static extern int MAPISendMail(IntPtr session, IntPtr hwnd, MapiMessage message, int flg, int rsv);
+ public static extern int MAPISendMail(IntPtr session, IntPtr hWnd, MapiMessage message, int flg, int rsv);
}
}
@@ -542,7 +497,7 @@ namespace Greenshot.Helpers {
}
///
- /// Represents a colleciton of recipients for a mail message.
+ /// Represents a collection of recipients for a mail message.
///
public class RecipientCollection : CollectionBase {
///
@@ -627,25 +582,26 @@ namespace Greenshot.Helpers {
///
/// Disposes of resources.
///
- public void Dispose() {
- if (Handle != IntPtr.Zero) {
- Type type = typeof(MapiMailMessage.MapiHelperInterop.MapiRecipDesc);
- int size = Marshal.SizeOf(type);
+ public void Dispose()
+ {
+ if (Handle == IntPtr.Zero) return;
+
+ Type type = typeof(MapiMailMessage.MapiHelperInterop.MapiRecipDesc);
+ int size = Marshal.SizeOf(type);
- // destroy all the structures in the memory area
- IntPtr ptr = Handle;
- for (int i = 0; i < _count; i++) {
- Marshal.DestroyStructure(ptr, type);
- ptr = new IntPtr(ptr.ToInt64() + size);
- }
+ // destroy all the structures in the memory area
+ IntPtr ptr = Handle;
+ for (int i = 0; i < _count; i++) {
+ Marshal.DestroyStructure(ptr, type);
+ ptr = new IntPtr(ptr.ToInt64() + size);
+ }
- // free the memory
- Marshal.FreeHGlobal(Handle);
+ // free the memory
+ Marshal.FreeHGlobal(Handle);
- Handle = IntPtr.Zero;
- _count = 0;
- }
- }
+ Handle = IntPtr.Zero;
+ _count = 0;
+ }
}
}
}
\ No newline at end of file
diff --git a/Greenshot/Helpers/NotifyIconNotificationService.cs b/Greenshot/Helpers/NotifyIconNotificationService.cs
index 7398a7890..708da7592 100644
--- a/Greenshot/Helpers/NotifyIconNotificationService.cs
+++ b/Greenshot/Helpers/NotifyIconNotificationService.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/PluginHelper.cs b/Greenshot/Helpers/PluginHelper.cs
index 1d31e8e38..38de55b24 100644
--- a/Greenshot/Helpers/PluginHelper.cs
+++ b/Greenshot/Helpers/PluginHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/PrintHelper.cs b/Greenshot/Helpers/PrintHelper.cs
index 5de51a20f..d04f8e317 100644
--- a/Greenshot/Helpers/PrintHelper.cs
+++ b/Greenshot/Helpers/PrintHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -102,7 +102,7 @@ namespace Greenshot.Helpers {
returnPrinterSettings = _printDocument.PrinterSettings;
}
} catch (Exception e) {
- Log.Error("An error ocurred while trying to print", e);
+ Log.Error("An error occurred while trying to print", e);
MessageBox.Show(Language.GetString(LangKey.print_error), Language.GetString(LangKey.error));
}
return returnPrinterSettings;
@@ -115,21 +115,20 @@ namespace Greenshot.Helpers {
/// printer settings if actually printed, or null if print was cancelled or has failed
public PrinterSettings PrintWithDialog() {
PrinterSettings returnPrinterSettings = null;
- if (_printDialog.ShowDialog() == DialogResult.OK) {
- DialogResult? printOptionsResult = ShowPrintOptionsDialog();
- try {
- if (printOptionsResult == null || printOptionsResult == DialogResult.OK) {
- if (!IsColorPrint()) {
- _printDocument.DefaultPageSettings.Color = false;
- }
- _printDocument.Print();
- returnPrinterSettings = _printDialog.PrinterSettings;
- }
- } catch (Exception e) {
- Log.Error("An error ocurred while trying to print", e);
- MessageBox.Show(Language.GetString(LangKey.print_error), Language.GetString(LangKey.error));
- }
+ if (_printDialog.ShowDialog() != DialogResult.OK) return null;
+ DialogResult? printOptionsResult = ShowPrintOptionsDialog();
+ try {
+ if (printOptionsResult == null || printOptionsResult == DialogResult.OK) {
+ if (!IsColorPrint()) {
+ _printDocument.DefaultPageSettings.Color = false;
+ }
+ _printDocument.Print();
+ returnPrinterSettings = _printDialog.PrinterSettings;
+ }
+ } catch (Exception e) {
+ Log.Error("An error occurred while trying to print", e);
+ MessageBox.Show(Language.GetString(LangKey.print_error), Language.GetString(LangKey.error));
}
return returnPrinterSettings;
}
@@ -153,9 +152,7 @@ namespace Greenshot.Helpers {
}
private void DrawImageForPrint(object sender, PrintPageEventArgs e) {
-
-
- // Create the output settins
+ // Create the output settings
SurfaceOutputSettings printOutputSettings = new SurfaceOutputSettings(OutputFormat.png, 100, false);
ApplyEffects(printOutputSettings);
@@ -190,7 +187,7 @@ namespace Greenshot.Helpers {
RectangleF imageRect = image.GetBounds(ref gu);
// rotate the image if it fits the page better
if (CoreConfig.OutputPrintAllowRotate) {
- if ((pageRect.Width > pageRect.Height && imageRect.Width < imageRect.Height) || (pageRect.Width < pageRect.Height && imageRect.Width > imageRect.Height)) {
+ if (pageRect.Width > pageRect.Height && imageRect.Width < imageRect.Height || pageRect.Width < pageRect.Height && imageRect.Width > imageRect.Height) {
image.RotateFlip(RotateFlipType.Rotate270FlipNone);
imageRect = image.GetBounds(ref gu);
if (alignment.Equals(ContentAlignment.TopLeft)) {
@@ -203,7 +200,7 @@ namespace Greenshot.Helpers {
// scale the image to fit the page better
if (CoreConfig.OutputPrintAllowEnlarge || CoreConfig.OutputPrintAllowShrink) {
SizeF resizedRect = ScaleHelper.GetScaledSize(imageRect.Size, pageRect.Size, false);
- if ((CoreConfig.OutputPrintAllowShrink && resizedRect.Width < printRect.Width) || CoreConfig.OutputPrintAllowEnlarge && resizedRect.Width > printRect.Width) {
+ if (CoreConfig.OutputPrintAllowShrink && resizedRect.Width < printRect.Width || CoreConfig.OutputPrintAllowEnlarge && resizedRect.Width > printRect.Width) {
printRect.Size = resizedRect;
}
}
diff --git a/Greenshot/Helpers/ProcessorHelper.cs b/Greenshot/Helpers/ProcessorHelper.cs
index 0ccf0fbe6..25598944a 100644
--- a/Greenshot/Helpers/ProcessorHelper.cs
+++ b/Greenshot/Helpers/ProcessorHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/ResourceMutex.cs b/Greenshot/Helpers/ResourceMutex.cs
index 7a70031c1..9854c3dca 100644
--- a/Greenshot/Helpers/ResourceMutex.cs
+++ b/Greenshot/Helpers/ResourceMutex.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -106,7 +106,7 @@ namespace Greenshot.Helpers
catch (AbandonedMutexException e)
{
// Another instance didn't cleanup correctly!
- // we can ignore the exception, it happend on the "waitone" but still the mutex belongs to us
+ // we can ignore the exception, it happened on the "waitOne" but still the mutex belongs to us
Log.WarnFormat("{0} didn't cleanup correctly, but we got the mutex {1}.", _resourceName, _mutexId);
Log.Warn(e);
}
@@ -132,26 +132,25 @@ namespace Greenshot.Helpers
/// The real disposing code
///
/// true if dispose is called, false when the finalizer is called
- protected virtual void Dispose(bool disposing)
+ protected void Dispose(bool disposing)
{
- if (!_disposedValue)
+ if (_disposedValue) return;
+
+ if (_applicationMutex != null)
{
- if (_applicationMutex != null)
+ try
{
- try
- {
- _applicationMutex.ReleaseMutex();
- _applicationMutex = null;
- Log.InfoFormat("Released Mutex {0} for {1}", _mutexId, _resourceName);
- }
- catch (Exception ex)
- {
- Log.ErrorFormat("Error releasing Mutex {0} for {1}", _mutexId, _resourceName);
- Log.Error(ex);
- }
+ _applicationMutex.ReleaseMutex();
+ _applicationMutex = null;
+ Log.InfoFormat("Released Mutex {0} for {1}", _mutexId, _resourceName);
+ }
+ catch (Exception ex)
+ {
+ Log.ErrorFormat("Error releasing Mutex {0} for {1}", _mutexId, _resourceName);
+ Log.Error(ex);
}
- _disposedValue = true;
}
+ _disposedValue = true;
}
///
diff --git a/Greenshot/Helpers/ScaleHelper.cs b/Greenshot/Helpers/ScaleHelper.cs
index b7c7b1d62..76e0091c6 100644
--- a/Greenshot/Helpers/ScaleHelper.cs
+++ b/Greenshot/Helpers/ScaleHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -64,7 +64,7 @@ namespace Greenshot.Helpers {
/// calculates the position of an element depending on the desired alignment within a RectangleF
///
/// the bounds of the element to be aligned
- /// the rectangle reference for aligment of the element
+ /// the rectangle reference for alignment of the element
/// the System.Drawing.ContentAlignment value indicating how the element is to be aligned should the width or height differ from targetSize
/// a new RectangleF object with Location aligned aligned to targetRect
public static RectangleF GetAlignedRectangle(RectangleF currentRect, RectangleF targetRect, ContentAlignment alignment) {
@@ -136,15 +136,13 @@ namespace Greenshot.Helpers {
/// coordinates of the used handle/gripper
/// ScaleOptions to use when scaling
public static void Scale(ref RectangleF originalRectangle, Positions resizeHandlePosition, PointF resizeHandleCoords, ScaleOptions? options) {
- if(options == null) {
- options = GetScaleOptions();
- }
+ options ??= GetScaleOptions();
- if((options & ScaleOptions.Rational) == ScaleOptions.Rational) {
+ if ((options & ScaleOptions.Rational) == ScaleOptions.Rational) {
adjustCoordsForRationalScale(originalRectangle, resizeHandlePosition, ref resizeHandleCoords);
}
- if((options & ScaleOptions.Centered) == ScaleOptions.Centered) {
+ if ((options & ScaleOptions.Centered) == ScaleOptions.Centered) {
// store center coordinates of rectangle
float rectCenterX = originalRectangle.Left + originalRectangle.Width / 2;
float rectCenterY = originalRectangle.Top + originalRectangle.Height / 2;
@@ -332,14 +330,14 @@ namespace Greenshot.Helpers {
}
public class ShapeAngleRoundBehavior : IDoubleProcessor {
- public static ShapeAngleRoundBehavior Instance = new ShapeAngleRoundBehavior();
+ public static ShapeAngleRoundBehavior Instance = new();
private ShapeAngleRoundBehavior() {}
public double Process(double angle) {
return Math.Round((angle+45)/90)*90 - 45;
}
}
public class LineAngleRoundBehavior : IDoubleProcessor {
- public static LineAngleRoundBehavior Instance = new LineAngleRoundBehavior();
+ public static LineAngleRoundBehavior Instance = new();
private LineAngleRoundBehavior() {}
public double Process(double angle) {
return Math.Round(angle/15)*15;
@@ -354,21 +352,6 @@ namespace Greenshot.Helpers {
return fixedAngle;
}
}
-
-
-
-
-
- /*public static int FindGripperPostition(float anchorX, float anchorY, float gripperX, float gripperY) {
- if(gripperY > anchorY) {
- if(gripperX > anchorY) return Gripper.POSITION_BOTTOM_RIGHT;
- else return Gripper.POSITION_BOTTOM_LEFT;
- } else {
- if(gripperX > anchorY) return Gripper.POSITION_TOP_RIGHT;
- else return Gripper.POSITION_TOP_LEFT;
- }
- }*/
-
}
}
\ No newline at end of file
diff --git a/Greenshot/Helpers/SoundHelper.cs b/Greenshot/Helpers/SoundHelper.cs
index eb9139290..427909d86 100644
--- a/Greenshot/Helpers/SoundHelper.cs
+++ b/Greenshot/Helpers/SoundHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/StartupHelper.cs b/Greenshot/Helpers/StartupHelper.cs
index 9e5e4461b..1ca5180e8 100644
--- a/Greenshot/Helpers/StartupHelper.cs
+++ b/Greenshot/Helpers/StartupHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -226,9 +226,9 @@ namespace Greenshot.Helpers {
}
///
- /// Test if there is a link in the Statup folder
+ /// Test if there is a link in the Startup folder
///
- ///
+ /// bool
public static bool IsInStartupFolder() {
try {
string lnkName = Path.GetFileNameWithoutExtension(Application.ExecutablePath) + ".lnk";
diff --git a/Greenshot/Helpers/ToolStripItemEndisabler.cs b/Greenshot/Helpers/ToolStripItemEndisabler.cs
index 268a8d2b2..db5a5d178 100644
--- a/Greenshot/Helpers/ToolStripItemEndisabler.cs
+++ b/Greenshot/Helpers/ToolStripItemEndisabler.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -63,24 +63,26 @@ namespace Greenshot.Helpers {
Endisable(tsi, false, PropagationMode.CHILDREN);
}
- private static void Endisable(ToolStrip ts, bool enable, PropagationMode mode){
- if((mode & PropagationMode.CHILDREN) == PropagationMode.CHILDREN) {
- foreach(ToolStripItem tsi in ts.Items) {
- Endisable(tsi, enable, PropagationMode.CHILDREN);
- }
+ private static void Endisable(ToolStrip ts, bool enable, PropagationMode mode)
+ {
+ if ((mode & PropagationMode.CHILDREN) != PropagationMode.CHILDREN) return;
+
+ foreach(ToolStripItem tsi in ts.Items) {
+ Endisable(tsi, enable, PropagationMode.CHILDREN);
}
}
private static void Endisable(ToolStripItem tsi, bool enable, PropagationMode mode){
- if(tsi is ToolStripDropDownItem) {
- Endisable(tsi as ToolStripDropDownItem, enable, mode);
+ if (tsi is ToolStripDropDownItem item) {
+ Endisable(item, enable, mode);
} else {
tsi.Enabled = enable;
}
- if((mode & PropagationMode.ANCESTORS) == PropagationMode.ANCESTORS) {
- if(tsi.OwnerItem != null) Endisable(tsi.OwnerItem, enable, PropagationMode.ANCESTORS);
- }
+
+ if ((mode & PropagationMode.ANCESTORS) != PropagationMode.ANCESTORS) return;
+ if (tsi.OwnerItem != null) Endisable(tsi.OwnerItem, enable, PropagationMode.ANCESTORS);
+
}
private static void Endisable(ToolStripDropDownItem tsddi, bool enable, PropagationMode mode) {
diff --git a/Greenshot/Helpers/UpdateService.cs b/Greenshot/Helpers/UpdateService.cs
index ceb3488be..8c1728fb8 100644
--- a/Greenshot/Helpers/UpdateService.cs
+++ b/Greenshot/Helpers/UpdateService.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Helpers/WindowWrapper.cs b/Greenshot/Helpers/WindowWrapper.cs
deleted file mode 100644
index 1fde215e0..000000000
--- a/Greenshot/Helpers/WindowWrapper.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-using System;
-using System.Windows.Forms;
-
-namespace Greenshot.Helpers {
- public class WindowWrapper : IWin32Window {
- public WindowWrapper(IntPtr handle) {
- Handle = handle;
- }
-
- public IntPtr Handle { get; }
- }
-}
diff --git a/Greenshot/Languages/language-ar-SY.xml b/Greenshot/Languages/language-ar-SY.xml
index eec227d75..c5c6edc84 100644
--- a/Greenshot/Languages/language-ar-SY.xml
+++ b/Greenshot/Languages/language-ar-SY.xml
@@ -5,7 +5,7 @@
اذا اعجبك البرنامج انت مدعو لدعمنا:
جرين شوت استضيف بواسطة GitHub في
الايقونات بواسطة مجموعة ايقونات يوسوكي كامياماني (تحت رخصة المشاع الإبداعي الاصدار 3.0)
- حقوق النشر © 2007 - 2020 توماس براون, جينس كلنجين, روبين كروم
+ حقوق النشر © 2007 -2021 توماس براون, جينس كلنجين, روبين كروم
جرين شوت لا يأتي مع أية ضمان. هذا برنامج حر, مرحبا بك لتعيد توزيعه تحت شروط معينة.
تفاصيل حول رخصة جنو العمومية:
حول جرين شوت
diff --git a/Greenshot/Languages/language-ca-CA.xml b/Greenshot/Languages/language-ca-CA.xml
index 374d58705..9f92f7446 100644
--- a/Greenshot/Languages/language-ca-CA.xml
+++ b/Greenshot/Languages/language-ca-CA.xml
@@ -5,7 +5,7 @@
Si Greenshot us agrada , us agrairem que ens ajudeu:
Greenshot s'allotja a sourceforge.net
Icones del conjunt d'icones Fugue de Yusuke Kamiyamane(Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot s'ofereix SENSE CAP GARANTIA. Aquest és un programari gratuït, i podeu redistribuir-lo amb algunes condicions.
Detalls sobre la Llicència General Publica GNU:
Quant a Greenshot
diff --git a/Greenshot/Languages/language-cs-CZ.xml b/Greenshot/Languages/language-cs-CZ.xml
index 392ba617d..c34389ebf 100644
--- a/Greenshot/Languages/language-cs-CZ.xml
+++ b/Greenshot/Languages/language-cs-CZ.xml
@@ -5,7 +5,7 @@
Pokud se vám Greenshot líbí, uvítáme Vaší podporu
Greenshot je hostován na sourceforge.net
Ikony pochází ze sady Yusuke Kamiyamane's Fugue (licence Creative Commons Attribution 3.0)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot je ABSOLUTNĚ BEZ ZÁRUKY. Toto je svobodný software, můžete jej dále šířit za určitých podmínek.
Podrobnosti o GNU General Public License:
O programu Greenshot
diff --git a/Greenshot/Languages/language-de-DE.xml b/Greenshot/Languages/language-de-DE.xml
index 2435a7105..9ece82568 100644
--- a/Greenshot/Languages/language-de-DE.xml
+++ b/Greenshot/Languages/language-de-DE.xml
@@ -5,7 +5,7 @@
Wenn Sie Greenshot mögen, können Sie uns gerne unterstützen:
Greenshot wird von GitHub gehostet unter
Icons aus Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Für Greenshot besteht KEINERLEI GARANTIE. Greenshot ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen.
Detaillierte Informationen zur GNU General Public License:
Über Greenshot
diff --git a/Greenshot/Languages/language-de-x-franconia.xml b/Greenshot/Languages/language-de-x-franconia.xml
index abbf24bbf..b989bcfe7 100644
--- a/Greenshot/Languages/language-de-x-franconia.xml
+++ b/Greenshot/Languages/language-de-x-franconia.xml
@@ -5,7 +5,7 @@
Wenn der Greenshot gfälld, kannsd uns gern a weng helfn:
Greenshot is a bei GitHub, und zwa dordn:
Dei Fuztl-Bildla sin vom Yusuke Kamiyamane's Fugue icon set (Griäidif Gommens Äddribuschn 3.0 Laisns)
- Kobbireid (C) 2007-2020 Domas Braun, Jens Glingen, Robin Grohm
+ Kobbireid (C) 2007-2021 Domas Braun, Jens Glingen, Robin Grohm
A Garandie gibds für Greenshot ned, des kannst vergessn. Greenshot is umsonsd und wennsd mogst, kannsd es a rumreichn.
Mehr Infos zur GNU Dschännerel Bablig Laisns:
Was issn Greenshot???
diff --git a/Greenshot/Languages/language-el-GR.xml b/Greenshot/Languages/language-el-GR.xml
index 732b54f0c..14cb68bef 100644
--- a/Greenshot/Languages/language-el-GR.xml
+++ b/Greenshot/Languages/language-el-GR.xml
@@ -5,7 +5,7 @@
Αν σας αρέσει το Greenshot, είστε ευπρόσδεκτοι να μας υποστηρίξετε:
Το Greenshot φιλοξενείται από τη GitHub:
Εικονίδια από Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Δεν παρέχεται ΚΑΜΙΑ ΕΓΓΥΗΣΗ για το Greenshot. Είναι ελεύθερο λογισμικό. Είστε ελεύθεροι να το αναδιανείμετε κάτω από ορισμένες συνθήκες.
Λεπτομέρειες σχετικά με την GNU General Public License:
Πληροφορίες για το Greenshot
diff --git a/Greenshot/Languages/language-en-US.xml b/Greenshot/Languages/language-en-US.xml
index 1efcd15e9..0537c965b 100644
--- a/Greenshot/Languages/language-en-US.xml
+++ b/Greenshot/Languages/language-en-US.xml
@@ -5,7 +5,7 @@
If you like Greenshot, you are welcome to support us:
Greenshot is hosted by GitHub at
Icons from Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
About Greenshot
diff --git a/Greenshot/Languages/language-es-ES.xml b/Greenshot/Languages/language-es-ES.xml
index 22d44abf5..b84aee912 100644
--- a/Greenshot/Languages/language-es-ES.xml
+++ b/Greenshot/Languages/language-es-ES.xml
@@ -5,7 +5,7 @@
Si te gusta Greenshot, te agradeceremos que nos ayudes:
Greenshot está alojado en GitHub en
Iconos del conjunto de iconos Fugue de Yusuke Kamiyamane(Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot viene ABSOLUTAMENTE SIN GARANTIA. Este es software gratuito, y eres bienvenido a redistribuirlo bajo ciertas condiciones.
Detalles acerca de la Licencia General Publica GNU:
Acerca de Greenshot
diff --git a/Greenshot/Languages/language-et-EE.xml b/Greenshot/Languages/language-et-EE.xml
index 0de7a68f7..b358977e8 100644
--- a/Greenshot/Languages/language-et-EE.xml
+++ b/Greenshot/Languages/language-et-EE.xml
@@ -5,7 +5,7 @@
Greenshoti kasutamismugavust ja arendust saate toetada siin:
Greenshot asub portaalis GitHub
Yusuke Kamiyamane on ikoonide tegija Fugue ikooni paketist (Creative Commons Attribution 3.0 litsents)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot ei paku GARANTIID. See on vabaravaline programm ja Te võite seda levitava vabalt teatud tingimuste alusel.
Lisainfo GNU Põhilise Avaliku Litsentsi kohta:
Info Greenshoti kohta
diff --git a/Greenshot/Languages/language-fi-FI.xml b/Greenshot/Languages/language-fi-FI.xml
index 13a01263c..f66cc5013 100644
--- a/Greenshot/Languages/language-fi-FI.xml
+++ b/Greenshot/Languages/language-fi-FI.xml
@@ -5,7 +5,7 @@
Jos pidät Greenshotista niin toivottavasti tuet meitä:
Greenshot is hosted by GitHub at
Ikonit ovat Yusuke Kamiyamane:n Fugue ikonisarjasta (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
Tietoja Greenshotista
diff --git a/Greenshot/Languages/language-fr-FR.xml b/Greenshot/Languages/language-fr-FR.xml
index 26349708d..53f8e21f6 100644
--- a/Greenshot/Languages/language-fr-FR.xml
+++ b/Greenshot/Languages/language-fr-FR.xml
@@ -5,7 +5,7 @@
Si vous aimez Greenshot, vous pouvez nous soutenir :
Greenshot est hébergé par GitHub à
Icônes provenant du lot d'icônes Fugue de Kamiyamane Yuusuke (Creative Commons Attribution 3.0 license)
- Copyright © 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright © 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot vous est fourni SANS AUCUNE GARANTIE. C'est un logiciel gratuit que vous êtes libres de redistribuer sous certaines conditions.
Détails de la GNU General Public License :
À propos de Greenshot
diff --git a/Greenshot/Languages/language-fr-QC.xml b/Greenshot/Languages/language-fr-QC.xml
index 629591d62..17c0e5537 100644
--- a/Greenshot/Languages/language-fr-QC.xml
+++ b/Greenshot/Languages/language-fr-QC.xml
@@ -5,7 +5,7 @@
Si vous aimez Greenshot, vous pouvez nous soutenir :
Greenshot est hébergé par GitHub à
Icônes provenant du lot d'icônes Fugue de Kamiyamane Yuusuke (Creative Commons Attribution 3.0 license)
- Copyright © 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright © 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot vous est fourni SANS AUCUNE GARANTIE. C'est un logiciel gratuit que vous êtes libres de redistribuer sous certaines conditions.
Détails de la GNU General Public License :
A propos de Greenshot
diff --git a/Greenshot/Languages/language-he-IL.xml b/Greenshot/Languages/language-he-IL.xml
index 10f5a3c31..4df909d37 100644
--- a/Greenshot/Languages/language-he-IL.xml
+++ b/Greenshot/Languages/language-he-IL.xml
@@ -5,7 +5,7 @@
:אם את\ה נהנה\ית משימוש בתוכנה, את\ה מוזמן לתרום לנו
Greenshot is hosted by GitHub at
Icons from Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
Greenshot אודות התוכנה
diff --git a/Greenshot/Languages/language-hu-HU.xml b/Greenshot/Languages/language-hu-HU.xml
index c20c0cf99..0d5a06df9 100644
--- a/Greenshot/Languages/language-hu-HU.xml
+++ b/Greenshot/Languages/language-hu-HU.xml
@@ -5,7 +5,7 @@
Ha szereted Greenshot -ot, akkor támogass minket:
Greenshot kiszolgálója a GitHub
Az ikonokat Yusuke Kamiyamane's Fugue készítette (Creative Commons Attribution 3.0 license)
- Szerzői jog (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Szerzői jog (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
SEMMIFÉLE GARANCIA sincs a Greenshot -hoz. Ez egy ingyenes program, és hálásak vagyunk, hogy terjeszted bizonyos feltételekkel.
Részletek a GNU Fő Nyílvános Engedélyről:
Greenshot névjegye
diff --git a/Greenshot/Languages/language-id-ID.xml b/Greenshot/Languages/language-id-ID.xml
index ea35af361..e474cae59 100644
--- a/Greenshot/Languages/language-id-ID.xml
+++ b/Greenshot/Languages/language-id-ID.xml
@@ -5,18 +5,18 @@
Jika anda menyukai Greenshot, anda dipersilahkan untuk mendukung kami:
Greenshot dikelola oleh GitHub di
Ikon dari Yusuke Kamiyamane Fugue ikon set (lisensi Creative Commons Attribution 3.0)
- Hak Cipta milik Thomas Braun, Jens Klingen, Robin Krom 2007-2020
-Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
+ Hak Cipta milik Thomas Braun, Jens Klingen, Robin Krom 2007-2021
+Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
Tentang Greenshot
Greenshot - utilitas penangkap layar yang revolusioner
Tutup
- Maaf, kesalahan yang tak terduga terjadi.
-
-Kabar baiknya: anda dapat membantu kami memperbaikinya dengan mengisi laporan kesalahan.
-Harap kunjungi laman berikut, buat laporan kesalahan baru dan letakkan konten dari area teks ke wadah deskripsi.
-
-Harap tambah penjelasan yang berarti dan sertakan informasi lain yang penting untuk kami tiru kesalahannya.
+ Maaf, kesalahan yang tak terduga terjadi.
+
+Kabar baiknya: anda dapat membantu kami memperbaikinya dengan mengisi laporan kesalahan.
+Harap kunjungi laman berikut, buat laporan kesalahan baru dan letakkan konten dari area teks ke wadah deskripsi.
+
+Harap tambah penjelasan yang berarti dan sertakan informasi lain yang penting untuk kami tiru kesalahannya.
Juga, kami sangat terbantu apabila anda mengecek laporan lain yang sama dengan kepunyaan anda. (Anda dapat menggunakan pencarian untuk mencari dengan cepat.) Terima kasih :)
Kesalahan
Batal
@@ -180,7 +180,7 @@ Juga, kami sangat terbantu apabila anda mengecek laporan lain yang sama dengan k
Outlook dengan teks
Kesalahan
Sesuatu dari Greenshot telah dijalankan.
- Tidak dapat berkas {0}.
+ Tidak dapat berkas {0}.
Harap cek aksesibilitas menuis pada lokasi penyimpanan yang dipilih.
Berkas "{0}" tidak dapat dibuka.
Tidak dapat membuka link '{0}'.
@@ -245,22 +245,22 @@ Harap cek aksesibilitas menuis pada lokasi penyimpanan yang dipilih.
Tangkap Internet Explorer
Kualitas JPEG
Bahasa
- Pedoman berikut akan ditimpa otomatis dalam pola yang ditetapkan:
-${YYYY} tahun, 4 digit
-${MM} bulan, 2 digit
-${DD} hari, 2 digit
-${hh} jam, 2 digit
-${mm} menit, 2 digit
-${ss} detik, 2 digit
-${NUM} angka tambahan, 6 digit
-${title} judul jendela
-${user} pengguna Windows
-${domain} domain Windows
-${hostname} nama PC
-
-Anda juga dapat membuat direktori Greenshot secara dinamis, cukup gunakan simbol garis miring {\} untuk memisahkan folder dan nama berkas
-Contoh: pola ${YYYY}-${MM}-${DD}\${hh}-${mm}-${ss}
-akan menbuat folder untuk hari terbaru di lokasi penyimpan default, cont. 2008-06-29, nama berkas didasarkan pada waktu terbaru
+ Pedoman berikut akan ditimpa otomatis dalam pola yang ditetapkan:
+${YYYY} tahun, 4 digit
+${MM} bulan, 2 digit
+${DD} hari, 2 digit
+${hh} jam, 2 digit
+${mm} menit, 2 digit
+${ss} detik, 2 digit
+${NUM} angka tambahan, 6 digit
+${title} judul jendela
+${user} pengguna Windows
+${domain} domain Windows
+${hostname} nama PC
+
+Anda juga dapat membuat direktori Greenshot secara dinamis, cukup gunakan simbol garis miring {\} untuk memisahkan folder dan nama berkas
+Contoh: pola ${YYYY}-${MM}-${DD}\${hh}-${mm}-${ss}
+akan menbuat folder untuk hari terbaru di lokasi penyimpan default, cont. 2008-06-29, nama berkas didasarkan pada waktu terbaru
cont, 11_58_32 (ditambah ekstensi yang ditetapkan pada pengaturan)
Jaringan dan pembaruan
Output
@@ -296,8 +296,8 @@ cont, 11_58_32 (ditambah ekstensi yang ditetapkan pada pengaturan)
Versi baru Greenshot telah tersedia! Apakah anda ingin mengunduh Greenshot {0}?
Harap tunggu ketika halaman Internet Explorer sedang ditangkap
Peringatan
- hotkey {0} tak dapat terdaftar, kemungkinan akibat alat lain telah mengklaim penggunaan hotkey, anda dapat mengganti hotkey yang lain atau menonaktifkannya.
-
+ hotkey {0} tak dapat terdaftar, kemungkinan akibat alat lain telah mengklaim penggunaan hotkey, anda dapat mengganti hotkey yang lain atau menonaktifkannya.
+
Semua fitur Greenshot masih bekerja dengan baik dari ikon tray menu konteks tanpa hotkey.
Gunakan warna kesukaan
Pertahankan kebeningan
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index 2d9fc43e0..a2b3db147 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -5,7 +5,7 @@
Se ti piace Greenshot, supportaci su:
Greenshot è disponibile nel repository GitHub
Libreria icone del set icone Fugue di Yusuke Kamiyamane (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot viene fornito SENZA ALCUNA GARANZIA.
Questo software è garuitio", e potete ri-distribuirlo secondo certe condizioni.
Dettagli della General Public License GNU:
diff --git a/Greenshot/Languages/language-ja-JP.xml b/Greenshot/Languages/language-ja-JP.xml
index 2111930ad..c894b9573 100644
--- a/Greenshot/Languages/language-ja-JP.xml
+++ b/Greenshot/Languages/language-ja-JP.xml
@@ -5,7 +5,7 @@
Greenshot がお気に召したなら、是非支援をお願いします :
Greenshot は GitHub によって運営されています :
上山根 祐輔氏の Fugue Icons を使用しています (Creative Commons Attribution 3.0 license) :
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot には一切の保障がありません。GNU General Public License に定められた条件下で再配布をおこなうことができます。:
Greenshot について
Greenshot - the revolutionary screenshot utility
diff --git a/Greenshot/Languages/language-kab-DZ.xml b/Greenshot/Languages/language-kab-DZ.xml
index 39244e170..31930d2db 100644
--- a/Greenshot/Languages/language-kab-DZ.xml
+++ b/Greenshot/Languages/language-kab-DZ.xml
@@ -5,7 +5,7 @@
Ma tḥemled Greenshot, Mudd-aɣ-d afus :
Greenshot yezdeɣ di sourceforge.net di
Tignitin i d-yekkan seg uqettun n tignitin Fugue n Kamiyamane Yuusuke (Creative Commons Attribution 3.0 license)
- Copyright © 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright © 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot yettunefk-d S WAR ṬMANA. d aseɣẓan ilelli i tzemreḍ ad tezuzreḍ s kra n tewtilin.
Talqayt ɣef GNU General Public License :
Ɣef Greenshot
diff --git a/Greenshot/Languages/language-ko-KR.xml b/Greenshot/Languages/language-ko-KR.xml
index 64379ce8c..a332cea33 100644
--- a/Greenshot/Languages/language-ko-KR.xml
+++ b/Greenshot/Languages/language-ko-KR.xml
@@ -5,7 +5,7 @@
Greenshot이 좋다면 아래 URL로 방문하셔서 지원할 수 있습니다.
Greenshot은 GitHub 관리하에 아래 링크에서 호스팅되고 있습니다
아이콘은 Yusuke Kamiyamane's Fugue icon set으로부터 제공받은 것입니다. (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
Details about the GNU General Public License:
Greenshot 프로그램 소개...
diff --git a/Greenshot/Languages/language-lt-LT.xml b/Greenshot/Languages/language-lt-LT.xml
index f69425916..e84388901 100644
--- a/Greenshot/Languages/language-lt-LT.xml
+++ b/Greenshot/Languages/language-lt-LT.xml
@@ -5,7 +5,7 @@
Jei jums patiko Greenshot, galite mus paremti:
Greenshot talpinamas GitHub
IIkonų rinkinys Fugue, аutorius Yusuke Kamiyamane, licencija Creative Commons Attribution 3.0
- Visos teisės saugomos (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Visos teisės saugomos (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot pateikiama BE JOKIŲ GARANTIJŲ. Greenshot — laisvai platinama PĮ su GPL licencija ir jūs galite laisvai ją platinti, laikydamasi licencinės sutarties:
Apie Greenshot
Greenshot — revoliucinis įrankis ekrano nuotraukoms daryti
diff --git a/Greenshot/Languages/language-nl-NL.xml b/Greenshot/Languages/language-nl-NL.xml
index 66601348d..507ece7dc 100644
--- a/Greenshot/Languages/language-nl-NL.xml
+++ b/Greenshot/Languages/language-nl-NL.xml
@@ -5,7 +5,7 @@
Als Greenshot u bevalt, wilt u ons wellicht ondersteunen:
Greenshot wordt uitgegeven door sourceforge.net op
Iconen afkomstig van Yusuke Kamiyamane's Fugue (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot komt zonder enige garantie! Dit is gratis software en het staat u vrij het onder bepaalde voorwaarden te verspreiden.
Details over de GNU General Public License:
Over Greenshot
diff --git a/Greenshot/Languages/language-nn-NO.xml b/Greenshot/Languages/language-nn-NO.xml
index 291e1e2db..003b11b9a 100644
--- a/Greenshot/Languages/language-nn-NO.xml
+++ b/Greenshot/Languages/language-nn-NO.xml
@@ -5,7 +5,7 @@
Om du likar Greenshot er du velkomen til å støtte oss:
Greenshot held virtuelt hus hjå GitHub:
Ikon frå Yusuke Kamiyamane sit "Fugue" ikonsett (Creative Commons Attribution 3.0-lisens)
- Med kopirett (C) 2007-2020 Thomas Braun, Jens Klingen og Robin Krom. Norsk omsetjing av Ivar Barstad.
+ Med kopirett (C) 2007-2021 Thomas Braun, Jens Klingen og Robin Krom. Norsk omsetjing av Ivar Barstad.
Greenshot har ABSOLUTT INGEN GARANTI. Dette er gratis programvare, og du står fritt til å distribuere det under visse vilkår.
Detaljar om GNU General Public-lisens:
Om Greenshot
diff --git a/Greenshot/Languages/language-pl-PL.xml b/Greenshot/Languages/language-pl-PL.xml
index ea6e96b0a..54e2fd993 100644
--- a/Greenshot/Languages/language-pl-PL.xml
+++ b/Greenshot/Languages/language-pl-PL.xml
@@ -5,7 +5,7 @@
Jeśli podoba Ci się Greenshot, chętnie przyjmiemy Twoje wsparcie:
Greenshot jest utrzymywany przez GitHub pod adresem:
Ikony z zestawu Fugue od Yusuke Kamiyamane (licencja Creative Commons Attribution 3.0):
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot nie jest objęty JAKĄKOLWIEK GWARANCJĄ. Jako wolne oprogramowanie może być rozpowszechniany na określonych warunkach.
Szczegóły na temat Powszechnej Licencji Publicznej GNU:
O Greenshot
diff --git a/Greenshot/Languages/language-pt-BR.xml b/Greenshot/Languages/language-pt-BR.xml
index 4f379ae80..8bfd938ed 100644
--- a/Greenshot/Languages/language-pt-BR.xml
+++ b/Greenshot/Languages/language-pt-BR.xml
@@ -6,7 +6,7 @@
O Greenshot está armazenado no GitHub em
Ícones de Yusuke Kamiyamane (Biblioteca Fugue, licença "Creative Commons Attribution 3.0")
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
O Greenshot não tem NENHUMA GARANTIA. Este software gratuito pode ser redistribuído sob algumas condições.
Detalhes sobre a licença GNU:
diff --git a/Greenshot/Languages/language-pt-PT.xml b/Greenshot/Languages/language-pt-PT.xml
index 8e53f804b..dabc42762 100644
--- a/Greenshot/Languages/language-pt-PT.xml
+++ b/Greenshot/Languages/language-pt-PT.xml
@@ -5,7 +5,7 @@
Se gostou do Greenshot, por favor contribua:
O Greenshot está armazenado no GitHub em
Ícones da colecção Fugue de Yusuke Kamiyamane (Licença "Creative Commons Attribution 3.0")
- Direitos de Autor (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Direitos de Autor (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
O Greenshot não tem NENHUMA GARANTIA. Este software gratuito pode ser redistribuído sob algumas condições.
Detalhes sobre a licença GNU:
Acerca do Greenshot
diff --git a/Greenshot/Languages/language-ru-RU.xml b/Greenshot/Languages/language-ru-RU.xml
index 9823d8bf1..42d85df80 100644
--- a/Greenshot/Languages/language-ru-RU.xml
+++ b/Greenshot/Languages/language-ru-RU.xml
@@ -5,7 +5,7 @@
Если вам нравится Greenshot, вы можете поддержать нас:
Greenshot размещается на GitHub
Набор иконок Yusuke Kamiyamane's Fugue (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot поставляется БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ.Это бесплатная программа и вы можете распространять её на определённых условиях.
Подробно о GNU General Public License:
О программе Greenshot
diff --git a/Greenshot/Languages/language-sk-SK.xml b/Greenshot/Languages/language-sk-SK.xml
index 47ed2b116..f47c2bd5b 100644
--- a/Greenshot/Languages/language-sk-SK.xml
+++ b/Greenshot/Languages/language-sk-SK.xml
@@ -5,7 +5,7 @@
Ak se vám Greenshot páči, uvítame vašu podporu:
Greenshot je na GitHub
Ikony z Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot je ÚPLNE BEZ ZÁRUKY. Toto je FREE software, a môžete ho distribuovať za určitých podmienok.
Podrobnosti o GNU General Public License:
O Greenshote
diff --git a/Greenshot/Languages/language-sl-SI.xml b/Greenshot/Languages/language-sl-SI.xml
index 5993e8c89..fd0dc2bc4 100644
--- a/Greenshot/Languages/language-sl-SI.xml
+++ b/Greenshot/Languages/language-sl-SI.xml
@@ -5,18 +5,18 @@
Če vam je Greenshot všeč nas prosim podprite:
Greenshot gostuje pri GitHub
Ikone: Yusuke Kamiyamane's Fugue icon set (Creative Commons Attribution 3.0 license)
- Avtorske pravice (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
-Greenshot absolutno ne ponuja NOBENE GARANCIJE. Program je brezplačen in ga lahko distribuirate pod določenimi pogoji.
+ Avtorske pravice (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
+Greenshot absolutno ne ponuja NOBENE GARANCIJE. Program je brezplačen in ga lahko distribuirate pod določenimi pogoji.
Licenčne podrobnosti GNU General Public License:
O Greenshot-u
Greenshot - revolucija zajema zaslonskih slik
Zapri
- Oprostite, program je izvedel nepričakovano napako.
-
-Dobra novica je, da nam lahko pomagate pri odpravi te napake.
-Prosimo obiščite spodnji URL, prijavite napako (create bug) in prilepite vsebino opisa napake.
-
-Prosimo dopišite še razumljiv opis kako ste prišli do težave, da jo bomo lahko ponovili.
+ Oprostite, program je izvedel nepričakovano napako.
+
+Dobra novica je, da nam lahko pomagate pri odpravi te napake.
+Prosimo obiščite spodnji URL, prijavite napako (create bug) in prilepite vsebino opisa napake.
+
+Prosimo dopišite še razumljiv opis kako ste prišli do težave, da jo bomo lahko ponovili.
Pred objavo preverite tudi ali je napaka že prijavlja s strani kakšnega drugega uporabnika. Hvala :)
Napaka
Prekliči
@@ -143,7 +143,7 @@ Pred objavo preverite tudi ali je napaka že prijavlja s strani kakšnega drugeg
Outlook kot text
Napaka
Greenshot že teče!
- Ne morem shraniti v {0}.
+ Ne morem shraniti v {0}.
Prosim preverite pravice pisanja v ta direktorij.
Datoteka "{0}" ne more biti odprta.
Ne morem odpreti povezave '{0}'.
@@ -235,8 +235,8 @@ Prosim preverite pravice pisanja v ta direktorij.
Na voljo je nova verzija Greenshot-a! Ali želite prenesti Greenshot {0}?
Prosimo počakajte - zajema se Internet Explorer...
Opozorilo
- Bližnjica "{0}" ne more biti registrirana. Težava je verjetno v tem, da nek drug program uporablja isto bližnjico ! Nastavite si drugo bližnjično tipko ali deaktivirajte bližnjice za ta program.
-
+ Bližnjica "{0}" ne more biti registrirana. Težava je verjetno v tem, da nek drug program uporablja isto bližnjico ! Nastavite si drugo bližnjično tipko ali deaktivirajte bližnjice za ta program.
+
Vse funkcije Greenshota še vedno delujejo preko ikone za hitri zagon.
Uporabi lastne barve
Ohrani prosojnost
diff --git a/Greenshot/Languages/language-sr-RS.xml b/Greenshot/Languages/language-sr-RS.xml
index f26d84da6..6b624dd9c 100644
--- a/Greenshot/Languages/language-sr-RS.xml
+++ b/Greenshot/Languages/language-sr-RS.xml
@@ -5,7 +5,7 @@
Ако вам се свиђа Гриншот, помозите нам:
Гриншот покреће Сорсфорџ (GitHub):
Иконе су преузете из пакета „Fugue“ Јусуке Камијамане (лиценца Кријејтив комонс Ауторство 3.0)
- Ауторска права © 2007–2020 Томас Браун, Џенс Клинџен, Робин Кром
+ Ауторска права © 2007–2021 Томас Браун, Џенс Клинџен, Робин Кром
Гриншот се издаје БЕЗ ИКАКВЕ ГАРАНЦИЈЕ. Он је бесплатан програм, који можете да делите под одређеним условима.
Више информација о ГНУ-овој општој јавној лиценци:
О програму
diff --git a/Greenshot/Languages/language-sv-SE.xml b/Greenshot/Languages/language-sv-SE.xml
index dedd0b5ef..3fe2df709 100644
--- a/Greenshot/Languages/language-sv-SE.xml
+++ b/Greenshot/Languages/language-sv-SE.xml
@@ -5,7 +5,7 @@
Om du gillar Greenshot, så är du välkommen att stödja oss:
Greenshots hemsida tillhandahålls av GitHub på
Ikoner från "Yusuke Kamiyamane's Fugue icon set" (Creative Commons Attribution 3.0 license)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot lämnar ABSOLUT INGA GARANTIER. Detta är ett gratisprogram, och du får vidaredistribuera programmet under vissa villkor.
Detaljer om "GNU General Public License":
Om Greenshot
diff --git a/Greenshot/Languages/language-tr-TR.xml b/Greenshot/Languages/language-tr-TR.xml
index 16c5e94ed..b5a43f083 100644
--- a/Greenshot/Languages/language-tr-TR.xml
+++ b/Greenshot/Languages/language-tr-TR.xml
@@ -5,7 +5,7 @@
Greenshot'ı sevdiyseniz, bizi destekleyin:
Greenshot GitHub üzerinde şu adreste barındırılmaktadır:
Simgeler Yusuke Kamiyamane'nin Fugue simge setidir (Creative Commons Attribution 3.0 lisansı)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot HİÇ BİR GARANTİ vermez. Serbest bir yazılımdır ve belirli koşullar altında dağıtmakta serbestsiniz. GNU
Genel Kamu Lisanslı hakkında daha fazla bilgi için:
Greenshot Hakkında
diff --git a/Greenshot/Languages/language-uk-UA.xml b/Greenshot/Languages/language-uk-UA.xml
index 041d73095..850a5ea7f 100644
--- a/Greenshot/Languages/language-uk-UA.xml
+++ b/Greenshot/Languages/language-uk-UA.xml
@@ -5,7 +5,7 @@
Якщо Вам подобається Greenshot, можете підтримати нас:
Greenshot розташовується на GitHub
Набір піктограм Fugue від Yusuke Kamiyamane (ліцензія Creative Commons Attribution 3.0)
- Авторство © 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Авторство © 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot постачається АБСОЛЮТНО БЕЗ ГАРАНТІЇ. Це вільне програмне забезпечення, Ви можете розповсюджувати його за певних умов.
Подробиці Загальної Публічної Ліцензії GNU:
Про Greenshot
diff --git a/Greenshot/Languages/language-vi-VN.xml b/Greenshot/Languages/language-vi-VN.xml
index 541513466..a4b1a73c2 100644
--- a/Greenshot/Languages/language-vi-VN.xml
+++ b/Greenshot/Languages/language-vi-VN.xml
@@ -5,7 +5,7 @@
Hãy ủng hộ nếu bạn thấy Greenshot hữu dụng:
Greenshot được tài trợ bởi GitHub
Dùng biểu tượng Fugue (Giấy phép Commons Attribution 3.0 license) :
- Bản quyền (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Bản quyền (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot không đi kèm theo đảm bảo nào và được phân phối dưới giấy phép GNU General Public License.
Giới thiệu Greenshot
Greenshot - Công cụ chụp màn hình
diff --git a/Greenshot/Languages/language-zh-CN.xml b/Greenshot/Languages/language-zh-CN.xml
index 77519c498..7325fff33 100644
--- a/Greenshot/Languages/language-zh-CN.xml
+++ b/Greenshot/Languages/language-zh-CN.xml
@@ -5,7 +5,7 @@
如果您喜欢这个软件,希望您可以捐助我们:
Greenshot 托管在 GitHub
图标来源:Yusuke Kamiyamane的Fugue图标基于(Creative Commons Attribution 3.0 协议)
- 版权所有 (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ 版权所有 (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
作者不会对程序进行任何担保。
此程序为自由软件,您可以在遵守 GNU 通用公共许可协议下任意传播本软件。
关于 GNU 通用公共许可协议:
diff --git a/Greenshot/Languages/language-zh-TW.xml b/Greenshot/Languages/language-zh-TW.xml
index 320db2614..590ec8f05 100644
--- a/Greenshot/Languages/language-zh-TW.xml
+++ b/Greenshot/Languages/language-zh-TW.xml
@@ -5,7 +5,7 @@
如果您喜歡 Greenshot,歡迎您支持我們:
Greenshot 的主機在 GitHub 網址是
圖片來源: Yusuke Kamiyamane's Fugue 圖示集 (Creative Commons Attribution 3.0 授權)
- Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot 不對這個程式做任何擔保。 這個程式是自由軟體,您可以在 GNU General Public License 下任意散佈本軟體。
關於GNU General Public License 詳細資料:
關於 Greenshot
diff --git a/Greenshot/Memento/AddElementMemento.cs b/Greenshot/Memento/AddElementMemento.cs
index 980bb17b1..07b4f18d3 100644
--- a/Greenshot/Memento/AddElementMemento.cs
+++ b/Greenshot/Memento/AddElementMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Memento/AddElementsMemento.cs b/Greenshot/Memento/AddElementsMemento.cs
index 91a4f4d56..1f73f2106 100644
--- a/Greenshot/Memento/AddElementsMemento.cs
+++ b/Greenshot/Memento/AddElementsMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/Memento/ChangeFieldHolderMemento.cs b/Greenshot/Memento/ChangeFieldHolderMemento.cs
index fc94df076..225e8de20 100644
--- a/Greenshot/Memento/ChangeFieldHolderMemento.cs
+++ b/Greenshot/Memento/ChangeFieldHolderMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -55,18 +55,11 @@ namespace Greenshot.Memento
public bool Merge(IMemento otherMemento)
{
- if (otherMemento is ChangeFieldHolderMemento other)
- {
- if (other._drawableContainer.Equals(_drawableContainer))
- {
- if (other._fieldToBeChanged.Equals(_fieldToBeChanged))
- {
- // Match, do not store anything as the initial state is what we want.
- return true;
- }
- }
- }
- return false;
+ if (otherMemento is not ChangeFieldHolderMemento other) return false;
+
+ if (!other._drawableContainer.Equals(_drawableContainer)) return false;
+
+ return other._fieldToBeChanged.Equals(_fieldToBeChanged);
}
public IMemento Restore()
diff --git a/Greenshot/Memento/DeleteElementMemento.cs b/Greenshot/Memento/DeleteElementMemento.cs
index fd9e793b2..cf921713f 100644
--- a/Greenshot/Memento/DeleteElementMemento.cs
+++ b/Greenshot/Memento/DeleteElementMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -27,12 +27,12 @@ namespace Greenshot.Memento {
/// The DeleteElementMemento makes it possible to undo deleting an element
///
public class DeleteElementMemento : IMemento {
- private IDrawableContainer drawableContainer;
- private readonly Surface surface;
+ private IDrawableContainer _drawableContainer;
+ private readonly Surface _surface;
public DeleteElementMemento(Surface surface, IDrawableContainer drawableContainer) {
- this.surface = surface;
- this.drawableContainer = drawableContainer;
+ _surface = surface;
+ _drawableContainer = drawableContainer;
}
public void Dispose() {
@@ -40,12 +40,13 @@ namespace Greenshot.Memento {
GC.SuppressFinalize(this);
}
- protected virtual void Dispose(bool disposing) {
- if (disposing) {
- if (drawableContainer != null) {
- drawableContainer.Dispose();
- drawableContainer = null;
- }
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposing) return;
+
+ if (_drawableContainer != null) {
+ _drawableContainer.Dispose();
+ _drawableContainer = null;
}
}
@@ -55,17 +56,17 @@ namespace Greenshot.Memento {
public IMemento Restore() {
// Before
- drawableContainer.Invalidate();
+ _drawableContainer.Invalidate();
- AddElementMemento oldState = new AddElementMemento(surface, drawableContainer);
- surface.AddElement(drawableContainer, false);
+ var oldState = new AddElementMemento(_surface, _drawableContainer);
+ _surface.AddElement(_drawableContainer, false);
// The container has a selected flag which represents the state at the moment it was deleted.
- if (drawableContainer.Selected) {
- surface.SelectElement(drawableContainer);
+ if (_drawableContainer.Selected) {
+ _surface.SelectElement(_drawableContainer);
}
// After
- drawableContainer.Invalidate();
+ _drawableContainer.Invalidate();
return oldState;
}
}
diff --git a/Greenshot/Memento/DeleteElementsMemento.cs b/Greenshot/Memento/DeleteElementsMemento.cs
index 98e3c63bf..33b0fe0ac 100644
--- a/Greenshot/Memento/DeleteElementsMemento.cs
+++ b/Greenshot/Memento/DeleteElementsMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -59,7 +59,7 @@ namespace Greenshot.Memento
public IMemento Restore()
{
- AddElementsMemento oldState = new AddElementsMemento(_surface, _containerList);
+ var oldState = new AddElementsMemento(_surface, _containerList);
_surface.AddElements(_containerList, false);
// After
_surface.Invalidate();
diff --git a/Greenshot/Memento/DrawableContainerBoundsChangeMemento.cs b/Greenshot/Memento/DrawableContainerBoundsChangeMemento.cs
index 9d29ea05d..32870a88a 100644
--- a/Greenshot/Memento/DrawableContainerBoundsChangeMemento.cs
+++ b/Greenshot/Memento/DrawableContainerBoundsChangeMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -31,8 +31,8 @@ namespace Greenshot.Memento
///
public class DrawableContainerBoundsChangeMemento : IMemento
{
- private readonly List _points = new List();
- private readonly List _sizes = new List();
+ private readonly List _points = new();
+ private readonly List _sizes = new();
private IDrawableContainerList _listOfdrawableContainer;
private void StoreBounds()
@@ -76,15 +76,14 @@ namespace Greenshot.Memento
public bool Merge(IMemento otherMemento)
{
- if (otherMemento is DrawableContainerBoundsChangeMemento other)
- {
- if (ObjectExtensions.CompareLists(_listOfdrawableContainer, other._listOfdrawableContainer))
- {
- // Lists are equal, as we have the state already we can ignore the new memento
- return true;
- }
- }
- return false;
+ if (otherMemento is not DrawableContainerBoundsChangeMemento other) return false;
+
+ if (ObjectExtensions.CompareLists(_listOfdrawableContainer, other._listOfdrawableContainer))
+ {
+ // Lists are equal, as we have the state already we can ignore the new memento
+ return true;
+ }
+ return false;
}
public IMemento Restore()
diff --git a/Greenshot/Memento/SurfaceBackgroundChangeMemento.cs b/Greenshot/Memento/SurfaceBackgroundChangeMemento.cs
index efece64d2..a20823878 100644
--- a/Greenshot/Memento/SurfaceBackgroundChangeMemento.cs
+++ b/Greenshot/Memento/SurfaceBackgroundChangeMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -45,18 +45,19 @@ namespace Greenshot.Memento {
Dispose(true);
}
- protected virtual void Dispose(bool disposing) {
- if (disposing) {
- if (_matrix != null) {
- _matrix.Dispose();
- _matrix = null;
- }
- if (_image != null) {
- _image.Dispose();
- _image = null;
- }
- _surface = null;
+ protected virtual void Dispose(bool disposing)
+ {
+ if (!disposing) return;
+
+ if (_matrix != null) {
+ _matrix.Dispose();
+ _matrix = null;
}
+ if (_image != null) {
+ _image.Dispose();
+ _image = null;
+ }
+ _surface = null;
}
public bool Merge(IMemento otherMemento) {
diff --git a/Greenshot/Memento/TextChangeMemento.cs b/Greenshot/Memento/TextChangeMemento.cs
index a15907adb..4971b8ff0 100644
--- a/Greenshot/Memento/TextChangeMemento.cs
+++ b/Greenshot/Memento/TextChangeMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -27,12 +27,12 @@ namespace Greenshot.Memento {
/// The TextChangeMemento makes it possible to undo-redo an IDrawableContainer move
///
public class TextChangeMemento : IMemento {
- private TextContainer textContainer;
- private readonly string oldText;
+ private TextContainer _textContainer;
+ private readonly string _oldText;
public TextChangeMemento(TextContainer textContainer) {
- this.textContainer = textContainer;
- oldText = textContainer.Text;
+ _textContainer = textContainer;
+ _oldText = textContainer.Text;
}
public void Dispose() {
@@ -41,27 +41,23 @@ namespace Greenshot.Memento {
protected virtual void Dispose(bool disposing) {
if (disposing) {
- textContainer = null;
+ _textContainer = null;
}
}
public bool Merge(IMemento otherMemento) {
- if (otherMemento is TextChangeMemento other) {
- if (other.textContainer.Equals(textContainer)) {
- // Match, do not store anything as the initial state is what we want.
- return true;
- }
- }
- return false;
+ if (otherMemento is not TextChangeMemento other) return false;
+
+ return other._textContainer.Equals(_textContainer);
}
public IMemento Restore() {
// Before
- textContainer.Invalidate();
- TextChangeMemento oldState = new TextChangeMemento(textContainer);
- textContainer.ChangeText(oldText, false);
+ _textContainer.Invalidate();
+ TextChangeMemento oldState = new TextChangeMemento(_textContainer);
+ _textContainer.ChangeText(_oldText, false);
// After
- textContainer.Invalidate();
+ _textContainer.Invalidate();
return oldState;
}
}
diff --git a/Greenshot/Processors/TitleFixProcessor.cs b/Greenshot/Processors/TitleFixProcessor.cs
index 7c44e218e..7bcc59f01 100644
--- a/Greenshot/Processors/TitleFixProcessor.cs
+++ b/Greenshot/Processors/TitleFixProcessor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/Greenshot/releases/innosetup/scripts/products.pas b/Greenshot/releases/innosetup/scripts/products.pas
index 3fa140e54..3335007e7 100644
--- a/Greenshot/releases/innosetup/scripts/products.pas
+++ b/Greenshot/releases/innosetup/scripts/products.pas
@@ -251,7 +251,7 @@ begin
//if SuppressibleMsgBox(FmtMessage(CustomMessage('depdownload_msg'), [FmtMessage(downloadMessage, [''])]), mbConfirmation, MB_YESNO, IDYES) = IDNO then
// Result := false
//else if
- if isxdl_DownloadFiles(StrToInt(ExpandConstant('{wizardhwnd}'))) = 0 then
+ if isxdl_DownloadFiles(StrToInt(ExpandConstant('{wizardhWnd}'))) = 0 then
Result := false;
end;
end;
diff --git a/GreenshotBoxPlugin/BoxConfiguration.cs b/GreenshotBoxPlugin/BoxConfiguration.cs
index 27ac67676..b8e9e0965 100644
--- a/GreenshotBoxPlugin/BoxConfiguration.cs
+++ b/GreenshotBoxPlugin/BoxConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -22,6 +22,7 @@
using System.Windows.Forms;
using GreenshotPlugin.Core;
using System;
+using GreenshotBoxPlugin.Forms;
using GreenshotPlugin.IniFile;
namespace GreenshotBoxPlugin {
diff --git a/GreenshotBoxPlugin/BoxDestination.cs b/GreenshotBoxPlugin/BoxDestination.cs
index 8cdd53515..06402ca89 100644
--- a/GreenshotBoxPlugin/BoxDestination.cs
+++ b/GreenshotBoxPlugin/BoxDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotBoxPlugin/BoxEntities.cs b/GreenshotBoxPlugin/BoxEntities.cs
index 23cc4a8c4..a1f1a5c61 100644
--- a/GreenshotBoxPlugin/BoxEntities.cs
+++ b/GreenshotBoxPlugin/BoxEntities.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotBoxPlugin/BoxPlugin.cs b/GreenshotBoxPlugin/BoxPlugin.cs
index 4848c4df2..b15835063 100644
--- a/GreenshotBoxPlugin/BoxPlugin.cs
+++ b/GreenshotBoxPlugin/BoxPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -45,13 +45,14 @@ namespace GreenshotBoxPlugin {
GC.SuppressFinalize(this);
}
- protected void Dispose(bool disposing) {
- if (disposing) {
- if (_itemPlugInConfig != null) {
- _itemPlugInConfig.Dispose();
- _itemPlugInConfig = null;
- }
- }
+ protected void Dispose(bool disposing)
+ {
+ if (!disposing) return;
+
+ if (_itemPlugInConfig == null) return;
+
+ _itemPlugInConfig.Dispose();
+ _itemPlugInConfig = null;
}
///
diff --git a/GreenshotBoxPlugin/BoxUtils.cs b/GreenshotBoxPlugin/BoxUtils.cs
index 0c5b2b10f..28bc90fb6 100644
--- a/GreenshotBoxPlugin/BoxUtils.cs
+++ b/GreenshotBoxPlugin/BoxUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotBoxPlugin/Forms/BoxForm.cs b/GreenshotBoxPlugin/Forms/BoxForm.cs
index 7083d89d0..1ab7aed75 100644
--- a/GreenshotBoxPlugin/Forms/BoxForm.cs
+++ b/GreenshotBoxPlugin/Forms/BoxForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs b/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
index 385452002..556cfe413 100644
--- a/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotBoxPlugin {
+namespace GreenshotBoxPlugin.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/GreenshotBoxPlugin/Forms/SettingsForm.cs b/GreenshotBoxPlugin/Forms/SettingsForm.cs
index 954dc13de..49e62fd17 100644
--- a/GreenshotBoxPlugin/Forms/SettingsForm.cs
+++ b/GreenshotBoxPlugin/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,9 +19,7 @@
* along with this program. If not, see .
*/
-using GreenshotBoxPlugin.Forms;
-
-namespace GreenshotBoxPlugin {
+namespace GreenshotBoxPlugin.Forms {
///
/// Description of PasswordRequestForm.
///
diff --git a/GreenshotBoxPlugin/GreenshotBoxPlugin.Credentials.template b/GreenshotBoxPlugin/GreenshotBoxPlugin.Credentials.template
index 253514e60..9ad35eced 100644
--- a/GreenshotBoxPlugin/GreenshotBoxPlugin.Credentials.template
+++ b/GreenshotBoxPlugin/GreenshotBoxPlugin.Credentials.template
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotBoxPlugin/LanguageKeys.cs b/GreenshotBoxPlugin/LanguageKeys.cs
index 7019cdca2..6e757a01d 100644
--- a/GreenshotBoxPlugin/LanguageKeys.cs
+++ b/GreenshotBoxPlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotBoxPlugin/Properties/AssemblyInfo.cs b/GreenshotBoxPlugin/Properties/AssemblyInfo.cs
index ce75d8750..b6b19f1c8 100644
--- a/GreenshotBoxPlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotBoxPlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Confluence.cs b/GreenshotConfluencePlugin/Confluence.cs
index 69833cb77..bb803602c 100644
--- a/GreenshotConfluencePlugin/Confluence.cs
+++ b/GreenshotConfluencePlugin/Confluence.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/ConfluenceConfiguration.cs b/GreenshotConfluencePlugin/ConfluenceConfiguration.cs
index a62dcbf38..5a3e7019c 100644
--- a/GreenshotConfluencePlugin/ConfluenceConfiguration.cs
+++ b/GreenshotConfluencePlugin/ConfluenceConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/ConfluenceDestination.cs b/GreenshotConfluencePlugin/ConfluenceDestination.cs
index 7403495e2..d7794989a 100644
--- a/GreenshotConfluencePlugin/ConfluenceDestination.cs
+++ b/GreenshotConfluencePlugin/ConfluenceDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/ConfluencePlugin.cs b/GreenshotConfluencePlugin/ConfluencePlugin.cs
index 2f5ea3539..f0014f221 100644
--- a/GreenshotConfluencePlugin/ConfluencePlugin.cs
+++ b/GreenshotConfluencePlugin/ConfluencePlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/ConfluenceUtils.cs b/GreenshotConfluencePlugin/ConfluenceUtils.cs
index 9b3394cc7..ccb808a0f 100644
--- a/GreenshotConfluencePlugin/ConfluenceUtils.cs
+++ b/GreenshotConfluencePlugin/ConfluenceUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/EnumDisplayer.cs b/GreenshotConfluencePlugin/EnumDisplayer.cs
index 2e4ded768..84ca2925e 100644
--- a/GreenshotConfluencePlugin/EnumDisplayer.cs
+++ b/GreenshotConfluencePlugin/EnumDisplayer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs
index 8545d91a0..9269072d4 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceConfigurationForm.xaml.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs
index 7ce72fd4f..4f2723c89 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluencePagePicker.xaml.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs
index e30ed9dc4..0702ddff7 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs
index b154ad357..1897a8f53 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceTreePicker.xaml.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs
index 86c5ff4e4..291581a2b 100644
--- a/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs
+++ b/GreenshotConfluencePlugin/Forms/ConfluenceUpload.xaml.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs b/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
index 85b380840..d4cbe59d4 100644
--- a/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
+++ b/GreenshotConfluencePlugin/Forms/ListViewColumnSorter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotConfluencePlugin/LanguageKeys.cs b/GreenshotConfluencePlugin/LanguageKeys.cs
index 0caa382cb..9cd71ea8e 100644
--- a/GreenshotConfluencePlugin/LanguageKeys.cs
+++ b/GreenshotConfluencePlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/DropboxDestination.cs b/GreenshotDropboxPlugin/DropboxDestination.cs
index 261ead03d..57d0a1326 100644
--- a/GreenshotDropboxPlugin/DropboxDestination.cs
+++ b/GreenshotDropboxPlugin/DropboxDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/DropboxPlugin.cs b/GreenshotDropboxPlugin/DropboxPlugin.cs
index 3ee7b73cc..0d3ca827d 100644
--- a/GreenshotDropboxPlugin/DropboxPlugin.cs
+++ b/GreenshotDropboxPlugin/DropboxPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/DropboxPluginConfiguration.cs b/GreenshotDropboxPlugin/DropboxPluginConfiguration.cs
index 1b189487b..52baabdef 100644
--- a/GreenshotDropboxPlugin/DropboxPluginConfiguration.cs
+++ b/GreenshotDropboxPlugin/DropboxPluginConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,6 +19,7 @@
* along with this program. If not, see .
*/
using System.Windows.Forms;
+using GreenshotDropboxPlugin.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
diff --git a/GreenshotDropboxPlugin/DropboxUtils.cs b/GreenshotDropboxPlugin/DropboxUtils.cs
index 434cdcdcf..717b41fe3 100644
--- a/GreenshotDropboxPlugin/DropboxUtils.cs
+++ b/GreenshotDropboxPlugin/DropboxUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/Forms/DropboxForm.cs b/GreenshotDropboxPlugin/Forms/DropboxForm.cs
index 97c4b9d92..e0a96b5bf 100644
--- a/GreenshotDropboxPlugin/Forms/DropboxForm.cs
+++ b/GreenshotDropboxPlugin/Forms/DropboxForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs b/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs
index 80c0009b1..1baae2160 100644
--- a/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotDropboxPlugin {
+namespace GreenshotDropboxPlugin.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/GreenshotDropboxPlugin/Forms/SettingsForm.cs b/GreenshotDropboxPlugin/Forms/SettingsForm.cs
index 5be2a25b2..98e1147ce 100644
--- a/GreenshotDropboxPlugin/Forms/SettingsForm.cs
+++ b/GreenshotDropboxPlugin/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,9 +19,7 @@
* along with this program. If not, see .
*/
-using GreenshotDropboxPlugin.Forms;
-
-namespace GreenshotDropboxPlugin {
+namespace GreenshotDropboxPlugin.Forms {
///
/// Description of PasswordRequestForm.
///
diff --git a/GreenshotDropboxPlugin/GreenshotDropboxPlugin.Credentials.template b/GreenshotDropboxPlugin/GreenshotDropboxPlugin.Credentials.template
index 3baf9fb94..6a13eb6d7 100644
--- a/GreenshotDropboxPlugin/GreenshotDropboxPlugin.Credentials.template
+++ b/GreenshotDropboxPlugin/GreenshotDropboxPlugin.Credentials.template
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/LanguageKeys.cs b/GreenshotDropboxPlugin/LanguageKeys.cs
index 16cd587fb..d50660add 100644
--- a/GreenshotDropboxPlugin/LanguageKeys.cs
+++ b/GreenshotDropboxPlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs b/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs
index 10b737886..9e9b18e04 100644
--- a/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs b/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs
index aa5e76d98..f8981b820 100644
--- a/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs
+++ b/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs
index 74676182c..81575c947 100644
--- a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs
+++ b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/ExternalCommandForm.cs b/GreenshotExternalCommandPlugin/ExternalCommandForm.cs
index dd42fbbe2..6436fc988 100644
--- a/GreenshotExternalCommandPlugin/ExternalCommandForm.cs
+++ b/GreenshotExternalCommandPlugin/ExternalCommandForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs b/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs
index 67a278a3a..13d1868d1 100644
--- a/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs
+++ b/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/IconCache.cs b/GreenshotExternalCommandPlugin/IconCache.cs
index f510c0823..bf9094c7e 100644
--- a/GreenshotExternalCommandPlugin/IconCache.cs
+++ b/GreenshotExternalCommandPlugin/IconCache.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs b/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs
index 0a7ed7d7f..f0a000f9b 100644
--- a/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs
+++ b/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/SettingsForm.cs b/GreenshotExternalCommandPlugin/SettingsForm.cs
index 7aecfb04e..01eea89bf 100644
--- a/GreenshotExternalCommandPlugin/SettingsForm.cs
+++ b/GreenshotExternalCommandPlugin/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs b/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs
index 028efa2cd..dd928449d 100644
--- a/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs
+++ b/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotExternalCommandPlugin/SettingsFormDetail.cs b/GreenshotExternalCommandPlugin/SettingsFormDetail.cs
index db154be58..8affd6976 100644
--- a/GreenshotExternalCommandPlugin/SettingsFormDetail.cs
+++ b/GreenshotExternalCommandPlugin/SettingsFormDetail.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/FlickrConfiguration.cs b/GreenshotFlickrPlugin/FlickrConfiguration.cs
index 56b74432e..06f65c9fd 100644
--- a/GreenshotFlickrPlugin/FlickrConfiguration.cs
+++ b/GreenshotFlickrPlugin/FlickrConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,6 +19,7 @@
* along with this program. If not, see .
*/
using System.Windows.Forms;
+using GreenshotFlickrPlugin.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
diff --git a/GreenshotFlickrPlugin/FlickrDestination.cs b/GreenshotFlickrPlugin/FlickrDestination.cs
index 6cc874d29..ccd9392d2 100644
--- a/GreenshotFlickrPlugin/FlickrDestination.cs
+++ b/GreenshotFlickrPlugin/FlickrDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/FlickrPlugin.cs b/GreenshotFlickrPlugin/FlickrPlugin.cs
index 524c6ad68..abf663625 100644
--- a/GreenshotFlickrPlugin/FlickrPlugin.cs
+++ b/GreenshotFlickrPlugin/FlickrPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/FlickrUtils.cs b/GreenshotFlickrPlugin/FlickrUtils.cs
index 332a9c6e6..6713e3702 100644
--- a/GreenshotFlickrPlugin/FlickrUtils.cs
+++ b/GreenshotFlickrPlugin/FlickrUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/Forms/FlickrForm.cs b/GreenshotFlickrPlugin/Forms/FlickrForm.cs
index 897f20eef..94e161d64 100644
--- a/GreenshotFlickrPlugin/Forms/FlickrForm.cs
+++ b/GreenshotFlickrPlugin/Forms/FlickrForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs b/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
index 498e37d18..18001eab2 100644
--- a/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotFlickrPlugin {
+namespace GreenshotFlickrPlugin.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/GreenshotFlickrPlugin/Forms/SettingsForm.cs b/GreenshotFlickrPlugin/Forms/SettingsForm.cs
index eed62ee7d..59d0e3cbf 100644
--- a/GreenshotFlickrPlugin/Forms/SettingsForm.cs
+++ b/GreenshotFlickrPlugin/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,9 +19,7 @@
* along with this program. If not, see .
*/
-using GreenshotFlickrPlugin.Forms;
-
-namespace GreenshotFlickrPlugin {
+namespace GreenshotFlickrPlugin.Forms {
///
/// Description of PasswordRequestForm.
///
diff --git a/GreenshotFlickrPlugin/GreenshotFlickrPlugin.Credentials.template b/GreenshotFlickrPlugin/GreenshotFlickrPlugin.Credentials.template
index 865c9e3e5..fb69e4460 100644
--- a/GreenshotFlickrPlugin/GreenshotFlickrPlugin.Credentials.template
+++ b/GreenshotFlickrPlugin/GreenshotFlickrPlugin.Credentials.template
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/LanguageKeys.cs b/GreenshotFlickrPlugin/LanguageKeys.cs
index aa08ff867..44320512b 100644
--- a/GreenshotFlickrPlugin/LanguageKeys.cs
+++ b/GreenshotFlickrPlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs b/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs
index 6b06e2aa5..7cc8b4a3a 100644
--- a/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotImgurPlugin/Forms/ImgurForm.cs b/GreenshotImgurPlugin/Forms/ImgurForm.cs
index c379e49fe..37316ac99 100644
--- a/GreenshotImgurPlugin/Forms/ImgurForm.cs
+++ b/GreenshotImgurPlugin/Forms/ImgurForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -21,7 +21,7 @@
using GreenshotPlugin.Controls;
-namespace GreenshotImgurPlugin {
+namespace GreenshotImgurPlugin.Forms {
///
/// This class is needed for design-time resolving of the language files
///
diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs
index 5b38b0e65..f8fb05dd2 100644
--- a/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs
+++ b/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotImgurPlugin
+namespace GreenshotImgurPlugin.Forms
{
partial class ImgurHistory
{
diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.cs
index cc5dc4cf1..359130a90 100644
--- a/GreenshotImgurPlugin/Forms/ImgurHistory.cs
+++ b/GreenshotImgurPlugin/Forms/ImgurHistory.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,16 +18,16 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System;
using System.Globalization;
using System.Text;
using System.Windows.Forms;
-
using GreenshotPlugin.Controls;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
-namespace GreenshotImgurPlugin {
+namespace GreenshotImgurPlugin.Forms {
///
/// Imgur history form
///
diff --git a/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs b/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs
index 788597c39..79192da09 100644
--- a/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotImgurPlugin {
+namespace GreenshotImgurPlugin.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/GreenshotImgurPlugin/Forms/SettingsForm.cs b/GreenshotImgurPlugin/Forms/SettingsForm.cs
index db7809a98..2ce863660 100644
--- a/GreenshotImgurPlugin/Forms/SettingsForm.cs
+++ b/GreenshotImgurPlugin/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,9 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System;
-namespace GreenshotImgurPlugin {
+namespace GreenshotImgurPlugin.Forms {
///
/// Description of PasswordRequestForm.
///
diff --git a/GreenshotImgurPlugin/GreenshotImgurPlugin.Credentials.template b/GreenshotImgurPlugin/GreenshotImgurPlugin.Credentials.template
index ea6d7c5ca..42dd7986f 100644
--- a/GreenshotImgurPlugin/GreenshotImgurPlugin.Credentials.template
+++ b/GreenshotImgurPlugin/GreenshotImgurPlugin.Credentials.template
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotImgurPlugin/ImgurConfiguration.cs b/GreenshotImgurPlugin/ImgurConfiguration.cs
index 795814192..d487c2387 100644
--- a/GreenshotImgurPlugin/ImgurConfiguration.cs
+++ b/GreenshotImgurPlugin/ImgurConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -22,6 +22,7 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
+using GreenshotImgurPlugin.Forms;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
diff --git a/GreenshotImgurPlugin/ImgurDestination.cs b/GreenshotImgurPlugin/ImgurDestination.cs
index c4d1ad445..5303ac295 100644
--- a/GreenshotImgurPlugin/ImgurDestination.cs
+++ b/GreenshotImgurPlugin/ImgurDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotImgurPlugin/ImgurInfo.cs b/GreenshotImgurPlugin/ImgurInfo.cs
index 08c454904..85ec5b39e 100644
--- a/GreenshotImgurPlugin/ImgurInfo.cs
+++ b/GreenshotImgurPlugin/ImgurInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotImgurPlugin/ImgurPlugin.cs b/GreenshotImgurPlugin/ImgurPlugin.cs
index 39cd8b9c0..d87c91f8e 100644
--- a/GreenshotImgurPlugin/ImgurPlugin.cs
+++ b/GreenshotImgurPlugin/ImgurPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -24,6 +24,7 @@ using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
+using GreenshotImgurPlugin.Forms;
using GreenshotPlugin.Controls;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
diff --git a/GreenshotImgurPlugin/ImgurUtils.cs b/GreenshotImgurPlugin/ImgurUtils.cs
index a38c12b95..ecbbf775b 100644
--- a/GreenshotImgurPlugin/ImgurUtils.cs
+++ b/GreenshotImgurPlugin/ImgurUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotImgurPlugin/LanguageKeys.cs b/GreenshotImgurPlugin/LanguageKeys.cs
index c0aeb0295..25b3e311f 100644
--- a/GreenshotImgurPlugin/LanguageKeys.cs
+++ b/GreenshotImgurPlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotImgurPlugin/Properties/AssemblyInfo.cs b/GreenshotImgurPlugin/Properties/AssemblyInfo.cs
index 19a2e1176..6818a420b 100644
--- a/GreenshotImgurPlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotImgurPlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/AsyncMemoryCache.cs b/GreenshotJiraPlugin/AsyncMemoryCache.cs
index 0242573e3..de2a61d04 100644
--- a/GreenshotJiraPlugin/AsyncMemoryCache.cs
+++ b/GreenshotJiraPlugin/AsyncMemoryCache.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs b/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
index ac718241e..bcd10427a 100644
--- a/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
+++ b/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/Forms/JiraForm.cs b/GreenshotJiraPlugin/Forms/JiraForm.cs
index 551fadadc..b9e4c3df8 100644
--- a/GreenshotJiraPlugin/Forms/JiraForm.cs
+++ b/GreenshotJiraPlugin/Forms/JiraForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/Forms/JiraFormBase.cs b/GreenshotJiraPlugin/Forms/JiraFormBase.cs
index 47266fda8..efc4d0201 100644
--- a/GreenshotJiraPlugin/Forms/JiraFormBase.cs
+++ b/GreenshotJiraPlugin/Forms/JiraFormBase.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs b/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs
index e3f26b571..0b0195cf4 100644
--- a/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/Forms/SettingsForm.cs b/GreenshotJiraPlugin/Forms/SettingsForm.cs
index 5599da8ac..043df8f8b 100644
--- a/GreenshotJiraPlugin/Forms/SettingsForm.cs
+++ b/GreenshotJiraPlugin/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/IssueTypeBitmapCache.cs b/GreenshotJiraPlugin/IssueTypeBitmapCache.cs
index 2edc0ed3e..c37cee314 100644
--- a/GreenshotJiraPlugin/IssueTypeBitmapCache.cs
+++ b/GreenshotJiraPlugin/IssueTypeBitmapCache.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/JiraConfiguration.cs b/GreenshotJiraPlugin/JiraConfiguration.cs
index 89c4fcf9b..ba8cad80c 100644
--- a/GreenshotJiraPlugin/JiraConfiguration.cs
+++ b/GreenshotJiraPlugin/JiraConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/JiraConnector.cs b/GreenshotJiraPlugin/JiraConnector.cs
index 841a240d1..6bf5739fe 100644
--- a/GreenshotJiraPlugin/JiraConnector.cs
+++ b/GreenshotJiraPlugin/JiraConnector.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/JiraDestination.cs b/GreenshotJiraPlugin/JiraDestination.cs
index 76d2314b3..080ec8619 100644
--- a/GreenshotJiraPlugin/JiraDestination.cs
+++ b/GreenshotJiraPlugin/JiraDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/JiraDetails.cs b/GreenshotJiraPlugin/JiraDetails.cs
index 61f746f81..67bbc0f61 100644
--- a/GreenshotJiraPlugin/JiraDetails.cs
+++ b/GreenshotJiraPlugin/JiraDetails.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub: https://github.com/greenshot
diff --git a/GreenshotJiraPlugin/JiraEventArgs.cs b/GreenshotJiraPlugin/JiraEventArgs.cs
index b1c4887d6..eb60e5fcf 100644
--- a/GreenshotJiraPlugin/JiraEventArgs.cs
+++ b/GreenshotJiraPlugin/JiraEventArgs.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub: https://github.com/greenshot
diff --git a/GreenshotJiraPlugin/JiraEventTypes.cs b/GreenshotJiraPlugin/JiraEventTypes.cs
index 36866e863..37e62cab1 100644
--- a/GreenshotJiraPlugin/JiraEventTypes.cs
+++ b/GreenshotJiraPlugin/JiraEventTypes.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub: https://github.com/greenshot
diff --git a/GreenshotJiraPlugin/JiraMonitor.cs b/GreenshotJiraPlugin/JiraMonitor.cs
index 4fcb083a7..65b73924a 100644
--- a/GreenshotJiraPlugin/JiraMonitor.cs
+++ b/GreenshotJiraPlugin/JiraMonitor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub: https://github.com/greenshot
diff --git a/GreenshotJiraPlugin/JiraPlugin.cs b/GreenshotJiraPlugin/JiraPlugin.cs
index 9448829c2..d58978328 100644
--- a/GreenshotJiraPlugin/JiraPlugin.cs
+++ b/GreenshotJiraPlugin/JiraPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/LanguageKeys.cs b/GreenshotJiraPlugin/LanguageKeys.cs
index 94f162dd6..d881be575 100644
--- a/GreenshotJiraPlugin/LanguageKeys.cs
+++ b/GreenshotJiraPlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotJiraPlugin/Log4NetLogger.cs b/GreenshotJiraPlugin/Log4NetLogger.cs
index 186e7e75b..d7b8d601c 100644
--- a/GreenshotJiraPlugin/Log4NetLogger.cs
+++ b/GreenshotJiraPlugin/Log4NetLogger.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/COMWrapper.cs b/GreenshotOCRCommand/COMWrapper.cs
index e64824f8d..fd26cfeb9 100644
--- a/GreenshotOCRCommand/COMWrapper.cs
+++ b/GreenshotOCRCommand/COMWrapper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,6 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
using System;
using System.Diagnostics;
using System.Reflection;
@@ -26,7 +27,7 @@ using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Proxies;
-namespace Greenshot.Interop {
+namespace GreenshotOCRCommand {
///
/// Wraps a late-bound COM server.
///
diff --git a/GreenshotOCRCommand/ComProgIdAttribute.cs b/GreenshotOCRCommand/ComProgIdAttribute.cs
index ae581d031..936ea34f9 100644
--- a/GreenshotOCRCommand/ComProgIdAttribute.cs
+++ b/GreenshotOCRCommand/ComProgIdAttribute.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -21,7 +21,7 @@
using System;
-namespace Greenshot.Interop {
+namespace GreenshotOCRCommand {
///
/// An attribute to specifiy the ProgID of the COM class to create. (As suggested by Kristen Wegner)
///
diff --git a/GreenshotOCRCommand/Modi/CompressionLevel.cs b/GreenshotOCRCommand/Modi/CompressionLevel.cs
index 87a3a2e7c..0cb9a4bc7 100644
--- a/GreenshotOCRCommand/Modi/CompressionLevel.cs
+++ b/GreenshotOCRCommand/Modi/CompressionLevel.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/FileFormat.cs b/GreenshotOCRCommand/Modi/FileFormat.cs
index bd738cdaf..42c86a104 100644
--- a/GreenshotOCRCommand/Modi/FileFormat.cs
+++ b/GreenshotOCRCommand/Modi/FileFormat.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,7 +19,7 @@
* along with this program. If not, see .
*/
-namespace GreenshotOCR
+namespace GreenshotOCRCommand.Modi
{
public enum FileFormat {
miFILE_FORMAT_DEFAULTVALUE = -1,
diff --git a/GreenshotOCRCommand/Modi/ICommon.cs b/GreenshotOCRCommand/Modi/ICommon.cs
index a8995c826..433fcd121 100644
--- a/GreenshotOCRCommand/Modi/ICommon.cs
+++ b/GreenshotOCRCommand/Modi/ICommon.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IDispatch.cs b/GreenshotOCRCommand/Modi/IDispatch.cs
index f2d5e9ed0..623feef72 100644
--- a/GreenshotOCRCommand/Modi/IDispatch.cs
+++ b/GreenshotOCRCommand/Modi/IDispatch.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IDocument.cs b/GreenshotOCRCommand/Modi/IDocument.cs
index 6b1d44e99..cd9098f61 100644
--- a/GreenshotOCRCommand/Modi/IDocument.cs
+++ b/GreenshotOCRCommand/Modi/IDocument.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,9 +19,6 @@
* along with this program. If not, see .
*/
-using Greenshot.Interop;
-using GreenshotOCR;
-
namespace GreenshotOCRCommand.Modi {
///
/// The MODI Document object represents an ordered collection of document images saved as a single file.
diff --git a/GreenshotOCRCommand/Modi/IImage.cs b/GreenshotOCRCommand/Modi/IImage.cs
index f53ffa089..5329c4eaf 100644
--- a/GreenshotOCRCommand/Modi/IImage.cs
+++ b/GreenshotOCRCommand/Modi/IImage.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IImages.cs b/GreenshotOCRCommand/Modi/IImages.cs
index 7eeeb6401..3c429c7d0 100644
--- a/GreenshotOCRCommand/Modi/IImages.cs
+++ b/GreenshotOCRCommand/Modi/IImages.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/ILayout.cs b/GreenshotOCRCommand/Modi/ILayout.cs
index 2b8d8beb5..351724150 100644
--- a/GreenshotOCRCommand/Modi/ILayout.cs
+++ b/GreenshotOCRCommand/Modi/ILayout.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IMiRect.cs b/GreenshotOCRCommand/Modi/IMiRect.cs
index 060a838f9..3474a5e86 100644
--- a/GreenshotOCRCommand/Modi/IMiRect.cs
+++ b/GreenshotOCRCommand/Modi/IMiRect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IMiRects.cs b/GreenshotOCRCommand/Modi/IMiRects.cs
index b9ae99af5..e322b577d 100644
--- a/GreenshotOCRCommand/Modi/IMiRects.cs
+++ b/GreenshotOCRCommand/Modi/IMiRects.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IWord.cs b/GreenshotOCRCommand/Modi/IWord.cs
index f905c2617..6ba1a425b 100644
--- a/GreenshotOCRCommand/Modi/IWord.cs
+++ b/GreenshotOCRCommand/Modi/IWord.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/IWords.cs b/GreenshotOCRCommand/Modi/IWords.cs
index 41acfb0fe..4e7243cdd 100644
--- a/GreenshotOCRCommand/Modi/IWords.cs
+++ b/GreenshotOCRCommand/Modi/IWords.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Modi/ModiLanguage.cs b/GreenshotOCRCommand/Modi/ModiLanguage.cs
index 89e49ed5b..b1af9f30c 100644
--- a/GreenshotOCRCommand/Modi/ModiLanguage.cs
+++ b/GreenshotOCRCommand/Modi/ModiLanguage.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRCommand/Program.cs b/GreenshotOCRCommand/Program.cs
index 2bd757e8d..7f1c81b09 100644
--- a/GreenshotOCRCommand/Program.cs
+++ b/GreenshotOCRCommand/Program.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -23,7 +23,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
-using Greenshot.Interop;
using GreenshotOCRCommand.Modi;
namespace GreenshotOCRCommand {
diff --git a/GreenshotOCRCommand/Properties/AssemblyInfo.cs b/GreenshotOCRCommand/Properties/AssemblyInfo.cs
index ff10a1848..85d71c24d 100644
--- a/GreenshotOCRCommand/Properties/AssemblyInfo.cs
+++ b/GreenshotOCRCommand/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/ModiLanguage.cs b/GreenshotOCRPlugin/ModiLanguage.cs
index ae531b6ab..3edd95d0f 100644
--- a/GreenshotOCRPlugin/ModiLanguage.cs
+++ b/GreenshotOCRPlugin/ModiLanguage.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/OCRConfiguration.cs b/GreenshotOCRPlugin/OCRConfiguration.cs
index bee6c33e1..8eebcc91e 100644
--- a/GreenshotOCRPlugin/OCRConfiguration.cs
+++ b/GreenshotOCRPlugin/OCRConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/OCRDestination.cs b/GreenshotOCRPlugin/OCRDestination.cs
index ee2dd975d..5c774bfc1 100644
--- a/GreenshotOCRPlugin/OCRDestination.cs
+++ b/GreenshotOCRPlugin/OCRDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/OCRForm.cs b/GreenshotOCRPlugin/OCRForm.cs
index 299bd990a..5ba8fda84 100644
--- a/GreenshotOCRPlugin/OCRForm.cs
+++ b/GreenshotOCRPlugin/OCRForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/OCRPlugin.cs b/GreenshotOCRPlugin/OCRPlugin.cs
index 96ad08135..677e22342 100644
--- a/GreenshotOCRPlugin/OCRPlugin.cs
+++ b/GreenshotOCRPlugin/OCRPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/SettingsForm.Designer.cs b/GreenshotOCRPlugin/SettingsForm.Designer.cs
index 5b0dfe877..a9e57749a 100644
--- a/GreenshotOCRPlugin/SettingsForm.Designer.cs
+++ b/GreenshotOCRPlugin/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOCRPlugin/SettingsForm.cs b/GreenshotOCRPlugin/SettingsForm.cs
index b2c88629d..94805f941 100644
--- a/GreenshotOCRPlugin/SettingsForm.cs
+++ b/GreenshotOCRPlugin/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -26,13 +26,13 @@ namespace GreenshotOCRPlugin {
/// Description of SettingsForm.
///
public partial class SettingsForm : OcrForm {
- private readonly OCRConfiguration config;
+ private readonly OCRConfiguration _config;
public SettingsForm(string [] languages, OCRConfiguration config) {
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
- this.config = config;
+ this._config = config;
InitializeComponent();
AcceptButton = buttonOK;
CancelButton = buttonCancel;
@@ -58,7 +58,7 @@ namespace GreenshotOCRPlugin {
private void ButtonOKClick(object sender, EventArgs e) {
string selectedString = (string) comboBox_languages.SelectedItem;
if (selectedString != null) {
- config.Language = selectedString.ToUpper();
+ _config.Language = selectedString.ToUpper();
}
}
}
diff --git a/GreenshotOfficePlugin/Destinations/ExcelDestination.cs b/GreenshotOfficePlugin/Destinations/ExcelDestination.cs
index 93ea6ed85..dfd0ed7e0 100644
--- a/GreenshotOfficePlugin/Destinations/ExcelDestination.cs
+++ b/GreenshotOfficePlugin/Destinations/ExcelDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/Destinations/OneNoteDestination.cs b/GreenshotOfficePlugin/Destinations/OneNoteDestination.cs
index 77d3c0a03..df833c6a1 100644
--- a/GreenshotOfficePlugin/Destinations/OneNoteDestination.cs
+++ b/GreenshotOfficePlugin/Destinations/OneNoteDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/Destinations/OutlookDestination.cs b/GreenshotOfficePlugin/Destinations/OutlookDestination.cs
index ac88ec091..65ccf03be 100644
--- a/GreenshotOfficePlugin/Destinations/OutlookDestination.cs
+++ b/GreenshotOfficePlugin/Destinations/OutlookDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/Destinations/PowerpointDestination.cs b/GreenshotOfficePlugin/Destinations/PowerpointDestination.cs
index 1000fb7d9..3e3700e4c 100644
--- a/GreenshotOfficePlugin/Destinations/PowerpointDestination.cs
+++ b/GreenshotOfficePlugin/Destinations/PowerpointDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/Destinations/WordDestination.cs b/GreenshotOfficePlugin/Destinations/WordDestination.cs
index a8a80893d..a7d630d1d 100644
--- a/GreenshotOfficePlugin/Destinations/WordDestination.cs
+++ b/GreenshotOfficePlugin/Destinations/WordDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeConfiguration.cs b/GreenshotOfficePlugin/OfficeConfiguration.cs
index 3971e5cd4..7064715fd 100644
--- a/GreenshotOfficePlugin/OfficeConfiguration.cs
+++ b/GreenshotOfficePlugin/OfficeConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteNotebook.cs b/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteNotebook.cs
index 75c2f23d3..40bf4255e 100644
--- a/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteNotebook.cs
+++ b/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteNotebook.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/Entities/OneNotePage.cs b/GreenshotOfficePlugin/OfficeExport/Entities/OneNotePage.cs
index b9fd2c4a9..6bc67084b 100644
--- a/GreenshotOfficePlugin/OfficeExport/Entities/OneNotePage.cs
+++ b/GreenshotOfficePlugin/OfficeExport/Entities/OneNotePage.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteSection.cs b/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteSection.cs
index e02908c11..00eafb5ae 100644
--- a/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteSection.cs
+++ b/GreenshotOfficePlugin/OfficeExport/Entities/OneNoteSection.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/ExcelExporter.cs b/GreenshotOfficePlugin/OfficeExport/ExcelExporter.cs
index 71939296e..ad92c6743 100644
--- a/GreenshotOfficePlugin/OfficeExport/ExcelExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/ExcelExporter.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
index 611594334..5b0fcb8c5 100644
--- a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs b/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs
index a0d0f54e0..40306ecf7 100644
--- a/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs b/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs
index a9d5632c4..7f87ff111 100644
--- a/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/PowerpointExporter.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeExport/WordExporter.cs b/GreenshotOfficePlugin/OfficeExport/WordExporter.cs
index 0132d86b0..b44f08161 100644
--- a/GreenshotOfficePlugin/OfficeExport/WordExporter.cs
+++ b/GreenshotOfficePlugin/OfficeExport/WordExporter.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub: https://github.com/greenshot
diff --git a/GreenshotOfficePlugin/OfficeInterop/EmailFormat.cs b/GreenshotOfficePlugin/OfficeInterop/EmailFormat.cs
index 98969057f..2de5cbf71 100644
--- a/GreenshotOfficePlugin/OfficeInterop/EmailFormat.cs
+++ b/GreenshotOfficePlugin/OfficeInterop/EmailFormat.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficeInterop/OfficeVersions.cs b/GreenshotOfficePlugin/OfficeInterop/OfficeVersions.cs
index 6d8a992ba..03943e4db 100644
--- a/GreenshotOfficePlugin/OfficeInterop/OfficeVersions.cs
+++ b/GreenshotOfficePlugin/OfficeInterop/OfficeVersions.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/OfficePlugin.cs b/GreenshotOfficePlugin/OfficePlugin.cs
index 4e01b38fa..6a17626a8 100644
--- a/GreenshotOfficePlugin/OfficePlugin.cs
+++ b/GreenshotOfficePlugin/OfficePlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotOfficePlugin/Properties/AssemblyInfo.cs b/GreenshotOfficePlugin/Properties/AssemblyInfo.cs
index 50c27e0ec..3e2563a07 100644
--- a/GreenshotOfficePlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotOfficePlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/Forms/PhotobucketForm.cs b/GreenshotPhotobucketPlugin/Forms/PhotobucketForm.cs
index 21c90f7d1..70971ca61 100644
--- a/GreenshotPhotobucketPlugin/Forms/PhotobucketForm.cs
+++ b/GreenshotPhotobucketPlugin/Forms/PhotobucketForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,7 +19,7 @@
* along with this program. If not, see .
*/
-namespace GreenshotPhotobucketPlugin {
+namespace GreenshotPhotobucketPlugin.Forms {
///
/// This class is needed for design-time resolving of the language files
///
diff --git a/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs b/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs
index a7dcc758e..4a0486dd1 100644
--- a/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotPhotobucketPlugin {
+namespace GreenshotPhotobucketPlugin.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs b/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs
index 056d696a9..1d221b2a9 100644
--- a/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs
+++ b/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,7 +19,7 @@
* along with this program. If not, see .
*/
-namespace GreenshotPhotobucketPlugin {
+namespace GreenshotPhotobucketPlugin.Forms {
///
/// Description of PasswordRequestForm.
///
diff --git a/GreenshotPhotobucketPlugin/GreenshotPhotobucketPlugin.Credentials.template b/GreenshotPhotobucketPlugin/GreenshotPhotobucketPlugin.Credentials.template
index 20a033ea8..312099888 100644
--- a/GreenshotPhotobucketPlugin/GreenshotPhotobucketPlugin.Credentials.template
+++ b/GreenshotPhotobucketPlugin/GreenshotPhotobucketPlugin.Credentials.template
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/LanguageKeys.cs b/GreenshotPhotobucketPlugin/LanguageKeys.cs
index 5c077c4ad..b94f13722 100644
--- a/GreenshotPhotobucketPlugin/LanguageKeys.cs
+++ b/GreenshotPhotobucketPlugin/LanguageKeys.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/PhotobucketConfiguration.cs b/GreenshotPhotobucketPlugin/PhotobucketConfiguration.cs
index 7b00ad768..8136adbff 100644
--- a/GreenshotPhotobucketPlugin/PhotobucketConfiguration.cs
+++ b/GreenshotPhotobucketPlugin/PhotobucketConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -19,6 +19,7 @@
* along with this program. If not, see .
*/
using System.Windows.Forms;
+using GreenshotPhotobucketPlugin.Forms;
using GreenshotPlugin.Controls;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
diff --git a/GreenshotPhotobucketPlugin/PhotobucketDestination.cs b/GreenshotPhotobucketPlugin/PhotobucketDestination.cs
index 9a22488bf..96dc98926 100644
--- a/GreenshotPhotobucketPlugin/PhotobucketDestination.cs
+++ b/GreenshotPhotobucketPlugin/PhotobucketDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/PhotobucketInfo.cs b/GreenshotPhotobucketPlugin/PhotobucketInfo.cs
index cf0fd0c54..b9759eb3c 100644
--- a/GreenshotPhotobucketPlugin/PhotobucketInfo.cs
+++ b/GreenshotPhotobucketPlugin/PhotobucketInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/PhotobucketPlugin.cs b/GreenshotPhotobucketPlugin/PhotobucketPlugin.cs
index 971ccc0e6..a9670a6a2 100644
--- a/GreenshotPhotobucketPlugin/PhotobucketPlugin.cs
+++ b/GreenshotPhotobucketPlugin/PhotobucketPlugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/PhotobucketUtils.cs b/GreenshotPhotobucketPlugin/PhotobucketUtils.cs
index b681edac7..4226e57c4 100644
--- a/GreenshotPhotobucketPlugin/PhotobucketUtils.cs
+++ b/GreenshotPhotobucketPlugin/PhotobucketUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs b/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs
index 9aa4884a4..99952c5c0 100644
--- a/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPicasaPlugin/Forms/PicasaForm.cs b/GreenshotPicasaPlugin/Forms/PicasaForm.cs
index a1d093e30..cea5a2f35 100644
--- a/GreenshotPicasaPlugin/Forms/PicasaForm.cs
+++ b/GreenshotPicasaPlugin/Forms/PicasaForm.cs
@@ -16,10 +16,11 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
- */
-using GreenshotPlugin.Controls;
-
-namespace GreenshotPicasaPlugin {
- public class PicasaForm : GreenshotForm {
- }
-}
+ */
+
+using GreenshotPlugin.Controls;
+
+namespace GreenshotPicasaPlugin.Forms {
+ public class PicasaForm : GreenshotForm {
+ }
+}
diff --git a/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs b/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
index 0d2447e41..38555c179 100644
--- a/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
+++ b/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-namespace GreenshotPicasaPlugin {
+namespace GreenshotPicasaPlugin.Forms {
partial class SettingsForm {
///
/// Designer variable used to keep track of non-visual components.
diff --git a/GreenshotPicasaPlugin/Forms/SettingsForm.cs b/GreenshotPicasaPlugin/Forms/SettingsForm.cs
index 734559762..a6691a424 100644
--- a/GreenshotPicasaPlugin/Forms/SettingsForm.cs
+++ b/GreenshotPicasaPlugin/Forms/SettingsForm.cs
@@ -18,7 +18,7 @@
* along with this program. If not, see .
*/
-namespace GreenshotPicasaPlugin {
+namespace GreenshotPicasaPlugin.Forms {
///
/// Description of PasswordRequestForm.
///
diff --git a/GreenshotPicasaPlugin/GreenshotPicasaPlugin.Credentials.template b/GreenshotPicasaPlugin/GreenshotPicasaPlugin.Credentials.template
index 5cb7a2aac..47172f2d4 100644
--- a/GreenshotPicasaPlugin/GreenshotPicasaPlugin.Credentials.template
+++ b/GreenshotPicasaPlugin/GreenshotPicasaPlugin.Credentials.template
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPicasaPlugin/PicasaConfiguration.cs b/GreenshotPicasaPlugin/PicasaConfiguration.cs
index a1372f598..202929459 100644
--- a/GreenshotPicasaPlugin/PicasaConfiguration.cs
+++ b/GreenshotPicasaPlugin/PicasaConfiguration.cs
@@ -20,6 +20,7 @@
using System.Windows.Forms;
using GreenshotPlugin.Core;
using System;
+using GreenshotPicasaPlugin.Forms;
using GreenshotPlugin.IniFile;
namespace GreenshotPicasaPlugin {
diff --git a/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs b/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs
index 35cc458c3..3a917ddcd 100644
--- a/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs
+++ b/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom, Francis Noel
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/AnimatingForm.cs b/GreenshotPlugin/Controls/AnimatingForm.cs
index 91f4762f0..55d6e1865 100644
--- a/GreenshotPlugin/Controls/AnimatingForm.cs
+++ b/GreenshotPlugin/Controls/AnimatingForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/BackgroundForm.Designer.cs b/GreenshotPlugin/Controls/BackgroundForm.Designer.cs
index fbfee52bd..cafbb6e18 100644
--- a/GreenshotPlugin/Controls/BackgroundForm.Designer.cs
+++ b/GreenshotPlugin/Controls/BackgroundForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/BackgroundForm.cs b/GreenshotPlugin/Controls/BackgroundForm.cs
index 5d90c6920..5ce737185 100644
--- a/GreenshotPlugin/Controls/BackgroundForm.cs
+++ b/GreenshotPlugin/Controls/BackgroundForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/ExtendedWebBrowser.cs b/GreenshotPlugin/Controls/ExtendedWebBrowser.cs
index 78a793866..c18a2071f 100644
--- a/GreenshotPlugin/Controls/ExtendedWebBrowser.cs
+++ b/GreenshotPlugin/Controls/ExtendedWebBrowser.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/FormWithoutActivation.cs b/GreenshotPlugin/Controls/FormWithoutActivation.cs
index 3fd3f8e30..4491bbf2b 100644
--- a/GreenshotPlugin/Controls/FormWithoutActivation.cs
+++ b/GreenshotPlugin/Controls/FormWithoutActivation.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotButton.cs b/GreenshotPlugin/Controls/GreenshotButton.cs
index 2cbee2916..16288ce43 100644
--- a/GreenshotPlugin/Controls/GreenshotButton.cs
+++ b/GreenshotPlugin/Controls/GreenshotButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotCheckBox.cs b/GreenshotPlugin/Controls/GreenshotCheckBox.cs
index 53300d5d7..e7e3483ab 100644
--- a/GreenshotPlugin/Controls/GreenshotCheckBox.cs
+++ b/GreenshotPlugin/Controls/GreenshotCheckBox.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotColumnSorter.cs b/GreenshotPlugin/Controls/GreenshotColumnSorter.cs
index 379d53883..efad46cd0 100644
--- a/GreenshotPlugin/Controls/GreenshotColumnSorter.cs
+++ b/GreenshotPlugin/Controls/GreenshotColumnSorter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotComboBox.cs b/GreenshotPlugin/Controls/GreenshotComboBox.cs
index e5245b5a2..c9f0b3d9e 100644
--- a/GreenshotPlugin/Controls/GreenshotComboBox.cs
+++ b/GreenshotPlugin/Controls/GreenshotComboBox.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotForm.cs b/GreenshotPlugin/Controls/GreenshotForm.cs
index 1f6ce5675..1375c0b7a 100644
--- a/GreenshotPlugin/Controls/GreenshotForm.cs
+++ b/GreenshotPlugin/Controls/GreenshotForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotGroupBox.cs b/GreenshotPlugin/Controls/GreenshotGroupBox.cs
index b61f64436..954027948 100644
--- a/GreenshotPlugin/Controls/GreenshotGroupBox.cs
+++ b/GreenshotPlugin/Controls/GreenshotGroupBox.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotLabel.cs b/GreenshotPlugin/Controls/GreenshotLabel.cs
index fa10711e0..887bdb2ea 100644
--- a/GreenshotPlugin/Controls/GreenshotLabel.cs
+++ b/GreenshotPlugin/Controls/GreenshotLabel.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotRadioButton.cs b/GreenshotPlugin/Controls/GreenshotRadioButton.cs
index 7ef3d41d7..ca68fb284 100644
--- a/GreenshotPlugin/Controls/GreenshotRadioButton.cs
+++ b/GreenshotPlugin/Controls/GreenshotRadioButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotTabPage.cs b/GreenshotPlugin/Controls/GreenshotTabPage.cs
index 189c9173a..6941a861a 100644
--- a/GreenshotPlugin/Controls/GreenshotTabPage.cs
+++ b/GreenshotPlugin/Controls/GreenshotTabPage.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotTextBox.cs b/GreenshotPlugin/Controls/GreenshotTextBox.cs
index e370c0b35..a4f743f25 100644
--- a/GreenshotPlugin/Controls/GreenshotTextBox.cs
+++ b/GreenshotPlugin/Controls/GreenshotTextBox.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotToolDropDownButton.cs b/GreenshotPlugin/Controls/GreenshotToolDropDownButton.cs
index 585334a5f..e9a9edb7d 100644
--- a/GreenshotPlugin/Controls/GreenshotToolDropDownButton.cs
+++ b/GreenshotPlugin/Controls/GreenshotToolDropDownButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotToolStripButton.cs b/GreenshotPlugin/Controls/GreenshotToolStripButton.cs
index c5ffff3b0..06bf59597 100644
--- a/GreenshotPlugin/Controls/GreenshotToolStripButton.cs
+++ b/GreenshotPlugin/Controls/GreenshotToolStripButton.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotToolStripLabel.cs b/GreenshotPlugin/Controls/GreenshotToolStripLabel.cs
index 2c7051c21..5bee42167 100644
--- a/GreenshotPlugin/Controls/GreenshotToolStripLabel.cs
+++ b/GreenshotPlugin/Controls/GreenshotToolStripLabel.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/GreenshotToolStripMenuItem.cs b/GreenshotPlugin/Controls/GreenshotToolStripMenuItem.cs
index 1adca374d..8547b65c8 100644
--- a/GreenshotPlugin/Controls/GreenshotToolStripMenuItem.cs
+++ b/GreenshotPlugin/Controls/GreenshotToolStripMenuItem.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/HotkeyControl.cs b/GreenshotPlugin/Controls/HotkeyControl.cs
index 89f0889b2..6e6557522 100644
--- a/GreenshotPlugin/Controls/HotkeyControl.cs
+++ b/GreenshotPlugin/Controls/HotkeyControl.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/IGreenshotConfigBindable.cs b/GreenshotPlugin/Controls/IGreenshotConfigBindable.cs
index 7211ed402..d20ed1cd1 100644
--- a/GreenshotPlugin/Controls/IGreenshotConfigBindable.cs
+++ b/GreenshotPlugin/Controls/IGreenshotConfigBindable.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/IGreenshotLanguageBindable.cs b/GreenshotPlugin/Controls/IGreenshotLanguageBindable.cs
index 7b5775a22..06237dcc9 100644
--- a/GreenshotPlugin/Controls/IGreenshotLanguageBindable.cs
+++ b/GreenshotPlugin/Controls/IGreenshotLanguageBindable.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs b/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs
index e8ca384a2..abf92060c 100644
--- a/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs
+++ b/GreenshotPlugin/Controls/OAuthLoginForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/OAuthLoginForm.cs b/GreenshotPlugin/Controls/OAuthLoginForm.cs
index 2b834d128..e2b036f97 100644
--- a/GreenshotPlugin/Controls/OAuthLoginForm.cs
+++ b/GreenshotPlugin/Controls/OAuthLoginForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs b/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs
index c308b4b07..a3ab2832b 100644
--- a/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs
+++ b/GreenshotPlugin/Controls/PleaseWaitForm.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/PleaseWaitForm.cs b/GreenshotPlugin/Controls/PleaseWaitForm.cs
index 995b0c17c..fecd1afc9 100644
--- a/GreenshotPlugin/Controls/PleaseWaitForm.cs
+++ b/GreenshotPlugin/Controls/PleaseWaitForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/QualityDialog.Designer.cs b/GreenshotPlugin/Controls/QualityDialog.Designer.cs
index eaf714d06..5f1c03fce 100644
--- a/GreenshotPlugin/Controls/QualityDialog.Designer.cs
+++ b/GreenshotPlugin/Controls/QualityDialog.Designer.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/QualityDialog.cs b/GreenshotPlugin/Controls/QualityDialog.cs
index ada7ad476..0e196f387 100644
--- a/GreenshotPlugin/Controls/QualityDialog.cs
+++ b/GreenshotPlugin/Controls/QualityDialog.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/SaveImageFileDialog.cs b/GreenshotPlugin/Controls/SaveImageFileDialog.cs
index 45f98118f..0245dc05e 100644
--- a/GreenshotPlugin/Controls/SaveImageFileDialog.cs
+++ b/GreenshotPlugin/Controls/SaveImageFileDialog.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Controls/ThumbnailForm.cs b/GreenshotPlugin/Controls/ThumbnailForm.cs
index 3e8256cf3..3578b63d3 100644
--- a/GreenshotPlugin/Controls/ThumbnailForm.cs
+++ b/GreenshotPlugin/Controls/ThumbnailForm.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/AbstractDestination.cs b/GreenshotPlugin/Core/AbstractDestination.cs
index ba9878c23..7efa0f570 100644
--- a/GreenshotPlugin/Core/AbstractDestination.cs
+++ b/GreenshotPlugin/Core/AbstractDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/AbstractProcessor.cs b/GreenshotPlugin/Core/AbstractProcessor.cs
index 1dce1ab16..f93a405fb 100644
--- a/GreenshotPlugin/Core/AbstractProcessor.cs
+++ b/GreenshotPlugin/Core/AbstractProcessor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/AccessibleHelper.cs b/GreenshotPlugin/Core/AccessibleHelper.cs
index f6d5770b3..871892e64 100644
--- a/GreenshotPlugin/Core/AccessibleHelper.cs
+++ b/GreenshotPlugin/Core/AccessibleHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -40,7 +40,7 @@ namespace GreenshotPlugin.Core {
return num;
}
[DllImport("oleacc.dll")]
- private static extern int AccessibleObjectFromWindow(IntPtr hwnd, uint id, ref Guid iid, [In, Out, MarshalAs(UnmanagedType.IUnknown)] ref object ppvObject);
+ private static extern int AccessibleObjectFromWindow(IntPtr hWnd, uint id, ref Guid iid, [In, Out, MarshalAs(UnmanagedType.IUnknown)] ref object ppvObject);
[DllImport("oleacc.dll")]
private static extern int AccessibleChildren(IAccessible paccContainer, int iChildStart, int cChildren, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] object[] rgvarChildren, out int pcObtained);
diff --git a/GreenshotPlugin/Core/AnimationHelpers.cs b/GreenshotPlugin/Core/AnimationHelpers.cs
index cd96b890a..9ed92eef6 100644
--- a/GreenshotPlugin/Core/AnimationHelpers.cs
+++ b/GreenshotPlugin/Core/AnimationHelpers.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/BinaryStructHelper.cs b/GreenshotPlugin/Core/BinaryStructHelper.cs
index b8584c572..1d8af4700 100644
--- a/GreenshotPlugin/Core/BinaryStructHelper.cs
+++ b/GreenshotPlugin/Core/BinaryStructHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/Cache.cs b/GreenshotPlugin/Core/Cache.cs
index ae41d7d60..857f5327a 100644
--- a/GreenshotPlugin/Core/Cache.cs
+++ b/GreenshotPlugin/Core/Cache.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/CaptureHandler.cs b/GreenshotPlugin/Core/CaptureHandler.cs
index 4f832004a..7716b56c1 100644
--- a/GreenshotPlugin/Core/CaptureHandler.cs
+++ b/GreenshotPlugin/Core/CaptureHandler.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/ClipboardHelper.cs b/GreenshotPlugin/Core/ClipboardHelper.cs
index 3933ccf71..046838716 100644
--- a/GreenshotPlugin/Core/ClipboardHelper.cs
+++ b/GreenshotPlugin/Core/ClipboardHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs
index 1db95dd93..15f408480 100644
--- a/GreenshotPlugin/Core/CoreConfiguration.cs
+++ b/GreenshotPlugin/Core/CoreConfiguration.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/CredentialsHelper.cs b/GreenshotPlugin/Core/CredentialsHelper.cs
index 7732c4f46..95426e934 100644
--- a/GreenshotPlugin/Core/CredentialsHelper.cs
+++ b/GreenshotPlugin/Core/CredentialsHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -382,7 +382,7 @@ namespace GreenshotPlugin.Core {
/// The System.Windows.Forms.IWin32Window the dialog will display in front of.
private CredUi.INFO GetInfo(IWin32Window owner) {
CredUi.INFO info = new CredUi.INFO();
- if (owner != null) info.hwndParent = owner.Handle;
+ if (owner != null) info.hWndParent = owner.Handle;
info.pszCaptionText = Caption;
info.pszMessageText = Message;
if (Banner != null) {
@@ -498,7 +498,7 @@ namespace GreenshotPlugin.Core {
///
public struct INFO {
public int cbSize;
- public IntPtr hwndParent;
+ public IntPtr hWndParent;
[MarshalAs(UnmanagedType.LPWStr)] public string pszMessageText;
[MarshalAs(UnmanagedType.LPWStr)] public string pszCaptionText;
public IntPtr hbmBanner;
diff --git a/GreenshotPlugin/Core/DisplayKeyAttribute.cs b/GreenshotPlugin/Core/DisplayKeyAttribute.cs
index d055b91ad..8f1b81b68 100644
--- a/GreenshotPlugin/Core/DisplayKeyAttribute.cs
+++ b/GreenshotPlugin/Core/DisplayKeyAttribute.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/EnumExtensions.cs b/GreenshotPlugin/Core/EnumExtensions.cs
index 39aff04f1..1bda1071f 100644
--- a/GreenshotPlugin/Core/EnumExtensions.cs
+++ b/GreenshotPlugin/Core/EnumExtensions.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/Enums/HResult.cs b/GreenshotPlugin/Core/Enums/HResult.cs
index 55f61aaf0..40bb62a7b 100644
--- a/GreenshotPlugin/Core/Enums/HResult.cs
+++ b/GreenshotPlugin/Core/Enums/HResult.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/EventDelay.cs b/GreenshotPlugin/Core/EventDelay.cs
index 84860f7ae..c00306309 100644
--- a/GreenshotPlugin/Core/EventDelay.cs
+++ b/GreenshotPlugin/Core/EventDelay.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/FastBitmap.cs b/GreenshotPlugin/Core/FastBitmap.cs
index a76045a42..0e52e04fb 100644
--- a/GreenshotPlugin/Core/FastBitmap.cs
+++ b/GreenshotPlugin/Core/FastBitmap.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/FilenameHelper.cs b/GreenshotPlugin/Core/FilenameHelper.cs
index 23fdbd9b4..5edf92afb 100644
--- a/GreenshotPlugin/Core/FilenameHelper.cs
+++ b/GreenshotPlugin/Core/FilenameHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/GreenshotResources.cs b/GreenshotPlugin/Core/GreenshotResources.cs
index 8f59dee91..6b80acf3f 100644
--- a/GreenshotPlugin/Core/GreenshotResources.cs
+++ b/GreenshotPlugin/Core/GreenshotResources.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/HResultExtensions.cs b/GreenshotPlugin/Core/HResultExtensions.cs
index bc0f8e4ba..a85bd7600 100644
--- a/GreenshotPlugin/Core/HResultExtensions.cs
+++ b/GreenshotPlugin/Core/HResultExtensions.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/IEHelper.cs b/GreenshotPlugin/Core/IEHelper.cs
index 703d42a15..2a85958fc 100644
--- a/GreenshotPlugin/Core/IEHelper.cs
+++ b/GreenshotPlugin/Core/IEHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/IImage.cs b/GreenshotPlugin/Core/IImage.cs
index 53fa64bd3..710a0d04d 100644
--- a/GreenshotPlugin/Core/IImage.cs
+++ b/GreenshotPlugin/Core/IImage.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/ImageHelper.cs b/GreenshotPlugin/Core/ImageHelper.cs
index e5e5a1b60..b80879141 100644
--- a/GreenshotPlugin/Core/ImageHelper.cs
+++ b/GreenshotPlugin/Core/ImageHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/ImageOutput.cs b/GreenshotPlugin/Core/ImageOutput.cs
index 97c8f8cf3..4388f2b59 100644
--- a/GreenshotPlugin/Core/ImageOutput.cs
+++ b/GreenshotPlugin/Core/ImageOutput.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/InterfaceUtils.cs b/GreenshotPlugin/Core/InterfaceUtils.cs
index b592474f0..89c8079f0 100644
--- a/GreenshotPlugin/Core/InterfaceUtils.cs
+++ b/GreenshotPlugin/Core/InterfaceUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/Language.cs b/GreenshotPlugin/Core/Language.cs
index 31200d8ff..f5f2caa26 100644
--- a/GreenshotPlugin/Core/Language.cs
+++ b/GreenshotPlugin/Core/Language.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/LogHelper.cs b/GreenshotPlugin/Core/LogHelper.cs
index 1b5d8764b..c0849537e 100644
--- a/GreenshotPlugin/Core/LogHelper.cs
+++ b/GreenshotPlugin/Core/LogHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/NetworkHelper.cs b/GreenshotPlugin/Core/NetworkHelper.cs
index c3fcff8ab..c07208710 100644
--- a/GreenshotPlugin/Core/NetworkHelper.cs
+++ b/GreenshotPlugin/Core/NetworkHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/OAuthHelper.cs b/GreenshotPlugin/Core/OAuthHelper.cs
index ce059189f..5370697b6 100644
--- a/GreenshotPlugin/Core/OAuthHelper.cs
+++ b/GreenshotPlugin/Core/OAuthHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/ObjectExtensions.cs b/GreenshotPlugin/Core/ObjectExtensions.cs
index 491d24238..a948242b0 100644
--- a/GreenshotPlugin/Core/ObjectExtensions.cs
+++ b/GreenshotPlugin/Core/ObjectExtensions.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/PluginUtils.cs b/GreenshotPlugin/Core/PluginUtils.cs
index d7c1ce08b..0db458a3f 100644
--- a/GreenshotPlugin/Core/PluginUtils.cs
+++ b/GreenshotPlugin/Core/PluginUtils.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/QuantizerHelper.cs b/GreenshotPlugin/Core/QuantizerHelper.cs
index 0946b4385..f5396810f 100644
--- a/GreenshotPlugin/Core/QuantizerHelper.cs
+++ b/GreenshotPlugin/Core/QuantizerHelper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/StringExtensions.cs b/GreenshotPlugin/Core/StringExtensions.cs
index 6676500af..e7ee8cf81 100644
--- a/GreenshotPlugin/Core/StringExtensions.cs
+++ b/GreenshotPlugin/Core/StringExtensions.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/SvgImage.cs b/GreenshotPlugin/Core/SvgImage.cs
index 64111a7eb..d777d30ad 100644
--- a/GreenshotPlugin/Core/SvgImage.cs
+++ b/GreenshotPlugin/Core/SvgImage.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/WindowCapture.cs b/GreenshotPlugin/Core/WindowCapture.cs
index 7d2c9e4d3..828851444 100644
--- a/GreenshotPlugin/Core/WindowCapture.cs
+++ b/GreenshotPlugin/Core/WindowCapture.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -305,7 +305,7 @@ namespace GreenshotPlugin.Core {
}
// get a .NET image object for it
- // A suggestion for the "A generic error occurred in GDI+." E_FAIL/080004005 error is to re-try...
+ // A suggestion for the "A generic error occurred in GDI+." E_FAIL/0�80004005 error is to re-try...
bool success = false;
ExternalException exception = null;
for (int i = 0; i < 3; i++) {
diff --git a/GreenshotPlugin/Core/WindowDetails.cs b/GreenshotPlugin/Core/WindowDetails.cs
index 4fff18959..0410d79c7 100644
--- a/GreenshotPlugin/Core/WindowDetails.cs
+++ b/GreenshotPlugin/Core/WindowDetails.cs
@@ -196,33 +196,33 @@ namespace GreenshotPlugin.Core
///
/// Get the icon for a hWnd
///
- ///
+ ///
///
- private static Icon GetAppIcon(IntPtr hwnd) {
+ private static Icon GetAppIcon(IntPtr hWnd) {
IntPtr iconSmall = IntPtr.Zero;
IntPtr iconBig = new IntPtr(1);
IntPtr iconSmall2 = new IntPtr(2);
IntPtr iconHandle;
if (Conf.UseLargeIcons) {
- iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, iconBig, IntPtr.Zero);
+ iconHandle = User32.SendMessage(hWnd, (int)WindowsMessages.WM_GETICON, iconBig, IntPtr.Zero);
if (iconHandle == IntPtr.Zero) {
- iconHandle = User32.GetClassLongWrapper(hwnd, (int)ClassLongIndex.GCL_HICON);
+ iconHandle = User32.GetClassLongWrapper(hWnd, (int)ClassLongIndex.GCL_HICON);
}
} else {
- iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, iconSmall2, IntPtr.Zero);
+ iconHandle = User32.SendMessage(hWnd, (int)WindowsMessages.WM_GETICON, iconSmall2, IntPtr.Zero);
}
if (iconHandle == IntPtr.Zero) {
- iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, iconSmall, IntPtr.Zero);
+ iconHandle = User32.SendMessage(hWnd, (int)WindowsMessages.WM_GETICON, iconSmall, IntPtr.Zero);
}
if (iconHandle == IntPtr.Zero) {
- iconHandle = User32.GetClassLongWrapper(hwnd, (int)ClassLongIndex.GCL_HICONSM);
+ iconHandle = User32.GetClassLongWrapper(hWnd, (int)ClassLongIndex.GCL_HICONSM);
}
if (iconHandle == IntPtr.Zero) {
- iconHandle = User32.SendMessage(hwnd, (int)WindowsMessages.WM_GETICON, iconBig, IntPtr.Zero);
+ iconHandle = User32.SendMessage(hWnd, (int)WindowsMessages.WM_GETICON, iconBig, IntPtr.Zero);
}
if (iconHandle == IntPtr.Zero) {
- iconHandle = User32.GetClassLongWrapper(hwnd, (int)ClassLongIndex.GCL_HICON);
+ iconHandle = User32.GetClassLongWrapper(hWnd, (int)ClassLongIndex.GCL_HICON);
}
if (iconHandle == IntPtr.Zero) {
diff --git a/GreenshotPlugin/Core/WindowsEnumerator.cs b/GreenshotPlugin/Core/WindowsEnumerator.cs
index 2df7fce54..3bc1095a5 100644
--- a/GreenshotPlugin/Core/WindowsEnumerator.cs
+++ b/GreenshotPlugin/Core/WindowsEnumerator.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Core/WmInputLangChangeRequestFilter.cs b/GreenshotPlugin/Core/WmInputLangChangeRequestFilter.cs
index 755854616..e48062f57 100644
--- a/GreenshotPlugin/Core/WmInputLangChangeRequestFilter.cs
+++ b/GreenshotPlugin/Core/WmInputLangChangeRequestFilter.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/AdjustEffect.cs b/GreenshotPlugin/Effects/AdjustEffect.cs
index a3a542c53..a01dd16d2 100644
--- a/GreenshotPlugin/Effects/AdjustEffect.cs
+++ b/GreenshotPlugin/Effects/AdjustEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/BorderEffect.cs b/GreenshotPlugin/Effects/BorderEffect.cs
index 32822f4a9..4e45f920c 100644
--- a/GreenshotPlugin/Effects/BorderEffect.cs
+++ b/GreenshotPlugin/Effects/BorderEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/DropShadowEffect.cs b/GreenshotPlugin/Effects/DropShadowEffect.cs
index b1f23bf1e..5f05b889f 100644
--- a/GreenshotPlugin/Effects/DropShadowEffect.cs
+++ b/GreenshotPlugin/Effects/DropShadowEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/GrayscaleEffect.cs b/GreenshotPlugin/Effects/GrayscaleEffect.cs
index 8210be695..7c8e5c7b2 100644
--- a/GreenshotPlugin/Effects/GrayscaleEffect.cs
+++ b/GreenshotPlugin/Effects/GrayscaleEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/IEffect.cs b/GreenshotPlugin/Effects/IEffect.cs
index aee145ea4..1beeb1aa5 100644
--- a/GreenshotPlugin/Effects/IEffect.cs
+++ b/GreenshotPlugin/Effects/IEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/InvertEffect.cs b/GreenshotPlugin/Effects/InvertEffect.cs
index 64f44c4c6..f890f5dd5 100644
--- a/GreenshotPlugin/Effects/InvertEffect.cs
+++ b/GreenshotPlugin/Effects/InvertEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/MonochromeEffect.cs b/GreenshotPlugin/Effects/MonochromeEffect.cs
index 4ee358cba..8e0b69c7b 100644
--- a/GreenshotPlugin/Effects/MonochromeEffect.cs
+++ b/GreenshotPlugin/Effects/MonochromeEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/ReduceColorsEffect.cs b/GreenshotPlugin/Effects/ReduceColorsEffect.cs
index c82b10e71..a432850b6 100644
--- a/GreenshotPlugin/Effects/ReduceColorsEffect.cs
+++ b/GreenshotPlugin/Effects/ReduceColorsEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/ResizeCanvasEffect.cs b/GreenshotPlugin/Effects/ResizeCanvasEffect.cs
index 750dc41ea..67bbf6e7d 100644
--- a/GreenshotPlugin/Effects/ResizeCanvasEffect.cs
+++ b/GreenshotPlugin/Effects/ResizeCanvasEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/ResizeEffect.cs b/GreenshotPlugin/Effects/ResizeEffect.cs
index 528d1a0dc..38f997f71 100644
--- a/GreenshotPlugin/Effects/ResizeEffect.cs
+++ b/GreenshotPlugin/Effects/ResizeEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/RotateEffect.cs b/GreenshotPlugin/Effects/RotateEffect.cs
index dedab9a34..772a41a6a 100644
--- a/GreenshotPlugin/Effects/RotateEffect.cs
+++ b/GreenshotPlugin/Effects/RotateEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Effects/TornEdgeEffect.cs b/GreenshotPlugin/Effects/TornEdgeEffect.cs
index dbd5f5120..682435132 100644
--- a/GreenshotPlugin/Effects/TornEdgeEffect.cs
+++ b/GreenshotPlugin/Effects/TornEdgeEffect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Hooking/WindowsEventHook.cs b/GreenshotPlugin/Hooking/WindowsEventHook.cs
index 2b838008b..8893bd57e 100644
--- a/GreenshotPlugin/Hooking/WindowsEventHook.cs
+++ b/GreenshotPlugin/Hooking/WindowsEventHook.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -39,12 +39,12 @@ namespace GreenshotPlugin.Hooking
/// Used with Register hook
///
///
- ///
+ ///
///
///
///
///
- public delegate void WinEventHandler(WinEvent eventType, IntPtr hwnd, EventObjects idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
+ public delegate void WinEventHandler(WinEvent eventType, IntPtr hWnd, EventObjects idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
///
/// Create a WindowsEventHook object
@@ -65,12 +65,12 @@ namespace GreenshotPlugin.Hooking
///
///
///
- ///
+ ///
///
///
///
///
- private delegate void WinEventDelegate(IntPtr hWinEventHook, WinEvent eventType, IntPtr hwnd, EventObjects idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
+ private delegate void WinEventDelegate(IntPtr hWinEventHook, WinEvent eventType, IntPtr hWnd, EventObjects idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
private readonly IDictionary _winEventHandlers = new Dictionary();
diff --git a/GreenshotPlugin/Hooking/WindowsOpenCloseMonitor.cs b/GreenshotPlugin/Hooking/WindowsOpenCloseMonitor.cs
index e62cdf89a..97634b92f 100644
--- a/GreenshotPlugin/Hooking/WindowsOpenCloseMonitor.cs
+++ b/GreenshotPlugin/Hooking/WindowsOpenCloseMonitor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Hooking/WindowsTitleMonitor.cs b/GreenshotPlugin/Hooking/WindowsTitleMonitor.cs
index 2fbda9dce..c35dbf2e8 100644
--- a/GreenshotPlugin/Hooking/WindowsTitleMonitor.cs
+++ b/GreenshotPlugin/Hooking/WindowsTitleMonitor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLBodyElement.cs b/GreenshotPlugin/IEInterop/IHTMLBodyElement.cs
index fb344f237..0890cc628 100644
--- a/GreenshotPlugin/IEInterop/IHTMLBodyElement.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLBodyElement.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLCurrentStyle.cs b/GreenshotPlugin/IEInterop/IHTMLCurrentStyle.cs
index 4de30a205..cfbab4b3f 100644
--- a/GreenshotPlugin/IEInterop/IHTMLCurrentStyle.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLCurrentStyle.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLDocument.cs b/GreenshotPlugin/IEInterop/IHTMLDocument.cs
index 79f2b622a..5faeda803 100644
--- a/GreenshotPlugin/IEInterop/IHTMLDocument.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLDocument.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLDocument2.cs b/GreenshotPlugin/IEInterop/IHTMLDocument2.cs
index 2e0ab177f..6ca8d9c9b 100644
--- a/GreenshotPlugin/IEInterop/IHTMLDocument2.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLDocument2.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLDocument3.cs b/GreenshotPlugin/IEInterop/IHTMLDocument3.cs
index 74af3d8c9..e12344f62 100644
--- a/GreenshotPlugin/IEInterop/IHTMLDocument3.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLDocument3.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLDocument4.cs b/GreenshotPlugin/IEInterop/IHTMLDocument4.cs
index 308243eff..57e4a32ee 100644
--- a/GreenshotPlugin/IEInterop/IHTMLDocument4.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLDocument4.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLDocument5.cs b/GreenshotPlugin/IEInterop/IHTMLDocument5.cs
index 574edbefe..60b5aab8c 100644
--- a/GreenshotPlugin/IEInterop/IHTMLDocument5.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLDocument5.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLElement.cs b/GreenshotPlugin/IEInterop/IHTMLElement.cs
index a7fcae716..aa0a54b79 100644
--- a/GreenshotPlugin/IEInterop/IHTMLElement.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLElement.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLElement2.cs b/GreenshotPlugin/IEInterop/IHTMLElement2.cs
index a6d258b06..44ace8d30 100644
--- a/GreenshotPlugin/IEInterop/IHTMLElement2.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLElement2.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLElementCollection.cs b/GreenshotPlugin/IEInterop/IHTMLElementCollection.cs
index 3901edc30..d9a7211dc 100644
--- a/GreenshotPlugin/IEInterop/IHTMLElementCollection.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLElementCollection.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLFrameBase.cs b/GreenshotPlugin/IEInterop/IHTMLFrameBase.cs
index ac26be320..d9566c0cc 100644
--- a/GreenshotPlugin/IEInterop/IHTMLFrameBase.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLFrameBase.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLFramesCollection2.cs b/GreenshotPlugin/IEInterop/IHTMLFramesCollection2.cs
index 731ff60a4..2c651db26 100644
--- a/GreenshotPlugin/IEInterop/IHTMLFramesCollection2.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLFramesCollection2.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLRect.cs b/GreenshotPlugin/IEInterop/IHTMLRect.cs
index ae398299b..c2d6d375a 100644
--- a/GreenshotPlugin/IEInterop/IHTMLRect.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLRect.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLScreen.cs b/GreenshotPlugin/IEInterop/IHTMLScreen.cs
index 97f87124e..f65b77da7 100644
--- a/GreenshotPlugin/IEInterop/IHTMLScreen.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLScreen.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLScreen2.cs b/GreenshotPlugin/IEInterop/IHTMLScreen2.cs
index e3c6fb5d2..3814da360 100644
--- a/GreenshotPlugin/IEInterop/IHTMLScreen2.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLScreen2.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLSelectionObject.cs b/GreenshotPlugin/IEInterop/IHTMLSelectionObject.cs
index ac618945b..fadb35ca0 100644
--- a/GreenshotPlugin/IEInterop/IHTMLSelectionObject.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLSelectionObject.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLStyle.cs b/GreenshotPlugin/IEInterop/IHTMLStyle.cs
index 5541f0541..43d10fa84 100644
--- a/GreenshotPlugin/IEInterop/IHTMLStyle.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLStyle.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLTxtRange.cs b/GreenshotPlugin/IEInterop/IHTMLTxtRange.cs
index c45d4313b..f9ff8d690 100644
--- a/GreenshotPlugin/IEInterop/IHTMLTxtRange.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLTxtRange.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLWindow2.cs b/GreenshotPlugin/IEInterop/IHTMLWindow2.cs
index c8846dfb4..02b2a756c 100644
--- a/GreenshotPlugin/IEInterop/IHTMLWindow2.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLWindow2.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLWindow3.cs b/GreenshotPlugin/IEInterop/IHTMLWindow3.cs
index 6363d31ac..f3c872f5a 100644
--- a/GreenshotPlugin/IEInterop/IHTMLWindow3.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLWindow3.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IHTMLWindow4.cs b/GreenshotPlugin/IEInterop/IHTMLWindow4.cs
index b267901a7..8643c88c1 100644
--- a/GreenshotPlugin/IEInterop/IHTMLWindow4.cs
+++ b/GreenshotPlugin/IEInterop/IHTMLWindow4.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IEInterop/IWebBrowser2.cs b/GreenshotPlugin/IEInterop/IWebBrowser2.cs
index 42b6c3fc1..36b06d6e4 100644
--- a/GreenshotPlugin/IEInterop/IWebBrowser2.cs
+++ b/GreenshotPlugin/IEInterop/IWebBrowser2.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IniFile/IniAttributes.cs b/GreenshotPlugin/IniFile/IniAttributes.cs
index 611661586..0b23b679e 100644
--- a/GreenshotPlugin/IniFile/IniAttributes.cs
+++ b/GreenshotPlugin/IniFile/IniAttributes.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IniFile/IniConfig.cs b/GreenshotPlugin/IniFile/IniConfig.cs
index 7981712f6..5ea33f6df 100644
--- a/GreenshotPlugin/IniFile/IniConfig.cs
+++ b/GreenshotPlugin/IniFile/IniConfig.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IniFile/IniReader.cs b/GreenshotPlugin/IniFile/IniReader.cs
index 6e399ab5e..641b5414e 100644
--- a/GreenshotPlugin/IniFile/IniReader.cs
+++ b/GreenshotPlugin/IniFile/IniReader.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IniFile/IniSection.cs b/GreenshotPlugin/IniFile/IniSection.cs
index 5022f5ab0..c8c9221dd 100644
--- a/GreenshotPlugin/IniFile/IniSection.cs
+++ b/GreenshotPlugin/IniFile/IniSection.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/IniFile/IniValue.cs b/GreenshotPlugin/IniFile/IniValue.cs
index 9a39ce995..de04c0b44 100644
--- a/GreenshotPlugin/IniFile/IniValue.cs
+++ b/GreenshotPlugin/IniFile/IniValue.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/CaptureMode.cs b/GreenshotPlugin/Interfaces/CaptureMode.cs
index a0aef56c4..8c9c9e268 100644
--- a/GreenshotPlugin/Interfaces/CaptureMode.cs
+++ b/GreenshotPlugin/Interfaces/CaptureMode.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs b/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
index 5d729376c..db5319e2c 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Adorners/IAdorner.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
diff --git a/GreenshotPlugin/Interfaces/Drawing/Container.cs b/GreenshotPlugin/Interfaces/Drawing/Container.cs
index 0044a0bb0..a97ff5ffc 100644
--- a/GreenshotPlugin/Interfaces/Drawing/Container.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/Container.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Drawing/IField.cs b/GreenshotPlugin/Interfaces/Drawing/IField.cs
index 54d083a3a..97c13c2d9 100644
--- a/GreenshotPlugin/Interfaces/Drawing/IField.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/IField.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Drawing/IFieldholder.cs b/GreenshotPlugin/Interfaces/Drawing/IFieldholder.cs
index fc10175c2..c67303ffb 100644
--- a/GreenshotPlugin/Interfaces/Drawing/IFieldholder.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/IFieldholder.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Drawing/IMemento.cs b/GreenshotPlugin/Interfaces/Drawing/IMemento.cs
index 40e1ab61c..bb64237fe 100644
--- a/GreenshotPlugin/Interfaces/Drawing/IMemento.cs
+++ b/GreenshotPlugin/Interfaces/Drawing/IMemento.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/DrawingModes.cs b/GreenshotPlugin/Interfaces/DrawingModes.cs
index 9ada15b2d..e6d25a359 100644
--- a/GreenshotPlugin/Interfaces/DrawingModes.cs
+++ b/GreenshotPlugin/Interfaces/DrawingModes.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Forms/ImageEditor.cs b/GreenshotPlugin/Interfaces/Forms/ImageEditor.cs
index b499231a3..bd42b9aca 100644
--- a/GreenshotPlugin/Interfaces/Forms/ImageEditor.cs
+++ b/GreenshotPlugin/Interfaces/Forms/ImageEditor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/ICapture.cs b/GreenshotPlugin/Interfaces/ICapture.cs
index 231af2d08..24f67a9f0 100644
--- a/GreenshotPlugin/Interfaces/ICapture.cs
+++ b/GreenshotPlugin/Interfaces/ICapture.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/ICaptureDetails.cs b/GreenshotPlugin/Interfaces/ICaptureDetails.cs
index 055cd598b..c475283da 100644
--- a/GreenshotPlugin/Interfaces/ICaptureDetails.cs
+++ b/GreenshotPlugin/Interfaces/ICaptureDetails.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/ICaptureElement.cs b/GreenshotPlugin/Interfaces/ICaptureElement.cs
index 36c0bbc72..fc84c1536 100644
--- a/GreenshotPlugin/Interfaces/ICaptureElement.cs
+++ b/GreenshotPlugin/Interfaces/ICaptureElement.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/IDestination.cs b/GreenshotPlugin/Interfaces/IDestination.cs
index e4f39d796..8bfb72ac3 100644
--- a/GreenshotPlugin/Interfaces/IDestination.cs
+++ b/GreenshotPlugin/Interfaces/IDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/INotificationService.cs b/GreenshotPlugin/Interfaces/INotificationService.cs
index c1342b5e4..43980a8e2 100644
--- a/GreenshotPlugin/Interfaces/INotificationService.cs
+++ b/GreenshotPlugin/Interfaces/INotificationService.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/IProcessor.cs b/GreenshotPlugin/Interfaces/IProcessor.cs
index 927933abf..d5f4c0ba8 100644
--- a/GreenshotPlugin/Interfaces/IProcessor.cs
+++ b/GreenshotPlugin/Interfaces/IProcessor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/ISurface.cs b/GreenshotPlugin/Interfaces/ISurface.cs
index 068ab0f29..d6928b87e 100644
--- a/GreenshotPlugin/Interfaces/ISurface.cs
+++ b/GreenshotPlugin/Interfaces/ISurface.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Ocr/IOcrProvider.cs b/GreenshotPlugin/Interfaces/Ocr/IOcrProvider.cs
index 451ffb403..4a9fd657e 100644
--- a/GreenshotPlugin/Interfaces/Ocr/IOcrProvider.cs
+++ b/GreenshotPlugin/Interfaces/Ocr/IOcrProvider.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/Plugin/PluginAttribute.cs b/GreenshotPlugin/Interfaces/Plugin/PluginAttribute.cs
index 73fa60653..c44d7f120 100644
--- a/GreenshotPlugin/Interfaces/Plugin/PluginAttribute.cs
+++ b/GreenshotPlugin/Interfaces/Plugin/PluginAttribute.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/ScreenCaptureMode.cs b/GreenshotPlugin/Interfaces/ScreenCaptureMode.cs
index 0a03f74c8..bdcc14d81 100644
--- a/GreenshotPlugin/Interfaces/ScreenCaptureMode.cs
+++ b/GreenshotPlugin/Interfaces/ScreenCaptureMode.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventArgs.cs b/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventArgs.cs
index cfc4f040a..b30a68828 100644
--- a/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventArgs.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventArgs.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventHandler.cs b/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventHandler.cs
index bada273cf..5582f77d3 100644
--- a/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventHandler.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceDrawingModeEventHandler.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceElementEventArgs.cs b/GreenshotPlugin/Interfaces/SurfaceElementEventArgs.cs
index 296ca1a08..f53241447 100644
--- a/GreenshotPlugin/Interfaces/SurfaceElementEventArgs.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceElementEventArgs.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceElementEventHandler.cs b/GreenshotPlugin/Interfaces/SurfaceElementEventHandler.cs
index 1ae41be70..eef546545 100644
--- a/GreenshotPlugin/Interfaces/SurfaceElementEventHandler.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceElementEventHandler.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceMessageEventArgs.cs b/GreenshotPlugin/Interfaces/SurfaceMessageEventArgs.cs
index 44273f810..2908e9ffb 100644
--- a/GreenshotPlugin/Interfaces/SurfaceMessageEventArgs.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceMessageEventArgs.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceMessageEventHandler.cs b/GreenshotPlugin/Interfaces/SurfaceMessageEventHandler.cs
index 72ffa01a0..1bea86b37 100644
--- a/GreenshotPlugin/Interfaces/SurfaceMessageEventHandler.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceMessageEventHandler.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceMessageTyp.cs b/GreenshotPlugin/Interfaces/SurfaceMessageTyp.cs
index abae0d6f1..84efe7609 100644
--- a/GreenshotPlugin/Interfaces/SurfaceMessageTyp.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceMessageTyp.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/SurfaceSizeChangeEventHandler.cs b/GreenshotPlugin/Interfaces/SurfaceSizeChangeEventHandler.cs
index 5f2dd1245..f9fe667f3 100644
--- a/GreenshotPlugin/Interfaces/SurfaceSizeChangeEventHandler.cs
+++ b/GreenshotPlugin/Interfaces/SurfaceSizeChangeEventHandler.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interfaces/VerticalAlignment.cs b/GreenshotPlugin/Interfaces/VerticalAlignment.cs
index 59e77f35e..f5cb71f0f 100644
--- a/GreenshotPlugin/Interfaces/VerticalAlignment.cs
+++ b/GreenshotPlugin/Interfaces/VerticalAlignment.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/COMWrapper.cs b/GreenshotPlugin/Interop/COMWrapper.cs
index 0a0dee361..f31392124 100644
--- a/GreenshotPlugin/Interop/COMWrapper.cs
+++ b/GreenshotPlugin/Interop/COMWrapper.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/ComProgIdAttribute.cs b/GreenshotPlugin/Interop/ComProgIdAttribute.cs
index 9138c1ce6..ed88fa7be 100644
--- a/GreenshotPlugin/Interop/ComProgIdAttribute.cs
+++ b/GreenshotPlugin/Interop/ComProgIdAttribute.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/IAppVisibility.cs b/GreenshotPlugin/Interop/IAppVisibility.cs
index ed6ceaf1f..2feb78b76 100644
--- a/GreenshotPlugin/Interop/IAppVisibility.cs
+++ b/GreenshotPlugin/Interop/IAppVisibility.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/IDispatch.cs b/GreenshotPlugin/Interop/IDispatch.cs
index eb9f4c918..b4391c621 100644
--- a/GreenshotPlugin/Interop/IDispatch.cs
+++ b/GreenshotPlugin/Interop/IDispatch.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/IOleCommandTarget.cs b/GreenshotPlugin/Interop/IOleCommandTarget.cs
index 3bab1bb5c..6207d196e 100644
--- a/GreenshotPlugin/Interop/IOleCommandTarget.cs
+++ b/GreenshotPlugin/Interop/IOleCommandTarget.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/IOleWindow.cs b/GreenshotPlugin/Interop/IOleWindow.cs
index 650bf6100..c5361dc0d 100644
--- a/GreenshotPlugin/Interop/IOleWindow.cs
+++ b/GreenshotPlugin/Interop/IOleWindow.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -27,7 +27,7 @@ namespace GreenshotPlugin.Interop {
// See: http://msdn.microsoft.com/en-us/library/ms680102%28v=vs.85%29.aspx
[ComImport, Guid("00000114-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IOleWindow {
- void GetWindow(out IntPtr phwnd);
+ void GetWindow(out IntPtr phWnd);
void ContextSensitiveHelp([In, MarshalAs(UnmanagedType.Bool)] bool fEnterMode);
}
}
diff --git a/GreenshotPlugin/Interop/IServiceProvider.cs b/GreenshotPlugin/Interop/IServiceProvider.cs
index ea6a7d437..d058f81c3 100644
--- a/GreenshotPlugin/Interop/IServiceProvider.cs
+++ b/GreenshotPlugin/Interop/IServiceProvider.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/Interop/IUnknown.cs b/GreenshotPlugin/Interop/IUnknown.cs
index 323bbafa3..bee0da243 100644
--- a/GreenshotPlugin/Interop/IUnknown.cs
+++ b/GreenshotPlugin/Interop/IUnknown.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/DWM.cs b/GreenshotPlugin/UnmanagedHelpers/DWM.cs
index 0a801fe57..bc17f3ab2 100644
--- a/GreenshotPlugin/UnmanagedHelpers/DWM.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/DWM.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/EnumWindowsProc.cs b/GreenshotPlugin/UnmanagedHelpers/EnumWindowsProc.cs
index fdec7c001..db0185e07 100644
--- a/GreenshotPlugin/UnmanagedHelpers/EnumWindowsProc.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/EnumWindowsProc.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Enums/DWMWINDOWATTRIBUTE.cs b/GreenshotPlugin/UnmanagedHelpers/Enums/DWMWINDOWATTRIBUTE.cs
index 0a8491806..e58bde613 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Enums/DWMWINDOWATTRIBUTE.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Enums/DWMWINDOWATTRIBUTE.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BB.cs b/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BB.cs
index c794d251c..1541e9143 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BB.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BB.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BLURBEHIND.cs b/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BLURBEHIND.cs
index f5629d9b4..29180d445 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BLURBEHIND.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_BLURBEHIND.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_THUMBNAIL_PROPERTIES.cs b/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_THUMBNAIL_PROPERTIES.cs
index 73dee612b..e442abfd5 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_THUMBNAIL_PROPERTIES.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Enums/DWM_THUMBNAIL_PROPERTIES.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Enums/SYSCOLOR.cs b/GreenshotPlugin/UnmanagedHelpers/Enums/SYSCOLOR.cs
index a6c535462..7d6802081 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Enums/SYSCOLOR.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Enums/SYSCOLOR.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Enums/WindowStyleFlags.cs b/GreenshotPlugin/UnmanagedHelpers/Enums/WindowStyleFlags.cs
index 5082f7e0b..b0045e3e5 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Enums/WindowStyleFlags.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Enums/WindowStyleFlags.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/GDI32.cs b/GreenshotPlugin/UnmanagedHelpers/GDI32.cs
index ed064e835..72f863e1a 100644
--- a/GreenshotPlugin/UnmanagedHelpers/GDI32.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/GDI32.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/GDIplus.cs b/GreenshotPlugin/UnmanagedHelpers/GDIplus.cs
index e0bbed83c..c8caf7700 100644
--- a/GreenshotPlugin/UnmanagedHelpers/GDIplus.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/GDIplus.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Kernel32.cs b/GreenshotPlugin/UnmanagedHelpers/Kernel32.cs
index c877db6dd..9734806a1 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Kernel32.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Kernel32.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/PsAPI.cs b/GreenshotPlugin/UnmanagedHelpers/PsAPI.cs
index 94e230a57..8b77f8d97 100644
--- a/GreenshotPlugin/UnmanagedHelpers/PsAPI.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/PsAPI.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Shell32.cs b/GreenshotPlugin/UnmanagedHelpers/Shell32.cs
index cd53741a0..e1b7ba0b0 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Shell32.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Shell32.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/Structs/SIZE.cs b/GreenshotPlugin/UnmanagedHelpers/Structs/SIZE.cs
index 2481a993c..be5d00bbc 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Structs/SIZE.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Structs/SIZE.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/User32.cs b/GreenshotPlugin/UnmanagedHelpers/User32.cs
index d6ae3acb1..8ba05f48f 100644
--- a/GreenshotPlugin/UnmanagedHelpers/User32.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/User32.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -109,7 +109,7 @@ namespace GreenshotPlugin.UnmanagedHelpers {
public static extern bool IsIconic(IntPtr hWnd);
[DllImport("user32", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static extern bool IsZoomed(IntPtr hwnd);
+ public static extern bool IsZoomed(IntPtr hWnd);
[DllImport("user32", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern int GetClassName (IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
[DllImport("user32", SetLastError = true)]
@@ -118,7 +118,7 @@ namespace GreenshotPlugin.UnmanagedHelpers {
public static extern IntPtr GetClassLongPtr(IntPtr hWnd, int nIndex);
[DllImport("user32", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static extern bool PrintWindow(IntPtr hwnd, IntPtr hDc, uint nFlags);
+ public static extern bool PrintWindow(IntPtr hWnd, IntPtr hDc, uint nFlags);
[DllImport("user32", CharSet=CharSet.Unicode, SetLastError=true)]
public static extern IntPtr SendMessage(IntPtr hWnd, uint wMsg, IntPtr wParam, IntPtr lParam);
[DllImport("user32", SetLastError = true)]
@@ -181,7 +181,7 @@ namespace GreenshotPlugin.UnmanagedHelpers {
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
- public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
+ public static extern IntPtr FindWindowEx(IntPtr hWndParent, IntPtr hWndChildAfter, string lpszClass, string lpszWindow);
/// uiFlags: 0 - Count of GDI objects
/// uiFlags: 1 - Count of USER objects
@@ -199,7 +199,7 @@ namespace GreenshotPlugin.UnmanagedHelpers {
[DllImport("user32", SetLastError = true)]
private static extern bool GetPhysicalCursorPos(out POINT cursorLocation);
[DllImport("user32", SetLastError=true)]
- public static extern int MapWindowPoints(IntPtr hwndFrom, IntPtr hwndTo, ref POINT lpPoints, [MarshalAs(UnmanagedType.U4)] int cPoints);
+ public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref POINT lpPoints, [MarshalAs(UnmanagedType.U4)] int cPoints);
[DllImport("user32", SetLastError = true)]
public static extern int GetSystemMetrics(SystemMetric index);
@@ -281,28 +281,28 @@ namespace GreenshotPlugin.UnmanagedHelpers {
///
/// Wrapper for the GetWindowLong which decides if the system is 64-bit or not and calls the right one.
///
- ///
+ ///
///
///
- public static long GetWindowLongWrapper(IntPtr hwnd, int nIndex) {
+ public static long GetWindowLongWrapper(IntPtr hWnd, int nIndex) {
if (IntPtr.Size == 8) {
- return GetWindowLongPtr(hwnd, nIndex).ToInt64();
+ return GetWindowLongPtr(hWnd, nIndex).ToInt64();
} else {
- return GetWindowLong(hwnd, nIndex);
+ return GetWindowLong(hWnd, nIndex);
}
}
///
/// Wrapper for the SetWindowLong which decides if the system is 64-bit or not and calls the right one.
///
- ///
+ ///
///
///
- public static void SetWindowLongWrapper(IntPtr hwnd, int nIndex, IntPtr styleFlags) {
+ public static void SetWindowLongWrapper(IntPtr hWnd, int nIndex, IntPtr styleFlags) {
if (IntPtr.Size == 8) {
- SetWindowLongPtr(hwnd, nIndex, styleFlags);
+ SetWindowLongPtr(hWnd, nIndex, styleFlags);
} else {
- SetWindowLong(hwnd, nIndex, styleFlags.ToInt32());
+ SetWindowLong(hWnd, nIndex, styleFlags.ToInt32());
}
}
diff --git a/GreenshotPlugin/UnmanagedHelpers/Win32.cs b/GreenshotPlugin/UnmanagedHelpers/Win32.cs
index 471f38049..77aaf2256 100644
--- a/GreenshotPlugin/UnmanagedHelpers/Win32.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/Win32.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotPlugin/UnmanagedHelpers/WinEventDelegate.cs b/GreenshotPlugin/UnmanagedHelpers/WinEventDelegate.cs
index e285418e7..551b75410 100644
--- a/GreenshotPlugin/UnmanagedHelpers/WinEventDelegate.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/WinEventDelegate.cs
@@ -8,10 +8,10 @@ namespace GreenshotPlugin.UnmanagedHelpers
///
///
///
- ///
+ ///
///
///
///
///
- public delegate void WinEventDelegate(IntPtr hWinEventHook, WinEvent eventType, IntPtr hwnd, EventObjects idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
+ public delegate void WinEventDelegate(IntPtr hWinEventHook, WinEvent eventType, IntPtr hWnd, EventObjects idObject, int idChild, uint dwEventThread, uint dwmsEventTime);
}
\ No newline at end of file
diff --git a/GreenshotPlugin/UnmanagedHelpers/WinMM.cs b/GreenshotPlugin/UnmanagedHelpers/WinMM.cs
index c2e46eaa7..71e8f6b7b 100644
--- a/GreenshotPlugin/UnmanagedHelpers/WinMM.cs
+++ b/GreenshotPlugin/UnmanagedHelpers/WinMM.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Destinations/Win10OcrDestination.cs b/GreenshotWin10Plugin/Destinations/Win10OcrDestination.cs
index 617e18763..3bcad532d 100644
--- a/GreenshotWin10Plugin/Destinations/Win10OcrDestination.cs
+++ b/GreenshotWin10Plugin/Destinations/Win10OcrDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Destinations/Win10ShareDestination.cs b/GreenshotWin10Plugin/Destinations/Win10ShareDestination.cs
index a01ae2216..fb52ef925 100644
--- a/GreenshotWin10Plugin/Destinations/Win10ShareDestination.cs
+++ b/GreenshotWin10Plugin/Destinations/Win10ShareDestination.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Internal/ShareInfo.cs b/GreenshotWin10Plugin/Internal/ShareInfo.cs
index 9b06d0d47..7516de371 100644
--- a/GreenshotWin10Plugin/Internal/ShareInfo.cs
+++ b/GreenshotWin10Plugin/Internal/ShareInfo.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs b/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
index a892e20f4..d47989c97 100644
--- a/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
+++ b/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Native/IDataTransferManagerInterOp.cs b/GreenshotWin10Plugin/Native/IDataTransferManagerInterOp.cs
index a4cef4ce4..14fb4c8eb 100644
--- a/GreenshotWin10Plugin/Native/IDataTransferManagerInterOp.cs
+++ b/GreenshotWin10Plugin/Native/IDataTransferManagerInterOp.cs
@@ -1,5 +1,5 @@
// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+// Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
//
// For more information see: http://getgreenshot.org/
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs b/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
index 6cab7b81d..341153eab 100644
--- a/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
+++ b/GreenshotWin10Plugin/Processors/Win10OcrProcessor.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/ToastNotificationService.cs b/GreenshotWin10Plugin/ToastNotificationService.cs
index 4b41f6f61..4e3f6bc03 100644
--- a/GreenshotWin10Plugin/ToastNotificationService.cs
+++ b/GreenshotWin10Plugin/ToastNotificationService.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
diff --git a/GreenshotWin10Plugin/Win10OcrProvider.cs b/GreenshotWin10Plugin/Win10OcrProvider.cs
index e8187b35e..81fd442e8 100644
--- a/GreenshotWin10Plugin/Win10OcrProvider.cs
+++ b/GreenshotWin10Plugin/Win10OcrProvider.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -115,7 +115,7 @@ namespace GreenshotWin10Plugin
///
/// OcrResult
/// OcrInformation
- private OcrInformation CreateOcrInformation(OcrResult ocrResult)
+ private static OcrInformation CreateOcrInformation(OcrResult ocrResult)
{
var result = new OcrInformation();
diff --git a/GreenshotWin10Plugin/Win10Plugin.cs b/GreenshotWin10Plugin/Win10Plugin.cs
index 53344f391..dc5190bbe 100644
--- a/GreenshotWin10Plugin/Win10Plugin.cs
+++ b/GreenshotWin10Plugin/Win10Plugin.cs
@@ -1,6 +1,6 @@
/*
* Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
@@ -39,17 +39,10 @@ namespace GreenshotWin10Plugin
public void Dispose()
{
- Dispose(true);
+ // Nothing to dispose
}
- private void Dispose(bool disposing)
- {
- if (disposing)
- {
- }
- }
-
- public void Configure()
+ public void Configure()
{
throw new NotImplementedException();
}
@@ -81,6 +74,7 @@ namespace GreenshotWin10Plugin
public void Shutdown()
{
+ // Nothing to shutdown
}
}
From 473de792ad9dba8670f8a1d3d92612c8b263c2f7 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Mon, 8 Mar 2021 22:32:29 +0100
Subject: [PATCH 077/224] BUG-2736: Fixed an issue where there Speechbubble
tail is not moved when it's transformed.
---
Greenshot/Drawing/SpeechbubbleContainer.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Greenshot/Drawing/SpeechbubbleContainer.cs b/Greenshot/Drawing/SpeechbubbleContainer.cs
index f585af7aa..ee00714e9 100644
--- a/Greenshot/Drawing/SpeechbubbleContainer.cs
+++ b/Greenshot/Drawing/SpeechbubbleContainer.cs
@@ -329,5 +329,17 @@ namespace Greenshot.Drawing
public override bool ClickableAt(int x, int y) {
return Contains(x,y);
}
+
+ ///
+ /// Additional to the Transform of the TextContainer the bubble tail coordinates also need to be moved
+ ///
+ /// Matrix
+ public override void Transform(Matrix matrix)
+ {
+ Point[] points = { TargetAdorner.Location };
+ matrix.TransformPoints(points);
+ TargetAdorner.Location = points[0];
+ base.Transform(matrix);
+ }
}
}
From 4c509618af68fad3f3dec3ed9f71bf060068f2d1 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Mon, 8 Mar 2021 23:19:34 +0100
Subject: [PATCH 078/224] In #283 it was reported that Greenshot doesn't draw
unicode icons correctly. this should solve it.
---
Greenshot/Drawing/TextContainer.cs | 55 ++++++++++++++++++++++++------
1 file changed, 44 insertions(+), 11 deletions(-)
diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs
index 4cc369dda..fda883f16 100644
--- a/Greenshot/Drawing/TextContainer.cs
+++ b/Greenshot/Drawing/TextContainer.cs
@@ -598,6 +598,41 @@ namespace Greenshot.Drawing
DrawText(graphics, rect, lineThickness, lineColor, drawShadow, _stringFormat, text, _font);
}
+ private static TextFormatFlags ConvertStringFormat(StringFormat stringFormat)
+ {
+ TextFormatFlags flags = TextFormatFlags.Default;
+ if (stringFormat == null)
+ {
+ return flags;
+ }
+ switch (stringFormat.LineAlignment)
+ {
+ case StringAlignment.Center:
+ flags |= TextFormatFlags.VerticalCenter;
+ break;
+ case StringAlignment.Far:
+ flags |= TextFormatFlags.Bottom;
+ break;
+ case StringAlignment.Near:
+ flags |= TextFormatFlags.Top;
+ break;
+ }
+ switch (stringFormat.Alignment)
+ {
+ case StringAlignment.Center:
+ flags |= TextFormatFlags.HorizontalCenter;
+ break;
+ case StringAlignment.Far:
+ flags |= TextFormatFlags.Right;
+ break;
+ case StringAlignment.Near:
+ flags |= TextFormatFlags.Left;
+ break;
+ }
+
+ return flags;
+ }
+
///
/// This method can be used from other containers
///
@@ -636,8 +671,8 @@ namespace Greenshot.Drawing
shadowRect.Inflate(-textOffset, -textOffset);
}
- using Brush fontBrush = new SolidBrush(Color.FromArgb(alpha, 100, 100, 100));
- graphics.DrawString(text, font, fontBrush, shadowRect, stringFormat);
+ TextRenderer.DrawText(graphics, text, font, shadowRect, Color.FromArgb(alpha, 100, 100, 100), ConvertStringFormat(stringFormat));
+
currentStep++;
alpha -= basealpha / steps;
}
@@ -647,16 +682,14 @@ namespace Greenshot.Drawing
{
drawingRectange.Inflate(-textOffset, -textOffset);
}
- using (Brush fontBrush = new SolidBrush(fontColor))
+
+ if (stringFormat != null)
{
- if (stringFormat != null)
- {
- graphics.DrawString(text, font, fontBrush, drawingRectange, stringFormat);
- }
- else
- {
- graphics.DrawString(text, font, fontBrush, drawingRectange);
- }
+ TextRenderer.DrawText(graphics, text, font, drawingRectange, fontColor, ConvertStringFormat(stringFormat));
+ }
+ else
+ {
+ TextRenderer.DrawText(graphics, text, font, drawingRectange, fontColor);
}
}
From da2db5eae801b961d681390fa88846db5845717a Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Tue, 9 Mar 2021 22:05:26 +0100
Subject: [PATCH 079/224] BUG-2739: Bugfix for error handling. [skip ci]
---
Greenshot/Forms/MainForm.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index 8ff531ca0..ce6bd92af 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -1393,7 +1393,7 @@ namespace Greenshot.Forms {
catch (Exception ex)
{
// Make sure we show what we tried to open in the exception
- ex.Data.Add("path", path);
+ ex.Data["path"] = path;
LOG.Warn("Couldn't open the path to the last exported file", ex);
// No reason to create a bug-form, we just display the error.
MessageBox.Show(this, ex.Message, "Opening " + path, MessageBoxButtons.OK, MessageBoxIcon.Error);
From eae8f173d0ab7c8b00e763acb3f7d0b588300e59 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Wed, 10 Mar 2021 13:55:21 +0100
Subject: [PATCH 080/224] Fixed a copyright statement [skip ci]
---
GreenshotWin10Plugin/Win10Configuration.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/GreenshotWin10Plugin/Win10Configuration.cs b/GreenshotWin10Plugin/Win10Configuration.cs
index 642296e94..ba3091909 100644
--- a/GreenshotWin10Plugin/Win10Configuration.cs
+++ b/GreenshotWin10Plugin/Win10Configuration.cs
@@ -1,8 +1,9 @@
/*
- * A Picasa Plugin for Greenshot
- * Copyright (C) 2011 Francis Noel
+ * Greenshot - a free and open source screenshot tool
+ * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
+ * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
From eadd1a7cac0a77854608350d4d17a00e3665625e Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Tue, 16 Mar 2021 15:56:03 +0100
Subject: [PATCH 081/224] BUG-2743: Made sure for the registry access that the
default value not requested in the registry access itself, but returned if
there is no value, as it will break the logic. Also there was a bug for 32
bit Windows versions.
---
GreenshotPlugin/Core/EmailConfigHelper.cs | 7 ++-
GreenshotPlugin/Core/RegistryKeyExtensions.cs | 49 +++++++++++++------
2 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/GreenshotPlugin/Core/EmailConfigHelper.cs b/GreenshotPlugin/Core/EmailConfigHelper.cs
index 354f02c33..9eb8a7bfe 100644
--- a/GreenshotPlugin/Core/EmailConfigHelper.cs
+++ b/GreenshotPlugin/Core/EmailConfigHelper.cs
@@ -28,16 +28,15 @@ namespace GreenshotPlugin.Core {
///
public static class EmailConfigHelper {
- public static string GetMapiClient() => Registry.LocalMachine.ReadKey64Or32(@"Clients\Mail");
+ public static string GetMapiClient() => RegistryHive.LocalMachine.ReadKey64Or32(@"Clients\Mail");
public static bool HasMapi()
{
- var value = Registry.LocalMachine.ReadKey64Or32(@"Microsoft\Windows Messaging Subsystem", "MAPI", "0");
+ var value = RegistryHive.LocalMachine.ReadKey64Or32(@"Microsoft\Windows Messaging Subsystem", "MAPI", "0");
return "1".Equals(value);
-
}
- public static string GetOutlookExePath() => Registry.LocalMachine.ReadKey64Or32(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
+ public static string GetOutlookExePath() => RegistryHive.LocalMachine.ReadKey64Or32(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
///
/// Check if Outlook is installed
diff --git a/GreenshotPlugin/Core/RegistryKeyExtensions.cs b/GreenshotPlugin/Core/RegistryKeyExtensions.cs
index 73fd66a47..bfdb63e10 100644
--- a/GreenshotPlugin/Core/RegistryKeyExtensions.cs
+++ b/GreenshotPlugin/Core/RegistryKeyExtensions.cs
@@ -32,36 +32,57 @@ namespace GreenshotPlugin.Core
///
/// Retrieve a registry value
///
- /// RegistryKey like Registry.LocalMachine
+ /// RegistryHive like RegistryHive.LocalMachine
/// string with the name of the key
/// string with the name of the value below the key, null will retrieve the default
/// string with the default value to return
/// string with the value
- public static string ReadKey64Or32(this RegistryKey registryKey, string keyName, string value = null, string defaultValue = null)
+ public static string ReadKey64Or32(this RegistryHive registryHive, string keyName, string value = null, string defaultValue = null)
{
string result = null;
value ??= string.Empty;
- if (Environment.Is64BitOperatingSystem)
+
+ using var registryKey32 = RegistryKey.OpenBaseKey(registryHive, RegistryView.Registry32);
+ // Logic for 32-bit Windows is just reading the key
+ if (!Environment.Is64BitOperatingSystem)
{
- using var key = registryKey.OpenSubKey($@"SOFTWARE\{keyName}", false);
-
+ using var key = registryKey32.OpenSubKey($@"SOFTWARE\{keyName}", false);
+
if (key != null)
{
- result = (string)key.GetValue(value, defaultValue);
+ result = (string)key.GetValue(value);
+ }
+ if (string.IsNullOrEmpty(result))
+ {
+ result = defaultValue;
+ }
+ return result;
+ }
+ using var registryKey64 = RegistryKey.OpenBaseKey(registryHive, RegistryView.Registry64);
+ // Logic for 64 bit Windows, is trying the key which is 64 bit
+ using (var key = registryKey64.OpenSubKey($@"SOFTWARE\{keyName}", false))
+ {
+ if (key != null)
+ {
+ result = (string)key.GetValue(value);
+ }
+ if (!string.IsNullOrEmpty(result)) return result;
+ }
+
+ // if there is no value use the wow6432node key which is 32 bit
+ using (var key = registryKey32.OpenSubKey($@"SOFTWARE\{keyName}", false))
+ {
+ if (key != null)
+ {
+ result = (string)key.GetValue(value);
}
}
if (string.IsNullOrEmpty(result))
{
- using var key = registryKey.OpenSubKey($@"SOFTWARE\wow6432node\{keyName}", false);
-
- if (key != null)
- {
- result = (string)key.GetValue(value, defaultValue);
- }
+ result = defaultValue;
}
-
return result;
}
}
-}
+}
\ No newline at end of file
From 3adf9e9a51bd5e485e50d0298f9d226db85c6173 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 18 Mar 2021 19:25:54 +0100
Subject: [PATCH 082/224] BUG-2743: Cleanup of MAPI & Outlook logic, removed
the check on "HKEY_LOCAL_MACHINE\SOFTWARE(\WOW6432Node)\Microsoft\Windows
Messaging Subsystem" with the MAPI value in favor of the
HKEY_LOCAL_MACHINE\SOFTWARE(\WOW6432Node)\Clients\Mail where the default
value contains the name, this should hopefully solve some issues.
---
Greenshot/Destinations/EmailDestination.cs | 16 +++---
Greenshot/Helpers/MailHelper.cs | 10 +---
.../Destinations/OutlookDestination.cs | 24 +++++++--
GreenshotPlugin/Core/EmailConfigHelper.cs | 54 -------------------
4 files changed, 28 insertions(+), 76 deletions(-)
delete mode 100644 GreenshotPlugin/Core/EmailConfigHelper.cs
diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs
index 0ba93ff59..326e27e9c 100644
--- a/Greenshot/Destinations/EmailDestination.cs
+++ b/Greenshot/Destinations/EmailDestination.cs
@@ -26,6 +26,7 @@ using Greenshot.Configuration;
using Greenshot.Helpers;
using GreenshotPlugin.Core;
using GreenshotPlugin.Interfaces;
+using Microsoft.Win32;
namespace Greenshot.Destinations {
///
@@ -39,12 +40,9 @@ namespace Greenshot.Destinations {
static EmailDestination() {
// Logic to decide what email implementation we use
- if (!EmailConfigHelper.HasMapi()) return;
-
- _isActiveFlag = false;
- _mapiClient = EmailConfigHelper.GetMapiClient();
+ _mapiClient = RegistryHive.LocalMachine.ReadKey64Or32(@"Clients\Mail");
if (!string.IsNullOrEmpty(_mapiClient)) {
- // Active as we have a mapi client, can be disabled later
+ // Active as we have a MAPI client, can be disabled later
_isActiveFlag = true;
}
}
@@ -66,11 +64,9 @@ namespace Greenshot.Destinations {
if (_isActiveFlag) {
// Disable if the office plugin is installed and the client is outlook
// TODO: Change this! It always creates an exception, as the plugin has not been loaded the type is not there :(
- Type outlookdestination = Type.GetType("GreenshotOfficePlugin.OutlookDestination,GreenshotOfficePlugin");
- if (outlookdestination != null) {
- if (_mapiClient.ToLower().Contains("microsoft outlook")) {
- _isActiveFlag = false;
- }
+ var outlookDestination = Type.GetType("GreenshotOfficePlugin.OutlookDestination,GreenshotOfficePlugin", false);
+ if (outlookDestination != null && _mapiClient.ToLower().Contains("microsoft outlook")) {
+ _isActiveFlag = false;
}
}
return base.IsActive && _isActiveFlag;
diff --git a/Greenshot/Helpers/MailHelper.cs b/Greenshot/Helpers/MailHelper.cs
index 5111ba2cf..3bc09b5f8 100644
--- a/Greenshot/Helpers/MailHelper.cs
+++ b/Greenshot/Helpers/MailHelper.cs
@@ -80,15 +80,7 @@ namespace Greenshot.Helpers {
// Store the list of currently active windows, so we can make sure we show the email window later!
var windowsBefore = WindowDetails.GetVisibleWindows();
- //bool isEmailSend = false;
- //if (EmailConfigHelper.HasOutlook() && (CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_HTML || CoreConfig.OutputEMailFormat == EmailFormat.OUTLOOK_TXT)) {
- // isEmailSend = OutlookExporter.ExportToOutlook(tmpFile, captureDetails);
- //}
- if (/*!isEmailSend &&*/ EmailConfigHelper.HasMapi()) {
- // Fallback to MAPI
- // Send the email
- SendImage(tmpFile, captureDetails.Title);
- }
+ SendImage(tmpFile, captureDetails.Title);
WindowDetails.ActiveNewerWindows(windowsBefore);
}
diff --git a/GreenshotOfficePlugin/Destinations/OutlookDestination.cs b/GreenshotOfficePlugin/Destinations/OutlookDestination.cs
index 65ccf03be..f08269c51 100644
--- a/GreenshotOfficePlugin/Destinations/OutlookDestination.cs
+++ b/GreenshotOfficePlugin/Destinations/OutlookDestination.cs
@@ -30,6 +30,7 @@ using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Plugin;
using Microsoft.Office.Interop.Outlook;
+using Microsoft.Win32;
namespace GreenshotOfficePlugin.Destinations {
///
@@ -47,23 +48,40 @@ namespace GreenshotOfficePlugin.Destinations {
private const string MapiClient = "Microsoft Outlook";
private readonly string _outlookInspectorCaption;
private readonly OlObjectClass _outlookInspectorType;
- private readonly OutlookEmailExporter _outlookEmailExporter = new OutlookEmailExporter();
+ private readonly OutlookEmailExporter _outlookEmailExporter = new();
static OutlookDestination() {
- if (EmailConfigHelper.HasOutlook()) {
+ if (HasOutlook()) {
IsActiveFlag = true;
}
ExePath = PluginUtils.GetExePath("OUTLOOK.EXE");
if (ExePath != null && File.Exists(ExePath)) {
WindowDetails.AddProcessToExcludeFromFreeze("outlook");
} else {
- ExePath = null;
+ ExePath = GetOutlookExePath();
}
if (ExePath == null) {
IsActiveFlag = false;
}
}
+
+ private static string GetOutlookExePath() => RegistryHive.LocalMachine.ReadKey64Or32(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
+
+ ///
+ /// Check if Outlook is installed
+ ///
+ /// Returns true if outlook is installed
+ private static bool HasOutlook()
+ {
+ string outlookPath = GetOutlookExePath();
+ if (outlookPath == null)
+ {
+ return false;
+ }
+ return File.Exists(outlookPath);
+ }
+
public OutlookDestination() {
}
diff --git a/GreenshotPlugin/Core/EmailConfigHelper.cs b/GreenshotPlugin/Core/EmailConfigHelper.cs
deleted file mode 100644
index 9eb8a7bfe..000000000
--- a/GreenshotPlugin/Core/EmailConfigHelper.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.IO;
-using Microsoft.Win32;
-
-namespace GreenshotPlugin.Core {
- ///
- /// Description of EmailConfigHelper.
- ///
- public static class EmailConfigHelper {
-
- public static string GetMapiClient() => RegistryHive.LocalMachine.ReadKey64Or32(@"Clients\Mail");
-
- public static bool HasMapi()
- {
- var value = RegistryHive.LocalMachine.ReadKey64Or32(@"Microsoft\Windows Messaging Subsystem", "MAPI", "0");
- return "1".Equals(value);
- }
-
- public static string GetOutlookExePath() => RegistryHive.LocalMachine.ReadKey64Or32(@"Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE");
-
- ///
- /// Check if Outlook is installed
- ///
- /// Returns true if outlook is installed
- public static bool HasOutlook() {
- string outlookPath = GetOutlookExePath();
- if (outlookPath == null)
- {
- return false;
- }
- return File.Exists(outlookPath);
- }
- }
-}
From 20e59ddd1ca81ba384e6608abf11b36c9aa2f4e1 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Thu, 18 Mar 2021 21:53:25 +0100
Subject: [PATCH 083/224] FEATURE-1110: A first step in enabling a hotkey for
opening the clipboard contents in the editor. This is not visible nor
configurable in the UI, but needs to be configured in the greenshot.ini, by
specifying ClipboardHotkey=
---
Greenshot/Forms/MainForm.cs | 19 +++++++++++++++++-
Greenshot/Helpers/CaptureHelper.cs | 24 +++++++++++++++--------
GreenshotPlugin/Controls/HotkeyControl.cs | 10 +++++-----
GreenshotPlugin/Core/CoreConfiguration.cs | 3 +++
4 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index ce6bd92af..1a38839c8 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -608,6 +608,10 @@ namespace Greenshot.Forms {
if (!RegisterWrapper(failedKeys, "CaptureLastRegion", "LastregionHotkey", _instance.CaptureLastRegion, ignoreFailedRegistration)) {
success = false;
}
+ if (!RegisterWrapper(failedKeys, "CaptureClipboard", "ClipboardHotkey", _instance.CaptureClipboard, true))
+ {
+ success = false;
+ }
if (_conf.IECapture) {
if (!RegisterWrapper(failedKeys, "CaptureIE", "IEHotkey", _instance.CaptureIE, ignoreFailedRegistration)) {
success = false;
@@ -688,7 +692,12 @@ namespace Greenshot.Forms {
contextmenu_capturewindow.ShortcutKeyDisplayString = HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.WindowHotkey);
contextmenu_capturefullscreen.ShortcutKeyDisplayString = HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.FullscreenHotkey);
contextmenu_captureie.ShortcutKeyDisplayString = HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.IEHotkey);
- }
+ var clipboardHotkey = HotkeyControl.GetLocalizedHotkeyStringFromString(_conf.ClipboardHotkey);
+ if (!string.IsNullOrEmpty(clipboardHotkey) && !"None".Equals(clipboardHotkey))
+ {
+ contextmenu_captureclipboard.ShortcutKeyDisplayString = clipboardHotkey;
+ }
+ }
private void MainFormFormClosing(object sender, FormClosingEventArgs e) {
@@ -728,6 +737,14 @@ namespace Greenshot.Forms {
CaptureHelper.CaptureLastRegion(true);
}
+ ///
+ /// This is used by the hotkey trigger
+ ///
+ private void CaptureClipboard()
+ {
+ CaptureHelper.CaptureClipboard(DestinationHelper.GetDestination(EditorDestination.DESIGNATION));
+ }
+
private void CaptureIE() {
if (_conf.IECapture) {
CaptureHelper.CaptureIe(true, null);
diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs
index 8b5d19bd7..19acda012 100644
--- a/Greenshot/Helpers/CaptureHelper.cs
+++ b/Greenshot/Helpers/CaptureHelper.cs
@@ -85,11 +85,23 @@ namespace Greenshot.Helpers {
PsAPI.EmptyWorkingSet();
}
}
+
public static void CaptureClipboard()
+ {
+ using CaptureHelper captureHelper = new CaptureHelper(CaptureMode.Clipboard);
+ captureHelper.MakeCapture();
+ }
+
+ public static void CaptureClipboard(IDestination destination)
{
using CaptureHelper captureHelper = new CaptureHelper(CaptureMode.Clipboard);
+ if (destination != null)
+ {
+ captureHelper.AddDestination(destination);
+ }
captureHelper.MakeCapture();
}
+
public static void CaptureRegion(bool captureMouse)
{
using CaptureHelper captureHelper = new CaptureHelper(CaptureMode.Region, captureMouse);
@@ -194,12 +206,8 @@ namespace Greenshot.Helpers {
}
public WindowDetails SelectedCaptureWindow {
- get {
- return _selectedCaptureWindow;
- }
- set {
- _selectedCaptureWindow = value;
- }
+ get => _selectedCaptureWindow;
+ set => _selectedCaptureWindow = value;
}
private void DoCaptureFeedback() {
@@ -244,7 +252,7 @@ namespace Greenshot.Helpers {
Log.Debug($"Capturing with mode {_captureMode} and using Cursor {_captureMouseCursor}");
_capture.CaptureDetails.CaptureMode = _captureMode;
- // Get the windows details in a seperate thread, only for those captures that have a Feedback
+ // Get the windows details in a separate thread, only for those captures that have a Feedback
// As currently the "elements" aren't used, we don't need them yet
switch (_captureMode) {
case CaptureMode.Region:
@@ -270,7 +278,7 @@ namespace Greenshot.Helpers {
CoreConfig.CaptureDelay = 0;
}
- // Capture Mousecursor if we are not loading from file or clipboard, only show when needed
+ // Capture Mouse cursor if we are not loading from file or clipboard, only show when needed
if (_captureMode != CaptureMode.File && _captureMode != CaptureMode.Clipboard)
{
_capture = WindowCapture.CaptureCursor(_capture);
diff --git a/GreenshotPlugin/Controls/HotkeyControl.cs b/GreenshotPlugin/Controls/HotkeyControl.cs
index 6e6557522..cb9f4593a 100644
--- a/GreenshotPlugin/Controls/HotkeyControl.cs
+++ b/GreenshotPlugin/Controls/HotkeyControl.cs
@@ -463,10 +463,10 @@ namespace GreenshotPlugin.Controls {
if (RegisterHotKey(_hotkeyHwnd, _hotKeyCounter, modifiers, (uint)virtualKeyCode)) {
KeyHandlers.Add(_hotKeyCounter, handler);
return _hotKeyCounter++;
- } else {
- Log.Warn($"Couldn't register hotkey modifier {modifierKeyCode} virtualKeyCode {virtualKeyCode}");
- return -1;
}
+
+ Log.Warn($"Couldn't register hotkey modifier {modifierKeyCode} virtualKeyCode {virtualKeyCode}");
+ return -1;
}
public static void UnregisterHotkeys() {
@@ -574,9 +574,9 @@ namespace GreenshotPlugin.Controls {
visibleName = visibleName.Substring(0,1) + visibleName.Substring(1).ToLower();
}
return visibleName;
- } else {
- return givenKey.ToString();
}
+
+ return givenKey.ToString();
}
}
}
\ No newline at end of file
diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs
index 15f408480..bf2570ce9 100644
--- a/GreenshotPlugin/Core/CoreConfiguration.cs
+++ b/GreenshotPlugin/Core/CoreConfiguration.cs
@@ -74,6 +74,9 @@ namespace GreenshotPlugin.Core {
public string LastregionHotkey { get; set; }
[IniProperty("IEHotkey", Description="Hotkey for starting the IE capture", DefaultValue="Shift + Ctrl + PrintScreen")]
public string IEHotkey { get; set; }
+
+ [IniProperty("ClipboardHotkey", Description = "Hotkey for opening the clipboard contents into the editor")]
+ public string ClipboardHotkey { get; set; }
[IniProperty("IsFirstLaunch", Description="Is this the first time launch?", DefaultValue="true")]
public bool IsFirstLaunch { get; set; }
From 96d04334ef68db1b700d78ae75602d082422184c Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 19 Mar 2021 08:42:40 +0100
Subject: [PATCH 084/224] BUG-2745: Fixed registering issue when a hotkey is
not or wrongly configured.
---
Greenshot/Forms/MainForm.cs | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs
index 1a38839c8..4053b41f5 100644
--- a/Greenshot/Forms/MainForm.cs
+++ b/Greenshot/Forms/MainForm.cs
@@ -532,21 +532,26 @@ namespace Greenshot.Forms {
private static bool RegisterWrapper(StringBuilder failedKeys, string functionName, string configurationKey, HotKeyHandler handler, bool ignoreFailedRegistration) {
IniValue hotkeyValue = _conf.Values[configurationKey];
+ var hotkeyStringValue = hotkeyValue.Value?.ToString();
+ if (string.IsNullOrEmpty(hotkeyStringValue))
+ {
+ return true;
+ }
try {
- bool success = RegisterHotkey(failedKeys, functionName, hotkeyValue.Value.ToString(), handler);
+ bool success = RegisterHotkey(failedKeys, functionName, hotkeyStringValue, handler);
if (!success && ignoreFailedRegistration) {
- LOG.DebugFormat("Ignoring failed hotkey registration for {0}, with value '{1}', resetting to 'None'.", functionName, hotkeyValue);
+ LOG.DebugFormat("Ignoring failed hotkey registration for {0}, with value '{1}', resetting to 'None'.", functionName, hotkeyStringValue);
_conf.Values[configurationKey].Value = Keys.None.ToString();
_conf.IsDirty = true;
}
return success;
} catch (Exception ex) {
LOG.Warn(ex);
- LOG.WarnFormat("Restoring default hotkey for {0}, stored under {1} from '{2}' to '{3}'", functionName, configurationKey, hotkeyValue.Value, hotkeyValue.Attributes.DefaultValue);
+ LOG.WarnFormat("Restoring default hotkey for {0}, stored under {1} from '{2}' to '{3}'", functionName, configurationKey, hotkeyStringValue, hotkeyValue.Attributes.DefaultValue);
// when getting an exception the key wasn't found: reset the hotkey value
hotkeyValue.UseValueOrDefault(null);
hotkeyValue.ContainingIniSection.IsDirty = true;
- return RegisterHotkey(failedKeys, functionName, hotkeyValue.Value.ToString(), handler);
+ return RegisterHotkey(failedKeys, functionName, hotkeyStringValue, handler);
}
}
From a21abb1c7e9965f9a65f16b8c27868da0da87ab7 Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Fri, 19 Mar 2021 19:43:16 +0100
Subject: [PATCH 085/224] Update Italian language
@Lakritzator
Please check and merge. Thanks.
---
Greenshot/Languages/language-it-IT.xml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Greenshot/Languages/language-it-IT.xml b/Greenshot/Languages/language-it-IT.xml
index a2b3db147..53fa10837 100644
--- a/Greenshot/Languages/language-it-IT.xml
+++ b/Greenshot/Languages/language-it-IT.xml
@@ -7,10 +7,10 @@
Libreria icone del set icone Fugue di Yusuke Kamiyamane (Creative Commons Attribution 3.0 license)
Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
Greenshot viene fornito SENZA ALCUNA GARANZIA.
-Questo software è garuitio", e potete ri-distribuirlo secondo certe condizioni.
+Questo software è gratuito", e potete ri-distribuirlo secondo certe condizioni.
Dettagli della General Public License GNU:
Info su Greenshot
- Traduzione italiana (v. 16.08.2020) di bovirus e tonytogna
+ Traduzione italiana (v. 29.01.2021) di bovirus e tonytogna
Greenshot - Uno straordinario strumento per copiare immagini dallo schermo
Chiudi
Si è verificato un errore inaspettato.
@@ -133,7 +133,7 @@ Controlla i permessi di accesso per '{0}'.
Adatta a dimensioni di cattura
Offusca (O)
Sfuma
- Modalità di offuscamento
+ Modalità offuscamento
Offusca/pixelizza
Oggetti
Apri cartella su Windows Explorer
@@ -185,7 +185,7 @@ Correggi la maschera noem file e riprova.
Esegui ottimizzazioni per uso con desktop remoto
Riutilizza se possibile la gestione immagini
Evita avviso di salvataggio in chiusura della gestione immagini
- Visualizza anteprima finestra nel menù di contesto (Vista e Windows 7)
+ Visualizza anteprima finestra nel menù contestuale (Vista e Windows 7)
Esportato in: {0}
Si è verificato un errore durante l'esportazione in {0}:
Guida in linea Greenshot
@@ -207,7 +207,7 @@ Correggi la maschera noem file e riprova.
Aggiungi data/ora nel piè di pagina
Opzioni di stampa di Greenshot
Salva come qualità predefinita e non chiedere più
- Qualità di Greenshot
+ Qualità Greenshot
Salva direttamente (usando le impostazioni preferite file destinazione)
Visualizza scelta opzioni di stampa ogni volta che stampi un'immagine
Visualizza scelta qualità ogni volta che si salva un'immagine
From c303c073201d2e3100a64c57b7224119ee9b4144 Mon Sep 17 00:00:00 2001
From: Robin Krom
Date: Fri, 19 Mar 2021 22:53:19 +0100
Subject: [PATCH 086/224] Updated Microsoft.Toolkit.Uwp.Notifications which
brings a lot more to Greenshot [skip ci]
---
.../GreenshotWin10Plugin.csproj | 2 +-
.../Native/GreenshotNotificationActivator.cs | 44 ------
.../ToastNotificationService.cs | 142 ++++++++----------
3 files changed, 67 insertions(+), 121 deletions(-)
delete mode 100644 GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
diff --git a/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj b/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj
index 00229a0ab..2c8237637 100644
--- a/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj
+++ b/GreenshotWin10Plugin/GreenshotWin10Plugin.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs b/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
deleted file mode 100644
index d47989c97..000000000
--- a/GreenshotWin10Plugin/Native/GreenshotNotificationActivator.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Runtime.InteropServices;
-using log4net;
-using Microsoft.Toolkit.Uwp.Notifications;
-
-namespace GreenshotWin10Plugin.Native
-{
- ///
- /// This implements the NotificationActivator
- ///
- [ClassInterface(ClassInterfaceType.None)]
- [ComSourceInterfaces(typeof(NotificationActivator.INotificationActivationCallback))]
- [Guid("F48E86D3-E34C-4DB7-8F8F-9A0EA55F0D08"), ComVisible(true)]
- public class GreenshotNotificationActivator : NotificationActivator
- {
- private static readonly ILog Log = LogManager.GetLogger(typeof(GreenshotNotificationActivator));
-
- public override void OnActivated(string invokedArgs, NotificationUserInput userInput, string appUserModelId)
- {
- // TODO: Handle activation
- Log.Info("Activated");
- }
- }
-}
diff --git a/GreenshotWin10Plugin/ToastNotificationService.cs b/GreenshotWin10Plugin/ToastNotificationService.cs
index 4e3f6bc03..e7c932ab7 100644
--- a/GreenshotWin10Plugin/ToastNotificationService.cs
+++ b/GreenshotWin10Plugin/ToastNotificationService.cs
@@ -22,13 +22,12 @@
using System;
using System.Drawing.Imaging;
using System.IO;
-using System.Linq;
+using Windows.Foundation.Collections;
using Windows.Foundation.Metadata;
using Windows.UI.Notifications;
using GreenshotPlugin.Core;
using GreenshotPlugin.IniFile;
using GreenshotPlugin.Interfaces;
-using GreenshotWin10Plugin.Native;
using log4net;
using Microsoft.Toolkit.Uwp.Notifications;
@@ -45,10 +44,21 @@ namespace GreenshotWin10Plugin
private readonly string _imageFilePath;
public ToastNotificationService()
{
- // Register AUMID and COM server (for Desktop Bridge apps, this no-ops)
- DesktopNotificationManagerCompat.RegisterAumidAndComServer("Greenshot");
- // Register COM server and activator type
- DesktopNotificationManagerCompat.RegisterActivator();
+ if (ToastNotificationManagerCompat.WasCurrentProcessToastActivated())
+ {
+ Log.Info("Greenshot was activated due to a toast.");
+ }
+ // Listen to notification activation
+ ToastNotificationManagerCompat.OnActivated += toastArgs =>
+ {
+ // Obtain the arguments from the notification
+ ToastArguments args = ToastArguments.Parse(toastArgs.Argument);
+
+ // Obtain any user input (text boxes, menu selections) from the notification
+ ValueSet userInput = toastArgs.UserInput;
+
+ Log.Info("Toast activated. Args: " + toastArgs.Argument);
+ };
var localAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Greenshot");
if (!Directory.Exists(localAppData))
@@ -81,7 +91,7 @@ namespace GreenshotWin10Plugin
return;
}
// Prepare the toast notifier. Be sure to specify the AppUserModelId on your application's shortcut!
- var toastNotifier = DesktopNotificationManagerCompat.CreateToastNotifier();
+ var toastNotifier = ToastNotificationManagerCompat.CreateToastNotifier();
// Here is an interesting article on reading the settings: https://www.rudyhuyn.com/blog/2018/02/10/toastnotifier-and-settings-careful-with-non-uwp-applications/
try
@@ -97,82 +107,62 @@ namespace GreenshotWin10Plugin
Log.Info("Ignoring exception as this means that there was no stored settings.");
}
- // Get a toast XML template
- var toastXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastImageAndText01);
+ // Generate the toast and send it off
+ new ToastContentBuilder()
- // Fill in the text elements
- var stringElement = toastXml.GetElementsByTagName("text").First();
- stringElement.AppendChild(toastXml.CreateTextNode(message));
-
- if (_imageFilePath != null && File.Exists(_imageFilePath))
- {
- // Specify the absolute path to an image
- var imageElement = toastXml.GetElementsByTagName("image").First();
- var imageSrcNode = imageElement.Attributes.GetNamedItem("src");
- if (imageSrcNode != null)
+ .AddArgument("ToastID", 100)
+ // Inline image
+ .AddText(message)
+ // Profile (app logo override) image
+ //.AddAppLogoOverride(new Uri($@"file://{_imageFilePath}"), ToastGenericAppLogoCrop.None)
+ .Show(toast =>
{
- imageSrcNode.NodeValue = _imageFilePath;
- }
- }
+ // Windows 10 first with 1903: ExpiresOnReboot = true
+ toast.ExpirationTime = timeout.HasValue ? DateTimeOffset.Now.Add(timeout.Value) : (DateTimeOffset?) null;
+ void ToastActivatedHandler(ToastNotification toastNotification, object sender)
+ {
+ try
+ {
+ onClickAction?.Invoke();
+ }
+ catch (Exception ex)
+ {
+ Log.Warn("Exception while handling the onclick action: ", ex);
+ }
- // Create the toast and attach event listeners
- var toast = new ToastNotification(toastXml)
- {
- // Windows 10 first with 1903: ExpiresOnReboot = true,
- ExpirationTime = timeout.HasValue ? DateTimeOffset.Now.Add(timeout.Value) : (DateTimeOffset?)null
- };
+ toast.Activated -= ToastActivatedHandler;
+ }
- void ToastActivatedHandler(ToastNotification toastNotification, object sender)
- {
- try
- {
- onClickAction?.Invoke();
- }
- catch (Exception ex)
- {
- Log.Warn("Exception while handling the onclick action: ", ex);
- }
+ if (onClickAction != null)
+ {
+ toast.Activated += ToastActivatedHandler;
+ }
- toast.Activated -= ToastActivatedHandler;
- }
+ void ToastDismissedHandler(ToastNotification toastNotification, ToastDismissedEventArgs eventArgs)
+ {
+ Log.Debug($"Toast closed with reason {eventArgs.Reason}");
+ if (eventArgs.Reason != ToastDismissalReason.UserCanceled)
+ {
+ return;
+ }
+ try
+ {
+ onClosedAction?.Invoke();
+ }
+ catch (Exception ex)
+ {
+ Log.Warn("Exception while handling the onClosed action: ", ex);
+ }
- if (onClickAction != null)
- {
- toast.Activated += ToastActivatedHandler;
- }
+ toast.Dismissed -= ToastDismissedHandler;
+ // Remove the other handler too
+ toast.Activated -= ToastActivatedHandler;
+ toast.Failed -= ToastOnFailed;
- void ToastDismissedHandler(ToastNotification toastNotification, ToastDismissedEventArgs eventArgs)
- {
- Log.Debug($"Toast closed with reason {eventArgs.Reason}");
- if (eventArgs.Reason != ToastDismissalReason.UserCanceled)
- {
- return;
- }
- try
- {
- onClosedAction?.Invoke();
- }
- catch (Exception ex)
- {
- Log.Warn("Exception while handling the onClosed action: ", ex);
- }
-
- toast.Dismissed -= ToastDismissedHandler;
- // Remove the other handler too
- toast.Activated -= ToastActivatedHandler;
- toast.Failed -= ToastOnFailed;
-
- }
- toast.Dismissed += ToastDismissedHandler;
- toast.Failed += ToastOnFailed;
- try
- {
- toastNotifier.Show(toast);
- }
- catch (Exception ex)
- {
- Log.Error("Couldn't show notification.", ex);
- }
+ }
+ toast.Dismissed += ToastDismissedHandler;
+ toast.Failed += ToastOnFailed;
+ });
}
private void ToastOnFailed(ToastNotification sender, ToastFailedEventArgs args)
From 33defa6165d462ded81e9ad1912ed50c86ec20da Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Sat, 20 Mar 2021 11:55:39 +0100
Subject: [PATCH 087/224] Update Help (IT)
@Lakritzator
Please check and merge. Thanks.
---
Greenshot/Languages/help-it-IT.html | 332 ++++++++++++----------------
1 file changed, 146 insertions(+), 186 deletions(-)
diff --git a/Greenshot/Languages/help-it-IT.html b/Greenshot/Languages/help-it-IT.html
index 1d5744287..14c135e67 100644
--- a/Greenshot/Languages/help-it-IT.html
+++ b/Greenshot/Languages/help-it-IT.html
@@ -1,4 +1,4 @@
-
+
@@ -35,68 +35,62 @@
Cattura ultima regione
Cattura finestra
Cattura schermo intero
- Cattura Internet Explorer
+ Cattura con Internet Explorer
- Uso della Gestione Immagini
+ Uso gestione immagini
- Disegnare forme
- Aggiungere testo
- Evidenziare qualcosa
- Offuscare qualcosa
- Ritagliare l'immagine
- Aggiungere elementi grafici all'immagine
- Riutilizzare gli elementi disegnati
- Esportare l'immagine
+ Disegna forme
+ Aggiungi testo
+ Evidenzia qualcosa
+ Offusca qualcosa\
+ Ritaglia immagine
+ Aggiungi elementi grafici all'immagine
+ Riusa elementi disegnati
+ Esporta immagine
- La pagina delle Impostazioni
+ Pagina impostazioni
- Impostazioni Generali
- Impostazioni di Cattura
- Impostazioni di Emissione
- Impostazioni Stampante
+ Impostazioni generali
+ Impostazioni cattura
+ Impostazioni destinazione
+ Impostazioni stampante
Vuoi aiutarci?
- Considera una donazione
+ Fai una donazione
Spargi la parola
Invia una traduzione
- Creazione immagine dello schermo
+ Crea immagine dello schermo
- L'immagine può essere creata utilizzando il tasto Stamp della tastiera,
- oppure cliccando il tasto destro del mouse sull'icona di Greenshot nella barra.
+ L'immagine può essere creata usando il tasto Stamp della tastiera, oppure facendo clic il tasto destro del mouse sull'icona di Greenshot nella barra.
Ci sono varie opzioni per creare un'immagine:
Cattura regione Stamp
- Il metodo cattura regione consente di selezionare una parte dello schermo da "fotografare".
- Dopo aver avviato il metodo regione, apparirà un mirino sulla posizione del mouse sullo
- schermo. Cliccare e tenere premuto dove si vuole impostare un angolo della regione da
- fotografare. Tenendo premuto il pulsante del mouse, muovere il mouse fino a definire il
- rettangolo da fotografare. Rilasciare quindi il pulsante quando il rettangolo verde avrà
- coperto l'area da catturare nell'immagine.
+ Il metodo cattura regione consente di selezionare una parte dello schermo da "catturare".
+ Dopo aver attivato la cattura, apparirà un mirino sulla posizione del mouse sullo schermo.
+ Fai clic e tieni premuto dove vuoi impostare un angolo della regione da catturare.
+ Tenendo premuto il pulsante del mouse, sposta il mouse fino a definire il rettangolo da catturare.
+ Rilascia quindi il pulsante quando il rettangolo verde avrà coperto l'area che vuoi catturare.
- Si può usare il tasto Spazio per cambiare da metodo regione a metodo
- finestra .
+ Puoi usare il tasto Spazio per cambiare da metodo regione a metodo finestra .
- Se si vuol catturare precisamente un'area, potrebbe risultare più facile selezionare
- un'area più grande e quindi ritagliare l'immagine in
- seguito, utilizzando la Gestione Immagini di Greenshot.
+ Se vuoi catturare una specifica, può risultare più facile selezionare un'area più grande e quindi ritagliare l'immagine in seguito, usando la 'Gestione immagini' di Greenshot.
Cattura ultima regione Maiusc + Stamp
- Usando questa opzione, se avete già eseguito un cattura regione o finestra ,
- si può ricatturare automaticamente la stessa regione.
+ Usando questa opzione, se hai già eseguito un cattura regione o finestra , puoi ricatturare automaticamente la stessa regione.
@@ -105,14 +99,10 @@
Crea un'immagine della finestra che è attiva in quel momento.
- La pagina delle impostazioni offre una possibilità per non catturare
- direttamente la finestra attiva, consentendo quindi di sceglierne una interattivamente.
- Se si seleziona questa opzione, la finestra può essere scelta cliccandovi (come nel metodo
- regione , Greenshot evidenzierà l'area che verrà catturata).
- Se si vuol catturare una finestra figlia (es: una browser
- viewport (senza barra strumenti, ecc...) o un singolo frame di una pagina web che usa i framesets)
- si può puntare il cursore del mouse sulla finestra e premere il tasto PgDown . Dopo di questo, sarà
- possibile selezionare elementi da catturare nella finestra figlia.
+ La pagina delle impostazioni offre una possibilità per non catturare direttamente la finestra attiva, consentendo quindi di sceglierne una interattivamente.
+ Se selezioni questa opzione, la finestra può essere scelta facendovi clic sopra (come nel metodo regione , Greenshot evidenzierà l'area che verrà catturata).
+ Se vuoi catturare una finestra figlia (es: una browser viewport (senza barra strumenti, ecc...) o un singolo frame di una pagina web che usa i frameset) puoi puntare il cursore del mouse sulla finestra e premere il tasto PgDown .
+ Fatto questo, sarà possibile selezionare gli elementi da catturare nella finestra figlia.
@@ -122,75 +112,63 @@
Cattura Internet Explorer Ctrl + Maiusc + Stamp
- Crea facilmente un'immagine della pagina web attiva in quel momento su Internet Explorer.
- Si può usare il menu sensibile al contesto di Greenshot per selezionare la tab di Internet Explorer da catturare, oppure premere
- Crtl + Maiusc + Stamp per catturare la tab attiva.
+ Crea facilmente un'immagine della pagina web attiva in quel momento su Internet Explorer.
+ Puoi usare il menu sensibile al contesto di Greenshot per selezionare la scheda di Internet Explorer da catturare, o premi Crtl + Maiusc + Stamp per catturare la scheda attiva.
- Uso della Gestione Immagini
+ Uso Gestione Immagini
- Greenshot fornisce anche una pratica gestione delle immagini, che include degli utili strumenti
- per aggiungere note e forme alle immagini. Essa permette inoltre di evidenziare o
- offuscare parti dell'immagine.
+ Greenshot fornisce anche una pratica gestione delle immagini, che include degli utili strumenti per aggiungere note e forme alle immagini.
+ Essa permette inoltre di evidenziare o offuscare parti dell'immagine.
- La Gestioni Immagini di Greenshot non è solo per le immagini catturate. Si può usare
- anche per aprire e modificare immagini da file o da Appunti. E' sufficiente premere il tasto destro
- sull'icona di Greenshot nella barra, e selezionare rispettivamente Apri immagine da file
- o Apri immagine da Appunti .
+ La Gestioni Immagini di Greenshot non serve solo per le immagini catturate.
+ Si può usare anche per aprire e modificare immagini da file o da Appunti.
+ E' sufficiente premere il tasto destro sull'icona di Greenshot nella barra, e selezionare rispettivamente Apri immagine da file o Apri immagine da Appunti .
- Come default, la gestione immagini verrà aperta ogniqualvolta un'immagine viene catturata.
- Se non si vuole passare per la gestione immagini, si può disabilitare questo funzionamento
- nella pagina delle impostazioni .
+ Come impostazione predefinita, la gestione immagini verrà aperta ogni volta che un'immagine viene catturata.
+ Se non vuoi usare la gestione immagini, puoi disabilitare questa funzionalità nella pagina delle impostazioni .
- Disegnare forme
+ Disegna forme
- Selezionare uno degli strumenti di disegno dalla barra degli strumenti sul lato sinistro
- della gestione immagini o dal menù Oggetti . Per facilitarne la selezione, ciascun
- strumento è assegnato ad un tasto.
- Le forme disponibili sono: rettangolo R , ellisse E , linea L
- e freccia A .
- Cliccare, tenendo premuto il pulsante del mouse e trascinare per definire la posizione e la dimensione della forma.
- Completata la definizione, rilasciare il pulsante del mouse.
+ Seleziona uno degli strumenti di disegno dalla barra degli strumenti sul lato sinistro della gestione immagini o dal menù Oggetti .
+ Per facilitarne la selezione, ciascun strumento è assegnato ad un tasto.
+ Le forme disponibili sono: rettangolo R , ellisse E , linea L e freccia A .
+ Fai clic, e tenendo premuto il pulsante del mouse trascina per definire la posizione e la dimensione della forma.
+ Completata la definizione, rilascia il pulsante del mouse.
- Le forme possono essere mosse e ridimensionate facilmente, previa selezione mediante lo strumento
- ESC disponibile nella barra a sinistra. Per ciascun tipo di elemento c'è un gruppo di
- opzioni specifiche per cambiarne l'aspetto (es: spessore linea,
- colore linea, colore di riempimento). Si possono modificare le opzioni di un elemento esistente, previa selezione,
- e anche quelle di nuovi elementi da disegnare, previa selezione dello strumento di disegno.
+ Le forme possono essere mosse e ridimensionate facilmente, previa selezione mediante lo strumento ESC disponibile nella barra a sinistra.
+ Per ciascun tipo di elemento c'è un gruppo di opzioni specifiche per cambiarne l'aspetto (es: spessore linea, colore linea, colore di riempimento).
+ Si possono modificare le opzioni di un elemento esistente, previa selezione, e anche quelle di nuovi elementi da disegnare, previa selezione dello strumento di disegno.
- Si possono inoltre selezionare più elementi per una modifica simultanea. Per selezionare più elementi,
- tenere premuto il tasto Maiusc mentre si clicca sugli elementi.
+ Si possono inoltre selezionare più elementi per una modifica simultanea.
+ Per selezionare più elementi, tieni premuto il tasto Maiusc mentre si fai clic sugli elementi.
- Aggiungere testo
+ Aggiungi testo
- L'uso dello strumento di testo T è simile all'uso degli strumenti di disegno
- forme . E' sufficiente disegnare l'elemento di testo delle dimensioni desiderate,
- e quindi digitare il testo.
- Per modificare il testo di un elemento esistente, premere il doppio click sull'elemento.
+ L'uso dello strumento di testo T è simile all'uso degli strumenti di disegno forme .
+ E' sufficiente disegnare l'elemento di testo delle dimensioni desiderate, e quindi digitare il testo.
+ Per modificare il testo di un elemento esistente, fai doppio clic sull'elemento.
- Evidenziare qualcosa
+ Evidenzia qualcosa
- Dopo aver selezionato lo strumento di evidenziazione H , definire l'area da evidenziare esattamente
- come si volesse disegnare una forma .
- Ci sono varie opzioni per evidenziare, esse possono essere selezionate cliccando il pulsante
- più in alto a sinistra nella barra degli strumenti:
+ Dopo aver selezionato lo strumento di evidenziazione H , definisci l'area da evidenziare esattamente come si volesse disegnare una forma .
+ Ci sono varie opzioni per evidenziare, esse possono essere selezionate selezionando il pulsante più in alto a sinistra nella barra degli strumenti:
- Evidenzia il testo : evidenzia un'area applicando un colore brillante ad essa, come un
- pennarello evidenziatore
- Evidenzia l'area : sfuoca* e scurisce tutto all'esterno dell'area selezionata
+ Evidenzia testo : evidenzia un'area applicando un colore brillante ad essa, come un pennarello evidenziatore
+ Evidenzia area : sfuoca * e scurisce tutto all'esterno dell'area selezionata
Scala di grigi : tutto ciò che è al di fuori dell'area selezionata viene trasformato in scala di grigi
Ingrandisci : l'area selezionata verrà visualizzata come ingrandita da una lente
@@ -198,177 +176,163 @@
Offuscare qualcosa
- Offuscare parti di un'immagine può essere una buona idea se essa contiene dati privati che non devono essere
- visti da altre persone, per esempio dati conto bancario, nomi, parole d'ordine o volti di persone.
- Usare lo strumento di offuscamento O esattamente come lo strumento di evidenziazione .
+ Offuscare parti di un'immagine può essere una buona idea se essa contiene dati privati che non devono essere visti da altre persone, per esempio dati conto bancario, nomi, parole d'ordine o volti di persone.
+ Usa lo strumento di offuscamento O esattamente come lo strumento di evidenziazione .
Le opzioni disponibili per l'offuscamento, sono:
- Offusca/pixelize : aumenta le dimensioni dei pixel nell'area selezionata
+ Offusca/pixelizza : aumenta le dimensioni dei pixel nell'area selezionata
Sfuma * : sfuma e sfuoca l'area selezionata
- * A seconda delle prestazioni del proprio PC, applicare un effetto di sfumatura potrebbe rallentare la Gestione
- Immagini di Greenshot. Se si vede che la Gestione Immagini risponde lentamente subito dopo aver eseguito una sfumatura,
- è utile provare a ridurre il valore di Qualità anteprima nella barra strumenti di offuscamento,
- o a diminuire il valore di Raggio sfumatura .
- Se le prestazioni della sfumatura sono ancora deludenti per poterci lavorare, si consiglia si usare invece
- l'effetto Offusca/pixelize.
+ * A seconda delle prestazioni del proprio PC, applicare un effetto di sfumatura potrebbe rallentare la Gestione Immagini di Greenshot.
+ Se si vede che la Gestione Immagini risponde lentamente subito dopo aver eseguito una sfumatura, è utile provare a ridurre il valore di Qualità anteprima nella barra strumenti di offuscamento, o a diminuire il valore di Raggio sfumatura .
+ Se le prestazioni della sfumatura sono ancora deludenti per poterci lavorare, ti consiglia si usare invece l'effetto Offusca/pixelizza.
- Ritagliare l'immagine
+ Ritaglia immagine
- Per ricavare solo una parte dell'immagine catturata, si può usare lo strumento di ritaglio C
- per ritagliare l'area desiderata.
- Dopo aver selezionato lo strumento di ritaglio, disegnare un rettangolo per l'area che si vuole mantenere.
+ Per ricavare solo una parte dell'immagine catturata, si può usare lo strumento di ritaglio C per ritagliare l'area desiderata.
+ Dopo aver selezionato lo strumento di ritaglio, disegna un rettangolo per l'area che vuoi mantenere.
Come per gli atri elementi, si possono facilmente modificare le dimensioni dell'area selezionata.
- Dopo aver impostato correttamente la selezione dell'area, premere il pulsante di conferma della barra strumenti
- oppure premere il tasto Invio . Si può annullare l'azione di ritaglio, cliccando il pulsante di cancellazione o premendo
- ESC .
+ Dopo aver impostato correttamente la selezione dell'area, seleziona il pulsante di conferma nella barra strumenti o premi il tasto Invio .
+ Puoi annullare l'azione di ritaglio, selezionando il pulsante annullamento o premendo ESC .
- Ritaglia Automaticamente : Se si ha la necessità di ritagliare un pezzo dell'immagine lungo i bordi di uno sfondo con colore compatto,
- è sufficiente scegliere Ritaglia Automaticamente dal menù Modifica e Greenshot automaticamente
- selezionerà l'area di ritaglio.
+ Ritaglia automaticamente : ae si ha la necessità di ritagliare un pezzo dell'immagine lungo i bordi di uno sfondo con colore compatto, è sufficiente scegliere Ritaglia automaticamente dal menù Modifica e Greenshot automaticamente selezionerà l'area di ritaglio.
Aggiunta elementi grafici all'immagine
- Si possono facilmente aggiungere degli elementi grafici o delle altre immagini alla immagine in lavorazione, è sufficiente trascinare un file di immagine
- all'interno della finestra di gestione immagini. Inoltre, selezionando Inserisci finestra dal menù Modifica , si possono inserire
- immagini prese da altre finestre. In questo caso, appare una lista con tutte le finestre aperte, consentendo quindi di scegliere quella che si
- vuole inserire.
+ Si possono facilmente aggiungere degli elementi grafici o delle altre immagini alla immagine in lavorazione, trascinando un file immagine all'interno della finestra di gestione immagini.
+ Inoltre, selezionando Inserisci finestra dal menù Modifica , si possono inserire immagini prese da altre finestre.
+ In questo caso, appare un elenco con tutte le finestre aperte, consentendo quindi di scegliere quella che si vuole inserire.
- Ri-utilizzare elementi disegnati
+ Ri-usa elementi disegnati
- Se ci si ritrova a utilizzare lo stesso o simile elemento nella maggior parte delle immagini,
- (es: campo di testo contenente tipo browser e versione, oppure offuscamento dello stesso elemento
- su più immagini), è possibile riutilizzare gli elementi in modo semplice.
- Selezionare Salva oggetti su file dal menù Oggetti per salvare di elementi correnti
- per poterli riutilizzare poi. Carica oggetti da file viene invece usato per applicare su un'altra immagine
- gli elementi salvati in precedenza.
+ Se ci si ritrova a utilizzare lo stesso o simile elemento nella maggior parte delle immagini, (es: campo di testo contenente tipo browser e versione, oppure offuscamento dello stesso elemento su più immagini), è possibile riusare gli elementi in modo semplice.
+ Per salvare di elementi attuali seleziona Salva oggetti su file dal menù Oggetti .
+ Per poterli riusare seleziona Carica oggetti da file con un'altra immagine.
- Esportare l'immagine
+ Esporta immagine
- Dopo aver modificato l'immagine, si può esportare il risultato per vari scopi, a seconda delle necessità.
- Si può accedere a tutte le opzioni di esportazione mediante il menù File ,
- sulla barra principale, o per mezzo delle seguenti scorciatoie:
+ Dopo aver modificato l'immagine, si può esportare il risultato per vari scopi, a seconda delle necessità.
+ Si può accedere a tutte le opzioni di esportazione dal menù File , nella barra principale, o per mezzo delle seguenti scorciatoie:
- Salva Ctrl + S : salva l'immagine su un file (se l'immagine è già stata salvata, altrimenti emette la finestra di Salva come... )
+ Salva Ctrl + S : salva l'immagine in un file (se l'immagine è già stata salvata, altrimenti visualizza la finestra di Salva come... )
Salva come... Ctrl + Maiusc + S : permette di scegliere la destinazione, il nome file e il formato immagine per il file da salvare
- Copia immagine sugli appunti Ctrl + Maiusc + C : mette una copia dell'immagine sugli appunti, consentendo poi di incollarla dentro altri programmi
- Stampa... Ctrl + P : invia l'immagine a una stampante
- E-Mail Ctrl + E : apre un nuovo messaggio sul programma di e-mail di default, aggiungendo l'immagine come allegato
+ Copia immagine negli Appunti Ctrl + Maiusc + C : fa una copia dell'immagine negli Appunti, consentendo poi di incollarla in altri programmi
+ Stampa... Ctrl + P : invia l'immagine ad una stampante
+ Email Ctrl + E : crea un nuovo messaggio nel programma email predefinito, aggiungendo l'immagine come allegato
- Dopo aver salvato un'immagine dalla gestione, cliccando con il tasto destro del mouse sulla barra di stato in basso sulla finestra
- della gestione immagini, è possibile copiare il percorso sugli appunti, oppure aprire la cartella di destinazione con la gestione risorse.
+ Dopo aver salvato un'immagine dalla gestione, facendo clic con il tasto destro del mouse sulla barra di stato in basso sulla finestra della gestione immagini, è possibile copiare il percorso negli Appunti, o aprire la cartella destinazione con la Gestione risorse.
- Le Preferenze
+ Preferenze
- Impostazioni Generali
+ Impostazioni generali
- Lingua : La lingua che si preferisce usare.
- Si possono scaricare i file per le lingue aggiuntive di Greenshot qui .
- Lancia Greenshot all'avvio : Avvia il programma in automatico all'accensione del sistema.
- Scorciatoie di tastiera : Personalizza le scorciatoie (hotkeys) da usare per catturare le immagini.
- Usa il proxy di default del sistema : Se selezionato, Greenshot usa il proxy di default del sistema per controllare se ci sono aggiornamenti.
- Intervallo di controllo aggiornamento, in giorni : Greenshot può controllare automaticamente se ci sono aggiornamenti. Questo parametro può essere
- utilizzato per specificare l'intervallo (in giorni); per disabilitare il controllo aggiornamento si può usare il valore 0.
+ Lingua : lingua dell'interfaccia utente.
+ Si possono scaricare i file per le lingue aggiuntive di Greenshot da qui .
+ Esegui Greenshot all'avvio : esegue il programma Greenshot in automatico all'avvio del sistema.
+ Scorciatoie tastiera : personalizza le scorciatoie (tasti rapidi) da usare per catturare le immagini.
+ Usa proxy predefinito sistema : se selezionato, Greenshot per controllare se ci sono aggiornamenti usa il proxy predefinito di sistema.
+ Intervallo controllo aggiornamento, in giorni : Greenshot può controllare automaticamente se ci sono aggiornamenti.
+ Questo parametro può essere usato per specificare l'intervallo (in giorni); per disabilitare il controllo aggiornamento si può usare il valore 0.
- Impostazioni di Cattura
+ Impostazioni cattura
- Cattura puntatore mouse : Se selezionato, il puntatore del mouse verrà catturato. Il puntatore viene gestito come un elemento separato, in modo che possa essere spostato o rimosso in seguito.
- Emetti suono fotocamera : Attiva il riscontro udibile dell'azione di cattura (suono dello scatto fotografico).
- Millisecondi di attesa prima di catturare : Utile per aggiungere un tempo di ritardo prima dell'effettiva cattura dello schermo.
- Usa la modalità di cattura via finestra interattiva : Invece di catturare direttamente la finestra attiva, la modalità interattiva
- consente di selezionare la finestra da catturare. E' inoltre possibile catturare le finestre figlie, vedi Cattura finestra .
+ Cattura puntatore mouse : se selezionato, il puntatore del mouse verrà catturato.
+ Il puntatore viene gestito come un elemento separato, in modo che possa essere spostato o rimosso in seguito.
+ Riproduci suono fotocamera : attiva il riscontro udibile dell'azione di cattura (suono scatto fotografico).
+ Millisecondi attesa prima di catturare : utile per aggiungere un tempo di ritardo prima dell'effettiva cattura dello schermo.
+ Usa modalità cattura via finestra interattiva : invece di catturare direttamente la finestra attiva, la modalità interattiva consente di selezionare la finestra da catturare.
+ E' inoltre possibile catturare le finestre figlie, vedi Cattura finestra .
- Cattura in stile Aero (so Windows Vista / 7) : Se si sta usando Greenshot su Windows Vista or Windows 7 con lo stile di visualizzazione Aero abilitato, è possibile
- scegliere come devono essere gestiti i bordi della finestra trasparente quando vengono create le immagini in modalità finestra. Questa impostazione è da usare per evitare
- la cattura di elementi dello sfondo che appaiono attraverso i bordi trasparenti.
+ Cattura in stile Aero (so Windows Vista / 7) : se si sta usando Greenshot in Windows Vista o Windows 7 con lo stile di visualizzazione Aero abilitato, è possibile scegliere come devono essere gestiti i bordi della finestra trasparenti quando vengono create le immagini in modalità finestra.
+ Questa impostazione è da usare per evitare la cattura di elementi dello sfondo che appaiono attraverso i bordi trasparenti.
Automaticamente : Greenshot deciderà come gestire la trasparenza.
- Come visualizzata : I bordi trasparenti verranno catturati come visualizzati sullo schermo.
- Usa i colori di default : Al posto della trasparenza verrà applicato un colore compatto di default.
- Usa colori personalizzati : Si può scegliere il colore che sarà applicato al posto della trasparenza.
- Conserva la trasparenza : I bordi verranno catturati conservando la trasparenza, senza però catturare gli elementi che potrebbero essere sullo sfondo. (Nota: le aree
- trasparenti verrano visualizzate usando un modello selezionato nella gestione immagini. Il modello non verrà esportato se si salverà l'immagine su file. Ricordarsi di salvare
- il file come PNG se si vuole conservance il pieno supporto della trasparenza.)
+ Come visualizzata : i bordi trasparenti verranno catturati come visualizzati sullo schermo.
+ Usa colori predefiniti : Al posto della trasparenza verrà applicato un colore compatto predefinito.
+ Usa colori personalizzati : si può scegliere il colore che sarà applicato al posto della trasparenza.
+ Conserva trasparenza : i bordi verranno catturati conservando la trasparenza, senza però catturare gli elementi che potrebbero essere sullo sfondo.
+ Nota: le aree trasparenti verranno visualizzate usando un modello selezionato nella gestione immagini.
+ Il modello non verrà esportato se si salverà l'immagine su file.
+ Ricordarti di salvare il file come PNG se vuoi conservare il pieno supporto della trasparenza.)
- Cattura Internet Explorer : Abilita la comoda cattura delle pagine web utilizzando Internet Explorer.
- Adatta finestra Gestione a dimensioni di cattura : Se selezionata, la finestra della Gestione immagini verrà automaticamente ridimensionata in base alla dimensione dell'immagine catturata.
+ Cattura con Internet Explorer : abilita la comoda cattura delle pagine web usando Internet Explorer.
+ Adatta finestra Gestione a dimensioni di cattura : se selezionata, la finestra della Gestione immagini verrà automaticamente ridimensionata in base alla dimensione dell'immagine catturata.
- Impostazioni di Emissione
+ Impostazioni destinazione
- Destinazione dell'immagine : Consente di scegliere la destinazione/i automatiche delle immagini subito dopo l'azione di cattura.
- Impostazioni Preferite per l'Emissione File : Cartella e nome file da usare quando si salva automaticamente, o da suggerire quando si salva (usando la finestra "Salva come"). Cliccare il pulsante ? per sapere di più sulle variabili che possono essere usate nel modello del nome file.
- Impostazioni JPEG : Qualità da usare quando si salvano file JPEG.
+ Destinazione immagine : consente di scegliere la/le destinazione/i automatiche delle immagini subito dopo l'azione di cattura.
+ Impostazioni preferite destinazione file : cartella e nome file da usare quando si salva automaticamente, o da suggerire quando si salva (usando la finestra "Salva come").
+ Fai clic su ? per sapere di più sulle variabili che possono essere usate nel modello del nome file.
+ Impostazioni JPEG : qualità da usare quando si salvano file JPEG.
Impostazioni Stampante
- Riduci alle dimensioni pagina : Se l'immagine eccede le dimensioni della pagina, essa verrà ridotta e adattata alle dimensioni della pagina.
- Ingrandisci fino alle dimensioni pagina : Se l'immagine è più piccola delle dimensioni della pagina, essa verrà ingrandita per stamparla più grande possibile senza superare le dimensioni della pagina.
+ Riduci a dimensioni pagina : se l'immagine eccede le dimensioni della pagina, essa verrà ridotta e adattata alle dimensioni della pagina.
+ Ingrandisci fino a dimensioni pagina : se l'immagine è più piccola delle dimensioni della pagina, essa verrà ingrandita per stamparla più grande possibile senza superare le dimensioni della pagina.
Ruota a seconda dell'orientamento pagina : Ruoterà l'immagine in formato orizzontale di 90° per la stampa.
- Centra nella pagina : L'immagine verrà stampata al centro della pagina.
- Stampa data / ora sul piede della pagina : La data e l'ora di stampa verranno stampati sul piede della pagina.
- Stampa con colori inverititi (negativo) : Trasformerà l'immagine in negativo prima di stamparla, utile per esempio quando si stampa un'immagine con testo bianco su sfondo nero (per risparmiare toner o inchiostro).
- Visualizza scelta opzioni di stampa ogni volta che si stampa un'immagine : Permette di scegliere se visualizzare o meno la finestra di scelta opzioni per le stampe successive alla prima.
+ Centra nella pagina : l'immagine verrà stampata al centro della pagina.
+ Stampa data/ora in piè di pagina : la data e l'ora di stampa verranno stampate nel piè di pagina.
+ Stampa con colori invertiti (negativo) : trasformerà l'immagine in negativo prima di stamparla.
+ Utile per esempio quando si stampa un'immagine con testo bianco su sfondo nero (per risparmiare toner o inchiostro).
+ Visualizza scelta opzioni stampa ogni volta che si stampa un'immagine : permette di scegliere se visualizzare o meno la finestra di scelta opzioni per le stampe successive alla prima.
- Impostazioni Componenti Aggiuntivi
+ Impostazioni componenti aggiuntivi
- Visualizza la lista dei componenti aggiuntivi di Greenshot che sono attualmente installati. La configurazione del singolo componente aggiuntivo è disponibile selezionando
- il componente dalla lista e quindi cliccando su Configura .
+ Visualizza l'elenco dei componenti aggiuntivi di Greenshot che sono attualmente installati.
+ La configurazione del singolo componente aggiuntivo è disponibile selezionando il componente dall'elenco e quindi selezionando Configura .
- Desideri aiutarci?
+ Vuoi aiutarci?
- Attualmente non abbiamo bisogno di aiuto per lo sviluppo. Tuttavia, ci sono molte cose che puoi fare per
- supportare Greenshot e il team di sviluppo.
+ Attualmente non abbiamo bisogno di aiuto per lo sviluppo.
+ Tuttavia, ci sono molte cose che puoi fare per supportare Greenshot e il team di sviluppo.
Grazie anticipatamente :)
- Considera una donazione
+ Fai una donazione
- Stiamo lavorando molto su Greenshot e stiamo spendendo molto tempo per fornire
- un buon prodotto software gratuito e open source. Se ti sei reso conto che Greenshot
- ti ha reso più produttivo, e se fa risparmiare a te (o alla tua società)
- molto tempo e denaro, o se semplicemente ti piace Greenshot e l'idea
- di software open source: per cortesia, considera di onorare i nostri sforzi con una donazione.
- Per cortesia dai un'occhiata alla nostra home page per vedere come puoi aiutare il team di sviluppo di Greenshot:
+ Stiamo lavorando molto su Greenshot e stiamo spendendo molto tempo per fornire un buon prodotto software gratuito e open source.
+ Se ti sei reso conto che Greenshot ti ha reso più produttivo, e se fa risparmiare a te (o alla tua società) molto tempo e denaro, o se semplicemente ti piace Greenshot e l'idea di software open source considera di onorare i nostri sforzi con una donazione.
+ Dai un'occhiata alla nostra home page per vedere come puoi aiutare il team di sviluppo di Greenshot:
http://getgreenshot.org/support/
Spargi la parola
- Se ti piace Greenshot, fallo sapere anche agli altri: racconta ai tuoi amici di Greenshot.
+ Se ti piace Greenshot, fallo sapere anche agli altri: racconta ai tuoi amici di Greenshot.
Anche loro, a loro volta :)
Commenta positivamente Greenshot sui portali di software, oppure metti un link sulla tua home page, blog o sito web.
@@ -376,20 +340,16 @@
Invia una traduzione
- Greenshot non è disponibile nella tua lingua preferita? Se ti senti in grado di tradurre un pezzo di software,
- sei più che benvenuto.
- Se sei un utente registrato su sourceforge.net, puoi inviare le traduzioni al nostro
- translations tracker .
- Prima di farlo, assicurati che non esista già la traduzione sulla nostra
- pagina di download . Controlla anche il nostro translations tracker ,
- ci potrebbe essere una traduzione in lavorazione, o almeno in discussione.
- Ti preghiamo di notare che forniremo una traduzione della nostra pagina di download solo se è stata inviata mediante
- il tuo conto utente su sourceforge.net. Visto che molto probabilmente non siamo in grado di capire la traduzione, è opportuno
- che gli altri utenti di sourceforge possano essere in grado di contattarti per revisioni o miglioramenti
- in caso di nuove versioni di Greenshot.
+ Greenshot non è disponibile nella tua lingua preferita?
+ Se ti senti in grado di tradurre un pezzo di software, sei più che benvenuto.
+ Se sei un utente registrato su sourceforge.net, puoi inviare le traduzioni al nostro translations tracker .
+ Prima di farlo, assicurati che non esista già la traduzione sulla nostra pagina download .
+ Controlla anche il nostro translations tracker , ci potrebbe essere una traduzione in lavorazione, o almeno in discussione.
+ Nota che forniremo una traduzione della nostra pagina di download solo se è stata inviata mediante il tuo account utente di sourceforge.net.
+ Visto che molto probabilmente non siamo in grado di capire la traduzione, è opportuno che gli altri utenti di sourceforge possano essere in grado di contattarti per revisioni o miglioramenti in caso di nuove versioni di Greenshot.
-
\ No newline at end of file
+