From e4653d426e792eff8ca62c20d2c45ef4565cc4b6 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 4 Jun 2018 12:55:20 +0200 Subject: [PATCH] Moved OCR Command --- .../ExternalCommandDestination.cs | 34 ++----- .../ExternalCommandDestinationProvider.cs | 3 +- .../IconCache.cs | 15 ++- .../ExternalCommandMasterViewModel.cs | 2 + src/Greenshot.Addon.OcrCommand/App.config | 6 ++ .../COMWrapper.cs | 2 +- .../ComProgIdAttribute.cs | 2 +- .../Greenshot.Addon.OcrCommand.csproj} | 96 ++++++++----------- .../Modi/CompressionLevel.cs | 2 +- .../Modi/FileFormat.cs | 2 +- .../Modi/ICommon.cs | 2 +- .../Modi/IDispatch.cs | 2 +- .../Modi/IDocument.cs | 2 +- .../Modi/IImage.cs | 2 +- .../Modi/IImages.cs | 2 +- .../Modi/ILayout.cs | 2 +- .../Modi/IMiRect.cs | 2 +- .../Modi/IMiRects.cs | 2 +- .../Modi/IWord.cs | 2 +- .../Modi/IWords.cs | 2 +- .../Modi/ModiLanguage.cs | 2 +- .../Program.cs | 4 +- .../Properties/AssemblyInfo.cs | 36 +++++++ src/Greenshot.sln | 23 ++--- .../Properties/AssemblyInfo.cs | 58 ----------- src/GreenshotOCRCommand/app.config | 11 --- src/GreenshotOCRCommand/packages.config | 3 - 27 files changed, 129 insertions(+), 192 deletions(-) create mode 100644 src/Greenshot.Addon.OcrCommand/App.config rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/COMWrapper.cs (96%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/ComProgIdAttribute.cs (95%) rename src/{GreenshotOCRCommand/GreenshotOCRCommand.csproj => Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj} (57%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/CompressionLevel.cs (93%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/FileFormat.cs (93%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/ICommon.cs (93%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IDispatch.cs (94%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IDocument.cs (96%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IImage.cs (94%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IImages.cs (94%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/ILayout.cs (94%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IMiRect.cs (95%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IMiRects.cs (94%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IWord.cs (95%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/IWords.cs (94%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Modi/ModiLanguage.cs (93%) rename src/{GreenshotOCRCommand => Greenshot.Addon.OcrCommand}/Program.cs (94%) create mode 100644 src/Greenshot.Addon.OcrCommand/Properties/AssemblyInfo.cs delete mode 100644 src/GreenshotOCRCommand/Properties/AssemblyInfo.cs delete mode 100644 src/GreenshotOCRCommand/app.config delete mode 100644 src/GreenshotOCRCommand/packages.config diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs index bd6dd4bc6..f86405b0e 100644 --- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs +++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs @@ -23,26 +23,16 @@ #region Usings -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; using System.Drawing; using System.IO; using System.Text.RegularExpressions; -using System.Threading; using System.Threading.Tasks; using CliWrap; -using CliWrap.Models; -using Dapplo.Ini; -using Dapplo.Log; using Greenshot.Addon.ExternalCommand.Entities; using Greenshot.Addons; -using Greenshot.Addons.Components; using Greenshot.Addons.Core; using Greenshot.Addons.Extensions; using Greenshot.Addons.Interfaces; -using Greenshot.Addons.Interfaces.Plugin; #endregion @@ -53,52 +43,48 @@ namespace Greenshot.Addon.ExternalCommand /// public class ExternalCommandDestination : AbstractDestination { - private static readonly LogSource Log = new LogSource(); - private static readonly Regex UriRegexp = new Regex( @"((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)", RegexOptions.Compiled); - private static readonly IExternalCommandConfiguration Config = IniConfig.Current.Get(); - private readonly string _presetCommand; + private readonly ExternalCommandDefinition _externalCommandDefinition; private readonly IExternalCommandConfiguration _externalCommandConfiguration; - public ExternalCommandDestination(string commando, + public ExternalCommandDestination(ExternalCommandDefinition defintion, IExternalCommandConfiguration externalCommandConfiguration, ICoreConfiguration coreConfiguration, IGreenshotLanguage greenshotLanguage ) : base(coreConfiguration, greenshotLanguage) { - _presetCommand = commando; + _externalCommandDefinition = defintion; _externalCommandConfiguration = externalCommandConfiguration; } - public override string Designation => "External " + _presetCommand.Replace(',', '_'); + public override string Designation => "External " + _externalCommandDefinition.Name.Replace(',', '_'); - public override string Description => _presetCommand; + public override string Description => _externalCommandDefinition.Name; public override Bitmap GetDisplayIcon(double dpi) { - return IconCache.IconForCommand(_presetCommand, dpi > 100); + return IconCache.IconForCommand(_externalCommandDefinition, dpi > 100); } public override async Task ExportCaptureAsync(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { var exportInformation = new ExportInformation(Designation, Description); - var definition = _externalCommandConfiguration.Read(_presetCommand); var fullPath = captureDetails.Filename; if (fullPath == null) { fullPath = surface.SaveNamedTmpFile(CoreConfiguration, _externalCommandConfiguration); } - using (var cli = new Cli(definition.Command)) + using (var cli = new Cli(_externalCommandDefinition.Command)) { - var arguments = string.Format(definition.Arguments, fullPath); + var arguments = string.Format(_externalCommandDefinition.Arguments, fullPath); // Execute var output = await cli.ExecuteAsync(arguments); - if (definition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris)) + if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris)) { var uriMatches = UriRegexp.Matches(output.StandardOutput); if (uriMatches.Count > 0) @@ -109,7 +95,7 @@ namespace Greenshot.Addon.ExternalCommand } } - if (definition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit)) + if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit)) { File.Delete(fullPath); } diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs index 829085eda..88d58b8ec 100644 --- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs +++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs @@ -62,7 +62,8 @@ namespace Greenshot.Addon.ExternalCommand public IEnumerable> Provide() { return _externalCommandConfig.Commands - .Select(command => new Lazy(() => new ExternalCommandDestination(command, _externalCommandConfig, _coreConfiguration, _greenshotLanguage), new DestinationAttribute(command))); + .Select(command => _externalCommandConfig.Read(command)) + .Select(definition => new Lazy(() => new ExternalCommandDestination(definition, _externalCommandConfig, _coreConfiguration, _greenshotLanguage), new DestinationAttribute(definition.Name))); } diff --git a/src/Greenshot.Addon.ExternalCommand/IconCache.cs b/src/Greenshot.Addon.ExternalCommand/IconCache.cs index d74cd0c36..d66e81b15 100644 --- a/src/Greenshot.Addon.ExternalCommand/IconCache.cs +++ b/src/Greenshot.Addon.ExternalCommand/IconCache.cs @@ -26,8 +26,8 @@ using System; using System.Drawing; using System.IO; -using Dapplo.Ini; using Dapplo.Log; +using Greenshot.Addon.ExternalCommand.Entities; using Greenshot.Addons.Core; #endregion @@ -39,33 +39,32 @@ namespace Greenshot.Addon.ExternalCommand /// public static class IconCache { - private static readonly IExternalCommandConfiguration Config = IniConfig.Current.Get(); private static readonly LogSource Log = new LogSource(); /// /// Retrieve the icon for a command /// - /// string + /// string /// true to use the large icon /// Bitmap - public static Bitmap IconForCommand(string commandName, bool useLargeIcons) + public static Bitmap IconForCommand(ExternalCommandDefinition externalCommandDefinition, bool useLargeIcons) { Bitmap icon = null; - if (commandName == null) + if (externalCommandDefinition == null) { return null; } - if (!Config.Commandline.ContainsKey(commandName) || !File.Exists(Config.Commandline[commandName])) + if (!File.Exists(externalCommandDefinition.Command)) { return null; } try { - icon = PluginUtils.GetCachedExeIcon(Config.Commandline[commandName], 0, useLargeIcons); + icon = PluginUtils.GetCachedExeIcon(externalCommandDefinition.Command, 0, useLargeIcons); } catch (Exception ex) { - Log.Warn().WriteLine(ex, "Problem loading icon for " + Config.Commandline[commandName]); + Log.Warn().WriteLine(ex, "Problem loading icon for " + externalCommandDefinition.Command); } return icon; } diff --git a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs index a59fbccf9..e2abd8f67 100644 --- a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs +++ b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs @@ -89,6 +89,8 @@ namespace Greenshot.Addon.ExternalCommand.ViewModels { foreach (var item in Items) { + // Remove before + ExternalCommandConfiguration.Delete(item.Definition.Name); if (item.Definition?.IsValid != true) { continue; diff --git a/src/Greenshot.Addon.OcrCommand/App.config b/src/Greenshot.Addon.OcrCommand/App.config new file mode 100644 index 000000000..bbb531477 --- /dev/null +++ b/src/Greenshot.Addon.OcrCommand/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/GreenshotOCRCommand/COMWrapper.cs b/src/Greenshot.Addon.OcrCommand/COMWrapper.cs similarity index 96% rename from src/GreenshotOCRCommand/COMWrapper.cs rename to src/Greenshot.Addon.OcrCommand/COMWrapper.cs index 5eceaefa5..e94c6fdff 100644 --- a/src/GreenshotOCRCommand/COMWrapper.cs +++ b/src/Greenshot.Addon.OcrCommand/COMWrapper.cs @@ -33,7 +33,7 @@ using System.Runtime.Remoting.Proxies; #endregion -namespace GreenshotOCRCommand +namespace Greenshot.Addon.OcrCommand { /// /// Wraps a late-bound COM server. diff --git a/src/GreenshotOCRCommand/ComProgIdAttribute.cs b/src/Greenshot.Addon.OcrCommand/ComProgIdAttribute.cs similarity index 95% rename from src/GreenshotOCRCommand/ComProgIdAttribute.cs rename to src/Greenshot.Addon.OcrCommand/ComProgIdAttribute.cs index 05cc25ef0..b49b17fad 100644 --- a/src/GreenshotOCRCommand/ComProgIdAttribute.cs +++ b/src/Greenshot.Addon.OcrCommand/ComProgIdAttribute.cs @@ -27,7 +27,7 @@ using System; #endregion -namespace GreenshotOCRCommand +namespace Greenshot.Addon.OcrCommand { /// /// An attribute to specifiy the ProgID of the COM class to create. (As suggested by Kristen Wegner) diff --git a/src/GreenshotOCRCommand/GreenshotOCRCommand.csproj b/src/Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj similarity index 57% rename from src/GreenshotOCRCommand/GreenshotOCRCommand.csproj rename to src/Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj index ea4db73c3..2e59217c4 100644 --- a/src/GreenshotOCRCommand/GreenshotOCRCommand.csproj +++ b/src/Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj @@ -1,95 +1,77 @@  - + + Debug - x86 - 8.0.30703 - 2.0 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02} + AnyCPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF} WinExe - Properties - GreenshotOCRCommand + Greenshot.Addon.OcrCommand GreenshotOCRCommand v4.6 512 - OnBuildSuccess - False - False - false - False - Off - 4194304 - x86 - - - - - 3.5 - + true - + + x86 + true full false bin\Debug\ DEBUG;TRACE prompt 4 - true - false latest - - None + + x86 + pdbonly true bin\Release\ TRACE prompt 4 - false - false latest - GreenshotOCRCommand.Program + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\" copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName).config" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\" - - False - - \ No newline at end of file diff --git a/src/GreenshotOCRCommand/Modi/CompressionLevel.cs b/src/Greenshot.Addon.OcrCommand/Modi/CompressionLevel.cs similarity index 93% rename from src/GreenshotOCRCommand/Modi/CompressionLevel.cs rename to src/Greenshot.Addon.OcrCommand/Modi/CompressionLevel.cs index 160c3b242..21ac98c25 100644 --- a/src/GreenshotOCRCommand/Modi/CompressionLevel.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/CompressionLevel.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { public enum CompressionLevel { diff --git a/src/GreenshotOCRCommand/Modi/FileFormat.cs b/src/Greenshot.Addon.OcrCommand/Modi/FileFormat.cs similarity index 93% rename from src/GreenshotOCRCommand/Modi/FileFormat.cs rename to src/Greenshot.Addon.OcrCommand/Modi/FileFormat.cs index 08a7be447..164097f5a 100644 --- a/src/GreenshotOCRCommand/Modi/FileFormat.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/FileFormat.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { public enum FileFormat { diff --git a/src/GreenshotOCRCommand/Modi/ICommon.cs b/src/Greenshot.Addon.OcrCommand/Modi/ICommon.cs similarity index 93% rename from src/GreenshotOCRCommand/Modi/ICommon.cs rename to src/Greenshot.Addon.OcrCommand/Modi/ICommon.cs index 081cf7dcb..53bd0e5ac 100644 --- a/src/GreenshotOCRCommand/Modi/ICommon.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/ICommon.cs @@ -27,7 +27,7 @@ using System; #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Base class for the common properties of the Modi interfaces diff --git a/src/GreenshotOCRCommand/Modi/IDispatch.cs b/src/Greenshot.Addon.OcrCommand/Modi/IDispatch.cs similarity index 94% rename from src/GreenshotOCRCommand/Modi/IDispatch.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IDispatch.cs index c89d06821..9da6b2ce4 100644 --- a/src/GreenshotOCRCommand/Modi/IDispatch.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IDispatch.cs @@ -29,7 +29,7 @@ using System.Runtime.InteropServices.CustomMarshalers; #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { [ComImport] [Guid("00020400-0000-0000-C000-000000000046")] diff --git a/src/GreenshotOCRCommand/Modi/IDocument.cs b/src/Greenshot.Addon.OcrCommand/Modi/IDocument.cs similarity index 96% rename from src/GreenshotOCRCommand/Modi/IDocument.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IDocument.cs index c5af06d08..d2f1114e4 100644 --- a/src/GreenshotOCRCommand/Modi/IDocument.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IDocument.cs @@ -25,7 +25,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// The MODI Document object represents an ordered collection of document images saved as a single file. diff --git a/src/GreenshotOCRCommand/Modi/IImage.cs b/src/Greenshot.Addon.OcrCommand/Modi/IImage.cs similarity index 94% rename from src/GreenshotOCRCommand/Modi/IImage.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IImage.cs index 341ea0ded..e90c1d538 100644 --- a/src/GreenshotOCRCommand/Modi/IImage.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IImage.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Describes the page in a scan diff --git a/src/GreenshotOCRCommand/Modi/IImages.cs b/src/Greenshot.Addon.OcrCommand/Modi/IImages.cs similarity index 94% rename from src/GreenshotOCRCommand/Modi/IImages.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IImages.cs index d3b5ae234..2fd2f7491 100644 --- a/src/GreenshotOCRCommand/Modi/IImages.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IImages.cs @@ -27,7 +27,7 @@ using System.Collections; #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Use the Images accessor property of the Document object to return an Images collection. diff --git a/src/GreenshotOCRCommand/Modi/ILayout.cs b/src/Greenshot.Addon.OcrCommand/Modi/ILayout.cs similarity index 94% rename from src/GreenshotOCRCommand/Modi/ILayout.cs rename to src/Greenshot.Addon.OcrCommand/Modi/ILayout.cs index 9abb29b6c..c0c095061 100644 --- a/src/GreenshotOCRCommand/Modi/ILayout.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/ILayout.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Layout of the IImage diff --git a/src/GreenshotOCRCommand/Modi/IMiRect.cs b/src/Greenshot.Addon.OcrCommand/Modi/IMiRect.cs similarity index 95% rename from src/GreenshotOCRCommand/Modi/IMiRect.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IMiRect.cs index c42b47bb6..6d6909ffd 100644 --- a/src/GreenshotOCRCommand/Modi/IMiRect.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IMiRect.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Represents a bounding rectangle in the optical character recognition (OCR) layout. diff --git a/src/GreenshotOCRCommand/Modi/IMiRects.cs b/src/Greenshot.Addon.OcrCommand/Modi/IMiRects.cs similarity index 94% rename from src/GreenshotOCRCommand/Modi/IMiRects.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IMiRects.cs index 7b3966703..9a6c01e29 100644 --- a/src/GreenshotOCRCommand/Modi/IMiRects.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IMiRects.cs @@ -27,7 +27,7 @@ using System.Collections; #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Represents the collection of bounding rectangles in the optical character recognition (OCR) layout. A collection of diff --git a/src/GreenshotOCRCommand/Modi/IWord.cs b/src/Greenshot.Addon.OcrCommand/Modi/IWord.cs similarity index 95% rename from src/GreenshotOCRCommand/Modi/IWord.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IWord.cs index 58b807d2e..2b64df57f 100644 --- a/src/GreenshotOCRCommand/Modi/IWord.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IWord.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// Represents a word recognized in the text during an optical character recognition (OCR) operation. diff --git a/src/GreenshotOCRCommand/Modi/IWords.cs b/src/Greenshot.Addon.OcrCommand/Modi/IWords.cs similarity index 94% rename from src/GreenshotOCRCommand/Modi/IWords.cs rename to src/Greenshot.Addon.OcrCommand/Modi/IWords.cs index b3bec524b..9e3e64735 100644 --- a/src/GreenshotOCRCommand/Modi/IWords.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/IWords.cs @@ -27,7 +27,7 @@ using System.Collections; #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { /// /// The Words collection recognized in the text during an optical character recognition (OCR) operation. diff --git a/src/GreenshotOCRCommand/Modi/ModiLanguage.cs b/src/Greenshot.Addon.OcrCommand/Modi/ModiLanguage.cs similarity index 93% rename from src/GreenshotOCRCommand/Modi/ModiLanguage.cs rename to src/Greenshot.Addon.OcrCommand/Modi/ModiLanguage.cs index ade96fbf2..7a6f3198d 100644 --- a/src/GreenshotOCRCommand/Modi/ModiLanguage.cs +++ b/src/Greenshot.Addon.OcrCommand/Modi/ModiLanguage.cs @@ -21,7 +21,7 @@ #endregion -namespace GreenshotOCRCommand.Modi +namespace Greenshot.Addon.OcrCommand.Modi { public enum ModiLanguage { diff --git a/src/GreenshotOCRCommand/Program.cs b/src/Greenshot.Addon.OcrCommand/Program.cs similarity index 94% rename from src/GreenshotOCRCommand/Program.cs rename to src/Greenshot.Addon.OcrCommand/Program.cs index 906fcf141..841c0ce20 100644 --- a/src/GreenshotOCRCommand/Program.cs +++ b/src/Greenshot.Addon.OcrCommand/Program.cs @@ -27,11 +27,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using GreenshotOCRCommand.Modi; +using Greenshot.Addon.OcrCommand.Modi; #endregion -namespace GreenshotOCRCommand +namespace Greenshot.Addon.OcrCommand { public static class Program { diff --git a/src/Greenshot.Addon.OcrCommand/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.OcrCommand/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..38c376b10 --- /dev/null +++ b/src/Greenshot.Addon.OcrCommand/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Greenshot.Addon.OcrCommand")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Greenshot")] +[assembly: AssemblyProduct("Greenshot.Addon.OcrCommand")] +[assembly: AssemblyCopyright("Copyright © Greenshot 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7b8e9055-a054-4290-b537-075ebfdf8bdf")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Greenshot.sln b/src/Greenshot.sln index 344ab6436..e6e5cdedd 100644 --- a/src/Greenshot.sln +++ b/src/Greenshot.sln @@ -17,11 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Jira", "Gre EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OCR", "Greenshot.Addon.OCR\Greenshot.Addon.OCR.csproj", "{C6988EE8-2FEE-4349-9F09-F9628A0D8965}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GreenshotOCRCommand", "GreenshotOCRCommand\GreenshotOCRCommand.csproj", "{D61E6ECE-E0B6-4467-B492-F08A06BA8F02}" - ProjectSection(ProjectDependencies) = postProject - {C6988EE8-2FEE-4349-9F09-F9628A0D8965} = {C6988EE8-2FEE-4349-9F09-F9628A0D8965} - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Box", "Greenshot.Addon.Box\Greenshot.Addon.Box.csproj", "{697CF066-9077-4F22-99D9-D989CCE7282B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Dropbox", "Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj", "{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}" @@ -52,6 +47,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OneDrive", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Tfs", "Greenshot.Addon.Tfs\Greenshot.Addon.Tfs.csproj", "{8B3643A5-AFED-49FF-8D66-6348FB102EB2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OcrCommand", "Greenshot.Addon.OcrCommand\Greenshot.Addon.OcrCommand.csproj", "{7B8E9055-A054-4290-B537-075EBFDF8BDF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -109,14 +106,6 @@ Global {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.Build.0 = Release|Any CPU {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.ActiveCfg = Release|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Any CPU.ActiveCfg = Debug|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|Any CPU.Build.0 = Debug|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|x86.ActiveCfg = Debug|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Debug|x86.Build.0 = Debug|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Any CPU.ActiveCfg = Release|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|Any CPU.Build.0 = Release|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|x86.ActiveCfg = Release|x86 - {D61E6ECE-E0B6-4467-B492-F08A06BA8F02}.Release|x86.Build.0 = Release|x86 {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.Build.0 = Debug|Any CPU {697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|x86.ActiveCfg = Debug|x86 @@ -232,6 +221,14 @@ Global {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|Any CPU.Build.0 = Release|Any CPU {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.ActiveCfg = Release|x86 {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.Build.0 = Release|x86 + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|x86.Build.0 = Debug|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|Any CPU.Build.0 = Release|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|x86.ActiveCfg = Release|Any CPU + {7B8E9055-A054-4290-B537-075EBFDF8BDF}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/GreenshotOCRCommand/Properties/AssemblyInfo.cs b/src/GreenshotOCRCommand/Properties/AssemblyInfo.cs deleted file mode 100644 index 3e200fac6..000000000 --- a/src/GreenshotOCRCommand/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -#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 - -#region Usings - -using System.Reflection; -using System.Runtime.InteropServices; - -#endregion - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die mit einer Assembly verknüpft sind. - -[assembly: AssemblyTitle("GreenshotOCRCommand")] -[assembly: AssemblyDescription("A small executable to OCR a bitmap")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Greenshot")] -[assembly: AssemblyProduct("GreenshotOCRCommand")] -[assembly: AssemblyCopyright("Greenshot")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar -// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von -// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. - -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird - -[assembly: Guid("d7668e7e-3018-4d27-9aa0-21b1afade1b8")] - -// The assembly version, replaced by build scripts - -[assembly: AssemblyVersion("1.3.0.0")] -[assembly: AssemblyInformationalVersion("1.3.0.0")] -[assembly: AssemblyFileVersion("1.3.0.0")] \ No newline at end of file diff --git a/src/GreenshotOCRCommand/app.config b/src/GreenshotOCRCommand/app.config deleted file mode 100644 index abe13c248..000000000 --- a/src/GreenshotOCRCommand/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/GreenshotOCRCommand/packages.config b/src/GreenshotOCRCommand/packages.config deleted file mode 100644 index 037b768bb..000000000 --- a/src/GreenshotOCRCommand/packages.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file