From 392ef6ac6d06b29435858fdf74fad7542ad77e87 Mon Sep 17 00:00:00 2001 From: GrandStrateGuerre Date: Wed, 31 May 2023 21:44:00 +0200 Subject: [PATCH] Corrects designer issues in Visual Studio (MS) --- src/Greenshot.Base/Core/CoreConfiguration.cs | 94 ++++++++++++++++++- src/Greenshot.Base/IniFile/IniConfig.cs | 4 +- .../Configuration/EditorConfiguration.cs | 14 +++ ...ontextMenuToolStripProfessionalRenderer.cs | 5 +- src/Greenshot/Forms/AboutForm.Designer.cs | 4 +- src/Greenshot/Forms/BaseForm.cs | 3 +- src/Greenshot/Forms/MainForm.Designer.cs | 19 ++-- src/Greenshot/Forms/MainForm.cs | 3 +- .../Forms/PrintOptionsDialog.Designer.cs | 17 ++-- src/Greenshot/Forms/SettingsForm.Designer.cs | 72 +++++++------- 10 files changed, 174 insertions(+), 61 deletions(-) diff --git a/src/Greenshot.Base/Core/CoreConfiguration.cs b/src/Greenshot.Base/Core/CoreConfiguration.cs index 3e085bc9b..6b536599d 100644 --- a/src/Greenshot.Base/Core/CoreConfiguration.cs +++ b/src/Greenshot.Base/Core/CoreConfiguration.cs @@ -43,289 +43,375 @@ namespace Greenshot.Base.Core [IniProperty("Language", Description = "The language in IETF format (e.g. en-US)")] public string Language { get; set; } + public const string _Language = nameof(Language); [IniProperty("RegionHotkey", Description = "Hotkey for starting the region capture", DefaultValue = "PrintScreen")] public string RegionHotkey { get; set; } + public const string _RegionHotkey = nameof(RegionHotkey); [IniProperty("WindowHotkey", Description = "Hotkey for starting the window capture", DefaultValue = "Alt + PrintScreen")] public string WindowHotkey { get; set; } + public const string _WindowHotkey = nameof(WindowHotkey); [IniProperty("FullscreenHotkey", Description = "Hotkey for starting the fullscreen capture", DefaultValue = "Ctrl + PrintScreen")] public string FullscreenHotkey { get; set; } + public const string _FullscreenHotkey = nameof(FullscreenHotkey); [IniProperty("LastregionHotkey", Description = "Hotkey for starting the last region capture", DefaultValue = "Shift + PrintScreen")] public string LastregionHotkey { get; set; } + public const string _LastregionHotkey = nameof(LastregionHotkey); [IniProperty("IEHotkey", Description = "Hotkey for starting the IE capture", DefaultValue = "Shift + Ctrl + PrintScreen")] public string IEHotkey { get; set; } + public const string _IEHotkey = nameof(IEHotkey); [IniProperty("ClipboardHotkey", Description = "Hotkey for opening the clipboard contents into the editor", ExcludeIfNull = true)] public string ClipboardHotkey { get; set; } + public const string _ClipboardHotkey = nameof(ClipboardHotkey); [IniProperty("IsFirstLaunch", Description = "Is this the first time launch?", DefaultValue = "true")] public bool IsFirstLaunch { get; set; } + public const string _IsFirstLaunch = nameof(IsFirstLaunch); [IniProperty("Destinations", Separator = ",", Description = "Which destinations? Possible options (more might be added by plugins) are: Editor, FileDefault, FileWithDialog, Clipboard, Printer, EMail, Picker", DefaultValue = "Picker")] public List OutputDestinations { get; set; } = new List(); + public const string _OutputDestinations = nameof(OutputDestinations); [IniProperty("ClipboardFormats", Separator = ",", Description = "Specify which formats we copy on the clipboard? Options are: PNG, HTML, HTMLDATAURL and DIB", DefaultValue = "PNG,DIB")] public List ClipboardFormats { get; set; } = new List(); + public const string _ClipboardFormats = nameof(ClipboardFormats); [IniProperty("CaptureMousepointer", Description = "Should the mouse be captured?", DefaultValue = "true")] public bool CaptureMousepointer { get; set; } + public const string _CaptureMousepointer = nameof(CaptureMousepointer); [IniProperty("CaptureWindowsInteractive", Description = "Use interactive window selection to capture? (false=Capture active window)", DefaultValue = "false")] public bool CaptureWindowsInteractive { get; set; } + public const string _CaptureWindowsInteractive = nameof(CaptureWindowsInteractive); [IniProperty("CaptureDelay", Description = "Capture delay in millseconds.", DefaultValue = "100")] public int CaptureDelay { get; set; } + public const string _CaptureDelay = nameof(CaptureDelay); [IniProperty("ScreenCaptureMode", Description = "The capture mode used to capture a screen. (Auto, FullScreen, Fixed)", DefaultValue = "Auto")] public ScreenCaptureMode ScreenCaptureMode { get; set; } + public const string _ScreenCaptureMode = nameof(ScreenCaptureMode); [IniProperty("ScreenToCapture", Description = "The screen number to capture when using ScreenCaptureMode Fixed.", DefaultValue = "1")] public int ScreenToCapture { get; set; } + public const string _ScreenToCapture = nameof(ScreenToCapture); [IniProperty("WindowCaptureMode", Description = "The capture mode used to capture a Window (Screen, GDI, Aero, AeroTransparent, Auto).", DefaultValue = "Auto")] public WindowCaptureMode WindowCaptureMode { get; set; } + public const string _WindowCaptureMode = nameof(WindowCaptureMode); [IniProperty("WindowCaptureAllChildLocations", Description = "Enable/disable capture all children, very slow but will make it possible to use this information in the editor.", DefaultValue = "False")] public bool WindowCaptureAllChildLocations { get; set; } + public const string _WindowCaptureAllChildLocations = nameof(WindowCaptureAllChildLocations); [IniProperty("DWMBackgroundColor", Description = "The background color for a DWM window capture.")] public Color DWMBackgroundColor { get; set; } + public const string _DWMBackgroundColor = nameof(DWMBackgroundColor); [IniProperty("PlayCameraSound", LanguageKey = "settings_playsound", Description = "Play a camera sound after taking a capture.", DefaultValue = "false")] public bool PlayCameraSound { get; set; } = false; + public const string _PlayCameraSound = nameof(PlayCameraSound); [IniProperty("ShowTrayNotification", LanguageKey = "settings_shownotify", Description = "Show a notification from the systray when a capture is taken.", DefaultValue = "true")] public bool ShowTrayNotification { get; set; } = true; + public const string _ShowTrayNotification = nameof(ShowTrayNotification); [IniProperty("OutputFilePath", Description = "Output file path.")] public string OutputFilePath { get; set; } + public const string _OutputFilePath = nameof(OutputFilePath); [IniProperty("OutputFileAllowOverwrite", Description = "If the target file already exists True will make Greenshot always overwrite and False will display a 'Save-As' dialog.", DefaultValue = "true")] public bool OutputFileAllowOverwrite { get; set; } + public const string _OutputFileAllowOverwrite = nameof(OutputFileAllowOverwrite); [IniProperty("OutputFileFilenamePattern", Description = "Filename pattern for screenshot.", DefaultValue = "${capturetime:d\"yyyy-MM-dd HH_mm_ss\"}-${title}")] public string OutputFileFilenamePattern { get; set; } + public const string _OutputFileFilenamePattern = nameof(OutputFileFilenamePattern); [IniProperty("OutputFileFormat", Description = "Default file type for writing screenshots. (bmp, gif, jpg, png, tiff)", DefaultValue = "png")] public OutputFormat OutputFileFormat { get; set; } = OutputFormat.png; + public const string _OutputFileFormat = nameof(OutputFileFormat); [IniProperty("OutputFileReduceColors", Description = "If set to true, than the colors of the output file are reduced to 256 (8-bit) colors", DefaultValue = "false")] public bool OutputFileReduceColors { get; set; } + public const string _OutputFileReduceColors = nameof(OutputFileReduceColors); [IniProperty("OutputFileAutoReduceColors", Description = "If set to true the amount of colors is counted and if smaller than 256 the color reduction is automatically used.", DefaultValue = "false")] public bool OutputFileAutoReduceColors { get; set; } + public const string _OutputFileAutoReduceColors = nameof(OutputFileAutoReduceColors); [IniProperty("OutputFileReduceColorsTo", Description = "Amount of colors to reduce to, when reducing", DefaultValue = "256")] public int OutputFileReduceColorsTo { get; set; } + public const string _OutputFileReduceColorsTo = nameof(OutputFileReduceColorsTo); [IniProperty("OutputFileCopyPathToClipboard", Description = "When saving a screenshot, copy the path to the clipboard?", DefaultValue = "true")] public bool OutputFileCopyPathToClipboard { get; set; } + public const string _OutputFileCopyPathToClipboard = nameof(OutputFileCopyPathToClipboard); [IniProperty("OutputFileAsFullpath", Description = "SaveAs Full path?")] public string OutputFileAsFullpath { get; set; } + public const string _OutputFileAsFullpath = nameof(OutputFileAsFullpath); [IniProperty("OutputFileJpegQuality", Description = "JPEG file save quality in %.", DefaultValue = "80")] public int OutputFileJpegQuality { get; set; } + public const string _OutputFileJpegQuality = nameof(OutputFileJpegQuality); [IniProperty("OutputFilePromptQuality", Description = "Ask for the quality before saving?", DefaultValue = "false")] public bool OutputFilePromptQuality { get; set; } + public const string _OutputFilePromptQuality = nameof(OutputFilePromptQuality); [IniProperty("OutputFileIncrementingNumber", Description = "The number for the ${NUM} in the filename pattern, is increased automatically after each save.", DefaultValue = "1")] public uint OutputFileIncrementingNumber { get; set; } + public const string _OutputFileIncrementingNumber = nameof(OutputFileIncrementingNumber); [IniProperty("OutputPrintPromptOptions", LanguageKey = "settings_alwaysshowprintoptionsdialog", Description = "Ask for print options when printing?", DefaultValue = "true")] public bool OutputPrintPromptOptions { get; set; } + public const string _OutputPrintPromptOptions = nameof(OutputPrintPromptOptions); [IniProperty("OutputPrintAllowRotate", LanguageKey = "printoptions_allowrotate", Description = "Allow rotating the picture for fitting on paper?", DefaultValue = "false")] public bool OutputPrintAllowRotate { get; set; } + public const string _OutputPrintAllowRotate = nameof(OutputPrintAllowRotate); [IniProperty("OutputPrintAllowEnlarge", LanguageKey = "printoptions_allowenlarge", Description = "Allow growing the picture for fitting on paper?", DefaultValue = "false")] public bool OutputPrintAllowEnlarge { get; set; } + public const string _OutputPrintAllowEnlarge = nameof(OutputPrintAllowEnlarge); [IniProperty("OutputPrintAllowShrink", LanguageKey = "printoptions_allowshrink", Description = "Allow shrinking the picture for fitting on paper?", DefaultValue = "true")] public bool OutputPrintAllowShrink { get; set; } + public const string _OutputPrintAllowShrink = nameof(OutputPrintAllowShrink); [IniProperty("OutputPrintCenter", LanguageKey = "printoptions_allowcenter", Description = "Center image when printing?", DefaultValue = "true")] public bool OutputPrintCenter { get; set; } + public const string _OutputPrintCenter = nameof(OutputPrintCenter); [IniProperty("OutputPrintInverted", LanguageKey = "printoptions_inverted", Description = "Print image inverted (use e.g. for console captures)", DefaultValue = "false")] public bool OutputPrintInverted { get; set; } + public const string _OutputPrintInverted = nameof(OutputPrintInverted); [IniProperty("OutputPrintGrayscale", LanguageKey = "printoptions_printgrayscale", Description = "Force grayscale printing", DefaultValue = "false")] public bool OutputPrintGrayscale { get; set; } + public const string _OutputPrintGrayscale = nameof(OutputPrintGrayscale); [IniProperty("OutputPrintMonochrome", LanguageKey = "printoptions_printmonochrome", Description = "Force monorchrome printing", DefaultValue = "false")] public bool OutputPrintMonochrome { get; set; } + public const string _OutputPrintMonochrome = nameof(OutputPrintMonochrome); [IniProperty("OutputPrintMonochromeThreshold", Description = "Threshold for monochrome filter (0 - 255), lower value means less black", DefaultValue = "127")] public byte OutputPrintMonochromeThreshold { get; set; } + public const string _OutputPrintMonochromeThreshold = nameof(OutputPrintMonochromeThreshold); [IniProperty("OutputPrintFooter", LanguageKey = "printoptions_timestamp", Description = "Print footer on print?", DefaultValue = "true")] public bool OutputPrintFooter { get; set; } + public const string _OutputPrintFooter = nameof(OutputPrintFooter); [IniProperty("OutputPrintFooterPattern", Description = "Footer pattern", DefaultValue = "${capturetime:d\"D\"} ${capturetime:d\"T\"} - ${title}")] public string OutputPrintFooterPattern { get; set; } + public const string _OutputPrintFooterPattern = nameof(OutputPrintFooterPattern); [IniProperty("NotificationSound", Description = "The wav-file to play when a capture is taken, loaded only once at the Greenshot startup", DefaultValue = "default")] public string NotificationSound { get; set; } + public const string _NotificationSound = nameof(NotificationSound); [IniProperty("UseProxy", Description = "Use your global proxy?", DefaultValue = "True")] public bool UseProxy { get; set; } + public const string _UseProxy = nameof(UseProxy); [IniProperty("IECapture", Description = "Enable/disable IE capture", DefaultValue = "True")] public bool IECapture { get; set; } + public const string _IECapture = nameof(IECapture); [IniProperty("IEFieldCapture", Description = "Enable/disable IE field capture, very slow but will make it possible to annotate the fields of a capture in the editor.", DefaultValue = "False")] public bool IEFieldCapture { get; set; } + public const string _IEFieldCapture = nameof(IEFieldCapture); [IniProperty("WindowClassesToCheckForIE", Description = "Comma separated list of Window-Classes which need to be checked for a IE instance!", DefaultValue = "AfxFrameOrView70,IMWindowClass")] public List WindowClassesToCheckForIE { get; set; } + public const string _WindowClassesToCheckForIE = nameof(WindowClassesToCheckForIE); [IniProperty("AutoCropDifference", Description = "Sets how to compare the colors for the autocrop detection, the higher the more is 'selected'. Possible values are from 0 to 255, where everything above ~150 doesn't make much sense!", DefaultValue = "10")] public int AutoCropDifference { get; set; } + public const string _AutoCropDifference = nameof(AutoCropDifference); [IniProperty("IncludePlugins", Description = "Comma separated list of Plugins which are allowed. If something in the list, than every plugin not in the list will not be loaded!")] public List IncludePlugins { get; set; } + public const string _IncludePlugins = nameof(IncludePlugins); [IniProperty("ExcludePlugins", Description = "Comma separated list of Plugins which are NOT allowed.")] public List ExcludePlugins { get; set; } + public const string _ExcludePlugins = nameof(ExcludePlugins); [IniProperty("ExcludeDestinations", Description = "Comma separated list of destinations which should be disabled.")] public List ExcludeDestinations { get; set; } + public const string _ExcludeDestinations = nameof(ExcludeDestinations); [IniProperty("UpdateCheckInterval", Description = "How many days between every update check? (0=no checks)", DefaultValue = "14")] public int UpdateCheckInterval { get; set; } + public const string _UpdateCheckInterval = nameof(UpdateCheckInterval); [IniProperty("LastUpdateCheck", Description = "Last update check")] public DateTime LastUpdateCheck { get; set; } + public const string _LastUpdateCheck = nameof(LastUpdateCheck); [IniProperty("DisableSettings", Description = "Enable/disable the access to the settings, can only be changed manually in this .ini", DefaultValue = "False")] public bool DisableSettings { get; set; } + public const string _DisableSettings = nameof(DisableSettings); [IniProperty("DisableQuickSettings", Description = "Enable/disable the access to the quick settings, can only be changed manually in this .ini", DefaultValue = "False")] public bool DisableQuickSettings { get; set; } + public const string _DisableQuickSettings = nameof(DisableQuickSettings); [IniProperty("DisableTrayicon", Description = "Disable the trayicon, can only be changed manually in this .ini", DefaultValue = "False")] public bool HideTrayicon { get; set; } + public const string _HideTrayicon = nameof(HideTrayicon); [IniProperty("HideExpertSettings", Description = "Hide expert tab in the settings, can only be changed manually in this .ini", DefaultValue = "False")] public bool HideExpertSettings { get; set; } + public const string _HideExpertSettings = nameof(HideExpertSettings); [IniProperty("ThumnailPreview", Description = "Enable/disable thumbnail previews", DefaultValue = "True")] public bool ThumnailPreview { get; set; } + public const string _ThumnailPreview = nameof(ThumnailPreview); [IniProperty("NoGDICaptureForProduct", Description = "List of productnames for which GDI capturing is skipped (using fallback).", DefaultValue = "IntelliJ IDEA")] public List NoGDICaptureForProduct { get; set; } + public const string _NoGDICaptureForProduct = nameof(NoGDICaptureForProduct); [IniProperty("NoDWMCaptureForProduct", Description = "List of productnames for which DWM capturing is skipped (using fallback).", DefaultValue = "Citrix ICA Client")] public List NoDWMCaptureForProduct { get; set; } + public const string _NoDWMCaptureForProduct = nameof(NoDWMCaptureForProduct); [IniProperty("OptimizeForRDP", Description = "Make some optimizations for usage with remote desktop", DefaultValue = "False")] public bool OptimizeForRDP { get; set; } + public const string _OptimizeForRDP = nameof(OptimizeForRDP); [IniProperty("DisableRDPOptimizing", Description = "Disable all optimizations for usage with remote desktop", DefaultValue = "False")] public bool DisableRDPOptimizing { get; set; } + public const string _DisableRDPOptimizing = nameof(DisableRDPOptimizing); [IniProperty("MinimizeWorkingSetSize", Description = "Optimize memory footprint, but with a performance penalty!", DefaultValue = "False")] public bool MinimizeWorkingSetSize { get; set; } + public const string _MinimizeWorkingSetSize = nameof(MinimizeWorkingSetSize); [IniProperty("WindowCaptureRemoveCorners", Description = "Remove the corners from a window capture", DefaultValue = "True")] public bool WindowCaptureRemoveCorners { get; set; } + public const string _WindowCaptureRemoveCorners = nameof(WindowCaptureRemoveCorners); [IniProperty("CheckForUnstable", Description = "Also check for unstable version updates", DefaultValue = "False")] public bool CheckForUnstable { get; set; } + public const string _CheckForUnstable = nameof(CheckForUnstable); [IniProperty("ActiveTitleFixes", Description = "The fixes that are active.")] public List ActiveTitleFixes { get; set; } + public const string _ActiveTitleFixes = nameof(ActiveTitleFixes); [IniProperty("TitleFixMatcher", Description = "The regular expressions to match the title with.")] public Dictionary TitleFixMatcher { get; set; } + public const string _TitleFixMatcher = nameof(TitleFixMatcher); [IniProperty("TitleFixReplacer", Description = "The replacements for the matchers.")] public Dictionary TitleFixReplacer { get; set; } + public const string _TitleFixReplacer = nameof(TitleFixReplacer); [IniProperty("ExperimentalFeatures", Description = "A list of experimental features, this allows us to test certain features before releasing them.", ExcludeIfNull = true)] public List ExperimentalFeatures { get; set; } + public const string _ExperimentalFeatures = nameof(ExperimentalFeatures); [IniProperty("EnableSpecialDIBClipboardReader", Description = "Enable a special DIB clipboard reader", DefaultValue = "True")] public bool EnableSpecialDIBClipboardReader { get; set; } + public const string _EnableSpecialDIBClipboardReader = nameof(EnableSpecialDIBClipboardReader); [IniProperty("WindowCornerCutShape", Description = "The cutshape which is used to remove the window corners, is mirrorred for all corners", DefaultValue = "5,3,2,1,1")] public List WindowCornerCutShape { get; set; } + public const string _WindowCornerCutShape = nameof(WindowCornerCutShape); [IniProperty("LeftClickAction", Description = "Specify what action is made if the tray icon is left clicked, if a double-click action is specified this action is initiated after a delay (configurable via the windows double-click speed)", DefaultValue = "SHOW_CONTEXT_MENU")] public ClickActions LeftClickAction { get; set; } + public const string _LeftClickAction = nameof(LeftClickAction); [IniProperty("DoubleClickAction", Description = "Specify what action is made if the tray icon is double clicked", DefaultValue = "OPEN_LAST_IN_EXPLORER")] public ClickActions DoubleClickAction { get; set; } + public const string _DoubleClickAction = nameof(DoubleClickAction); [IniProperty("ZoomerEnabled", Description = "Sets if the zoomer is enabled", DefaultValue = "True")] public bool ZoomerEnabled { get; set; } + public const string _ZoomerEnabled = nameof(ZoomerEnabled); [IniProperty("ZoomerOpacity", Description = "Specify the transparency for the zoomer, from 0-1 (where 1 is no transparency and 0 is complete transparent. An usefull setting would be 0.7)", DefaultValue = "1")] public float ZoomerOpacity { get; set; } + public const string _ZoomerOpacity = nameof(ZoomerOpacity); [IniProperty("MaxMenuItemLength", Description = "Maximum length of submenu items in the context menu, making this longer might cause context menu issues on dual screen systems.", DefaultValue = "25")] public int MaxMenuItemLength { get; set; } + public const string _MaxMenuItemLength = nameof(MaxMenuItemLength); [IniProperty("MailApiTo", Description = "The 'to' field for the email destination (settings for Outlook can be found under the Office section)", DefaultValue = "")] public string MailApiTo { get; set; } + public const string _MailApiTo = nameof(MailApiTo); [IniProperty("MailApiCC", Description = "The 'CC' field for the email destination (settings for Outlook can be found under the Office section)", DefaultValue = "")] public string MailApiCC { get; set; } + public const string _MailApiCC = nameof(MailApiCC); [IniProperty("MailApiBCC", Description = "The 'BCC' field for the email destination (settings for Outlook can be found under the Office section)", DefaultValue = "")] public string MailApiBCC { get; set; } + public const string _MailApiBCC = nameof(MailApiBCC); [IniProperty("OptimizePNGCommand", Description = "Optional command to execute on a temporary PNG file, the command should overwrite the file and Greenshot will read it back. Note: this command is also executed when uploading PNG's!", DefaultValue = "")] public string OptimizePNGCommand { get; set; } + public const string _OptimizePNGCommand = nameof(OptimizePNGCommand); [IniProperty("OptimizePNGCommandArguments", Description = "Arguments for the optional command to execute on a PNG, {0} is replaced by the temp-filename from Greenshot. Note: Temp-file is deleted afterwards by Greenshot.", DefaultValue = "\"{0}\"")] public string OptimizePNGCommandArguments { get; set; } + public const string _OptimizePNGCommandArguments = nameof(OptimizePNGCommandArguments); [IniProperty("LastSaveWithVersion", Description = "Version of Greenshot which created this .ini")] public string LastSaveWithVersion { get; set; } + public const string _LastSaveWithVersion = nameof(LastSaveWithVersion); [IniProperty("ProcessEXIFOrientation", Description = "When reading images from files or clipboard, use the EXIF information to correct the orientation", DefaultValue = "True")] public bool ProcessEXIFOrientation { get; set; } + public const string _ProcessEXIFOrientation = nameof(ProcessEXIFOrientation); [IniProperty("LastCapturedRegion", Description = "The last used region, for reuse in the capture last region")] public NativeRect LastCapturedRegion { get; set; } + public const string _LastCapturedRegion = nameof(LastCapturedRegion); [IniProperty("Win10BorderCrop", Description = "The capture is cropped with these settings, e.g. when you don't want to color around it -1,-1"), DefaultValue("0,0")] public NativeSize Win10BorderCrop { get; set; } + public const string _Win10BorderCrop = nameof(Win10BorderCrop); private NativeSize _iconSize; @@ -369,14 +455,18 @@ namespace Greenshot.Base.Core } } } - + public const string _IconSize = nameof(IconSize); + [IniProperty("WebRequestTimeout", Description = "The connect timeout value for web requests, these are seconds", DefaultValue = "100")] public int WebRequestTimeout { get; set; } + public const string _WebRequestTimeout = nameof(WebRequestTimeout); [IniProperty("WebRequestReadWriteTimeout", Description = "The read/write timeout value for web requests, these are seconds", DefaultValue = "100")] public int WebRequestReadWriteTimeout { get; set; } + public const string _WebRequestReadWriteTimeout = nameof(WebRequestReadWriteTimeout); public bool UseLargeIcons => IconSize.Width >= 32 || IconSize.Height >= 32; + public const string _UseLargeIcons = nameof(UseLargeIcons); /// /// A helper method which returns true if the supplied experimental feature is enabled @@ -658,5 +748,7 @@ namespace Greenshot.Base.Core OutputFileAsFullpath = GetDefault(nameof(OutputFileAsFullpath)) as string; } } + + } } \ No newline at end of file diff --git a/src/Greenshot.Base/IniFile/IniConfig.cs b/src/Greenshot.Base/IniFile/IniConfig.cs index cbe04e11b..d69b45845 100644 --- a/src/Greenshot.Base/IniFile/IniConfig.cs +++ b/src/Greenshot.Base/IniFile/IniConfig.cs @@ -205,7 +205,9 @@ namespace Greenshot.Base.IniFile string applicationStartupPath; try { - applicationStartupPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); + applicationStartupPath = Environment.CurrentDirectory; + //Buggy in designer mode + //applicationStartupPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); } catch (Exception exception) { diff --git a/src/Greenshot.Editor/Configuration/EditorConfiguration.cs b/src/Greenshot.Editor/Configuration/EditorConfiguration.cs index 3a516797c..ebe553e17 100644 --- a/src/Greenshot.Editor/Configuration/EditorConfiguration.cs +++ b/src/Greenshot.Editor/Configuration/EditorConfiguration.cs @@ -40,45 +40,59 @@ namespace Greenshot.Editor.Configuration { [IniProperty("RecentColors", Separator = "|", Description = "Last used colors")] public List RecentColors { get; set; } + public const string _RecentColors = nameof(RecentColors); [IniProperty("LastFieldValue", Separator = "|", Description = "Field values, make sure the last used settings are re-used")] public Dictionary LastUsedFieldValues { get; set; } + public const string _LastUsedFieldValues = nameof(LastUsedFieldValues); [IniProperty("MatchSizeToCapture", Description = "Match the editor window size to the capture", DefaultValue = "True")] public bool MatchSizeToCapture { get; set; } + public const string _MatchSizeToCapture = nameof(MatchSizeToCapture); [IniProperty("WindowPlacementFlags", Description = "Placement flags", DefaultValue = "0")] public WindowPlacementFlags WindowPlacementFlags { get; set; } + public const string _WindowPlacementFlags = nameof(WindowPlacementFlags); [IniProperty("WindowShowCommand", Description = "Show command", DefaultValue = "Normal")] public ShowWindowCommands ShowWindowCommand { get; set; } + public const string _ShowWindowCommand = nameof(ShowWindowCommand); [IniProperty("WindowMinPosition", Description = "Position of minimized window", DefaultValue = "-1,-1")] public NativePoint WindowMinPosition { get; set; } + public const string _WindowMinPosition = nameof(WindowMinPosition); [IniProperty("WindowMaxPosition", Description = "Position of maximized window", DefaultValue = "-1,-1")] public NativePoint WindowMaxPosition { get; set; } + public const string _WindowMaxPosition = nameof(WindowMaxPosition); [IniProperty("WindowNormalPosition", Description = "Position of normal window", DefaultValue = "100,100,400,400")] public NativeRect WindowNormalPosition { get; set; } + public const string _WindowNormalPosition = nameof(WindowNormalPosition); [IniProperty("ReuseEditor", Description = "Reuse already open editor", DefaultValue = "false")] public bool ReuseEditor { get; set; } + public const string _ReuseEditor = nameof(ReuseEditor); [IniProperty("FreehandSensitivity", Description = "The smaller this number, the less smoothing is used. Decrease for detailed drawing, e.g. when using a pen. Increase for smoother lines. e.g. when you want to draw a smooth line. Minimal value is 1, max is 2147483647.", DefaultValue = "3")] public int FreehandSensitivity { get; set; } + public const string _FreehandSensitivity = nameof(FreehandSensitivity); [IniProperty("SuppressSaveDialogAtClose", Description = "Suppressed the 'do you want to save' dialog when closing the editor.", DefaultValue = "False")] public bool SuppressSaveDialogAtClose { get; set; } + public const string _SuppressSaveDialogAtClose = nameof(SuppressSaveDialogAtClose); [IniProperty("DropShadowEffectSettings", Description = "Settings for the drop shadow effect.")] public DropShadowEffect DropShadowEffectSettings { get; set; } + public const string _DropShadowEffectSettings = nameof(DropShadowEffectSettings); [IniProperty("TornEdgeEffectSettings", Description = "Settings for the torn edge effect.")] public TornEdgeEffect TornEdgeEffectSettings { get; set; } + public const string _TornEdgeEffectSettings = nameof(TornEdgeEffectSettings); [IniProperty("DefaultEditorSize", Description = "The size for the editor when it's opened without a capture", DefaultValue = "500,500")] public NativeSize DefaultEditorSize { get; set; } + public const string _DefaultEditorSize = nameof(DefaultEditorSize); public override void AfterLoad() diff --git a/src/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs b/src/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs index 0a9a511c7..a117cfb90 100644 --- a/src/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs +++ b/src/Greenshot/Controls/ContextMenuToolStripProfessionalRenderer.cs @@ -26,6 +26,7 @@ using Dapplo.Windows.Dpi; using Greenshot.Base.Core; using Greenshot.Base.IniFile; using Greenshot.Base.Interfaces; +using Greenshot.Forms; namespace Greenshot.Controls { @@ -39,8 +40,8 @@ namespace Greenshot.Controls private static Image _scaledCheckbox; public ContextMenuToolStripProfessionalRenderer(IProvideDeviceDpi provideDeviceDpi) - { - _provideDeviceDpi = provideDeviceDpi; + { + _provideDeviceDpi = provideDeviceDpi; } protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) { diff --git a/src/Greenshot/Forms/AboutForm.Designer.cs b/src/Greenshot/Forms/AboutForm.Designer.cs index 1dbdbdc2d..29a16494f 100644 --- a/src/Greenshot/Forms/AboutForm.Designer.cs +++ b/src/Greenshot/Forms/AboutForm.Designer.cs @@ -69,9 +69,9 @@ namespace Greenshot.Forms { // // lblTitle // - var fontsize = (this.DeviceDpi / 96) * lblTitle.Font.Size; + //var fontsize = (this.DeviceDpi / 96) * lblTitle.Font.Size;//cause the designer to be buggy this.lblTitle.AutoSize = true; - this.lblTitle.Font = new System.Drawing.Font(System.Drawing.FontFamily.GenericSansSerif, fontsize, 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); diff --git a/src/Greenshot/Forms/BaseForm.cs b/src/Greenshot/Forms/BaseForm.cs index ff0796848..cb62b9c9c 100644 --- a/src/Greenshot/Forms/BaseForm.cs +++ b/src/Greenshot/Forms/BaseForm.cs @@ -20,13 +20,14 @@ */ using Greenshot.Base.Controls; +using Greenshot.Base.Interfaces; namespace Greenshot.Forms { /// /// This class is only here to help in the Designer mode, so it's clear where the language files are /// - public class BaseForm : GreenshotForm + public class BaseForm : GreenshotForm, IProvideDeviceDpi { } } \ No newline at end of file diff --git a/src/Greenshot/Forms/MainForm.Designer.cs b/src/Greenshot/Forms/MainForm.Designer.cs index b558bf4f9..ca05f72ad 100644 --- a/src/Greenshot/Forms/MainForm.Designer.cs +++ b/src/Greenshot/Forms/MainForm.Designer.cs @@ -107,10 +107,10 @@ namespace Greenshot.Forms { this.contextMenu.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.ContextMenuClosing); this.contextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuOpening); this.contextMenu.Renderer = new Greenshot.Controls.ContextMenuToolStripProfessionalRenderer(this); - // - // contextmenu_capturearea - // - this.contextmenu_capturearea.Image = ((System.Drawing.Image)(resources.GetObject("contextmenu_capturearea.Image"))); + // + // contextmenu_capturearea + // + this.contextmenu_capturearea.Image = ((System.Drawing.Image)(resources.GetObject("contextmenu_capturearea.Image"))); this.contextmenu_capturearea.Name = "contextmenu_capturearea"; this.contextmenu_capturearea.ShortcutKeyDisplayString = "Print"; this.contextmenu_capturearea.Size = new System.Drawing.Size(170, 22); @@ -204,11 +204,12 @@ namespace Greenshot.Forms { // contextmenu_quicksettings // this.contextmenu_quicksettings.Name = "contextmenu_quicksettings"; - this.contextmenu_quicksettings.Size = new System.Drawing.Size(170, coreConfiguration.IconSize.Height + 8); - // - // contextmenu_settings - // - this.contextmenu_settings.Image = ((System.Drawing.Image)(resources.GetObject("contextmenu_settings.Image"))); + //this.contextmenu_quicksettings.Size = new System.Drawing.Size(170, coreConfiguration.IconSize.Height + 8); + this.contextmenu_quicksettings.Size = new System.Drawing.Size(170, 16 + 8); + // + // contextmenu_settings + // + 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); diff --git a/src/Greenshot/Forms/MainForm.cs b/src/Greenshot/Forms/MainForm.cs index 081084d0b..9c3528874 100644 --- a/src/Greenshot/Forms/MainForm.cs +++ b/src/Greenshot/Forms/MainForm.cs @@ -62,7 +62,7 @@ namespace Greenshot.Forms /// /// This is the MainForm, the shell of Greenshot /// - public partial class MainForm : BaseForm, IGreenshotMainForm, ICaptureHelper, IProvideDeviceDpi + public partial class MainForm : BaseForm, IGreenshotMainForm, ICaptureHelper { private static ILog LOG; private static ResourceMutex _applicationMutex; @@ -322,6 +322,7 @@ namespace Greenshot.Forms // Should fix BUG-1633 Application.DoEvents(); + //create the instance _instance = new MainForm(transport); Application.Run(); } diff --git a/src/Greenshot/Forms/PrintOptionsDialog.Designer.cs b/src/Greenshot/Forms/PrintOptionsDialog.Designer.cs index 9f9d0a13a..ca4ab5481 100644 --- a/src/Greenshot/Forms/PrintOptionsDialog.Designer.cs +++ b/src/Greenshot/Forms/PrintOptionsDialog.Designer.cs @@ -20,6 +20,7 @@ */ using Greenshot.Base.Controls; +using Greenshot.Base.Core; namespace Greenshot.Forms { @@ -89,7 +90,7 @@ namespace Greenshot.Forms this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink"; this.checkboxAllowShrink.Location = new System.Drawing.Point(13, 23); this.checkboxAllowShrink.Name = "checkboxAllowShrink"; - this.checkboxAllowShrink.PropertyName = nameof(coreConfiguration.OutputPrintAllowShrink); + this.checkboxAllowShrink.PropertyName = CoreConfiguration._OutputPrintAllowShrink; this.checkboxAllowShrink.Size = new System.Drawing.Size(168, 17); this.checkboxAllowShrink.TabIndex = 2; this.checkboxAllowShrink.Text = "Shrink printout to fit paper size"; @@ -103,7 +104,7 @@ namespace Greenshot.Forms this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge"; this.checkboxAllowEnlarge.Location = new System.Drawing.Point(13, 46); this.checkboxAllowEnlarge.Name = "checkboxAllowEnlarge"; - this.checkboxAllowEnlarge.PropertyName = nameof(coreConfiguration.OutputPrintAllowEnlarge); + this.checkboxAllowEnlarge.PropertyName = CoreConfiguration._OutputPrintAllowEnlarge; this.checkboxAllowEnlarge.Size = new System.Drawing.Size(174, 17); this.checkboxAllowEnlarge.TabIndex = 3; this.checkboxAllowEnlarge.Text = "Enlarge printout to fit paper size"; @@ -117,7 +118,7 @@ namespace Greenshot.Forms this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter"; this.checkboxAllowCenter.Location = new System.Drawing.Point(13, 92); this.checkboxAllowCenter.Name = "checkboxAllowCenter"; - this.checkboxAllowCenter.PropertyName = nameof(coreConfiguration.OutputPrintCenter); + this.checkboxAllowCenter.PropertyName = CoreConfiguration._OutputPrintCenter; this.checkboxAllowCenter.Size = new System.Drawing.Size(137, 17); this.checkboxAllowCenter.TabIndex = 5; this.checkboxAllowCenter.Text = "Center printout on page"; @@ -131,7 +132,7 @@ namespace Greenshot.Forms this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate"; this.checkboxAllowRotate.Location = new System.Drawing.Point(13, 69); this.checkboxAllowRotate.Name = "checkboxAllowRotate"; - this.checkboxAllowRotate.PropertyName = nameof(coreConfiguration.OutputPrintAllowRotate); + this.checkboxAllowRotate.PropertyName = CoreConfiguration._OutputPrintAllowRotate; this.checkboxAllowRotate.Size = new System.Drawing.Size(187, 17); this.checkboxAllowRotate.TabIndex = 4; this.checkboxAllowRotate.Text = "Rotate printout to page orientation"; @@ -158,7 +159,7 @@ namespace Greenshot.Forms this.checkboxDateTime.LanguageKey = "printoptions_timestamp"; this.checkboxDateTime.Location = new System.Drawing.Point(13, 115); this.checkboxDateTime.Name = "checkboxDateTime"; - this.checkboxDateTime.PropertyName = nameof(coreConfiguration.OutputPrintFooter); + this.checkboxDateTime.PropertyName = CoreConfiguration._OutputPrintFooter; this.checkboxDateTime.Size = new System.Drawing.Size(187, 17); this.checkboxDateTime.TabIndex = 6; this.checkboxDateTime.Text = "Print date / time at bottom of page"; @@ -184,7 +185,7 @@ namespace Greenshot.Forms this.checkboxPrintInverted.LanguageKey = "printoptions_inverted"; this.checkboxPrintInverted.Location = new System.Drawing.Point(13, 88); this.checkboxPrintInverted.Name = "checkboxPrintInverted"; - this.checkboxPrintInverted.PropertyName = nameof(coreConfiguration.OutputPrintInverted); + this.checkboxPrintInverted.PropertyName = CoreConfiguration._OutputPrintInverted; this.checkboxPrintInverted.Size = new System.Drawing.Size(141, 17); this.checkboxPrintInverted.TabIndex = 14; this.checkboxPrintInverted.Text = "Print with inverted colors"; @@ -198,7 +199,7 @@ namespace Greenshot.Forms this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale"; this.radioBtnGrayScale.Location = new System.Drawing.Point(13, 42); this.radioBtnGrayScale.Name = "radioBtnGrayScale"; - this.radioBtnGrayScale.PropertyName = nameof(coreConfiguration.OutputPrintGrayscale); + this.radioBtnGrayScale.PropertyName = CoreConfiguration._OutputPrintGrayscale; this.radioBtnGrayScale.Size = new System.Drawing.Size(137, 17); this.radioBtnGrayScale.TabIndex = 12; this.radioBtnGrayScale.Text = "Force grayscale printing"; @@ -212,7 +213,7 @@ namespace Greenshot.Forms this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome"; this.radioBtnMonochrome.Location = new System.Drawing.Point(13, 65); this.radioBtnMonochrome.Name = "radioBtnMonochrome"; - this.radioBtnMonochrome.PropertyName = nameof(coreConfiguration.OutputPrintMonochrome); + this.radioBtnMonochrome.PropertyName = CoreConfiguration._OutputPrintMonochrome; this.radioBtnMonochrome.Size = new System.Drawing.Size(148, 17); this.radioBtnMonochrome.TabIndex = 13; this.radioBtnMonochrome.Text = "Force black/white printing"; diff --git a/src/Greenshot/Forms/SettingsForm.Designer.cs b/src/Greenshot/Forms/SettingsForm.Designer.cs index 6bea356df..a1c5c27ad 100644 --- a/src/Greenshot/Forms/SettingsForm.Designer.cs +++ b/src/Greenshot/Forms/SettingsForm.Designer.cs @@ -237,7 +237,7 @@ namespace Greenshot.Forms { // this.textbox_screenshotname.Location = new System.Drawing.Point(138, 41); this.textbox_screenshotname.Name = "textbox_screenshotname"; - this.textbox_screenshotname.PropertyName = nameof(CoreConfiguration.OutputFileFilenamePattern); + this.textbox_screenshotname.PropertyName = CoreConfiguration._OutputFileFilenamePattern; this.textbox_screenshotname.Size = new System.Drawing.Size(233, 20); this.textbox_screenshotname.TabIndex = 3; this.textbox_screenshotname.TextChanged += new System.EventHandler(this.FilenamePatternChanged); @@ -266,7 +266,7 @@ namespace Greenshot.Forms { this.combobox_primaryimageformat.FormattingEnabled = true; this.combobox_primaryimageformat.Location = new System.Drawing.Point(138, 64); this.combobox_primaryimageformat.Name = "combobox_primaryimageformat"; - this.combobox_primaryimageformat.PropertyName = nameof(CoreConfiguration.OutputFileFormat); + this.combobox_primaryimageformat.PropertyName = CoreConfiguration._OutputFileFormat; this.combobox_primaryimageformat.Size = new System.Drawing.Size(268, 21); this.combobox_primaryimageformat.TabIndex = 5; // @@ -311,7 +311,7 @@ namespace Greenshot.Forms { this.checkbox_copypathtoclipboard.LanguageKey = "settings_copypathtoclipboard"; this.checkbox_copypathtoclipboard.Location = new System.Drawing.Point(12, 89); this.checkbox_copypathtoclipboard.Name = "checkbox_copypathtoclipboard"; - this.checkbox_copypathtoclipboard.PropertyName = nameof(CoreConfiguration.OutputFileCopyPathToClipboard); + this.checkbox_copypathtoclipboard.PropertyName = CoreConfiguration._OutputFileCopyPathToClipboard; this.checkbox_copypathtoclipboard.Size = new System.Drawing.Size(394, 24); this.checkbox_copypathtoclipboard.TabIndex = 6; this.checkbox_copypathtoclipboard.UseVisualStyleBackColor = true; @@ -376,7 +376,7 @@ namespace Greenshot.Forms { this.checkbox_reducecolors.LanguageKey = "settings_reducecolors"; this.checkbox_reducecolors.Location = new System.Drawing.Point(12, 72); this.checkbox_reducecolors.Name = "checkbox_reducecolors"; - this.checkbox_reducecolors.PropertyName = nameof(CoreConfiguration.OutputFileReduceColors); + this.checkbox_reducecolors.PropertyName = CoreConfiguration._OutputFileReduceColors; this.checkbox_reducecolors.Size = new System.Drawing.Size(394, 25); this.checkbox_reducecolors.TabIndex = 10; this.checkbox_reducecolors.UseVisualStyleBackColor = true; @@ -386,7 +386,7 @@ namespace Greenshot.Forms { this.checkbox_alwaysshowqualitydialog.LanguageKey = "settings_alwaysshowqualitydialog"; this.checkbox_alwaysshowqualitydialog.Location = new System.Drawing.Point(12, 50); this.checkbox_alwaysshowqualitydialog.Name = "checkbox_alwaysshowqualitydialog"; - this.checkbox_alwaysshowqualitydialog.PropertyName = nameof(CoreConfiguration.OutputFilePromptQuality); + this.checkbox_alwaysshowqualitydialog.PropertyName = CoreConfiguration._OutputFilePromptQuality; this.checkbox_alwaysshowqualitydialog.Size = new System.Drawing.Size(394, 25); this.checkbox_alwaysshowqualitydialog.TabIndex = 9; this.checkbox_alwaysshowqualitydialog.UseVisualStyleBackColor = true; @@ -528,7 +528,7 @@ namespace Greenshot.Forms { this.checkbox_usedefaultproxy.LanguageKey = "settings_usedefaultproxy"; this.checkbox_usedefaultproxy.Location = new System.Drawing.Point(7, 11); this.checkbox_usedefaultproxy.Name = "checkbox_usedefaultproxy"; - this.checkbox_usedefaultproxy.PropertyName = nameof(CoreConfiguration.UseProxy); + this.checkbox_usedefaultproxy.PropertyName = CoreConfiguration._UseProxy; this.checkbox_usedefaultproxy.Size = new System.Drawing.Size(397, 25); this.checkbox_usedefaultproxy.TabIndex = 7; this.checkbox_usedefaultproxy.UseVisualStyleBackColor = true; @@ -566,7 +566,7 @@ namespace Greenshot.Forms { this.lastregion_hotkeyControl.HotkeyModifiers = System.Windows.Forms.Keys.None; this.lastregion_hotkeyControl.Location = new System.Drawing.Point(224, 94); this.lastregion_hotkeyControl.Name = "lastregion_hotkeyControl"; - this.lastregion_hotkeyControl.PropertyName = nameof(CoreConfiguration.LastregionHotkey); + this.lastregion_hotkeyControl.PropertyName = CoreConfiguration._LastregionHotkey; this.lastregion_hotkeyControl.Size = new System.Drawing.Size(179, 20); this.lastregion_hotkeyControl.TabIndex = 5; // @@ -584,7 +584,7 @@ namespace Greenshot.Forms { this.ie_hotkeyControl.HotkeyModifiers = System.Windows.Forms.Keys.None; this.ie_hotkeyControl.Location = new System.Drawing.Point(224, 120); this.ie_hotkeyControl.Name = "ie_hotkeyControl"; - this.ie_hotkeyControl.PropertyName = nameof(CoreConfiguration.IEHotkey); + this.ie_hotkeyControl.PropertyName = CoreConfiguration._IEHotkey; this.ie_hotkeyControl.Size = new System.Drawing.Size(179, 20); this.ie_hotkeyControl.TabIndex = 6; // @@ -618,7 +618,7 @@ namespace Greenshot.Forms { this.region_hotkeyControl.HotkeyModifiers = System.Windows.Forms.Keys.None; this.region_hotkeyControl.Location = new System.Drawing.Point(224, 68); this.region_hotkeyControl.Name = "region_hotkeyControl"; - this.region_hotkeyControl.PropertyName = nameof(CoreConfiguration.RegionHotkey); + this.region_hotkeyControl.PropertyName = CoreConfiguration._RegionHotkey; this.region_hotkeyControl.Size = new System.Drawing.Size(179, 20); this.region_hotkeyControl.TabIndex = 4; // @@ -628,7 +628,7 @@ namespace Greenshot.Forms { this.window_hotkeyControl.HotkeyModifiers = System.Windows.Forms.Keys.None; this.window_hotkeyControl.Location = new System.Drawing.Point(224, 42); this.window_hotkeyControl.Name = "window_hotkeyControl"; - this.window_hotkeyControl.PropertyName = nameof(CoreConfiguration.WindowHotkey); + this.window_hotkeyControl.PropertyName = CoreConfiguration._WindowHotkey; this.window_hotkeyControl.Size = new System.Drawing.Size(179, 20); this.window_hotkeyControl.TabIndex = 3; // @@ -638,7 +638,7 @@ namespace Greenshot.Forms { this.fullscreen_hotkeyControl.HotkeyModifiers = System.Windows.Forms.Keys.None; this.fullscreen_hotkeyControl.Location = new System.Drawing.Point(224, 16); this.fullscreen_hotkeyControl.Name = "fullscreen_hotkeyControl"; - this.fullscreen_hotkeyControl.PropertyName = nameof(CoreConfiguration.FullscreenHotkey); + this.fullscreen_hotkeyControl.PropertyName = CoreConfiguration._FullscreenHotkey; this.fullscreen_hotkeyControl.Size = new System.Drawing.Size(179, 20); this.fullscreen_hotkeyControl.TabIndex = 2; // @@ -670,7 +670,7 @@ namespace Greenshot.Forms { this.checkbox_editor_match_capture_size.LanguageKey = "editor_match_capture_size"; this.checkbox_editor_match_capture_size.Location = new System.Drawing.Point(6, 19); this.checkbox_editor_match_capture_size.Name = "checkbox_editor_match_capture_size"; - this.checkbox_editor_match_capture_size.PropertyName = nameof(EditorConfiguration.MatchSizeToCapture); + this.checkbox_editor_match_capture_size.PropertyName = EditorConfiguration._MatchSizeToCapture; this.checkbox_editor_match_capture_size.SectionName = "Editor"; this.checkbox_editor_match_capture_size.Size = new System.Drawing.Size(397, 24); this.checkbox_editor_match_capture_size.TabIndex = 11; @@ -691,7 +691,7 @@ namespace Greenshot.Forms { this.checkbox_ie_capture.LanguageKey = "settings_iecapture"; this.checkbox_ie_capture.Location = new System.Drawing.Point(6, 19); this.checkbox_ie_capture.Name = "checkbox_ie_capture"; - this.checkbox_ie_capture.PropertyName = nameof(CoreConfiguration.IECapture); + this.checkbox_ie_capture.PropertyName = CoreConfiguration._IECapture; this.checkbox_ie_capture.Size = new System.Drawing.Size(404, 24); this.checkbox_ie_capture.TabIndex = 10; this.checkbox_ie_capture.UseVisualStyleBackColor = true; @@ -734,7 +734,7 @@ namespace Greenshot.Forms { this.radiobuttonInteractiveCapture.LanguageKey = "settings_capture_windows_interactive"; this.radiobuttonInteractiveCapture.Location = new System.Drawing.Point(11, 20); this.radiobuttonInteractiveCapture.Name = "radiobuttonInteractiveCapture"; - this.radiobuttonInteractiveCapture.PropertyName = nameof(CoreConfiguration.CaptureWindowsInteractive); + this.radiobuttonInteractiveCapture.PropertyName = CoreConfiguration._CaptureWindowsInteractive; this.radiobuttonInteractiveCapture.Size = new System.Drawing.Size(203, 17); this.radiobuttonInteractiveCapture.TabIndex = 6; this.radiobuttonInteractiveCapture.TabStop = true; @@ -772,7 +772,7 @@ namespace Greenshot.Forms { this.checkbox_zoomer.LanguageKey = "settings_zoom"; this.checkbox_zoomer.Location = new System.Drawing.Point(11, 79); this.checkbox_zoomer.Name = "checkbox_zoomer"; - this.checkbox_zoomer.PropertyName = nameof(CoreConfiguration.ZoomerEnabled); + this.checkbox_zoomer.PropertyName = CoreConfiguration._ZoomerEnabled; this.checkbox_zoomer.Size = new System.Drawing.Size(399, 24); this.checkbox_zoomer.TabIndex = 4; this.checkbox_zoomer.UseVisualStyleBackColor = true; @@ -782,7 +782,7 @@ namespace Greenshot.Forms { this.checkbox_notifications.LanguageKey = "settings_shownotify"; this.checkbox_notifications.Location = new System.Drawing.Point(11, 59); this.checkbox_notifications.Name = "checkbox_notifications"; - this.checkbox_notifications.PropertyName = nameof(CoreConfiguration.ShowTrayNotification); + this.checkbox_notifications.PropertyName = CoreConfiguration._ShowTrayNotification; this.checkbox_notifications.Size = new System.Drawing.Size(399, 24); this.checkbox_notifications.TabIndex = 3; this.checkbox_notifications.UseVisualStyleBackColor = true; @@ -792,7 +792,7 @@ namespace Greenshot.Forms { this.checkbox_playsound.LanguageKey = "settings_playsound"; this.checkbox_playsound.Location = new System.Drawing.Point(11, 39); this.checkbox_playsound.Name = "checkbox_playsound"; - this.checkbox_playsound.PropertyName = nameof(CoreConfiguration.PlayCameraSound); + this.checkbox_playsound.PropertyName = CoreConfiguration._PlayCameraSound; this.checkbox_playsound.Size = new System.Drawing.Size(399, 24); this.checkbox_playsound.TabIndex = 2; this.checkbox_playsound.UseVisualStyleBackColor = true; @@ -802,7 +802,7 @@ namespace Greenshot.Forms { this.checkbox_capture_mousepointer.LanguageKey = "settings_capture_mousepointer"; this.checkbox_capture_mousepointer.Location = new System.Drawing.Point(11, 19); this.checkbox_capture_mousepointer.Name = "checkbox_capture_mousepointer"; - this.checkbox_capture_mousepointer.PropertyName = nameof(CoreConfiguration.CaptureMousepointer); + this.checkbox_capture_mousepointer.PropertyName = CoreConfiguration._CaptureMousepointer; this.checkbox_capture_mousepointer.Size = new System.Drawing.Size(394, 24); this.checkbox_capture_mousepointer.TabIndex = 1; this.checkbox_capture_mousepointer.UseVisualStyleBackColor = true; @@ -889,7 +889,7 @@ namespace Greenshot.Forms { this.checkboxPrintInverted.LanguageKey = "printoptions_inverted"; this.checkboxPrintInverted.Location = new System.Drawing.Point(13, 88); this.checkboxPrintInverted.Name = "checkboxPrintInverted"; - this.checkboxPrintInverted.PropertyName = nameof(CoreConfiguration.OutputPrintInverted); + this.checkboxPrintInverted.PropertyName = CoreConfiguration._OutputPrintInverted; this.checkboxPrintInverted.Size = new System.Drawing.Size(141, 17); this.checkboxPrintInverted.TabIndex = 14; this.checkboxPrintInverted.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -914,7 +914,7 @@ namespace Greenshot.Forms { this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale"; this.radioBtnGrayScale.Location = new System.Drawing.Point(13, 42); this.radioBtnGrayScale.Name = "radioBtnGrayScale"; - this.radioBtnGrayScale.PropertyName = nameof(coreConfiguration.OutputPrintGrayscale); + this.radioBtnGrayScale.PropertyName = CoreConfiguration._OutputPrintGrayscale; this.radioBtnGrayScale.Size = new System.Drawing.Size(137, 17); this.radioBtnGrayScale.TabIndex = 12; this.radioBtnGrayScale.Text = "Force grayscale printing"; @@ -928,7 +928,7 @@ namespace Greenshot.Forms { this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome"; this.radioBtnMonochrome.Location = new System.Drawing.Point(13, 65); this.radioBtnMonochrome.Name = "radioBtnMonochrome"; - this.radioBtnMonochrome.PropertyName = nameof(coreConfiguration.OutputPrintMonochrome); + this.radioBtnMonochrome.PropertyName = CoreConfiguration._OutputPrintMonochrome; this.radioBtnMonochrome.Size = new System.Drawing.Size(148, 17); this.radioBtnMonochrome.TabIndex = 13; this.radioBtnMonochrome.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -955,7 +955,7 @@ namespace Greenshot.Forms { this.checkboxDateTime.LanguageKey = "printoptions_timestamp"; this.checkboxDateTime.Location = new System.Drawing.Point(13, 115); this.checkboxDateTime.Name = "checkboxDateTime"; - this.checkboxDateTime.PropertyName = nameof(coreConfiguration.OutputPrintFooter); + this.checkboxDateTime.PropertyName = CoreConfiguration._OutputPrintFooter; this.checkboxDateTime.Size = new System.Drawing.Size(187, 17); this.checkboxDateTime.TabIndex = 6; this.checkboxDateTime.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -968,7 +968,7 @@ namespace Greenshot.Forms { this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink"; this.checkboxAllowShrink.Location = new System.Drawing.Point(13, 23); this.checkboxAllowShrink.Name = "checkboxAllowShrink"; - this.checkboxAllowShrink.PropertyName = nameof(coreConfiguration.OutputPrintAllowShrink); + this.checkboxAllowShrink.PropertyName = CoreConfiguration._OutputPrintAllowShrink; this.checkboxAllowShrink.Size = new System.Drawing.Size(168, 17); this.checkboxAllowShrink.TabIndex = 2; this.checkboxAllowShrink.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -981,7 +981,7 @@ namespace Greenshot.Forms { this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge"; this.checkboxAllowEnlarge.Location = new System.Drawing.Point(13, 46); this.checkboxAllowEnlarge.Name = "checkboxAllowEnlarge"; - this.checkboxAllowEnlarge.PropertyName = nameof(coreConfiguration.OutputPrintAllowEnlarge); + this.checkboxAllowEnlarge.PropertyName = CoreConfiguration._OutputPrintAllowEnlarge; this.checkboxAllowEnlarge.Size = new System.Drawing.Size(174, 17); this.checkboxAllowEnlarge.TabIndex = 3; this.checkboxAllowEnlarge.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -994,7 +994,7 @@ namespace Greenshot.Forms { this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate"; this.checkboxAllowRotate.Location = new System.Drawing.Point(13, 69); this.checkboxAllowRotate.Name = "checkboxAllowRotate"; - this.checkboxAllowRotate.PropertyName = nameof(coreConfiguration.OutputPrintAllowRotate); + this.checkboxAllowRotate.PropertyName = CoreConfiguration._OutputPrintAllowRotate; this.checkboxAllowRotate.Size = new System.Drawing.Size(187, 17); this.checkboxAllowRotate.TabIndex = 4; this.checkboxAllowRotate.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -1007,7 +1007,7 @@ namespace Greenshot.Forms { this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter"; this.checkboxAllowCenter.Location = new System.Drawing.Point(13, 92); this.checkboxAllowCenter.Name = "checkboxAllowCenter"; - this.checkboxAllowCenter.PropertyName = nameof(coreConfiguration.OutputPrintCenter); + this.checkboxAllowCenter.PropertyName = CoreConfiguration._OutputPrintCenter; this.checkboxAllowCenter.Size = new System.Drawing.Size(137, 17); this.checkboxAllowCenter.TabIndex = 5; this.checkboxAllowCenter.TextAlign = System.Drawing.ContentAlignment.TopLeft; @@ -1018,7 +1018,7 @@ namespace Greenshot.Forms { this.checkbox_alwaysshowprintoptionsdialog.LanguageKey = "settings_alwaysshowprintoptionsdialog"; this.checkbox_alwaysshowprintoptionsdialog.Location = new System.Drawing.Point(19, 293); this.checkbox_alwaysshowprintoptionsdialog.Name = "checkbox_alwaysshowprintoptionsdialog"; - this.checkbox_alwaysshowprintoptionsdialog.PropertyName = nameof(coreConfiguration.OutputPrintPromptOptions); + this.checkbox_alwaysshowprintoptionsdialog.PropertyName = CoreConfiguration._OutputPrintPromptOptions; this.checkbox_alwaysshowprintoptionsdialog.Size = new System.Drawing.Size(394, 20); this.checkbox_alwaysshowprintoptionsdialog.TabIndex = 15; this.checkbox_alwaysshowprintoptionsdialog.Text = "Show print options dialog every time an image is printed"; @@ -1115,7 +1115,7 @@ namespace Greenshot.Forms { this.checkbox_reuseeditor.LanguageKey = "expertsettings_reuseeditorifpossible"; this.checkbox_reuseeditor.Location = new System.Drawing.Point(10, 225); this.checkbox_reuseeditor.Name = "checkbox_reuseeditor"; - this.checkbox_reuseeditor.PropertyName = nameof(EditorConfiguration.ReuseEditor); + this.checkbox_reuseeditor.PropertyName = EditorConfiguration._ReuseEditor; this.checkbox_reuseeditor.SectionName = "Editor"; this.checkbox_reuseeditor.Size = new System.Drawing.Size(394, 24); this.checkbox_reuseeditor.TabIndex = 9; @@ -1126,7 +1126,7 @@ namespace Greenshot.Forms { this.checkbox_minimizememoryfootprint.LanguageKey = "expertsettings_minimizememoryfootprint"; this.checkbox_minimizememoryfootprint.Location = new System.Drawing.Point(10, 206); this.checkbox_minimizememoryfootprint.Name = "checkbox_minimizememoryfootprint"; - this.checkbox_minimizememoryfootprint.PropertyName = nameof(coreConfiguration.MinimizeWorkingSetSize); + this.checkbox_minimizememoryfootprint.PropertyName = CoreConfiguration._MinimizeWorkingSetSize; this.checkbox_minimizememoryfootprint.Size = new System.Drawing.Size(394, 24); this.checkbox_minimizememoryfootprint.TabIndex = 8; this.checkbox_minimizememoryfootprint.UseVisualStyleBackColor = true; @@ -1136,7 +1136,7 @@ namespace Greenshot.Forms { this.checkbox_checkunstableupdates.LanguageKey = "expertsettings_checkunstableupdates"; this.checkbox_checkunstableupdates.Location = new System.Drawing.Point(10, 187); this.checkbox_checkunstableupdates.Name = "checkbox_checkunstableupdates"; - this.checkbox_checkunstableupdates.PropertyName = nameof(coreConfiguration.CheckForUnstable); + this.checkbox_checkunstableupdates.PropertyName = CoreConfiguration._CheckForUnstable; this.checkbox_checkunstableupdates.Size = new System.Drawing.Size(394, 24); this.checkbox_checkunstableupdates.TabIndex = 7; this.checkbox_checkunstableupdates.UseVisualStyleBackColor = true; @@ -1146,7 +1146,7 @@ namespace Greenshot.Forms { this.checkbox_suppresssavedialogatclose.LanguageKey = "expertsettings_suppresssavedialogatclose"; this.checkbox_suppresssavedialogatclose.Location = new System.Drawing.Point(10, 168); this.checkbox_suppresssavedialogatclose.Name = "checkbox_suppresssavedialogatclose"; - this.checkbox_suppresssavedialogatclose.PropertyName = nameof(EditorConfiguration.SuppressSaveDialogAtClose); + this.checkbox_suppresssavedialogatclose.PropertyName = EditorConfiguration._SuppressSaveDialogAtClose; this.checkbox_suppresssavedialogatclose.SectionName = "Editor"; this.checkbox_suppresssavedialogatclose.Size = new System.Drawing.Size(394, 24); this.checkbox_suppresssavedialogatclose.TabIndex = 6; @@ -1164,7 +1164,7 @@ namespace Greenshot.Forms { // this.textbox_counter.Location = new System.Drawing.Point(259, 282); this.textbox_counter.Name = "textbox_counter"; - this.textbox_counter.PropertyName = nameof(coreConfiguration.OutputFileIncrementingNumber); + this.textbox_counter.PropertyName = CoreConfiguration._OutputFileIncrementingNumber; this.textbox_counter.Size = new System.Drawing.Size(141, 20); this.textbox_counter.TabIndex = 11; // @@ -1181,7 +1181,7 @@ namespace Greenshot.Forms { // this.textbox_footerpattern.Location = new System.Drawing.Point(138, 256); this.textbox_footerpattern.Name = "textbox_footerpattern"; - this.textbox_footerpattern.PropertyName = nameof(coreConfiguration.OutputPrintFooterPattern); + this.textbox_footerpattern.PropertyName = CoreConfiguration._OutputPrintFooterPattern; this.textbox_footerpattern.Size = new System.Drawing.Size(262, 20); this.textbox_footerpattern.TabIndex = 10; // @@ -1190,7 +1190,7 @@ namespace Greenshot.Forms { this.checkbox_thumbnailpreview.LanguageKey = "expertsettings_thumbnailpreview"; this.checkbox_thumbnailpreview.Location = new System.Drawing.Point(10, 149); this.checkbox_thumbnailpreview.Name = "checkbox_thumbnailpreview"; - this.checkbox_thumbnailpreview.PropertyName = nameof(coreConfiguration.ThumnailPreview); + this.checkbox_thumbnailpreview.PropertyName = CoreConfiguration._ThumnailPreview; this.checkbox_thumbnailpreview.Size = new System.Drawing.Size(394, 24); this.checkbox_thumbnailpreview.TabIndex = 5; this.checkbox_thumbnailpreview.UseVisualStyleBackColor = true; @@ -1200,7 +1200,7 @@ namespace Greenshot.Forms { this.checkbox_optimizeforrdp.LanguageKey = "expertsettings_optimizeforrdp"; this.checkbox_optimizeforrdp.Location = new System.Drawing.Point(10, 130); this.checkbox_optimizeforrdp.Name = "checkbox_optimizeforrdp"; - this.checkbox_optimizeforrdp.PropertyName = nameof(coreConfiguration.OptimizeForRDP); + this.checkbox_optimizeforrdp.PropertyName = CoreConfiguration._OptimizeForRDP; this.checkbox_optimizeforrdp.Size = new System.Drawing.Size(394, 24); this.checkbox_optimizeforrdp.TabIndex = 4; this.checkbox_optimizeforrdp.UseVisualStyleBackColor = true; @@ -1210,7 +1210,7 @@ namespace Greenshot.Forms { this.checkbox_autoreducecolors.LanguageKey = "expertsettings_autoreducecolors"; this.checkbox_autoreducecolors.Location = new System.Drawing.Point(10, 111); this.checkbox_autoreducecolors.Name = "checkbox_autoreducecolors"; - this.checkbox_autoreducecolors.PropertyName = nameof(coreConfiguration.OutputFileAutoReduceColors); + this.checkbox_autoreducecolors.PropertyName = CoreConfiguration._OutputFileAutoReduceColors; this.checkbox_autoreducecolors.Size = new System.Drawing.Size(408, 24); this.checkbox_autoreducecolors.TabIndex = 3; this.checkbox_autoreducecolors.UseVisualStyleBackColor = true;