diff --git a/src/Greenshot.Addon.Box/BoxAutofacModule.cs b/src/Greenshot.Addon.Box/BoxAutofacModule.cs index 662f66d1a..dffed4692 100644 --- a/src/Greenshot.Addon.Box/BoxAutofacModule.cs +++ b/src/Greenshot.Addon.Box/BoxAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Box.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Box { diff --git a/src/Greenshot.Addon.Box/BoxDestination.cs b/src/Greenshot.Addon.Box/BoxDestination.cs index d6cc31918..54cd3b175 100644 --- a/src/Greenshot.Addon.Box/BoxDestination.cs +++ b/src/Greenshot.Addon.Box/BoxDestination.cs @@ -39,7 +39,7 @@ using Dapplo.Log; using Dapplo.Utils; using Greenshot.Addon.Box.Entities; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; diff --git a/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj b/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj index 7df1978eb..6c41b528d 100644 --- a/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj +++ b/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj @@ -46,29 +46,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Box/packages.config b/src/Greenshot.Addon.Box/packages.config index ef85c5efe..e61378b41 100644 --- a/src/Greenshot.Addon.Box/packages.config +++ b/src/Greenshot.Addon.Box/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Confluence/ConfluenceAutofacModule.cs b/src/Greenshot.Addon.Confluence/ConfluenceAutofacModule.cs index fe56e1a3c..bffe5c2a7 100644 --- a/src/Greenshot.Addon.Confluence/ConfluenceAutofacModule.cs +++ b/src/Greenshot.Addon.Confluence/ConfluenceAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Confluence.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Confluence { diff --git a/src/Greenshot.Addon.Confluence/ConfluenceDestination.cs b/src/Greenshot.Addon.Confluence/ConfluenceDestination.cs index 664b950f2..21324db8e 100644 --- a/src/Greenshot.Addon.Confluence/ConfluenceDestination.cs +++ b/src/Greenshot.Addon.Confluence/ConfluenceDestination.cs @@ -33,7 +33,7 @@ using Dapplo.Confluence; using Dapplo.Confluence.Entities; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj b/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj index 29bed941b..20281f8e3 100644 --- a/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj +++ b/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj @@ -65,29 +65,29 @@ ..\packages\Costura.Fody.2.0.1\lib\net452\Costura.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Confluence.0.7.19\lib\net45\Dapplo.Confluence.dll diff --git a/src/Greenshot.Addon.Confluence/packages.config b/src/Greenshot.Addon.Confluence/packages.config index 1ae990d5e..90c6c0040 100644 --- a/src/Greenshot.Addon.Confluence/packages.config +++ b/src/Greenshot.Addon.Confluence/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Dropbox/DropboxAutofacModule.cs b/src/Greenshot.Addon.Dropbox/DropboxAutofacModule.cs index a4709ef5b..f04dd907f 100644 --- a/src/Greenshot.Addon.Dropbox/DropboxAutofacModule.cs +++ b/src/Greenshot.Addon.Dropbox/DropboxAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Dropbox.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Dropbox { diff --git a/src/Greenshot.Addon.Dropbox/DropboxDestination.cs b/src/Greenshot.Addon.Dropbox/DropboxDestination.cs index 6fac98793..131583553 100644 --- a/src/Greenshot.Addon.Dropbox/DropboxDestination.cs +++ b/src/Greenshot.Addon.Dropbox/DropboxDestination.cs @@ -39,7 +39,7 @@ using Dapplo.Log; using Dapplo.Utils; using Greenshot.Addon.Dropbox.Entities; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; diff --git a/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj b/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj index 806d27a26..d76dc4c56 100644 --- a/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj +++ b/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj @@ -58,29 +58,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Dropbox/packages.config b/src/Greenshot.Addon.Dropbox/packages.config index ef85c5efe..e61378b41 100644 --- a/src/Greenshot.Addon.Dropbox/packages.config +++ b/src/Greenshot.Addon.Dropbox/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandAutofacModule.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandAutofacModule.cs index 0d7723060..6d8e54d30 100644 --- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandAutofacModule.cs +++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandAutofacModule.cs @@ -2,7 +2,7 @@ using Dapplo.Addons; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.ExternalCommand.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.ExternalCommand { @@ -12,8 +12,9 @@ namespace Greenshot.Addon.ExternalCommand protected override void Load(ContainerBuilder builder) { builder - .RegisterType() + .RegisterType() .As() + .As() .SingleInstance(); builder .RegisterType() diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs index eb99b5b0c..6d545fd21 100644 --- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs +++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs @@ -33,7 +33,7 @@ using System.Threading; using Dapplo.Ini; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Plugin; @@ -42,10 +42,10 @@ using Greenshot.Addons.Interfaces.Plugin; namespace Greenshot.Addon.ExternalCommand { - /// - /// Description of OCRDestination. - /// - public class ExternalCommandDestination : AbstractDestination + /// + /// ExternalCommandDestination provides a destination to export to an external command + /// + public class ExternalCommandDestination : AbstractDestination { private static readonly LogSource Log = new LogSource(); @@ -83,41 +83,43 @@ namespace Greenshot.Addon.ExternalCommand var outputSettings = new SurfaceOutputSettings(); outputSettings.PreventGreenshotFormat(); - if (_presetCommand != null) - { - if (!Config.RunInbackground.ContainsKey(_presetCommand)) - { - Config.RunInbackground.Add(_presetCommand, true); - } - var runInBackground = Config.RunInbackground[_presetCommand]; - var fullPath = captureDetails.Filename; - if (fullPath == null) - { - fullPath = ImageOutput.SaveNamedTmpFile(surface, captureDetails, outputSettings); - } + if (_presetCommand == null) + { + return exportInformation; + } - if (runInBackground) - { - var commandThread = new Thread(() => - { - CallExternalCommand(exportInformation, fullPath, out _, out _); - ProcessExport(exportInformation, surface); - }) - { - Name = "Running " + _presetCommand, - IsBackground = true - }; - commandThread.SetApartmentState(ApartmentState.STA); - commandThread.Start(); - exportInformation.ExportMade = true; - } - else - { - CallExternalCommand(exportInformation, fullPath, out _, out _); - ProcessExport(exportInformation, surface); - } - } - return exportInformation; + if (!Config.RunInbackground.ContainsKey(_presetCommand)) + { + Config.RunInbackground.Add(_presetCommand, true); + } + var runInBackground = Config.RunInbackground[_presetCommand]; + var fullPath = captureDetails.Filename; + if (fullPath == null) + { + fullPath = ImageOutput.SaveNamedTmpFile(surface, captureDetails, outputSettings); + } + + if (runInBackground) + { + var commandThread = new Thread(() => + { + CallExternalCommand(exportInformation, fullPath, out _, out _); + ProcessExport(exportInformation, surface); + }) + { + Name = "Running " + _presetCommand, + IsBackground = true + }; + commandThread.SetApartmentState(ApartmentState.STA); + commandThread.Start(); + exportInformation.ExportMade = true; + } + else + { + CallExternalCommand(exportInformation, fullPath, out _, out _); + ProcessExport(exportInformation, surface); + } + return exportInformation; } /// @@ -137,24 +139,29 @@ namespace Greenshot.Addon.ExternalCommand if (CallExternalCommand(_presetCommand, fullPath, out output, out error) == 0) { exportInformation.ExportMade = true; - if (!string.IsNullOrEmpty(output)) - { - var uriMatches = UriRegexp.Matches(output); - // Place output on the clipboard before the URI, so if one is found this overwrites - if (Config.OutputToClipboard) - { - ClipboardHelper.SetClipboardData(output); - } - if (uriMatches.Count > 0) - { - exportInformation.Uri = uriMatches[0].Groups[1].Value; - Log.Info().WriteLine("Got URI : {0} ", exportInformation.Uri); - if (Config.UriToClipboard) - { - ClipboardHelper.SetClipboardData(exportInformation.Uri); - } - } - } + if (string.IsNullOrEmpty(output)) + { + return; + } + + var uriMatches = UriRegexp.Matches(output); + // Place output on the clipboard before the URI, so if one is found this overwrites + if (Config.OutputToClipboard) + { + ClipboardHelper.SetClipboardData(output); + } + + if (uriMatches.Count <= 0) + { + return; + } + + exportInformation.Uri = uriMatches[0].Groups[1].Value; + Log.Info().WriteLine("Got URI : {0} ", exportInformation.Uri); + if (Config.UriToClipboard) + { + ClipboardHelper.SetClipboardData(exportInformation.Uri); + } } else { @@ -221,56 +228,57 @@ namespace Greenshot.Addon.ExternalCommand var arguments = Config.Argument[commando]; output = null; error = null; - if (!string.IsNullOrEmpty(commandline)) - { - using (var process = new Process()) - { - // Fix variables - commandline = FilenameHelper.FillVariables(commandline, true); - commandline = FilenameHelper.FillCmdVariables(commandline); + if (string.IsNullOrEmpty(commandline)) + { + return -1; + } - arguments = FilenameHelper.FillVariables(arguments, false); - arguments = FilenameHelper.FillCmdVariables(arguments, false); + using (var process = new Process()) + { + // Fix variables + commandline = FilenameHelper.FillVariables(commandline, true); + commandline = FilenameHelper.FillCmdVariables(commandline); - process.StartInfo.FileName = FilenameHelper.FillCmdVariables(commandline); - process.StartInfo.Arguments = FormatArguments(arguments, fullPath); - process.StartInfo.UseShellExecute = false; - if (Config.RedirectStandardOutput) - { - process.StartInfo.RedirectStandardOutput = true; - } - if (Config.RedirectStandardError) - { - process.StartInfo.RedirectStandardError = true; - } - if (verb != null) - { - process.StartInfo.Verb = verb; - } - Log.Info().WriteLine("Starting : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); - process.Start(); - process.WaitForExit(); - if (Config.RedirectStandardOutput) - { - output = process.StandardOutput.ReadToEnd(); - if (Config.ShowStandardOutputInLog && output.Trim().Length > 0) - { - Log.Info().WriteLine("Output:\n{0}", output); - } - } - if (Config.RedirectStandardError) - { - error = process.StandardError.ReadToEnd(); - if (error.Trim().Length > 0) - { - Log.Warn().WriteLine("Error:\n{0}", error); - } - } - Log.Info().WriteLine("Finished : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); - return process.ExitCode; - } - } - return -1; + arguments = FilenameHelper.FillVariables(arguments, false); + arguments = FilenameHelper.FillCmdVariables(arguments, false); + + process.StartInfo.FileName = FilenameHelper.FillCmdVariables(commandline); + process.StartInfo.Arguments = FormatArguments(arguments, fullPath); + process.StartInfo.UseShellExecute = false; + if (Config.RedirectStandardOutput) + { + process.StartInfo.RedirectStandardOutput = true; + } + if (Config.RedirectStandardError) + { + process.StartInfo.RedirectStandardError = true; + } + if (verb != null) + { + process.StartInfo.Verb = verb; + } + Log.Info().WriteLine("Starting : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); + process.Start(); + process.WaitForExit(); + if (Config.RedirectStandardOutput) + { + output = process.StandardOutput.ReadToEnd(); + if (Config.ShowStandardOutputInLog && output.Trim().Length > 0) + { + Log.Info().WriteLine("Output:\n{0}", output); + } + } + if (Config.RedirectStandardError) + { + error = process.StandardError.ReadToEnd(); + if (error.Trim().Length > 0) + { + Log.Warn().WriteLine("Error:\n{0}", error); + } + } + Log.Info().WriteLine("Finished : {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); + return process.ExitCode; + } } public static string FormatArguments(string arguments, string fullpath) diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandStartup.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs similarity index 80% rename from src/Greenshot.Addon.ExternalCommand/ExternalCommandStartup.cs rename to src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs index ba5d5cb2b..957d7ceb1 100644 --- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandStartup.cs +++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs @@ -23,13 +23,14 @@ #region Usings +using System; using System.Collections.Generic; using System.IO; using System.Linq; using Dapplo.Addons; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; #endregion @@ -37,27 +38,31 @@ using Greenshot.Addons.Core; namespace Greenshot.Addon.ExternalCommand { /// - /// TODO: Somehow generate the external command destinations + /// Generate the external command destinations /// - public sealed class ExternalCommandStartup : IStartup + public sealed class ExternalCommandDestinationProvider : IStartup, IDestinationProvider { private static readonly LogSource Log = new LogSource(); private readonly IExternalCommandConfiguration _externalCommandConfig; private readonly ICoreConfiguration _coreConfiguration; private readonly IGreenshotLanguage _greenshotLanguage; - public ExternalCommandStartup(IExternalCommandConfiguration externalCommandConfiguration, + public ExternalCommandDestinationProvider( + IExternalCommandConfiguration externalCommandConfiguration, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage) { _externalCommandConfig = externalCommandConfiguration; _coreConfiguration = coreConfiguration; _greenshotLanguage = greenshotLanguage; + + externalCommandConfiguration.AfterLoad(); } - public IEnumerable Destinations() + public IEnumerable> Provide() { - return _externalCommandConfig.Commands.Select(command => new ExternalCommandDestination(command, _coreConfiguration, _greenshotLanguage)); + return _externalCommandConfig.Commands + .Select(command => new Lazy(() => new ExternalCommandDestination(command, _coreConfiguration, _greenshotLanguage), new DestinationAttribute(command))); } diff --git a/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj b/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj index d5b43fd2a..7bc4c692c 100644 --- a/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj +++ b/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj @@ -58,29 +58,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll @@ -160,7 +160,7 @@ Form - + diff --git a/src/Greenshot.Addon.ExternalCommand/packages.config b/src/Greenshot.Addon.ExternalCommand/packages.config index 28fab9e6b..d595fe47f 100644 --- a/src/Greenshot.Addon.ExternalCommand/packages.config +++ b/src/Greenshot.Addon.ExternalCommand/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Flickr/FlickrAutofacModule.cs b/src/Greenshot.Addon.Flickr/FlickrAutofacModule.cs index 42027e11b..03df8336c 100644 --- a/src/Greenshot.Addon.Flickr/FlickrAutofacModule.cs +++ b/src/Greenshot.Addon.Flickr/FlickrAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Flickr.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Flickr { diff --git a/src/Greenshot.Addon.Flickr/FlickrDestination.cs b/src/Greenshot.Addon.Flickr/FlickrDestination.cs index d6de3f54c..7d5a5fd02 100644 --- a/src/Greenshot.Addon.Flickr/FlickrDestination.cs +++ b/src/Greenshot.Addon.Flickr/FlickrDestination.cs @@ -41,7 +41,7 @@ using Dapplo.HttpExtensions.Listener; using Dapplo.HttpExtensions.OAuth; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; diff --git a/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj b/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj index 386201e0d..70fc5deea 100644 --- a/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj +++ b/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj @@ -58,29 +58,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Flickr/packages.config b/src/Greenshot.Addon.Flickr/packages.config index 43ed8fd9c..16c782681 100644 --- a/src/Greenshot.Addon.Flickr/packages.config +++ b/src/Greenshot.Addon.Flickr/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.GooglePhotos/GooglePhotosAutofacModule.cs b/src/Greenshot.Addon.GooglePhotos/GooglePhotosAutofacModule.cs index a00c80735..9e2679c76 100644 --- a/src/Greenshot.Addon.GooglePhotos/GooglePhotosAutofacModule.cs +++ b/src/Greenshot.Addon.GooglePhotos/GooglePhotosAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.GooglePhotos.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.GooglePhotos { diff --git a/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs b/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs index 1b1b2db65..1b6c24027 100644 --- a/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs +++ b/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs @@ -38,7 +38,7 @@ using Dapplo.HttpExtensions.OAuth; using Dapplo.Log; using Dapplo.Utils; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; diff --git a/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj b/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj index 55ea8342f..677b56cbc 100644 --- a/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj +++ b/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj @@ -44,29 +44,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.GooglePhotos/packages.config b/src/Greenshot.Addon.GooglePhotos/packages.config index 43ed8fd9c..16c782681 100644 --- a/src/Greenshot.Addon.GooglePhotos/packages.config +++ b/src/Greenshot.Addon.GooglePhotos/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj b/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj index 92f11721b..cb75412e1 100644 --- a/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj +++ b/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj @@ -63,29 +63,29 @@ ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Imgur/ImgurAutofacModule.cs b/src/Greenshot.Addon.Imgur/ImgurAutofacModule.cs index 1f3d18b3d..ee8a39a59 100644 --- a/src/Greenshot.Addon.Imgur/ImgurAutofacModule.cs +++ b/src/Greenshot.Addon.Imgur/ImgurAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Imgur.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Imgur { diff --git a/src/Greenshot.Addon.Imgur/ImgurDestination.cs b/src/Greenshot.Addon.Imgur/ImgurDestination.cs index 7412c1e2e..a0a53faa9 100644 --- a/src/Greenshot.Addon.Imgur/ImgurDestination.cs +++ b/src/Greenshot.Addon.Imgur/ImgurDestination.cs @@ -34,7 +34,7 @@ using Dapplo.Windows.Extensions; using Greenshot.Addon.Imgur.Entities; using Greenshot.Addon.Imgur.ViewModels; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.Imgur/packages.config b/src/Greenshot.Addon.Imgur/packages.config index d9c882889..4c28aa2da 100644 --- a/src/Greenshot.Addon.Imgur/packages.config +++ b/src/Greenshot.Addon.Imgur/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj b/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj index 82d3e1ba2..eafc26dcc 100644 --- a/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj +++ b/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj @@ -63,29 +63,29 @@ ..\packages\Costura.Fody.2.0.1\lib\net452\Costura.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Jira/JiraAutofacModule.cs b/src/Greenshot.Addon.Jira/JiraAutofacModule.cs index db41af209..33d0196bf 100644 --- a/src/Greenshot.Addon.Jira/JiraAutofacModule.cs +++ b/src/Greenshot.Addon.Jira/JiraAutofacModule.cs @@ -2,7 +2,7 @@ using Dapplo.CaliburnMicro; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Jira.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Jira { diff --git a/src/Greenshot.Addon.Jira/JiraDestination.cs b/src/Greenshot.Addon.Jira/JiraDestination.cs index 15bf1b35a..831dee85a 100644 --- a/src/Greenshot.Addon.Jira/JiraDestination.cs +++ b/src/Greenshot.Addon.Jira/JiraDestination.cs @@ -35,7 +35,7 @@ using Dapplo.Jira.Entities; using Dapplo.Log; using Greenshot.Addon.Jira.ViewModels; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.Jira/packages.config b/src/Greenshot.Addon.Jira/packages.config index 896eb03b8..63b958ca8 100644 --- a/src/Greenshot.Addon.Jira/packages.config +++ b/src/Greenshot.Addon.Jira/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.LegacyEditor/EditorAutofacModule.cs b/src/Greenshot.Addon.LegacyEditor/EditorAutofacModule.cs index bf16ff41d..7248fc480 100644 --- a/src/Greenshot.Addon.LegacyEditor/EditorAutofacModule.cs +++ b/src/Greenshot.Addon.LegacyEditor/EditorAutofacModule.cs @@ -3,7 +3,7 @@ using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.LegacyEditor.Drawing; using Greenshot.Addon.LegacyEditor.Forms; using Greenshot.Addon.LegacyEditor.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Interfaces; namespace Greenshot.Addon.LegacyEditor diff --git a/src/Greenshot.Addon.LegacyEditor/EditorDestination.cs b/src/Greenshot.Addon.LegacyEditor/EditorDestination.cs index fcde48572..62cc664a2 100644 --- a/src/Greenshot.Addon.LegacyEditor/EditorDestination.cs +++ b/src/Greenshot.Addon.LegacyEditor/EditorDestination.cs @@ -29,7 +29,7 @@ using System.Drawing; using System.Linq; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Forms; diff --git a/src/Greenshot.Addon.LegacyEditor/Forms/ImageEditorForm.cs b/src/Greenshot.Addon.LegacyEditor/Forms/ImageEditorForm.cs index 283d9ae38..e98ce1bd6 100644 --- a/src/Greenshot.Addon.LegacyEditor/Forms/ImageEditorForm.cs +++ b/src/Greenshot.Addon.LegacyEditor/Forms/ImageEditorForm.cs @@ -45,7 +45,7 @@ using Greenshot.Addon.LegacyEditor.Controls; using Greenshot.Addon.LegacyEditor.Drawing; using Greenshot.Addon.LegacyEditor.Drawing.Fields; using Greenshot.Addon.LegacyEditor.Drawing.Fields.Binding; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; @@ -80,19 +80,19 @@ namespace Greenshot.Addon.LegacyEditor.Forms private BitmapScaleHandler _destinationScaleHandler; private readonly IDisposable _clipboardSubscription; private readonly EditorFactory _editorFactory; - private readonly IEnumerable> _destinations; + private readonly DestinationHolder _destinationHolder; private CompositeDisposable _disposables; public ImageEditorForm( IEditorConfiguration editorConfiguration, IEditorLanguage editorLanguage, EditorFactory editorFactory, - IEnumerable> destinations) + DestinationHolder destinationHolder) { _editorConfiguration = editorConfiguration; _editorLanguage = editorLanguage; _editorFactory = editorFactory; - _destinations = destinations; + _destinationHolder = destinationHolder; // // The InitializeComponent() call is required for Windows Forms designer support. // @@ -378,7 +378,7 @@ namespace Greenshot.Addon.LegacyEditor.Forms await Task.Run(() => { // Create export buttons - foreach (var destination in _destinations + foreach (var destination in _destinationHolder.AllDestinations .Where(destination => destination.Metadata.Priority > 2 && !IgnoreDestinations.Contains(destination.Metadata.Designation) && destination.Value.IsActive) .OrderBy(destination => destination.Metadata.Priority).ThenBy(destination => destination.Value.Description) .Select(d => d.Value)) @@ -519,7 +519,7 @@ namespace Greenshot.Addon.LegacyEditor.Forms ClearItems(fileStripMenuItem.DropDownItems); // Add the destinations - foreach (var destination in _destinations + foreach (var destination in _destinationHolder.AllDestinations .Where(destination => !IgnoreDestinations.Contains(destination.Metadata.Designation) && destination.Value.IsActive) .OrderBy(destination => destination.Metadata.Priority).ThenBy(destination => destination.Value.Description) .Select(d => d.Value)) @@ -1239,12 +1239,12 @@ namespace Greenshot.Addon.LegacyEditor.Forms { destinationDesignation = "FileDialog"; } - _destinations.Find(destinationDesignation)?.ExportCaptureAsync(true, _surface, _surface.CaptureDetails); + _destinationHolder.AllDestinations.Find(destinationDesignation)?.ExportCaptureAsync(true, _surface, _surface.CaptureDetails); } private void BtnClipboardClick(object sender, EventArgs e) { - _destinations.Find("Clipboard")?.ExportCaptureAsync(true, _surface, _surface.CaptureDetails); + _destinationHolder.AllDestinations.Find("Clipboard")?.ExportCaptureAsync(true, _surface, _surface.CaptureDetails); } private void BtnPrintClick(object sender, EventArgs e) @@ -1252,7 +1252,7 @@ namespace Greenshot.Addon.LegacyEditor.Forms // The BeginInvoke is a solution for the printdialog not having focus BeginInvoke((MethodInvoker) delegate { - _destinations.Find("Printer")?.ExportCaptureAsync(true, _surface, _surface.CaptureDetails); + _destinationHolder.AllDestinations.Find("Printer")?.ExportCaptureAsync(true, _surface, _surface.CaptureDetails); }); } @@ -1708,9 +1708,7 @@ namespace Greenshot.Addon.LegacyEditor.Forms // Go through the destinations to check the EditorShortcut Keys // this way the menu entries don't need to be enabled. // This also fixes bugs #3526974 & #3527020 - foreach (var destination in _destinations.Where(destination => destination.Value.IsActive) - .OrderBy(destination => destination.Metadata.Priority).ThenBy(destination => destination.Value.Description) - .Select(d => d.Value)) + foreach (var destination in _destinationHolder.SortedActiveDestinations) { if (destination.EditorShortcutKeys != keys) { diff --git a/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj b/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj index 12629e562..02a477299 100644 --- a/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj +++ b/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj @@ -36,29 +36,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.Addon.LegacyEditor/packages.config b/src/Greenshot.Addon.LegacyEditor/packages.config index aad61a63a..5e68d3cc5 100644 --- a/src/Greenshot.Addon.LegacyEditor/packages.config +++ b/src/Greenshot.Addon.LegacyEditor/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj b/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj index 8cbc245f1..2448b49bf 100644 --- a/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj +++ b/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj @@ -61,29 +61,29 @@ ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Lutim/LutimAutofacModule.cs b/src/Greenshot.Addon.Lutim/LutimAutofacModule.cs index 608072afc..9350290c9 100644 --- a/src/Greenshot.Addon.Lutim/LutimAutofacModule.cs +++ b/src/Greenshot.Addon.Lutim/LutimAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Lutim.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Lutim { diff --git a/src/Greenshot.Addon.Lutim/LutimDestination.cs b/src/Greenshot.Addon.Lutim/LutimDestination.cs index f6d8a86e8..1b29a73fa 100644 --- a/src/Greenshot.Addon.Lutim/LutimDestination.cs +++ b/src/Greenshot.Addon.Lutim/LutimDestination.cs @@ -28,7 +28,7 @@ using Dapplo.Addons; using Dapplo.Log; using Greenshot.Addon.Lutim.Entities; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; @@ -36,7 +36,7 @@ using Greenshot.Gfx; namespace Greenshot.Addon.Lutim { /// - /// Description of LutimDestination. + /// This is the destination for Lutim /// [Destination("Lutim")] public class LutimDestination : AbstractDestination diff --git a/src/Greenshot.Addon.Lutim/packages.config b/src/Greenshot.Addon.Lutim/packages.config index dea96809c..ca16e935f 100644 --- a/src/Greenshot.Addon.Lutim/packages.config +++ b/src/Greenshot.Addon.Lutim/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj b/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj index e3b48b59a..0bc07cd35 100644 --- a/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj +++ b/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj @@ -58,29 +58,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.Addon.OCR/OCRDestination.cs b/src/Greenshot.Addon.OCR/OCRDestination.cs index 25295739e..9612a895e 100644 --- a/src/Greenshot.Addon.OCR/OCRDestination.cs +++ b/src/Greenshot.Addon.OCR/OCRDestination.cs @@ -31,7 +31,7 @@ using System.Reflection; using System.Windows.Forms; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Core.Enums; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.OCR/OcrAutofacModule.cs b/src/Greenshot.Addon.OCR/OcrAutofacModule.cs index e77c96a7b..8ce3b44a3 100644 --- a/src/Greenshot.Addon.OCR/OcrAutofacModule.cs +++ b/src/Greenshot.Addon.OCR/OcrAutofacModule.cs @@ -1,5 +1,5 @@ using Autofac; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.OCR { diff --git a/src/Greenshot.Addon.OCR/packages.config b/src/Greenshot.Addon.OCR/packages.config index 28fab9e6b..d595fe47f 100644 --- a/src/Greenshot.Addon.OCR/packages.config +++ b/src/Greenshot.Addon.OCR/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Office/Destinations/ExcelDestination.cs b/src/Greenshot.Addon.Office/Destinations/ExcelDestination.cs index 7f45c39ee..76bde07fa 100644 --- a/src/Greenshot.Addon.Office/Destinations/ExcelDestination.cs +++ b/src/Greenshot.Addon.Office/Destinations/ExcelDestination.cs @@ -29,7 +29,7 @@ using System.IO; using System.Text.RegularExpressions; using Greenshot.Addon.Office.OfficeExport; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Plugin; @@ -41,7 +41,7 @@ namespace Greenshot.Addon.Office.Destinations /// /// Description of PowerpointDestination. /// - [Destination("Excel", 5)] + [Destination("Excel", DestinationOrder.Excel)] public class ExcelDestination : AbstractDestination { private const int IconApplication = 0; @@ -61,7 +61,7 @@ namespace Greenshot.Addon.Office.Destinations } } - public ExcelDestination(string workbookName, + protected ExcelDestination(string workbookName, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : this(coreConfiguration, greenshotLanguage) diff --git a/src/Greenshot.Addon.Office/Destinations/OneNoteDestination.cs b/src/Greenshot.Addon.Office/Destinations/OneNoteDestination.cs index 2461e86c7..34d88d93a 100644 --- a/src/Greenshot.Addon.Office/Destinations/OneNoteDestination.cs +++ b/src/Greenshot.Addon.Office/Destinations/OneNoteDestination.cs @@ -33,7 +33,7 @@ using Dapplo.Log; using Greenshot.Addon.Office.OfficeExport; using Greenshot.Addon.Office.OfficeInterop; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; @@ -41,7 +41,7 @@ using Greenshot.Addons.Interfaces; namespace Greenshot.Addon.Office.Destinations { - [Destination("OneNote", 4)] + [Destination("OneNote", DestinationOrder.OneNote)] public class OneNoteDestination : AbstractDestination { private const int IconApplication = 0; @@ -61,7 +61,7 @@ namespace Greenshot.Addon.Office.Destinations } } - public OneNoteDestination(OneNotePage page, + protected OneNoteDestination(OneNotePage page, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : this(coreConfiguration, greenshotLanguage) diff --git a/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs b/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs index 96bf3135b..5866f36f3 100644 --- a/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs +++ b/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs @@ -33,7 +33,7 @@ using Dapplo.Log; using Greenshot.Addon.Office.OfficeExport; using Greenshot.Addon.Office.OfficeInterop; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Plugin; @@ -45,27 +45,29 @@ namespace Greenshot.Addon.Office.Destinations /// /// Description of OutlookDestination. /// - [Destination("Outlook", 3)] + [Destination("Outlook", DestinationOrder.Outlook)] public class OutlookDestination : AbstractDestination { - private const int IconApplication = 0; + private const int IconApplication = 0; private const int IconMeeting = 2; private const string MapiClient = "Microsoft Outlook"; private static readonly LogSource Log = new LogSource(); + private readonly IOfficeConfiguration _officeConfiguration; private static readonly Bitmap MailIcon = GreenshotResources.GetBitmap("Email.Image"); - private static readonly IOfficeConfiguration OfficeConfig = IniConfig.Current.Get(); private readonly string _exePath; private readonly bool _isActiveFlag; private readonly string _outlookInspectorCaption; private readonly OlObjectClass _outlookInspectorType; public OutlookDestination( + IOfficeConfiguration officeConfiguration, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : base(coreConfiguration, greenshotLanguage) { - if (EmailConfigHelper.HasOutlook()) + _officeConfiguration = officeConfiguration; + if (EmailConfigHelper.HasOutlook()) { _isActiveFlag = true; } @@ -80,12 +82,13 @@ namespace Greenshot.Addon.Office.Destinations } } - public OutlookDestination( + protected OutlookDestination( string outlookInspectorCaption, OlObjectClass outlookInspectorType, + IOfficeConfiguration officeConfiguration, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage - ) : this(coreConfiguration, greenshotLanguage) + ) : this(officeConfiguration, coreConfiguration, greenshotLanguage) { _outlookInspectorCaption = outlookInspectorCaption; _outlookInspectorType = outlookInspectorType; @@ -122,7 +125,7 @@ namespace Greenshot.Addon.Office.Destinations } foreach (var inspectorCaption in inspectorCaptions.Keys) { - yield return new OutlookDestination(inspectorCaption, inspectorCaptions[inspectorCaption], CoreConfiguration, GreenshotLanguage); + yield return new OutlookDestination(inspectorCaption, inspectorCaptions[inspectorCaption], _officeConfiguration, CoreConfiguration, GreenshotLanguage); } } @@ -175,11 +178,11 @@ namespace Greenshot.Addon.Office.Destinations { var destinations = new List { - new OutlookDestination(CoreConfiguration, GreenshotLanguage) + new OutlookDestination(_officeConfiguration, CoreConfiguration, GreenshotLanguage) }; foreach (var inspectorCaption in inspectorCaptions.Keys) { - destinations.Add(new OutlookDestination(inspectorCaption, inspectorCaptions[inspectorCaption], CoreConfiguration, GreenshotLanguage)); + destinations.Add(new OutlookDestination(inspectorCaption, inspectorCaptions[inspectorCaption], _officeConfiguration, CoreConfiguration, GreenshotLanguage)); } // Return the ExportInformation from the picker without processing, as this indirectly comes from us self return ShowPickerMenu(false, surface, captureDetails, destinations); @@ -187,9 +190,9 @@ namespace Greenshot.Addon.Office.Destinations } else { - exportInformation.ExportMade = OutlookEmailExporter.ExportToOutlook(OfficeConfig.OutlookEmailFormat, tmpFile, - FilenameHelper.FillPattern(OfficeConfig.EmailSubjectPattern, captureDetails, false), attachmentName, OfficeConfig.EmailTo, OfficeConfig.EmailCC, - OfficeConfig.EmailBCC, null); + exportInformation.ExportMade = OutlookEmailExporter.ExportToOutlook(_officeConfiguration.OutlookEmailFormat, tmpFile, + FilenameHelper.FillPattern(_officeConfiguration.EmailSubjectPattern, captureDetails, false), attachmentName, _officeConfiguration.EmailTo, _officeConfiguration.EmailCC, + _officeConfiguration.EmailBCC, null); } } ProcessExport(exportInformation, surface); diff --git a/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs b/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs index 775f671df..dec8391f9 100644 --- a/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs +++ b/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs @@ -30,7 +30,7 @@ using System.Linq; using System.Text.RegularExpressions; using Greenshot.Addon.Office.OfficeExport; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Plugin; @@ -42,7 +42,7 @@ namespace Greenshot.Addon.Office.Destinations /// /// Description of PowerpointDestination. /// - [Destination("Powerpoint", 4)] + [Destination("Powerpoint", DestinationOrder.Powerpoint)] public class PowerpointDestination : AbstractDestination { private const int IconApplication = 0; diff --git a/src/Greenshot.Addon.Office/Destinations/WordDestination.cs b/src/Greenshot.Addon.Office/Destinations/WordDestination.cs index e8e2857bb..7d77fdb7b 100644 --- a/src/Greenshot.Addon.Office/Destinations/WordDestination.cs +++ b/src/Greenshot.Addon.Office/Destinations/WordDestination.cs @@ -32,7 +32,7 @@ using System.Text.RegularExpressions; using Dapplo.Log; using Greenshot.Addon.Office.OfficeExport; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Plugin; @@ -44,7 +44,7 @@ namespace Greenshot.Addon.Office.Destinations /// /// Description of EmailDestination. /// - [Destination("Word", 4)] + [Destination("Word", DestinationOrder.Word)] public class WordDestination : AbstractDestination { private const int IconApplication = 0; diff --git a/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj b/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj index 7e5266cfb..2c8434082 100644 --- a/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj +++ b/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj @@ -44,29 +44,29 @@ ..\packages\Costura.Fody.2.0.1\lib\net452\Costura.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.Addon.Office/packages.config b/src/Greenshot.Addon.Office/packages.config index 17803155f..637798890 100644 --- a/src/Greenshot.Addon.Office/packages.config +++ b/src/Greenshot.Addon.Office/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj b/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj index 36384e90d..eb24e2ea6 100644 --- a/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj +++ b/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj @@ -57,29 +57,29 @@ ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.OneDrive/OneDriveAutofacModule.cs b/src/Greenshot.Addon.OneDrive/OneDriveAutofacModule.cs index d02f7a1f0..8a61a4b66 100644 --- a/src/Greenshot.Addon.OneDrive/OneDriveAutofacModule.cs +++ b/src/Greenshot.Addon.OneDrive/OneDriveAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.OneDrive.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.OneDrive { diff --git a/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs b/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs index 3c706a33b..8f0cb0429 100644 --- a/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs +++ b/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs @@ -39,7 +39,7 @@ using Dapplo.Log; using Dapplo.Utils; using Greenshot.Addon.OneDrive.Entities; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; diff --git a/src/Greenshot.Addon.OneDrive/packages.config b/src/Greenshot.Addon.OneDrive/packages.config index d9c882889..4c28aa2da 100644 --- a/src/Greenshot.Addon.OneDrive/packages.config +++ b/src/Greenshot.Addon.OneDrive/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj b/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj index e6651fba7..0d53b3a28 100644 --- a/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj +++ b/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj @@ -58,29 +58,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Photobucket/PhotobucketAutofacModule.cs b/src/Greenshot.Addon.Photobucket/PhotobucketAutofacModule.cs index 5383aa80d..25c790e9f 100644 --- a/src/Greenshot.Addon.Photobucket/PhotobucketAutofacModule.cs +++ b/src/Greenshot.Addon.Photobucket/PhotobucketAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Photobucket.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Photobucket { diff --git a/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs b/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs index c42e83545..27107f9bd 100644 --- a/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs +++ b/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs @@ -38,7 +38,7 @@ using Dapplo.HttpExtensions.OAuth; using Dapplo.Log; using Dapplo.Utils; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.Photobucket/packages.config b/src/Greenshot.Addon.Photobucket/packages.config index 43ed8fd9c..16c782681 100644 --- a/src/Greenshot.Addon.Photobucket/packages.config +++ b/src/Greenshot.Addon.Photobucket/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj b/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj index c1df90376..f9881c69f 100644 --- a/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj +++ b/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj @@ -57,29 +57,29 @@ ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot.Addon.Tfs/TfsAutofacModule.cs b/src/Greenshot.Addon.Tfs/TfsAutofacModule.cs index 3683e8b20..89f9bfadd 100644 --- a/src/Greenshot.Addon.Tfs/TfsAutofacModule.cs +++ b/src/Greenshot.Addon.Tfs/TfsAutofacModule.cs @@ -1,7 +1,7 @@ using Autofac; using Dapplo.CaliburnMicro.Configuration; using Greenshot.Addon.Tfs.ViewModels; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Tfs { diff --git a/src/Greenshot.Addon.Tfs/TfsDestination.cs b/src/Greenshot.Addon.Tfs/TfsDestination.cs index 369822b03..24639c3ee 100644 --- a/src/Greenshot.Addon.Tfs/TfsDestination.cs +++ b/src/Greenshot.Addon.Tfs/TfsDestination.cs @@ -33,7 +33,7 @@ using Dapplo.Addons; using Dapplo.Log; using Greenshot.Addon.Tfs.Entities; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.Tfs/packages.config b/src/Greenshot.Addon.Tfs/packages.config index dea96809c..ca16e935f 100644 --- a/src/Greenshot.Addon.Tfs/packages.config +++ b/src/Greenshot.Addon.Tfs/packages.config @@ -7,14 +7,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj b/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj index af0e44915..0e0aa5a3a 100644 --- a/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj +++ b/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj @@ -54,17 +54,17 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.8-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.8-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.31-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.31-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.Addon.Win10/Win10AutofacModule.cs b/src/Greenshot.Addon.Win10/Win10AutofacModule.cs index 3636a324a..d22c79f87 100644 --- a/src/Greenshot.Addon.Win10/Win10AutofacModule.cs +++ b/src/Greenshot.Addon.Win10/Win10AutofacModule.cs @@ -1,5 +1,5 @@ using Autofac; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addon.Win10 { diff --git a/src/Greenshot.Addon.Win10/Win10OcrDestination.cs b/src/Greenshot.Addon.Win10/Win10OcrDestination.cs index f517e83e2..2de393e5e 100644 --- a/src/Greenshot.Addon.Win10/Win10OcrDestination.cs +++ b/src/Greenshot.Addon.Win10/Win10OcrDestination.cs @@ -27,7 +27,7 @@ using Windows.Graphics.Imaging; using Windows.Media.Ocr; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Addons.Interfaces.Plugin; diff --git a/src/Greenshot.Addon.Win10/Win10ShareDestination.cs b/src/Greenshot.Addon.Win10/Win10ShareDestination.cs index 6a87a4c14..4a53c81c4 100644 --- a/src/Greenshot.Addon.Win10/Win10ShareDestination.cs +++ b/src/Greenshot.Addon.Win10/Win10ShareDestination.cs @@ -34,7 +34,7 @@ using Dapplo.Log; using Dapplo.Windows.Messages; using Greenshot.Addon.Win10.Native; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Core.Enums; using Greenshot.Addons.Interfaces; diff --git a/src/Greenshot.Addon.Win10/packages.config b/src/Greenshot.Addon.Win10/packages.config index c055f229a..96eb9b996 100644 --- a/src/Greenshot.Addon.Win10/packages.config +++ b/src/Greenshot.Addon.Win10/packages.config @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/src/Greenshot.Addons/AddonsAutofacModule.cs b/src/Greenshot.Addons/AddonsAutofacModule.cs index a93ae42c0..cd3632ae6 100644 --- a/src/Greenshot.Addons/AddonsAutofacModule.cs +++ b/src/Greenshot.Addons/AddonsAutofacModule.cs @@ -1,4 +1,28 @@ -using Autofac; +#region Greenshot GNU General Public License + +// Greenshot - a free and open source screenshot tool +// Copyright (C) 2007-2018 Thomas 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 . + +#endregion + +using Autofac; +using Greenshot.Addons.Components; using Greenshot.Addons.ViewModels; namespace Greenshot.Addons @@ -11,7 +35,10 @@ namespace Greenshot.Addons builder .RegisterType() .AsSelf(); - + builder + .RegisterType() + .AsSelf(); + } } } diff --git a/src/Greenshot.Addons/Addons/DestinationAttribute.cs b/src/Greenshot.Addons/Components/DestinationAttribute.cs similarity index 84% rename from src/Greenshot.Addons/Addons/DestinationAttribute.cs rename to src/Greenshot.Addons/Components/DestinationAttribute.cs index 509130a99..3fa4cc99c 100644 --- a/src/Greenshot.Addons/Addons/DestinationAttribute.cs +++ b/src/Greenshot.Addons/Components/DestinationAttribute.cs @@ -24,28 +24,16 @@ using System; using System.ComponentModel.Composition; -namespace Greenshot.Addons.Addons +namespace Greenshot.Addons.Components { [MetadataAttribute] [AttributeUsage(AttributeTargets.Class, Inherited = false)] public class DestinationAttribute : Attribute { - /// - /// Default constructor - /// public DestinationAttribute() { - } - /// - /// Use a specific contract name for the Destination - /// - /// string - public DestinationAttribute(string designation) - { - Designation = designation; } - /// /// Use a specific contract name for the Destination /// @@ -57,6 +45,20 @@ namespace Greenshot.Addons.Addons Priority = priority; } + /// + /// Use a specific contract name for the Destination + /// + /// string + /// object + public DestinationAttribute(string designation, object priority = null) + { + Designation = designation; + if (priority != null) + { + Priority = Convert.ToInt32(priority); + } + } + public string Designation { get; set; } public int Priority { get; set; } = 10; } diff --git a/src/Greenshot.Addons/Components/DestinationHolder.cs b/src/Greenshot.Addons/Components/DestinationHolder.cs new file mode 100644 index 000000000..489236aed --- /dev/null +++ b/src/Greenshot.Addons/Components/DestinationHolder.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Greenshot.Addons.Extensions; + +namespace Greenshot.Addons.Components +{ + /// + /// This holds the destinations, so other components can easily retrieve them + /// + public class DestinationHolder + { + private readonly IEnumerable> _destinations; + private readonly IEnumerable _destinationProviders; + + public DestinationHolder( + IEnumerable> destinations, + IEnumerable destinationProviders + ) + { + _destinations = destinations; + _destinationProviders = destinationProviders; + } + + /// + /// Return an IEnumerable with sorted IDestination entries + /// + public IEnumerable SortedActiveDestinations => _destinationProviders + .SelectMany(provider => provider.Provide()) + .Concat(_destinations) + .Where(destination => destination.Value.IsActive) + .OrderBy(destination => destination.Metadata.Priority) + .ThenBy(destination => destination.Value.Description) + .Select(d => d.Value); + + /// + /// Return an IEnumerable with all destinations + /// + public IEnumerable> AllDestinations => _destinationProviders + .SelectMany(provider => provider.Provide()) + .Concat(_destinations); + } +} diff --git a/src/Greenshot.Addons/Components/DestinationOrder.cs b/src/Greenshot.Addons/Components/DestinationOrder.cs new file mode 100644 index 000000000..795b10469 --- /dev/null +++ b/src/Greenshot.Addons/Components/DestinationOrder.cs @@ -0,0 +1,41 @@ +#region Greenshot GNU General Public License + +// Greenshot - a free and open source screenshot tool +// Copyright (C) 2007-2018 Thomas 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 . + +#endregion + +namespace Greenshot.Addons.Components +{ + public enum DestinationOrder + { + FileNoDialog = 0, + FileDialog = 0, + Picker = 1, + Printer = 2, + Clipboard = 2, + Email = 3, + Outlook = 3, + Word = 4, + Powerpoint = 4, + OneNote = 4, + Excel = 5, + + } +} diff --git a/src/Greenshot.Addons/Addons/IDestination.cs b/src/Greenshot.Addons/Components/IDestination.cs similarity index 96% rename from src/Greenshot.Addons/Addons/IDestination.cs rename to src/Greenshot.Addons/Components/IDestination.cs index 88754abb0..ba1d303c1 100644 --- a/src/Greenshot.Addons/Addons/IDestination.cs +++ b/src/Greenshot.Addons/Components/IDestination.cs @@ -34,7 +34,7 @@ using Greenshot.Addons.Interfaces; #endregion -namespace Greenshot.Addons.Addons +namespace Greenshot.Addons.Components { /// /// Description of IDestination. diff --git a/src/Greenshot.Addons/Components/IDestinationProvider.cs b/src/Greenshot.Addons/Components/IDestinationProvider.cs new file mode 100644 index 000000000..4e2e3929d --- /dev/null +++ b/src/Greenshot.Addons/Components/IDestinationProvider.cs @@ -0,0 +1,36 @@ +#region Greenshot GNU General Public License + +// Greenshot - a free and open source screenshot tool +// Copyright (C) 2007-2018 Thomas 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 . + +#endregion + +using System; +using System.Collections.Generic; + +namespace Greenshot.Addons.Components +{ + /// + /// Implement this interface to provide last-minute or dynamic IDestinations + /// + public interface IDestinationProvider + { + IEnumerable> Provide(); + } +} diff --git a/src/Greenshot.Addons/Core/AbstractDestination.cs b/src/Greenshot.Addons/Core/AbstractDestination.cs index a4725bafa..9a0df5095 100644 --- a/src/Greenshot.Addons/Core/AbstractDestination.cs +++ b/src/Greenshot.Addons/Core/AbstractDestination.cs @@ -37,7 +37,7 @@ using Dapplo.Windows.Common.Structs; using Dapplo.Windows.Dpi; using Dapplo.Windows.Dpi.Forms; using Dapplo.Windows.Extensions; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Extensions; using Greenshot.Addons.Interfaces; using Greenshot.Gfx; diff --git a/src/Greenshot.Addons/Core/CaptureDetails.cs b/src/Greenshot.Addons/Core/CaptureDetails.cs index 47d32a553..69c70aa63 100644 --- a/src/Greenshot.Addons/Core/CaptureDetails.cs +++ b/src/Greenshot.Addons/Core/CaptureDetails.cs @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Interfaces; #endregion diff --git a/src/Greenshot.Addons/Extensions/DestinationExtensions.cs b/src/Greenshot.Addons/Extensions/DestinationExtensions.cs index 099a128d6..a280c0657 100644 --- a/src/Greenshot.Addons/Extensions/DestinationExtensions.cs +++ b/src/Greenshot.Addons/Extensions/DestinationExtensions.cs @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addons.Extensions { diff --git a/src/Greenshot.Addons/Greenshot.Addons.csproj b/src/Greenshot.Addons/Greenshot.Addons.csproj index 1576ce784..db0c45e51 100644 --- a/src/Greenshot.Addons/Greenshot.Addons.csproj +++ b/src/Greenshot.Addons/Greenshot.Addons.csproj @@ -40,29 +40,29 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll @@ -163,7 +163,7 @@ - + @@ -173,6 +173,9 @@ + + + Form @@ -377,7 +380,7 @@ - + diff --git a/src/Greenshot.Addons/Interfaces/ICaptureDetails.cs b/src/Greenshot.Addons/Interfaces/ICaptureDetails.cs index 815176d2d..a327e5a05 100644 --- a/src/Greenshot.Addons/Interfaces/ICaptureDetails.cs +++ b/src/Greenshot.Addons/Interfaces/ICaptureDetails.cs @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; #endregion diff --git a/src/Greenshot.Addons/ViewModels/UploadViewModel.cs b/src/Greenshot.Addons/ViewModels/UploadViewModel.cs index 38de01e8a..c00d3c594 100644 --- a/src/Greenshot.Addons/ViewModels/UploadViewModel.cs +++ b/src/Greenshot.Addons/ViewModels/UploadViewModel.cs @@ -24,7 +24,7 @@ using System.Reactive.Disposables; using Caliburn.Micro; using Dapplo.CaliburnMicro.Extensions; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; namespace Greenshot.Addons.ViewModels { diff --git a/src/Greenshot.Addons/packages.config b/src/Greenshot.Addons/packages.config index f0c3f3007..fcbf39ad3 100644 --- a/src/Greenshot.Addons/packages.config +++ b/src/Greenshot.Addons/packages.config @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Greenshot.Gfx/Greenshot.Gfx.csproj b/src/Greenshot.Gfx/Greenshot.Gfx.csproj index 801c0553f..f5f301486 100644 --- a/src/Greenshot.Gfx/Greenshot.Gfx.csproj +++ b/src/Greenshot.Gfx/Greenshot.Gfx.csproj @@ -36,17 +36,17 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.Gfx/packages.config b/src/Greenshot.Gfx/packages.config index ecad05e58..e6b51c2dd 100644 --- a/src/Greenshot.Gfx/packages.config +++ b/src/Greenshot.Gfx/packages.config @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj index aa093c1f1..e53e30737 100644 --- a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj +++ b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj @@ -42,17 +42,17 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.PerformanceTests/packages.config b/src/Greenshot.PerformanceTests/packages.config index c5ee86e13..886c885d4 100644 --- a/src/Greenshot.PerformanceTests/packages.config +++ b/src/Greenshot.PerformanceTests/packages.config @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/src/Greenshot.Tests/Greenshot.Tests.csproj b/src/Greenshot.Tests/Greenshot.Tests.csproj index 74d520184..ccaa1a613 100644 --- a/src/Greenshot.Tests/Greenshot.Tests.csproj +++ b/src/Greenshot.Tests/Greenshot.Tests.csproj @@ -71,17 +71,17 @@ ..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll diff --git a/src/Greenshot.Tests/packages.config b/src/Greenshot.Tests/packages.config index b4952cf07..71cd66cd8 100644 --- a/src/Greenshot.Tests/packages.config +++ b/src/Greenshot.Tests/packages.config @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/src/Greenshot/Components/CommandlineParser.cs b/src/Greenshot/Components/CommandlineParser.cs index f6094e848..ed7fb19cb 100644 --- a/src/Greenshot/Components/CommandlineParser.cs +++ b/src/Greenshot/Components/CommandlineParser.cs @@ -28,7 +28,7 @@ using System.Text; using CommonServiceLocator; using Dapplo.Log; using Dapplo.Windows.Kernel32; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; namespace Greenshot.Components diff --git a/src/Greenshot/Components/FormsStartup.cs b/src/Greenshot/Components/FormsStartup.cs index c010dc0fc..734f2c47b 100644 --- a/src/Greenshot/Components/FormsStartup.cs +++ b/src/Greenshot/Components/FormsStartup.cs @@ -32,7 +32,7 @@ namespace Greenshot.Components /// /// This startup action starts Windows.Forms /// - [StartupOrder((int)GreenshotStartupOrder.Forms)] + [ServiceOrder(GreenshotStartupOrder.Forms)] public class FormsStartup : IStartup { private static readonly LogSource Log = new LogSource(); diff --git a/src/Greenshot/Components/GreenshotServer.cs b/src/Greenshot/Components/GreenshotServer.cs index 08250662d..6e9dbd4dc 100644 --- a/src/Greenshot/Components/GreenshotServer.cs +++ b/src/Greenshot/Components/GreenshotServer.cs @@ -35,7 +35,7 @@ using System.Windows.Forms; using Dapplo.Addons; using Dapplo.Ini; using Dapplo.Log; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; @@ -51,14 +51,14 @@ namespace Greenshot.Components /// This startup action starts the Greenshot "server", which allows to open files etc. /// [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] - [StartupOrder((int)GreenshotStartupOrder.Server)] + [ServiceOrder(GreenshotStartupOrder.Server)] public class GreenshotServerAction : IGreenshotContract, IStartupAsync, IShutdownAsync { private static readonly LogSource Log = new LogSource(); private readonly ICoreConfiguration _coreConfiguration; private readonly MainForm _mainForm; private readonly HotkeyHandler _hotkeyHandler; - private readonly IEnumerable _destinations; + private readonly DestinationHolder _destinationHolder; private ServiceHost _host; public static string Identity @@ -71,12 +71,16 @@ namespace Greenshot.Components } public static string EndPoint => $"net.pipe://localhost/Greenshot/Greenshot_{Identity}"; - public GreenshotServerAction(ICoreConfiguration coreConfiguration, MainForm mainForm, HotkeyHandler hotkeyHandler, IEnumerable destinations) + public GreenshotServerAction( + ICoreConfiguration coreConfiguration, + MainForm mainForm, + HotkeyHandler hotkeyHandler, + DestinationHolder destinationHolder) { _coreConfiguration = coreConfiguration; _mainForm = mainForm; _hotkeyHandler = hotkeyHandler; - _destinations = destinations; + _destinationHolder = destinationHolder; } public async Task StartAsync(CancellationToken cancellationToken = default) @@ -160,7 +164,7 @@ namespace Greenshot.Components // Fallback-Destination var designation = _coreConfiguration.OutputDestinations.FirstOrDefault(); - var destination = _destinations.FirstOrDefault(d => d.Designation == designation && d.IsActive); + var destination = _destinationHolder.SortedActiveDestinations.FirstOrDefault(d => d.Designation == designation); switch (captureMode.ToLower()) { diff --git a/src/Greenshot/Components/HotkeyHandler.cs b/src/Greenshot/Components/HotkeyHandler.cs index c7adf3f46..683f60353 100644 --- a/src/Greenshot/Components/HotkeyHandler.cs +++ b/src/Greenshot/Components/HotkeyHandler.cs @@ -43,7 +43,7 @@ namespace Greenshot.Components /// /// This startup action registers the hotkeys /// - [StartupOrder((int)GreenshotUiStartupOrder.Hotkeys), ShutdownOrder(int.MinValue)] + [ServiceOrder(GreenshotUiStartupOrder.Hotkeys, int.MinValue)] public class HotkeyHandler : IUiStartup, IUiShutdown { private static readonly LogSource Log = new LogSource(); diff --git a/src/Greenshot/Components/MainFormStartup.cs b/src/Greenshot/Components/MainFormStartup.cs index 3251b2b3e..b85c438d3 100644 --- a/src/Greenshot/Components/MainFormStartup.cs +++ b/src/Greenshot/Components/MainFormStartup.cs @@ -39,7 +39,7 @@ namespace Greenshot.Components /// /// This startup action starts the MainForm /// - [StartupOrder((int)GreenshotUiStartupOrder.TrayIcon)] + [ServiceOrder(GreenshotUiStartupOrder.TrayIcon)] public class MainFormStartup : IUiStartup, IUiShutdown { private static readonly LogSource Log = new LogSource(); diff --git a/src/Greenshot/Components/SoundHelper.cs b/src/Greenshot/Components/SoundHelper.cs index 4d2407a8f..18369e479 100644 --- a/src/Greenshot/Components/SoundHelper.cs +++ b/src/Greenshot/Components/SoundHelper.cs @@ -41,7 +41,7 @@ namespace Greenshot.Components /// Create to fix the sometimes wrongly played sample, especially after first start from IDE /// See: http://www.codeproject.com/KB/audio-video/soundplayerbug.aspx?msg=2487569 /// - [StartupOrder((int)GreenshotStartupOrder.Sound)] + [ServiceOrder(GreenshotStartupOrder.Sound)] public class SoundHelper : IStartup, IShutdown { private readonly ICoreConfiguration _coreConfiguration; diff --git a/src/Greenshot/Destinations/ClipboardDestination.cs b/src/Greenshot/Destinations/ClipboardDestination.cs index 681b8758e..ea3669493 100644 --- a/src/Greenshot/Destinations/ClipboardDestination.cs +++ b/src/Greenshot/Destinations/ClipboardDestination.cs @@ -27,7 +27,7 @@ using System; using System.Drawing; using System.Windows.Forms; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Configuration; @@ -39,7 +39,7 @@ namespace Greenshot.Destinations /// /// Description of ClipboardDestination. /// - [Destination("Clipboard",2)] + [Destination("Clipboard", DestinationOrder.Clipboard)] public class ClipboardDestination : AbstractDestination { public ClipboardDestination( diff --git a/src/Greenshot/Destinations/EmailDestination.cs b/src/Greenshot/Destinations/EmailDestination.cs index b6fa01550..76fc62f16 100644 --- a/src/Greenshot/Destinations/EmailDestination.cs +++ b/src/Greenshot/Destinations/EmailDestination.cs @@ -27,7 +27,7 @@ using System; using System.Drawing; using System.Windows.Forms; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Helpers; @@ -39,7 +39,7 @@ namespace Greenshot.Destinations /// /// Description of EmailDestination. /// - [Destination("EMail", 3)] + [Destination("EMail", DestinationOrder.Email)] public class EmailDestination : AbstractDestination { private static readonly Bitmap MailIcon = GreenshotResources.GetBitmap("Email.Image"); diff --git a/src/Greenshot/Destinations/FileDestination.cs b/src/Greenshot/Destinations/FileDestination.cs index 866a88af6..fc7742c16 100644 --- a/src/Greenshot/Destinations/FileDestination.cs +++ b/src/Greenshot/Destinations/FileDestination.cs @@ -29,7 +29,7 @@ using System.IO; using System.Windows.Forms; using Dapplo.Log; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; @@ -42,7 +42,7 @@ namespace Greenshot.Destinations /// /// Description of FileSaveAsDestination. /// - [Destination("FileNoDialog", 0)] + [Destination("FileNoDialog", DestinationOrder.FileNoDialog)] public class FileDestination : AbstractDestination { private static readonly LogSource Log = new LogSource(); diff --git a/src/Greenshot/Destinations/FileWithDialogDestination.cs b/src/Greenshot/Destinations/FileWithDialogDestination.cs index 7b20743c9..9ceb5dffd 100644 --- a/src/Greenshot/Destinations/FileWithDialogDestination.cs +++ b/src/Greenshot/Destinations/FileWithDialogDestination.cs @@ -26,7 +26,7 @@ using System.Drawing; using System.Windows.Forms; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Configuration; @@ -38,7 +38,7 @@ namespace Greenshot.Destinations /// /// Description of FileWithDialog. /// - [Destination("FileDialog", 0)] + [Destination("FileDialog", DestinationOrder.FileDialog)] public class FileWithDialogDestination : AbstractDestination { diff --git a/src/Greenshot/Destinations/PickerDestination.cs b/src/Greenshot/Destinations/PickerDestination.cs index 52c4d2c13..be1f238ae 100644 --- a/src/Greenshot/Destinations/PickerDestination.cs +++ b/src/Greenshot/Destinations/PickerDestination.cs @@ -27,7 +27,7 @@ using System; using System.Collections.Generic; using System.Linq; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; @@ -38,21 +38,21 @@ namespace Greenshot.Destinations /// /// The PickerDestination shows a context menu with all possible destinations, so the user can "pick" one /// - [Destination("Picker", 1)] + [Destination("Picker", DestinationOrder.Picker)] public class PickerDestination : AbstractDestination { - private readonly IEnumerable> _destinations; + private readonly DestinationHolder _destinationHolder; public override string Description => GreenshotLanguage.SettingsDestinationPicker; public PickerDestination( - IEnumerable> destinations, + DestinationHolder destinationHolder, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : base(coreConfiguration, greenshotLanguage) - { - _destinations = destinations; - } + { + _destinationHolder = destinationHolder; + } /// /// Export the capture with the destination picker @@ -69,11 +69,8 @@ namespace Greenshot.Destinations { foreach (var outputDestination in CoreConfiguration.PickerDestinations) { - var pickerDestination = _destinations - .Where(destination => !"Picker".Equals(destination.Metadata.Designation)) - .Where(destination => destination.Value.IsActive) - .Where(destination => outputDestination == destination.Value.Designation) - .Select(d => d.Value).FirstOrDefault(); + var pickerDestination = _destinationHolder.SortedActiveDestinations + .FirstOrDefault(destination => outputDestination == destination.Designation); if (pickerDestination != null) { @@ -83,12 +80,8 @@ namespace Greenshot.Destinations } else { - foreach (var pickerDestination in _destinations - .Where(destination => !"Picker".Equals(destination.Metadata.Designation)) - .Where(destination => destination.Value.IsActive) - .OrderBy(destination => destination.Metadata.Priority) - .ThenBy(destination => destination.Value.Description) - .Select(d => d.Value)) + foreach (var pickerDestination in _destinationHolder.SortedActiveDestinations + .Where(destination => !"Picker".Equals(destination.Designation))) { pickerDestinations.Add(pickerDestination); } diff --git a/src/Greenshot/Destinations/PrinterDestination.cs b/src/Greenshot/Destinations/PrinterDestination.cs index 0bd30e87a..04ebcdd4f 100644 --- a/src/Greenshot/Destinations/PrinterDestination.cs +++ b/src/Greenshot/Destinations/PrinterDestination.cs @@ -29,7 +29,7 @@ using System.Drawing; using System.Drawing.Printing; using System.Windows.Forms; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Interfaces; using Greenshot.Configuration; @@ -42,7 +42,7 @@ namespace Greenshot.Destinations /// /// Description of PrinterDestination. /// - [Destination("Printer", 2)] + [Destination("Printer", DestinationOrder.Printer)] public class PrinterDestination : AbstractDestination { private readonly string _printerName; diff --git a/src/Greenshot/Forms/MainForm.cs b/src/Greenshot/Forms/MainForm.cs index 5def0ae1e..11676f045 100644 --- a/src/Greenshot/Forms/MainForm.cs +++ b/src/Greenshot/Forms/MainForm.cs @@ -48,7 +48,7 @@ using Dapplo.Windows.DesktopWindowsManager; using Dapplo.Windows.Dpi.Enums; using Dapplo.Windows.Dpi.Forms; using Dapplo.Windows.Kernel32; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Core.Enums; @@ -73,12 +73,14 @@ namespace Greenshot.Forms private readonly ICoreConfiguration _coreConfiguration; private readonly IWindowManager _windowManager; private readonly ConfigViewModel _configViewModel; - private readonly IEnumerable _destinations; // Timer for the double click test private readonly Timer _doubleClickTimer = new Timer(); // Make sure we have only one settings form private readonly SettingsForm _settingsForm; + + private readonly DestinationHolder _destinationHolder; + // Make sure we have only one about form private AboutForm _aboutForm; // Thumbnail preview @@ -88,13 +90,14 @@ namespace Greenshot.Forms public MainForm(ICoreConfiguration coreConfiguration, IWindowManager windowManager, - ConfigViewModel configViewModel, SettingsForm settingsForm, IEnumerable destinations) + ConfigViewModel configViewModel, SettingsForm settingsForm, + DestinationHolder destinationHolder) { _coreConfiguration = coreConfiguration; _windowManager = windowManager; _configViewModel = configViewModel; _settingsForm = settingsForm; - _destinations = destinations; + _destinationHolder = destinationHolder; Instance = this; } @@ -275,7 +278,7 @@ namespace Greenshot.Forms if (File.Exists(_coreConfiguration.OutputFileAsFullpath)) { - CaptureHelper.CaptureFile(_coreConfiguration.OutputFileAsFullpath, _destinations.Find("Editor")); + CaptureHelper.CaptureFile(_coreConfiguration.OutputFileAsFullpath, _destinationHolder.SortedActiveDestinations.Find("Editor")); } break; case ClickActions.OPEN_SETTINGS: @@ -957,7 +960,7 @@ namespace Greenshot.Forms Text = Language.GetString(LangKey.settings_destination) }; // Working with IDestination: - foreach (var destination in _destinations) + foreach (var destination in _destinationHolder.SortedActiveDestinations) { selectList.AddItem(destination.Description, destination, _coreConfiguration.OutputDestinations.Contains(destination.Designation)); } diff --git a/src/Greenshot/Forms/SettingsForm.cs b/src/Greenshot/Forms/SettingsForm.cs index 75012083b..e6e436934 100644 --- a/src/Greenshot/Forms/SettingsForm.cs +++ b/src/Greenshot/Forms/SettingsForm.cs @@ -35,7 +35,7 @@ using System.Windows.Forms; using Dapplo.Log; using Dapplo.Windows.Common; using Dapplo.Windows.DesktopWindowsManager; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Controls; using Greenshot.Addons.Core; using Greenshot.Addons.Core.Enums; @@ -54,16 +54,15 @@ namespace Greenshot.Forms /// public partial class SettingsForm : BaseForm { - private static readonly LogSource Log = new LogSource(); + private readonly DestinationHolder _destinationHolder; + private static readonly LogSource Log = new LogSource(); private readonly ToolTip _toolTip = new ToolTip(); private int _daysbetweencheckPreviousValue; private bool _inHotkey; - private readonly IEnumerable> _destinations = null; - - public SettingsForm(IEnumerable> destinations) + public SettingsForm(DestinationHolder destinationHolder) { - _destinations = destinations; + _destinationHolder = destinationHolder; // Make sure the store isn't called to early, that's why we do it manually ManualStoreFields = true; } @@ -372,9 +371,7 @@ namespace Greenshot.Forms var imageList = new ImageList(); listview_destinations.SmallImageList = imageList; var imageNr = -1; - foreach (var currentDestination in _destinations.Where(d => d.Value.IsActive) - .OrderBy(destination => destination.Metadata.Priority).ThenBy(d => d.Value.Description) - .Select(d => d.Value)) + foreach (var currentDestination in _destinationHolder.SortedActiveDestinations) { var destinationImage = currentDestination.GetDisplayIcon(DpiHandler.Dpi); if (destinationImage != null) diff --git a/src/Greenshot/Greenshot.csproj b/src/Greenshot/Greenshot.csproj index 1c1cae979..6250fd3d5 100644 --- a/src/Greenshot/Greenshot.csproj +++ b/src/Greenshot/Greenshot.csproj @@ -57,32 +57,32 @@ ..\packages\Costura.Fody.2.0.1\lib\net452\Costura.dll - - ..\packages\Dapplo.Addons.1.0.9-beta\lib\net45\Dapplo.Addons.dll + + ..\packages\Dapplo.Addons.1.0.11-beta\lib\net45\Dapplo.Addons.dll - - ..\packages\Dapplo.Addons.Bootstrapper.1.0.9-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll + + ..\packages\Dapplo.Addons.Bootstrapper.1.0.11-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll - - ..\packages\Dapplo.CaliburnMicro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.dll + + ..\packages\Dapplo.CaliburnMicro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.dll - - ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll + + ..\packages\Dapplo.CaliburnMicro.Configuration.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Configuration.dll - - ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll + + ..\packages\Dapplo.CaliburnMicro.Dapp.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Dapp.dll - - ..\packages\Dapplo.CaliburnMicro.Menu.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll + + ..\packages\Dapplo.CaliburnMicro.Menu.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Menu.dll - - ..\packages\Dapplo.CaliburnMicro.Metro.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Metro.dll + + ..\packages\Dapplo.CaliburnMicro.Metro.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Metro.dll - - ..\packages\Dapplo.CaliburnMicro.Security.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll + + ..\packages\Dapplo.CaliburnMicro.Security.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Security.dll - - ..\packages\Dapplo.CaliburnMicro.Translations.1.0.32-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll + + ..\packages\Dapplo.CaliburnMicro.Translations.1.0.33-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll ..\packages\Dapplo.HttpExtensions.0.8.35\lib\net45\Dapplo.HttpExtensions.dll diff --git a/src/Greenshot/GreenshotAutofacModule.cs b/src/Greenshot/GreenshotAutofacModule.cs index aae09644b..1c2246a70 100644 --- a/src/Greenshot/GreenshotAutofacModule.cs +++ b/src/Greenshot/GreenshotAutofacModule.cs @@ -3,7 +3,6 @@ using Dapplo.Addons; using Dapplo.CaliburnMicro; using Dapplo.CaliburnMicro.Configuration; using Dapplo.CaliburnMicro.Security; -using Greenshot.Addons.Addons; using Greenshot.Addons.Components; using Greenshot.Addons.Interfaces.Plugin; using Greenshot.Components; diff --git a/src/Greenshot/Helpers/CaptureHelper.cs b/src/Greenshot/Helpers/CaptureHelper.cs index ed7703023..735f6365d 100644 --- a/src/Greenshot/Helpers/CaptureHelper.cs +++ b/src/Greenshot/Helpers/CaptureHelper.cs @@ -43,7 +43,7 @@ using Dapplo.Windows.Common.Structs; using Dapplo.Windows.DesktopWindowsManager; using Dapplo.Windows.Kernel32; using Dapplo.Windows.User32; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Core.Enums; using Greenshot.Addons.Extensions; @@ -71,14 +71,14 @@ namespace Greenshot.Helpers // TODO: when we get the screen capture code working correctly, this needs to be enabled //private static ScreenCaptureHelper screenCapture = null; private IList _windows = new List(); - private readonly IEnumerable _destinations; + private readonly DestinationHolder _destinationHolder; private readonly IEnumerable _processors; public CaptureHelper(CaptureMode captureMode) { _captureMode = captureMode; _capture = new Capture(); - _destinations = ServiceLocator.Current.GetAllInstances(); + _destinationHolder = ServiceLocator.Current.GetInstance(); _processors = ServiceLocator.Current.GetAllInstances(); } @@ -412,13 +412,13 @@ namespace Greenshot.Helpers if (_capture.CaptureDetails.HasDestination(typeof(PickerDestination).GetDesignation())) { _capture.CaptureDetails.ClearDestinations(); - _capture.CaptureDetails.AddDestination(_destinations.Find("Editor")); - _capture.CaptureDetails.AddDestination(_destinations.Find(typeof(PickerDestination))); + _capture.CaptureDetails.AddDestination(_destinationHolder.SortedActiveDestinations.Find("Editor")); + _capture.CaptureDetails.AddDestination(_destinationHolder.SortedActiveDestinations.Find(typeof(PickerDestination))); } else { _capture.CaptureDetails.ClearDestinations(); - _capture.CaptureDetails.AddDestination(_destinations.Find("Editor")); + _capture.CaptureDetails.AddDestination(_destinationHolder.SortedActiveDestinations.Find("Editor")); } HandleCapture(); } @@ -441,7 +441,7 @@ namespace Greenshot.Helpers var surface = ImageOutput.SurfaceFactory(); surface = ImageOutput.LoadGreenshotSurface(filename, surface); surface.CaptureDetails = _capture.CaptureDetails; - _destinations.Find("Editor")?.ExportCaptureAsync(true, surface, _capture.CaptureDetails).Wait(); + _destinationHolder.SortedActiveDestinations.Find("Editor")?.ExportCaptureAsync(true, surface, _capture.CaptureDetails).Wait(); break; } } @@ -477,13 +477,13 @@ namespace Greenshot.Helpers if (_capture.CaptureDetails.HasDestination(typeof(PickerDestination).GetDesignation())) { _capture.CaptureDetails.ClearDestinations(); - _capture.CaptureDetails.AddDestination(_destinations.Find("Editor")); - _capture.CaptureDetails.AddDestination(_destinations.Find(typeof(PickerDestination))); + _capture.CaptureDetails.AddDestination(_destinationHolder.SortedActiveDestinations.Find("Editor")); + _capture.CaptureDetails.AddDestination(_destinationHolder.SortedActiveDestinations.Find(typeof(PickerDestination))); } else { _capture.CaptureDetails.ClearDestinations(); - _capture.CaptureDetails.AddDestination(_destinations.Find("Editor")); + _capture.CaptureDetails.AddDestination(_destinationHolder.SortedActiveDestinations.Find("Editor")); } HandleCapture(); } @@ -553,7 +553,7 @@ namespace Greenshot.Helpers { foreach (var destinationDesignation in CoreConfig.OutputDestinations) { - var destination = _destinations.Find(destinationDesignation); + var destination = _destinationHolder.SortedActiveDestinations.Find(destinationDesignation); if (destination != null) { _capture.CaptureDetails.AddDestination(destination); @@ -705,7 +705,7 @@ namespace Greenshot.Helpers if (captureDetails.HasDestination(typeof(PickerDestination).GetDesignation())) { - _destinations.Find(typeof(PickerDestination))?.ExportCaptureAsync(false, surface, captureDetails).Wait(); + _destinationHolder.SortedActiveDestinations.Find(typeof(PickerDestination))?.ExportCaptureAsync(false, surface, captureDetails).Wait(); captureDetails.CaptureDestinations.Clear(); canDisposeSurface = false; } diff --git a/src/Greenshot/Startup.cs b/src/Greenshot/Startup.cs index ad59c71e4..699e5f701 100644 --- a/src/Greenshot/Startup.cs +++ b/src/Greenshot/Startup.cs @@ -95,10 +95,10 @@ namespace Greenshot }; // Load the assemblies, and run the application - application.Bootstrapper.LoadAssemblies(FileLocations.Scan(scanDirectories, "Dapplo.*.dll")); + application.Bootstrapper.LoadAssemblies(FileLocations.Scan(scanDirectories, "Dapplo.Caliburn*.dll")); // Make sure the non-plugin DLLs are also loaded, so exports are available. - application.Bootstrapper.LoadAssemblies(FileLocations.Scan(scanDirectories, "Greenshot*.dll")); - application.Bootstrapper.LoadAssemblies(FileLocations.Scan(scanDirectories, "Greenshot*.gsp")); + application.Bootstrapper.LoadAssemblies(FileLocations.Scan(scanDirectories, "Greenshot.Addon*.dll")); + application.Bootstrapper.LoadAssemblies(FileLocations.Scan(scanDirectories, "Greenshot.Addon*.gsp")); application.Bootstrapper.OnContainerCreated += container => { @@ -123,6 +123,7 @@ namespace Greenshot /// /// Show the exception /// + /// Dapplication /// Exception private static void DisplayErrorViewModel(Dapplication application, Exception exception) { diff --git a/src/Greenshot/Ui/Configuration/ViewModels/DestinationPickerConfigViewModel.cs b/src/Greenshot/Ui/Configuration/ViewModels/DestinationPickerConfigViewModel.cs index 50b5a494c..b95477ee7 100644 --- a/src/Greenshot/Ui/Configuration/ViewModels/DestinationPickerConfigViewModel.cs +++ b/src/Greenshot/Ui/Configuration/ViewModels/DestinationPickerConfigViewModel.cs @@ -21,24 +21,24 @@ #endregion -using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Reactive.Disposables; using Dapplo.CaliburnMicro.Configuration; using Dapplo.CaliburnMicro.Extensions; using Greenshot.Addons; -using Greenshot.Addons.Addons; +using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Configuration; namespace Greenshot.Ui.Configuration.ViewModels { + /// + /// The ViewModel for the DestinationPicket configuration + /// public sealed class DestinationPickerConfigViewModel : SimpleConfigScreen { - private readonly IEnumerable> _allDestinations; - + private readonly DestinationHolder _destinationHolder; /// /// Here all disposables are registered, so we can clean the up @@ -46,23 +46,22 @@ namespace Greenshot.Ui.Configuration.ViewModels private CompositeDisposable _disposables; public ICoreConfiguration CoreConfiguration { get; } - public IConfigTranslations ConfigTranslations { get; } - public IGreenshotLanguage GreenshotLanguage { get; } public DestinationPickerConfigViewModel( ICoreConfiguration coreConfiguration, IConfigTranslations configTranslations, IGreenshotLanguage greenshotLanguage, - IEnumerable> allDestinations + DestinationHolder destinationHolder ) { - _allDestinations = allDestinations; + _destinationHolder = destinationHolder; ConfigTranslations = configTranslations; GreenshotLanguage = greenshotLanguage; CoreConfiguration = coreConfiguration; } + public override void Initialize(IConfig config) { // Prepare disposables @@ -85,11 +84,9 @@ namespace Greenshot.Ui.Configuration.ViewModels { foreach (var outputDestination in CoreConfiguration.PickerDestinations) { - var pickerDestination = _allDestinations - .Where(destination => !"Picker".Equals(destination.Metadata.Designation)) - .Where(destination => destination.Value.IsActive) - .Where(destination => outputDestination == destination.Value.Designation) - .Select(d => d.Value).FirstOrDefault(); + var pickerDestination = _destinationHolder.SortedActiveDestinations + .Where(destination => !"Picker".Equals(destination.Designation)) + .FirstOrDefault(destination => outputDestination == destination.Designation); if (pickerDestination != null) { @@ -99,23 +96,16 @@ namespace Greenshot.Ui.Configuration.ViewModels } else { - foreach (var pickerDestination in _allDestinations - .Where(destination => !"Picker".Equals(destination.Metadata.Designation)) - .Where(destination => destination.Value.IsActive) - .OrderBy(destination => destination.Metadata.Priority) - .ThenBy(destination => destination.Value.Description) - .Select(d => d.Value)) + foreach (var pickerDestination in _destinationHolder.SortedActiveDestinations + .Where(destination => !"Picker".Equals(destination.Designation))) { UsedDestinations.Add(pickerDestination); } } AvailableDestinations.Clear(); - foreach (var destination in _allDestinations - .Where(destination => !"Picker".Equals(destination.Metadata.Designation)) - .Where(destination => destination.Value.IsActive) - .Where(destination => UsedDestinations.All(pickerDestination => pickerDestination.Designation != destination.Value.Designation)) - .OrderBy(destination => destination.Metadata.Priority).ThenBy(destination => destination.Value.Description) - .Select(d => d.Value)) + foreach (var destination in _destinationHolder.SortedActiveDestinations + .Where(destination => !"Picker".Equals(destination.Designation)) + .Where(destination => UsedDestinations.All(pickerDestination => pickerDestination.Designation != destination.Designation))) { AvailableDestinations.Add(destination); } diff --git a/src/Greenshot/packages.config b/src/Greenshot/packages.config index 33c4c653f..58ec525d0 100644 --- a/src/Greenshot/packages.config +++ b/src/Greenshot/packages.config @@ -11,15 +11,15 @@ - - - - - - - - - + + + + + + + + +