Fixing a build error and updating some more documentation to reduce warnings.

This commit is contained in:
Robin Krom 2019-04-28 01:16:34 +02:00
commit 8c74bb6917
5 changed files with 39 additions and 1 deletions

View file

@ -6,7 +6,6 @@
<add key="Dapplo.Config" value="https://ci.appveyor.com/nuget/dapplo-config-85fagsv5oequ" /> <add key="Dapplo.Config" value="https://ci.appveyor.com/nuget/dapplo-config-85fagsv5oequ" />
<add key="Dapplo.CaliburnMicro" value="https://ci.appveyor.com/nuget/dapplo-caliburnmicro-46kaa8k8ft4i" /> <add key="Dapplo.CaliburnMicro" value="https://ci.appveyor.com/nuget/dapplo-caliburnmicro-46kaa8k8ft4i" />
<add key="Dapplo.HttpExtensions" value="https://ci.appveyor.com/nuget/dapplo-httpextensions-6qa60p3t5ixy" /> <add key="Dapplo.HttpExtensions" value="https://ci.appveyor.com/nuget/dapplo-httpextensions-6qa60p3t5ixy" />
<add key="Dapplo.Windows" value="https://ci.appveyor.com/nuget/dapplo-windows-pjnkjqjp7t6a" />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" /> <add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="dotnet-windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" /> <add key="dotnet-windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
<add key="aspnet-aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" /> <add key="aspnet-aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />

View file

@ -27,21 +27,39 @@ namespace Greenshot.Configuration
/// </summary> /// </summary>
public class CommandlineOptions public class CommandlineOptions
{ {
/// <summary>
/// A commandline setting to define what files to open
/// </summary>
[Option('f', "file", HelpText = "Files to open.")] [Option('f', "file", HelpText = "Files to open.")]
public IEnumerable<string> ImageFiles { get; set; } public IEnumerable<string> ImageFiles { get; set; }
/// <summary>
/// A commandline setting to define that we need to exit
/// </summary>
[Option(Default = false, HelpText = "Exit the running Greenshot instance.")] [Option(Default = false, HelpText = "Exit the running Greenshot instance.")]
public bool Exit { get; set; } public bool Exit { get; set; }
/// <summary>
/// A commandline setting to define that a reload is needed
/// </summary>
[Option(Default = false, HelpText = "Reload configuration.")] [Option(Default = false, HelpText = "Reload configuration.")]
public bool Reload { get; set; } public bool Reload { get; set; }
/// <summary>
/// A commandline setting to define the language
/// </summary>
[Option('l', "language", Default = "en-US", HelpText = "Language to use.")] [Option('l', "language", Default = "en-US", HelpText = "Language to use.")]
public string Language { get; set; } public string Language { get; set; }
/// <summary>
/// A commandline setting to define the directory to use for the configuration files
/// </summary>
[Option('i', "inidirectory", HelpText = "The directory to use to locate the ini file(s). This can be used to use Greenshot with different profiles.")] [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; } public string IniDirectory { get; set; }
/// <summary>
/// A commandline setting to define verbose
/// </summary>
[Option(Default = false, HelpText = "Prints all messages to standard output.")] [Option(Default = false, HelpText = "Prints all messages to standard output.")]
public bool Verbose { get; set; } public bool Verbose { get; set; }
} }

View file

@ -22,9 +22,15 @@ using Dapplo.Config.Language;
namespace Greenshot.Configuration namespace Greenshot.Configuration
{ {
/// <summary>
/// This defines the translations for the config
/// </summary>
[Language("Config")] [Language("Config")]
public interface IConfigTranslations : Dapplo.CaliburnMicro.Translations.IConfigTranslations, ILanguage public interface IConfigTranslations : Dapplo.CaliburnMicro.Translations.IConfigTranslations, ILanguage
{ {
/// <summary>
/// Theme translation
/// </summary>
[DefaultValue("Theme")] [DefaultValue("Theme")]
string Theme { get; } string Theme { get; }
} }

View file

@ -23,12 +23,17 @@ using Dapplo.Config.Ini;
namespace Greenshot.Configuration namespace Greenshot.Configuration
{ {
/// <summary>
/// This specifies the configuration for MahApps.Metro
/// </summary>
[IniSection("Metro")] [IniSection("Metro")]
public interface IMetroConfiguration : IIniSection, IMetroUiConfiguration public interface IMetroConfiguration : IIniSection, IMetroUiConfiguration
{ {
/// <inheritdoc />
[DefaultValue("Light")] [DefaultValue("Light")]
new string Theme { get; set; } new string Theme { get; set; }
/// <inheritdoc />
[DefaultValue("Olive")] [DefaultValue("Olive")]
new string ThemeColor{ get; set; } new string ThemeColor{ get; set; }
} }

View file

@ -41,6 +41,12 @@ namespace Greenshot.Destinations
{ {
private readonly ExportNotification _exportNotification; private readonly ExportNotification _exportNotification;
/// <summary>
/// DI Constructor
/// </summary>
/// <param name="coreConfiguration">ICoreConfiguration</param>
/// <param name="greenshotLanguage">IGreenshotLanguage</param>
/// <param name="exportNotification">ExportNotification</param>
public ClipboardDestination( public ClipboardDestination(
ICoreConfiguration coreConfiguration, ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage, IGreenshotLanguage greenshotLanguage,
@ -50,12 +56,16 @@ namespace Greenshot.Destinations
_exportNotification = exportNotification; _exportNotification = exportNotification;
} }
/// <inheritdoc />
public override string Description => GreenshotLanguage.SettingsDestinationClipboard; public override string Description => GreenshotLanguage.SettingsDestinationClipboard;
/// <inheritdoc />
public override Keys EditorShortcutKeys => Keys.Control | Keys.Shift | Keys.C; public override Keys EditorShortcutKeys => Keys.Control | Keys.Shift | Keys.C;
/// <inheritdoc />
public override IBitmapWithNativeSupport DisplayIcon => GreenshotResources.Instance.GetBitmap("Clipboard.Image"); public override IBitmapWithNativeSupport DisplayIcon => GreenshotResources.Instance.GetBitmap("Clipboard.Image");
/// <inheritdoc />
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
{ {
var exportInformation = new ExportInformation(Designation, Description); var exportInformation = new ExportInformation(Designation, Description);