From 8c74bb6917805c2bcec6c1f58f9c6b80b6b54bb8 Mon Sep 17 00:00:00 2001 From: Robin Krom Date: Sun, 28 Apr 2019 01:16:34 +0200 Subject: [PATCH] Fixing a build error and updating some more documentation to reduce warnings. --- NuGet.Config | 1 - .../Configuration/CommandlineOptions.cs | 18 ++++++++++++++++++ .../Configuration/IConfigTranslations.cs | 6 ++++++ .../Configuration/IMetroConfiguration.cs | 5 +++++ .../Destinations/ClipboardDestination.cs | 10 ++++++++++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/NuGet.Config b/NuGet.Config index cba75eeee..28aaeb53d 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -6,7 +6,6 @@ - diff --git a/src/Greenshot/Configuration/CommandlineOptions.cs b/src/Greenshot/Configuration/CommandlineOptions.cs index cd8c41ca2..20b491133 100644 --- a/src/Greenshot/Configuration/CommandlineOptions.cs +++ b/src/Greenshot/Configuration/CommandlineOptions.cs @@ -27,21 +27,39 @@ namespace Greenshot.Configuration /// public class CommandlineOptions { + /// + /// A commandline setting to define what files to open + /// [Option('f', "file", HelpText = "Files to open.")] public IEnumerable ImageFiles { get; set; } + /// + /// A commandline setting to define that we need to exit + /// [Option(Default = false, HelpText = "Exit the running Greenshot instance.")] public bool Exit { get; set; } + /// + /// A commandline setting to define that a reload is needed + /// [Option(Default = false, HelpText = "Reload configuration.")] public bool Reload { get; set; } + /// + /// A commandline setting to define the language + /// [Option('l', "language", Default = "en-US", HelpText = "Language to use.")] public string Language { get; set; } + /// + /// A commandline setting to define the directory to use for the configuration files + /// [Option('i', "inidirectory", HelpText = "The directory to use to locate the ini file(s). This can be used to use Greenshot with different profiles.")] public string IniDirectory { get; set; } + /// + /// A commandline setting to define verbose + /// [Option(Default = false, HelpText = "Prints all messages to standard output.")] public bool Verbose { get; set; } } diff --git a/src/Greenshot/Configuration/IConfigTranslations.cs b/src/Greenshot/Configuration/IConfigTranslations.cs index 980a2fd6f..cab23e787 100644 --- a/src/Greenshot/Configuration/IConfigTranslations.cs +++ b/src/Greenshot/Configuration/IConfigTranslations.cs @@ -22,9 +22,15 @@ using Dapplo.Config.Language; namespace Greenshot.Configuration { + /// + /// This defines the translations for the config + /// [Language("Config")] public interface IConfigTranslations : Dapplo.CaliburnMicro.Translations.IConfigTranslations, ILanguage { + /// + /// Theme translation + /// [DefaultValue("Theme")] string Theme { get; } } diff --git a/src/Greenshot/Configuration/IMetroConfiguration.cs b/src/Greenshot/Configuration/IMetroConfiguration.cs index a109594ae..97497e89e 100644 --- a/src/Greenshot/Configuration/IMetroConfiguration.cs +++ b/src/Greenshot/Configuration/IMetroConfiguration.cs @@ -23,12 +23,17 @@ using Dapplo.Config.Ini; namespace Greenshot.Configuration { + /// + /// This specifies the configuration for MahApps.Metro + /// [IniSection("Metro")] public interface IMetroConfiguration : IIniSection, IMetroUiConfiguration { + /// [DefaultValue("Light")] new string Theme { get; set; } + /// [DefaultValue("Olive")] new string ThemeColor{ get; set; } } diff --git a/src/Greenshot/Destinations/ClipboardDestination.cs b/src/Greenshot/Destinations/ClipboardDestination.cs index d751ed13d..8abf958e6 100644 --- a/src/Greenshot/Destinations/ClipboardDestination.cs +++ b/src/Greenshot/Destinations/ClipboardDestination.cs @@ -41,6 +41,12 @@ namespace Greenshot.Destinations { private readonly ExportNotification _exportNotification; + /// + /// DI Constructor + /// + /// ICoreConfiguration + /// IGreenshotLanguage + /// ExportNotification public ClipboardDestination( ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage, @@ -50,12 +56,16 @@ namespace Greenshot.Destinations _exportNotification = exportNotification; } + /// public override string Description => GreenshotLanguage.SettingsDestinationClipboard; + /// public override Keys EditorShortcutKeys => Keys.Control | Keys.Shift | Keys.C; + /// public override IBitmapWithNativeSupport DisplayIcon => GreenshotResources.Instance.GetBitmap("Clipboard.Image"); + /// protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { var exportInformation = new ExportInformation(Designation, Description);