diff --git a/build.cake b/build.cake index 5ae38cb17..9beb85a50 100644 --- a/build.cake +++ b/build.cake @@ -187,6 +187,12 @@ Task("DisableDNC30") ReplaceRegexInFiles("./**/*.csproj", "", ""); }); +Task("DNC30Only") + .Does(() => +{ + ReplaceRegexInFiles("./**/*.csproj", "net472;netcoreapp3.0", "netcoreapp3.0"); +}); + Task("ChangeNETVersion") .Does(() => { diff --git a/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj b/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj index 0bf60c9af..c12ee5927 100644 --- a/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj +++ b/src/Greenshot.Addon.Box/Greenshot.Addon.Box.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Box Greenshot.Addon.Box - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj b/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj index 04217a904..b78193763 100644 --- a/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj +++ b/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Confluence Greenshot.Addon.Confluence - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj b/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj index 6568b5a18..41f11d698 100644 --- a/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj +++ b/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Dropbox Greenshot.Addon.Dropbox - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj b/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj index adbdb2def..99bd3f392 100644 --- a/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj +++ b/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.ExternalCommand Greenshot.Addon.ExternalCommand - net472;netcoreapp3.0 + netcoreapp3.0 @@ -41,7 +41,7 @@ - + all runtime; build; native; contentfiles; analyzers diff --git a/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj b/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj index 61cf1c559..1ea50c6ef 100644 --- a/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj +++ b/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Flickr Greenshot.Addon.Flickr - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj b/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj index 44a510474..2c3caa79e 100644 --- a/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj +++ b/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.GooglePhotos Greenshot.Addon.GooglePhotos - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj b/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj index 7c68ca899..317067b14 100644 --- a/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj +++ b/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Imgur Greenshot.Addon.Imgur - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.InternetExplorer/Greenshot.Addon.InternetExplorer.csproj b/src/Greenshot.Addon.InternetExplorer/Greenshot.Addon.InternetExplorer.csproj index bed6acaea..5825b3c48 100644 --- a/src/Greenshot.Addon.InternetExplorer/Greenshot.Addon.InternetExplorer.csproj +++ b/src/Greenshot.Addon.InternetExplorer/Greenshot.Addon.InternetExplorer.csproj @@ -1,7 +1,7 @@ - + - net472;netcoreapp3.0 + netcoreapp3.0 true diff --git a/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj b/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj index 282d8036d..e9caf58fc 100644 --- a/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj +++ b/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj @@ -3,41 +3,14 @@ Greenshot.Addon.Jira Greenshot.Addon.Jira - net472 + netcoreapp3.0 PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -52,7 +25,7 @@ - + diff --git a/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj b/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj index 572d77a59..d2f2d0165 100644 --- a/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj +++ b/src/Greenshot.Addon.LegacyEditor/Greenshot.Addon.LegacyEditor.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.LegacyEditor Greenshot.Addon.LegacyEditor - net472;netcoreapp3.0 + netcoreapp3.0 true diff --git a/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj b/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj index a6a59029a..971108c9c 100644 --- a/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj +++ b/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Lutim Greenshot.Addon.Lutim - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.OCR/Configuration/IOcrConfiguration.cs b/src/Greenshot.Addon.OCR/Configuration/IOcrConfiguration.cs deleted file mode 100644 index 13b6682cc..000000000 --- a/src/Greenshot.Addon.OCR/Configuration/IOcrConfiguration.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 . - -using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; -using Dapplo.Config.Ini; - -namespace Greenshot.Addon.OCR.Configuration -{ - /// - /// OCR Configuration. - /// - [IniSection("OCR")] - [Description("Greenshot OCR Plugin configuration")] - [SuppressMessage("ReSharper", "UnusedMember.Global")] -#pragma warning disable CS1591 - public interface IOcrConfiguration : IIniSection - { - [Description("Language for OCR")] - [DefaultValue ("miLANG_ENGLISH")] - string Language { get; set; } - - [Description("Orient image?")] - [DefaultValue(true)] - bool Orientimage { get; set; } - - [Description("Straighten image?")] - [DefaultValue(true)] - bool StraightenImage { get; set; } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Configuration/IOcrLanguage.cs b/src/Greenshot.Addon.OCR/Configuration/IOcrLanguage.cs deleted file mode 100644 index 6d436a516..000000000 --- a/src/Greenshot.Addon.OCR/Configuration/IOcrLanguage.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Greenshot - a free and open source screenshot tool -// Copyright (C) 2007-2017 Thomas Braun, Jens Klingen, Robin Krom -// -// For more information see: http://getgreenshot.org/ -// The Greenshot project is hosted on GitHub: https://github.com/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 . - -using System.Diagnostics.CodeAnalysis; -using Dapplo.Config.Language; - -namespace Greenshot.Addon.OCR.Configuration -{ - [Language("Ocr")] - [SuppressMessage("ReSharper", "UnusedMember.Global")] -#pragma warning disable CS1591 - public interface IOcrLanguage : ILanguage - { - string Language { get; } - string OrientImage { get; } - string StraightenImage { get; } - - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Configuration/Impl/OcrConfigurationImpl.cs b/src/Greenshot.Addon.OCR/Configuration/Impl/OcrConfigurationImpl.cs deleted file mode 100644 index 66f739ba9..000000000 --- a/src/Greenshot.Addon.OCR/Configuration/Impl/OcrConfigurationImpl.cs +++ /dev/null @@ -1,30 +0,0 @@ -// 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 . - -using Dapplo.Config.Ini; - -namespace Greenshot.Addon.OCR.Configuration.Impl -{ - internal class OcrConfigurationImpl : IniSectionBase, IOcrConfiguration - { - public string Language { get; set; } - public bool Orientimage { get; set; } - public bool StraightenImage { get; set; } - } -} diff --git a/src/Greenshot.Addon.OCR/Configuration/Impl/OcrLanguageImpl.cs b/src/Greenshot.Addon.OCR/Configuration/Impl/OcrLanguageImpl.cs deleted file mode 100644 index 2eac0c649..000000000 --- a/src/Greenshot.Addon.OCR/Configuration/Impl/OcrLanguageImpl.cs +++ /dev/null @@ -1,36 +0,0 @@ -// 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 . - -using System.Diagnostics.CodeAnalysis; -using Dapplo.Config.Language; - -namespace Greenshot.Addon.OCR.Configuration.Impl -{ - /// - /// This implements IOcrLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody - /// -#pragma warning disable CS1591 - [SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")] - public class OcrLanguageImpl : LanguageBase, IOcrLanguage - { - public string Language { get; } - public string OrientImage { get; } - public string StraightenImage { get; } - } -} diff --git a/src/Greenshot.Addon.OCR/FodyWeavers.xml b/src/Greenshot.Addon.OCR/FodyWeavers.xml deleted file mode 100644 index 7f5a26669..000000000 --- a/src/Greenshot.Addon.OCR/FodyWeavers.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/FodyWeavers.xsd b/src/Greenshot.Addon.OCR/FodyWeavers.xsd deleted file mode 100644 index 6e1ac6983..000000000 --- a/src/Greenshot.Addon.OCR/FodyWeavers.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. - - - - - A comma-separated list of error codes that can be safely ignored in assembly verification. - - - - - 'false' to turn off automatic generation of the XML Schema file. - - - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj b/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj deleted file mode 100644 index b2455eb89..000000000 --- a/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj +++ /dev/null @@ -1,49 +0,0 @@ - - - - Greenshot.Addon.OCR - Greenshot.Addon.OCR - net472;netcoreapp3.0 - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-cs-CZ.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-cs-CZ.xml deleted file mode 100644 index dfb450bc5..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-cs-CZ.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Jazyk pro OCR - Orientaci obrázku - Srovnat obrázek - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-de-DE.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-de-DE.xml deleted file mode 100644 index 30ac387f7..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-de-DE.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Sprache für OCR - - - Bild ausrichten - - - Bild glätten - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-en-US.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-en-US.xml deleted file mode 100644 index 42887705c..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-en-US.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Language for OCR - - - Orient image - - - Straighten image - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-fr-FR.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-fr-FR.xml deleted file mode 100644 index fe6dcd58d..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-fr-FR.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Langage pour l'OCR - Orienter l'image - Redresser l'image - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-id-ID.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-id-ID.xml deleted file mode 100644 index 3e771831d..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-id-ID.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Bahasa untuk OCR - Orientasikan gambar - Rapikan gambar - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-it-IT.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-it-IT.xml deleted file mode 100644 index 509ed131f..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-it-IT.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Lingua OCR - - - Orienta - - - Raddrizza - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ja-JP.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ja-JP.xml deleted file mode 100644 index 4a8ea5981..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ja-JP.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - OCRの言語 - 画像の向きを揃える - 画像の傾きを補正する - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-kab-DZ.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-kab-DZ.xml deleted file mode 100644 index 1ff7d4e0f..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-kab-DZ.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Tutlayt i OCR - Wehhi tugna - Seggwem tugna - - diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ko-KR.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ko-KR.xml deleted file mode 100644 index 6654e0c1b..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ko-KR.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - OCR 언어 - - - 가로 이미지 - - - 세로 이미지 - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-lv-LV.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-lv-LV.xml deleted file mode 100644 index d4f84fa48..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-lv-LV.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - OCR valoda - - - Pagriezt attēlu - - - Iztaisnot attēlu - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-nl-NL.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-nl-NL.xml deleted file mode 100644 index 6a4c7f30e..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-nl-NL.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Taal voor OCR - - - Beeld richten - - - Beeld vereffenen - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-pl-PL.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-pl-PL.xml deleted file mode 100644 index 569adead7..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-pl-PL.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Język dla OCR - Orientacja obrazu - Wyprostowanie obrazów - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-pt-PT.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-pt-PT.xml deleted file mode 100644 index 608b3ccd2..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-pt-PT.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Idioma para OCR - Orientar imagem - Endireitar imagem - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ru-RU.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ru-RU.xml deleted file mode 100644 index fd8b01c38..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-ru-RU.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Язык для OCR - Ориентация изображения - Выпрямление изображения - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sk-SK.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sk-SK.xml deleted file mode 100644 index 9674e994a..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sk-SK.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Jazyk pre OCR - - - Orientácia obrázku - - - Narovnať obrázok - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sr-Cyrl-RS.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sr-Cyrl-RS.xml deleted file mode 100644 index 5c5d97abe..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sr-Cyrl-RS.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Језик за препознавање знакова - Усмери слику - Исправи слику - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sv-SE.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sv-SE.xml deleted file mode 100644 index aca753c3a..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-sv-SE.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Språk för OCR - - - Orientera bild - - - Släta ut bild - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-uk-UA.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-uk-UA.xml deleted file mode 100644 index 528f9a925..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-uk-UA.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Мова для ОРТ - Орієнтувати зображення - Випрямлення зображення - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-zh-CN.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-zh-CN.xml deleted file mode 100644 index 9a76c44a1..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-zh-CN.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - OCR语言 - - - 图像定位 - - - 图像矫正 - - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-zh-TW.xml b/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-zh-TW.xml deleted file mode 100644 index a2fce0682..000000000 --- a/src/Greenshot.Addon.OCR/Languages/language_ocrplugin-zh-TW.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - OCR 語言 - 定向圖片 - 拉直圖片 - - \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/ModiLanguage.cs b/src/Greenshot.Addon.OCR/ModiLanguage.cs deleted file mode 100644 index f667925db..000000000 --- a/src/Greenshot.Addon.OCR/ModiLanguage.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace Greenshot.Addon.OCR -{ - /// - /// Needed for the drop down, available languages for OCR - /// - public enum ModiLanguage - { - CHINESE_SIMPLIFIED = 2052, - CHINESE_TRADITIONAL = 1028, - CZECH = 5, - DANISH = 6, - DUTCH = 19, - ENGLISH = 9, - FINNISH = 11, - FRENCH = 12, - GERMAN = 7, - GREEK = 8, - HUNGARIAN = 14, - ITALIAN = 16, - JAPANESE = 17, - KOREAN = 18, - NORWEGIAN = 20, - POLISH = 21, - PORTUGUESE = 22, - RUSSIAN = 25, - SPANISH = 10, - SWEDISH = 29, - TURKISH = 31, - SYSDEFAULT = 2048 - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/OCRDestination.cs b/src/Greenshot.Addon.OCR/OCRDestination.cs deleted file mode 100644 index ae53498af..000000000 --- a/src/Greenshot.Addon.OCR/OCRDestination.cs +++ /dev/null @@ -1,209 +0,0 @@ -// 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 . - -using System; -using System.Diagnostics; -using System.IO; -using System.Reflection; -using System.Windows.Forms; -using Dapplo.Log; -using Greenshot.Addon.OCR.Configuration; -using Greenshot.Addons; -using Greenshot.Addons.Components; -using Greenshot.Addons.Core; -using Greenshot.Addons.Interfaces; -using Greenshot.Addons.Interfaces.Plugin; -using Greenshot.Core.Enums; -using Greenshot.Gfx; -using Greenshot.Gfx.Effects; - -namespace Greenshot.Addon.OCR -{ - /// - /// Description of OCRDestination. - /// - [Destination("OCR")] - public class OcrDestination : AbstractDestination - { - private static readonly LogSource Log = new LogSource(); - private const int MinWidth = 130; - private const int MinHeight = 130; - private readonly IOcrConfiguration _ocrConfiguration; - private readonly string _ocrCommand; - - public OcrDestination( - IOcrConfiguration ocrConfiguration, - ICoreConfiguration coreConfiguration, - IGreenshotLanguage greenshotLanguage, - ExportNotification exportNotification - ) : base(coreConfiguration, greenshotLanguage) - { - _ocrConfiguration = ocrConfiguration; - - var ocrDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - if (ocrDirectory == null) - { - return; - } - - _ocrCommand = Path.Combine(ocrDirectory, "greenshotocrcommand.exe"); - IsActive = File.Exists(_ocrCommand) && HasModi(); - - } - - public override bool IsActive { get; } - - public override string Description => "OCR"; - - public override IBitmapWithNativeSupport GetDisplayIcon(double dpi) - { - var exePath = PluginUtils.GetExePath("MSPVIEW.EXE"); - if (exePath != null && File.Exists(exePath)) - { - return PluginUtils.GetCachedExeIcon(exePath, 0, dpi > 100); - } - return null; - } - - protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) - { - var exportInformation = new ExportInformation(Designation, Description) - { - ExportMade = DoOcr(surface) != null - }; - return exportInformation; - } - - - /// - /// Handling of the CaptureTaken "event" from the ICaptureHost - /// We do the OCR here! - /// - /// Has the Image and the capture details - public string DoOcr(ISurface surface) - { - var outputSettings = new SurfaceOutputSettings(CoreConfiguration, OutputFormats.bmp, 0, true) - { - ReduceColors = true, - SaveBackgroundOnly = true - }; - // We only want the background - // Force Grayscale output - outputSettings.Effects.Add(new GrayscaleEffect()); - - // Also we need to check the size, resize if needed to 130x130 this is the minimum - if (surface.Screenshot.Width < MinWidth || surface.Screenshot.Height < MinHeight) - { - var addedWidth = MinWidth - surface.Screenshot.Width; - if (addedWidth < 0) - { - addedWidth = 0; - } - var addedHeight = MinHeight - surface.Screenshot.Height; - if (addedHeight < 0) - { - addedHeight = 0; - } - IEffect effect = new ResizeCanvasEffect(addedWidth / 2, addedWidth / 2, addedHeight / 2, addedHeight / 2); - outputSettings.Effects.Add(effect); - } - var filePath = ImageOutput.SaveToTmpFile(surface, outputSettings, null); - - Log.Debug().WriteLine("Saved tmp file to: " + filePath); - - var text = ""; - try - { - var processStartInfo = new ProcessStartInfo(_ocrCommand, "\"" + filePath + "\" " + _ocrConfiguration.Language + " " + _ocrConfiguration.Orientimage + " " + _ocrConfiguration.StraightenImage) - { - CreateNoWindow = true, - RedirectStandardOutput = true, - UseShellExecute = false - }; - using (var process = Process.Start(processStartInfo)) - { - if (process != null) - { - process.WaitForExit(30 * 1000); - if (process.ExitCode == 0) - { - text = process.StandardOutput.ReadToEnd(); - } - } - } - } - catch (Exception e) - { - Log.Error().WriteLine(e, "Error while calling Microsoft Office Document Imaging (MODI) to OCR: "); - } - finally - { - if (File.Exists(filePath)) - { - Log.Debug().WriteLine("Cleaning up tmp file: " + filePath); - File.Delete(filePath); - } - } - - if (string.IsNullOrEmpty(text)) - { - Log.Info().WriteLine("No text returned"); - return null; - } - - // For for BUG-1884: - text = text.Trim(); - - try - { - Log.Debug().WriteLine("Pasting OCR Text to Clipboard: {0}", text); - // Paste to Clipboard (the Plugin currently doesn't have access to the ClipboardHelper from Greenshot - IDataObject ido = new DataObject(); - ido.SetData(DataFormats.Text, true, text); - Clipboard.SetDataObject(ido, true); - } - catch (Exception e) - { - Log.Error().WriteLine(e, "Problem pasting text to clipboard: "); - } - return text; - } - - private bool HasModi() - { - try - { - using (var process = Process.Start(_ocrCommand, "-c")) - { - if (process != null) - { - process.WaitForExit(); - return process.ExitCode == 0; - } - } - } - catch (Exception e) - { - Log.Debug().WriteLine("Error trying to initiate MODI: {0}", e.Message); - } - Log.Info().WriteLine("No Microsoft Office Document Imaging (MODI) found, disabling OCR"); - return false; - } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/OcrAddonModule.cs b/src/Greenshot.Addon.OCR/OcrAddonModule.cs deleted file mode 100644 index fc4e127d6..000000000 --- a/src/Greenshot.Addon.OCR/OcrAddonModule.cs +++ /dev/null @@ -1,83 +0,0 @@ -// 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 . - -using System.Diagnostics; -using System.IO; -using Autofac; -using Dapplo.Addons; -using Dapplo.Addons.Bootstrapper.Resolving; -using Dapplo.Config.Ini; -using Dapplo.Config.Language; -using Greenshot.Addon.OCR.Configuration; -using Greenshot.Addon.OCR.Configuration.Impl; -using Greenshot.Addons.Components; - -namespace Greenshot.Addon.OCR -{ - /// - public class OcrAddonModule : AddonModule - { - private bool HasModi() - { - var ocrCommand = Path.Combine(FileTools.NormalizeDirectory(Path.GetDirectoryName(GetType().Assembly.Location)), "greenshotocrcommand.exe"); - try - { - using (var process = Process.Start(ocrCommand, "-c")) - { - if (process != null) - { - process.WaitForExit(); - return process.ExitCode == 0; - } - } - } - catch - { - // ignored - } - - return false; - } - - /// - protected override void Load(ContainerBuilder builder) - { - if (HasModi()) - { - builder - .RegisterType() - .As() - .As() - .SingleInstance(); - - builder - .RegisterType() - .As() - .As() - .SingleInstance(); - - builder - .RegisterType() - .As() - .SingleInstance(); - } - base.Load(builder); - } - } -} diff --git a/src/Greenshot.Addon.OCR/SettingsForm.Designer.cs b/src/Greenshot.Addon.OCR/SettingsForm.Designer.cs deleted file mode 100644 index 8164c7bba..000000000 --- a/src/Greenshot.Addon.OCR/SettingsForm.Designer.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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 . - */ - -using Greenshot.Addons.Controls; - -namespace Greenshot.Addon.OCR -{ - partial class SettingsForm - { - /// - /// Designer variable used to keep track of non-visual components. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Disposes resources used by the form. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) { - if (components != null) { - components.Dispose(); - } - } - base.Dispose(disposing); - } - - /// - /// This method is required for Windows Forms designer support. - /// Do not change the method contents inside the source code editor. The Forms designer might - /// not be able to load this method if it was changed manually. - /// - private void InitializeComponent() - { - this.comboBox_languages = new System.Windows.Forms.ComboBox(); - this.checkBox_orientImage = new GreenshotCheckBox(); - this.checkBox_straightenImage = new GreenshotCheckBox(); - this.label_language = new GreenshotLabel(); - this.buttonOK = new GreenshotButton(); - this.buttonCancel = new GreenshotButton(); - this.SuspendLayout(); - // - // comboBox_languages - // - this.comboBox_languages.FormattingEnabled = true; - this.comboBox_languages.Items.AddRange(new object[] { - "English", - "Deutsch"}); - this.comboBox_languages.Location = new System.Drawing.Point(74, 12); - this.comboBox_languages.Name = "comboBox_languages"; - this.comboBox_languages.Size = new System.Drawing.Size(153, 21); - this.comboBox_languages.TabIndex = 1; - // - // checkBox_orientImage - // - this.checkBox_orientImage.LanguageKey = "ocr.orient_image"; - this.checkBox_orientImage.Location = new System.Drawing.Point(13, 68); - this.checkBox_orientImage.Name = "checkBox_orientImage"; - this.checkBox_orientImage.PropertyName = "orientimage"; - this.checkBox_orientImage.SectionName = "OCR"; - this.checkBox_orientImage.Size = new System.Drawing.Size(104, 24); - this.checkBox_orientImage.TabIndex = 3; - this.checkBox_orientImage.UseVisualStyleBackColor = true; - // - // checkBox_straightenImage - // - this.checkBox_straightenImage.LanguageKey = "ocr.straighten_image"; - this.checkBox_straightenImage.Location = new System.Drawing.Point(13, 41); - this.checkBox_straightenImage.Name = "checkBox_straightenImage"; - this.checkBox_straightenImage.PropertyName = "straightenImage"; - this.checkBox_straightenImage.SectionName = "OCR"; - this.checkBox_straightenImage.Size = new System.Drawing.Size(109, 24); - this.checkBox_straightenImage.TabIndex = 2; - this.checkBox_straightenImage.UseVisualStyleBackColor = true; - // - // label_language - // - this.label_language.LanguageKey = "ocr.language"; - this.label_language.Location = new System.Drawing.Point(13, 15); - this.label_language.Name = "label_language"; - this.label_language.Size = new System.Drawing.Size(55, 23); - this.label_language.TabIndex = 3; - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.LanguageKey = "OK"; - this.buttonOK.Location = new System.Drawing.Point(12, 98); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(104, 23); - this.buttonOK.TabIndex = 4; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick); - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.LanguageKey = "CANCEL"; - this.buttonCancel.Location = new System.Drawing.Point(128, 98); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(104, 23); - this.buttonCancel.TabIndex = 5; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // SettingsForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13.5F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(244, 135); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.label_language); - this.Controls.Add(this.checkBox_straightenImage); - this.Controls.Add(this.checkBox_orientImage); - this.Controls.Add(this.comboBox_languages); - this.LanguageKey = "settings_title"; - this.Name = "SettingsForm"; - this.ResumeLayout(false); - - } - private GreenshotLabel label_language; - private GreenshotButton buttonCancel; - private GreenshotButton buttonOK; - private GreenshotCheckBox checkBox_orientImage; - private GreenshotCheckBox checkBox_straightenImage; - private System.Windows.Forms.ComboBox comboBox_languages; - } -} diff --git a/src/Greenshot.Addon.OCR/SettingsForm.cs b/src/Greenshot.Addon.OCR/SettingsForm.cs deleted file mode 100644 index 6e945a4f8..000000000 --- a/src/Greenshot.Addon.OCR/SettingsForm.cs +++ /dev/null @@ -1,73 +0,0 @@ -// 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 . - -using System; -using Greenshot.Addon.OCR.Configuration; -using Greenshot.Addons.Controls; - -namespace Greenshot.Addon.OCR -{ - /// - /// Description of SettingsForm. - /// - public partial class SettingsForm : GreenshotForm - { - private readonly IOcrConfiguration _config; - - public SettingsForm(string[] languages, IOcrLanguage ocrLanguage, IOcrConfiguration config) : base(ocrLanguage) - { - // - // The InitializeComponent() call is required for Windows Forms designer support. - // - _config = config; - InitializeComponent(); - AcceptButton = buttonOK; - CancelButton = buttonCancel; - - comboBox_languages.Items.Clear(); - var index = 0; - - // Preventing Tracker #3234560, although this should not happen... - var languageFromConfig = "ENGLISH"; - if (config.Language != null) - { - languageFromConfig = config.Language; - } - foreach (var availableLanguage in languages) - { - var displayLanguage = availableLanguage.Substring(0, 1).ToUpper() + availableLanguage.Substring(1).ToLower(); - comboBox_languages.Items.Add(displayLanguage); - if (availableLanguage.Equals(languageFromConfig, StringComparison.CurrentCultureIgnoreCase)) - { - comboBox_languages.SelectedIndex = index; - } - index++; - } - } - - private void ButtonOkClick(object sender, EventArgs e) - { - var selectedString = (string) comboBox_languages.SelectedItem; - if (selectedString != null) - { - _config.Language = selectedString.ToUpper(); - } - } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OCR/app.config b/src/Greenshot.Addon.OCR/app.config deleted file mode 100644 index edca5a0c4..000000000 --- a/src/Greenshot.Addon.OCR/app.config +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Greenshot.Addon.OcrCommand/App.config b/src/Greenshot.Addon.OcrCommand/App.config deleted file mode 100644 index 45437954e..000000000 --- a/src/Greenshot.Addon.OcrCommand/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/Greenshot.Addon.OcrCommand/COMWrapper.cs b/src/Greenshot.Addon.OcrCommand/COMWrapper.cs deleted file mode 100644 index 214221025..000000000 --- a/src/Greenshot.Addon.OcrCommand/COMWrapper.cs +++ /dev/null @@ -1,619 +0,0 @@ -// 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 . - -using System; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.Remoting; -using System.Runtime.Remoting.Messaging; -using System.Runtime.Remoting.Proxies; - -namespace Greenshot.Addon.OcrCommand -{ - /// - /// Wraps a late-bound COM server. - /// - public sealed class COMWrapper : RealProxy, IDisposable, IRemotingTypeInfo - { - private const int MK_E_UNAVAILABLE = -2147221021; - private const int CO_E_CLASSSTRING = -2147221005; - - /// - /// Implementation for the interface IRemotingTypeInfo - /// This makes it possible to cast the COMWrapper - /// - /// Type to cast to - /// object to cast - /// - public bool CanCastTo(Type toType, object o) - { - var returnValue = _interceptType.IsAssignableFrom(toType); - return returnValue; - } - - /// - /// Implementation for the interface IRemotingTypeInfo - /// - public string TypeName - { - get { throw new NotSupportedException(); } - set { throw new NotSupportedException(); } - } - - /// - /// Intercept method calls - /// - /// - /// Contains information about the method being called - /// - /// - /// A . - /// - public override IMessage Invoke(IMessage myMessage) - { - var callMessage = myMessage as IMethodCallMessage; - - var method = callMessage?.MethodBase as MethodInfo; - if (method == null) - { - if (callMessage != null) - { - Debug.WriteLine($"Unrecognized Invoke call: {callMessage.MethodBase}"); - } - return null; - } - - object returnValue = null; - object[] outArgs = null; - var outArgsCount = 0; - - var methodName = method.Name; - var returnType = method.ReturnType; - var flags = BindingFlags.InvokeMethod; - var argCount = callMessage.ArgCount; - - ParameterModifier[] argModifiers = null; - ParameterInfo[] parameters = null; - - if ("Dispose" == methodName && 0 == argCount && typeof(void) == returnType) - { - Dispose(); - } - else if ("ToString" == methodName && 0 == argCount && typeof(string) == returnType) - { - returnValue = ToString(); - } - else if ("GetType" == methodName && 0 == argCount && typeof(Type) == returnType) - { - returnValue = _interceptType; - } - else if ("GetHashCode" == methodName && 0 == argCount && typeof(int) == returnType) - { - returnValue = GetHashCode(); - } - else if ("Equals" == methodName && 1 == argCount && typeof(bool) == returnType) - { - returnValue = Equals(callMessage.Args[0]); - } - else if (1 == argCount && typeof(void) == returnType && (methodName.StartsWith("add_") || methodName.StartsWith("remove_"))) - { - var handler = callMessage.InArgs[0] as Delegate; - if (null == handler) - { - return new ReturnMessage(new ArgumentNullException(nameof(handler)), callMessage); - } - } - else - { - var invokeObject = _comObject; - var invokeType = _comType; - - ParameterInfo parameter; - object[] args; - if (methodName.StartsWith("get_")) - { - // Property Get - methodName = methodName.Substring(4); - flags = BindingFlags.GetProperty; - args = callMessage.InArgs; - } - else if (methodName.StartsWith("set_")) - { - // Property Set - methodName = methodName.Substring(4); - flags = BindingFlags.SetProperty; - args = callMessage.InArgs; - } - else - { - args = callMessage.Args; - if (null != args && 0 != args.Length) - { - // Modifiers for ref / out parameters - argModifiers = new ParameterModifier[1]; - argModifiers[0] = new ParameterModifier(args.Length); - - parameters = method.GetParameters(); - for (var i = 0; i < parameters.Length; i++) - { - parameter = parameters[i]; - if (parameter.IsOut || parameter.ParameterType.IsByRef) - { - argModifiers[0][i] = true; - outArgsCount++; - } - } - - if (0 == outArgsCount) - { - argModifiers = null; - } - } - } - - // Un-wrap wrapped COM objects before passing to the method - COMWrapper[] originalArgs; - COMWrapper wrapper; - Type byValType; - if (null == args || 0 == args.Length) - { - originalArgs = null; - } - else - { - originalArgs = new COMWrapper[args.Length]; - for (var i = 0; i < args.Length; i++) - { - if (null != args[i] && RemotingServices.IsTransparentProxy(args[i])) - { - wrapper = RemotingServices.GetRealProxy(args[i]) as COMWrapper; - if (null != wrapper) - { - originalArgs[i] = wrapper; - args[i] = wrapper._comObject; - } - } - else if (argModifiers != null && 0 != outArgsCount && argModifiers[0][i]) - { - byValType = GetByValType(parameters[i].ParameterType); - if (byValType.IsInterface) - { - // If we're passing a COM object by reference, and - // the parameter is null, we need to pass a - // DispatchWrapper to avoid a type mismatch exception. - if (null == args[i]) - { - args[i] = new DispatchWrapper(null); - } - } - else if (typeof(decimal) == byValType) - { - // If we're passing a decimal value by reference, - // we need to pass a CurrencyWrapper to avoid a - // type mismatch exception. - // http://support.microsoft.com/?kbid=837378 - args[i] = new CurrencyWrapper(args[i]); - } - } - } - } - - try - { - returnValue = invokeType.InvokeMember(methodName, flags, null, invokeObject, args, argModifiers, null, null); - } - catch (Exception ex) - { - return new ReturnMessage(ex, callMessage); - } - - // Handle enum and interface return types - if (null != returnValue) - { - if (returnType.IsInterface) - { - // Wrap the returned value in an intercepting COM wrapper - if (Marshal.IsComObject(returnValue)) - { - returnValue = Wrap(returnValue, returnType); - } - } - else if (returnType.IsEnum) - { - // Convert to proper Enum type - returnValue = Enum.Parse(returnType, returnValue.ToString()); - } - } - - // Handle out args - if (0 != outArgsCount) - { - if (args != null && parameters != null) - { - outArgs = new object[args.Length]; - for (var i = 0; i < parameters.Length; i++) - { - if (argModifiers != null && !argModifiers[0][i]) - { - continue; - } - - var arg = args[i]; - if (null == arg) - { - continue; - } - - parameter = parameters[i]; - wrapper = null; - - byValType = GetByValType(parameter.ParameterType); - if (typeof(decimal) == byValType) - { - if (arg is CurrencyWrapper) - { - arg = ((CurrencyWrapper) arg).WrappedObject; - } - } - else if (byValType.IsEnum) - { - arg = Enum.Parse(byValType, arg.ToString()); - } - else if (byValType.IsInterface) - { - if (Marshal.IsComObject(arg)) - { - if (originalArgs != null) - { - wrapper = originalArgs[i]; - } - if (null != wrapper && wrapper._comObject != arg) - { - wrapper.Dispose(); - wrapper = null; - } - - if (null == wrapper) - { - wrapper = new COMWrapper(arg, byValType); - } - arg = wrapper.GetTransparentProxy(); - } - } - outArgs[i] = arg; - } - } - } - } - - return new ReturnMessage(returnValue, outArgs, outArgsCount, callMessage.LogicalCallContext, callMessage); - } - - /// - /// Holds reference to the actual COM object which is wrapped by this proxy - /// - private readonly object _comObject; - - /// - /// Type of the COM object, set on constructor after getting the COM reference - /// - private readonly Type _comType; - - /// - /// The type of which method calls are intercepted and executed on the COM object. - /// - private readonly Type _interceptType; - - /// - /// Gets a COM object and returns the transparent proxy which intercepts all calls to the object - /// - /// Interface which defines the method and properties to intercept - /// Transparent proxy to the real proxy for the object - /// T must be an interface decorated with the attribute. - public static T GetInstance() - { - var type = typeof(T); - if (null == type) - { - throw new ArgumentNullException(nameof(T)); - } - if (!type.IsInterface) - { - throw new ArgumentException("The specified type must be an interface.", nameof(T)); - } - - var progIdAttribute = ComProgIdAttribute.GetAttribute(type); - if (string.IsNullOrEmpty(progIdAttribute?.Value)) - { - throw new ArgumentException("The specified type must define a ComProgId attribute.", nameof(T)); - } - var progId = progIdAttribute.Value; - - object comObject = null; - try - { - comObject = Marshal.GetActiveObject(progId); - } - catch (COMException comE) - { - if (comE.ErrorCode == MK_E_UNAVAILABLE) - { - Debug.WriteLine($"No current instance of {progId} object available."); - } - else if (comE.ErrorCode == CO_E_CLASSSTRING) - { - Debug.WriteLine($"Unknown progId {progId}"); - } - } - catch (Exception ex) - { - Debug.WriteLine($"Error getting active object for {progId} {ex.Message}"); - } - - if (comObject != null) - { - var wrapper = new COMWrapper(comObject, type); - return (T) wrapper.GetTransparentProxy(); - } - return default; - } - - /// - /// Gets or creates a COM object and returns the transparent proxy which intercepts all calls to the object - /// The ComProgId can be a normal ComProgId or a GUID prefixed with "clsid:" - /// - /// Interface which defines the method and properties to intercept - /// Transparent proxy to the real proxy for the object - /// The type must be an interface decorated with the attribute. - public static T GetOrCreateInstance() - { - var type = typeof(T); - if (null == type) - { - throw new ArgumentNullException(nameof(T)); - } - if (!type.IsInterface) - { - throw new ArgumentException("The specified type must be an interface.", nameof(T)); - } - - var progIdAttribute = ComProgIdAttribute.GetAttribute(type); - if (string.IsNullOrEmpty(progIdAttribute?.Value)) - { - throw new ArgumentException("The specified type must define a ComProgId attribute.", nameof(T)); - } - - object comObject = null; - Type comType = null; - var progId = progIdAttribute.Value; - - try - { - comObject = Marshal.GetActiveObject(progId); - } - catch (COMException comE) - { - if (comE.ErrorCode == MK_E_UNAVAILABLE) - { - Debug.WriteLine($"No current instance of {progId} object available."); - } - else if (comE.ErrorCode == CO_E_CLASSSTRING) - { - Debug.WriteLine($"Unknown progId {progId}"); - } - } - catch (Exception ex) - { - Debug.WriteLine($"Error getting active object for {progId} {ex.Message}"); - } - // Did we get the current instance? If not, try to create a new - if (comObject == null) - { - try - { - comType = Type.GetTypeFromProgID(progId, true); - } - catch (Exception) - { - Debug.WriteLine($"Error getting type for {progId}"); - } - if (comType != null) - { - try - { - comObject = Activator.CreateInstance(comType); - if (comObject != null) - { - Debug.WriteLine($"Created new instance of {progId} object."); - } - } - catch (Exception ex) - { - Debug.WriteLine($"Error creating object for {progId} {ex.Message}"); - } - } - } - if (comObject != null) - { - var wrapper = new COMWrapper(comObject, type); - return (T) wrapper.GetTransparentProxy(); - } - return default; - } - - /// - /// Wrap an object and return the transparent proxy which intercepts all calls to the object - /// - /// An object to intercept - /// Interface which defines the method and properties to intercept - /// Transparent proxy to the real proxy for the object - private static object Wrap(object comObject, Type type) - { - if (null == comObject) - { - throw new ArgumentNullException(nameof(comObject)); - } - if (null == type) - { - throw new ArgumentNullException(nameof(type)); - } - - var wrapper = new COMWrapper(comObject, type); - return wrapper.GetTransparentProxy(); - } - - /// - /// Constructor - /// - /// - /// The COM object to wrap. - /// - /// - /// The interface type to impersonate. - /// - private COMWrapper(object comObject, Type type) - : base(type) - { - _comObject = comObject; - _comType = comObject.GetType(); - _interceptType = type; - } - - /// - /// If dispose() is not called, we need to make - /// sure that the COM object is still cleaned up. - /// - ~COMWrapper() - { - Dispose(false); - } - - /// - /// Cleans up the COM object. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Release the COM reference - /// - /// - /// if this was called from the - /// interface. - /// - private void Dispose(bool disposing) - { - if (disposing && null != _comObject) - { - if (Marshal.IsComObject(_comObject)) - { - try - { - while (Marshal.ReleaseComObject(_comObject) > 0) - { - } - } - catch (Exception ex) - { - Debug.WriteLine($"Problem releasing {_comType}"); - Debug.WriteLine("Error: " + ex); - } - } - } - } - - /// - /// Returns a string representing the wrapped object. - /// - /// - /// The full name of the intercepted type. - /// - public override string ToString() - { - return _interceptType.FullName; - } - - /// - /// Returns the hash code of the wrapped object. - /// - /// - /// The hash code of the wrapped object. - /// - public override int GetHashCode() - { - return _comObject.GetHashCode(); - } - - /// - /// Compares this object to another. - /// - /// - /// The value to compare to. - /// - /// - /// if the objects are equal. - /// - public override bool Equals(object value) - { - if (null != value && RemotingServices.IsTransparentProxy(value)) - { - var wrapper = RemotingServices.GetRealProxy(value) as COMWrapper; - if (null != wrapper) - { - return _comObject == wrapper._comObject; - } - } - - return base.Equals(value); - } - - /// - /// Returns the base type for a reference type. - /// - /// - /// The reference type. - /// - /// - /// The base value type. - /// - /// - /// is . - /// - private static Type GetByValType(Type byRefType) - { - if (null == byRefType) - { - throw new ArgumentNullException(nameof(byRefType)); - } - - if (byRefType.IsByRef) - { - var name = byRefType.FullName; - name = name.Substring(0, name.Length - 1); - byRefType = byRefType.Assembly.GetType(name, true); - } - - return byRefType; - } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/ComProgIdAttribute.cs b/src/Greenshot.Addon.OcrCommand/ComProgIdAttribute.cs deleted file mode 100644 index 05fc8675d..000000000 --- a/src/Greenshot.Addon.OcrCommand/ComProgIdAttribute.cs +++ /dev/null @@ -1,85 +0,0 @@ -// 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 . - -using System; - -namespace Greenshot.Addon.OcrCommand -{ - /// - /// An attribute to specifiy the ProgID of the COM class to create. (As suggested by Kristen Wegner) - /// - [AttributeUsage(AttributeTargets.Interface)] - public sealed class ComProgIdAttribute : Attribute - { - /// Constructor - /// The COM ProgID. - public ComProgIdAttribute(string value) - { - Value = value; - } - - /// - /// Returns the COM ProgID - /// - public string Value { get; } - - /// - /// Extracts the attribute from the specified type. - /// - /// - /// The interface type. - /// - /// - /// The . - /// - /// - /// is . - /// - public static ComProgIdAttribute GetAttribute(Type interfaceType) - { - if (null == interfaceType) - { - throw new ArgumentNullException(nameof(interfaceType)); - } - - var attributeType = typeof(ComProgIdAttribute); - var attributes = interfaceType.GetCustomAttributes(attributeType, false); - - if (0 == attributes.Length) - { - var interfaces = interfaceType.GetInterfaces(); - for (var i = 0; i < interfaces.Length; i++) - { - interfaceType = interfaces[i]; - attributes = interfaceType.GetCustomAttributes(attributeType, false); - if (0 != attributes.Length) - { - break; - } - } - } - - if (0 == attributes.Length) - { - return null; - } - return (ComProgIdAttribute) attributes[0]; - } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj b/src/Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj deleted file mode 100644 index 2ba2850cd..000000000 --- a/src/Greenshot.Addon.OcrCommand/Greenshot.Addon.OcrCommand.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - WinExe - net472 - Greenshot.Addon.OcrCommand - GreenshotOCRCommand - - - - - - - - - - - - - - - - - - diff --git a/src/Greenshot.Addon.OcrCommand/Modi/CompressionLevel.cs b/src/Greenshot.Addon.OcrCommand/Modi/CompressionLevel.cs deleted file mode 100644 index b422130f8..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/CompressionLevel.cs +++ /dev/null @@ -1,28 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - public enum CompressionLevel - { - miCOMP_LEVEL_LOW = 0, - miCOMP_LEVEL_MEDIUM = 1, - miCOMP_LEVEL_HIGH = 2 - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/FileFormat.cs b/src/Greenshot.Addon.OcrCommand/Modi/FileFormat.cs deleted file mode 100644 index 729d0b24d..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/FileFormat.cs +++ /dev/null @@ -1,29 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - public enum FileFormat - { - miFILE_FORMAT_DEFAULTVALUE = -1, - miFILE_FORMAT_TIFF = 1, - miFILE_FORMAT_TIFF_LOSSLESS = 2, - miFILE_FORMAT_MDI = 4 - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/ICommon.cs b/src/Greenshot.Addon.OcrCommand/Modi/ICommon.cs deleted file mode 100644 index 848a9f247..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/ICommon.cs +++ /dev/null @@ -1,31 +0,0 @@ -// 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 . - -using System; - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Base class for the common properties of the Modi interfaces - /// - public interface ICommon : IDisposable - { - IDocument Application { get; } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IDispatch.cs b/src/Greenshot.Addon.OcrCommand/Modi/IDispatch.cs deleted file mode 100644 index e8b91c2b7..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IDispatch.cs +++ /dev/null @@ -1,36 +0,0 @@ -// 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 . - -using System; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.CustomMarshalers; - -namespace Greenshot.Addon.OcrCommand.Modi -{ - [ComImport] - [Guid("00020400-0000-0000-C000-000000000046")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IDispatch - { - void Reserved(); - - [PreserveSig] - int GetTypeInfo(uint nInfo, int lcid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(TypeToTypeInfoMarshaler))] out Type typeInfo); - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IDocument.cs b/src/Greenshot.Addon.OcrCommand/Modi/IDocument.cs deleted file mode 100644 index 1440f7615..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IDocument.cs +++ /dev/null @@ -1,85 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// The MODI Document object represents an ordered collection of document images saved as a single file. - /// You can use the Create method to load an existing MDI or TIF file, or to create an empty document that you can - /// populate with images from other documents. - /// The OCR method performs OCR on all pages in the document, and the OnOCRProgress event reports the status of the - /// operation and allows the user to cancel it. - /// The Dirty property lets you know whether your document has unsaved OCR results or changes. - /// The SaveAs method allows you to specify an image file format and a compression level. - /// You can also use the PrintOut method to print the document to a printer or a file. - /// - [ComProgId("MODI.Document")] - public interface IDocument : ICommon - { - /// - /// The document's collection of pages. - /// - IImages Images { get; } - - /// - /// Occurs periodically during an optical character recognition (OCR) operation. Returns the estimated percentage of - /// the OCR operation that is complete, and allows the user to cancel the operation. - /// - /// - /// Indicates whether the active document has unsaved changes. - /// - bool Dirty { get; } - - /// - /// Closes the document. - /// - /// - void Close(bool saveCall); - - /// - /// Creates a new document. - /// - /// - /// Optional String. The path and filename of the optional document file that is to be loaded into the - /// new document. - /// - void Create(string file); - - /// - /// Performs optical character recognition (OCR) on the specified document or image. - /// - /// ModiLanguage - /// - /// Optional Boolean. Specifies whether the OCR engine attempts to determine the orientation of - /// the page. Default is true. - /// - /// - /// Optional Boolean. Specifies whether the OCR engine attempts to "de-skew" the page to - /// correct for small angles of misalignment from the vertical. Default is true. - /// - void OCR(ModiLanguage language, bool orientimage, bool straightenImage); - - /// - /// - /// - /// - /// - void SaveAs(string filename, FileFormat fileFormat, CompressionLevel compressionLevel); - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IImage.cs b/src/Greenshot.Addon.OcrCommand/Modi/IImage.cs deleted file mode 100644 index 6ddb1feb5..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IImage.cs +++ /dev/null @@ -1,38 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Describes the page in a scan - /// - public interface IImage : ICommon - { - ILayout Layout { get; } - - long BitsPerPixel { get; } - CompressionLevel Compression { get; } - //IPictureDisp Picture { get; } - int PixelHeight { get; } - int PixelWidth { get; } - //IPictureDisp Thumbnail { get; } - int XDPI { get; } - int YDPI { get; } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IImages.cs b/src/Greenshot.Addon.OcrCommand/Modi/IImages.cs deleted file mode 100644 index 16e425779..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IImages.cs +++ /dev/null @@ -1,39 +0,0 @@ -// 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 . - -using System.Collections; - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Use the Images accessor property of the Document object to return an Images collection. - /// Use the Item property of the Images collection to return an Image object and gain access to its OCR Layout - /// (including recognized Text and Words), the properties that describe its dimensions and format (BitsPerPixel, - /// Compression, PixelHeight, PixelWidth, XDPI, and YDPI), - /// and its Picture and Thumbnail images. - /// - public interface IImages : ICommon, IEnumerable - { - int Count { get; } - - IImage this[int index] { get; } - - new IEnumerator GetEnumerator(); - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/ILayout.cs b/src/Greenshot.Addon.OcrCommand/Modi/ILayout.cs deleted file mode 100644 index 7b36bc989..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/ILayout.cs +++ /dev/null @@ -1,53 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Layout of the IImage - /// - public interface ILayout : ICommon - { - /// - /// Returns the recognized text as a Unicode string. - /// - string Text { get; } - - /// - /// An accessor property that returns the Words collection recognized in the text during an optical character - /// recognition (OCR) operation. - /// - IWords Words { get; } - - /// - /// Returns the number of characters in the recognized text. - /// - int NumChars { get; } - - /// - /// Returns the number of words in the recognized text. - /// - int NumWords { get; } - - /// - /// Returns the language identifier for the recognized text. Read-only Long. - /// - ModiLanguage Language { get; } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IMiRect.cs b/src/Greenshot.Addon.OcrCommand/Modi/IMiRect.cs deleted file mode 100644 index 26544e805..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IMiRect.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Represents a bounding rectangle in the optical character recognition (OCR) layout. - /// - public interface IMiRect : ICommon - { - /// - /// The Bottom property represent the distance in pixels from the top edge of the containing image. - /// - int Bottom { get; } - - /// - /// The Left property represent the distance in pixels from the left edge of the containing image. - /// - int Left { get; } - - /// - /// The Right property represent the distance in pixels from the left edge of the containing image. - /// - int Right { get; } - - /// - /// The Top property represent the distance in pixels from the top edge of the containing image. - /// - int Top { get; } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IMiRects.cs b/src/Greenshot.Addon.OcrCommand/Modi/IMiRects.cs deleted file mode 100644 index e43884c11..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IMiRects.cs +++ /dev/null @@ -1,36 +0,0 @@ -// 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 . - -using System.Collections; - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Represents the collection of bounding rectangles in the optical character recognition (OCR) layout. A collection of - /// MiRect objects. - /// - public interface IMiRects : ICommon, IEnumerable - { - int Count { get; } - - IMiRect this[int index] { get; } - - new IEnumerator GetEnumerator(); - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IWord.cs b/src/Greenshot.Addon.OcrCommand/Modi/IWord.cs deleted file mode 100644 index 14c4e6d31..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IWord.cs +++ /dev/null @@ -1,64 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// Represents a word recognized in the text during an optical character recognition (OCR) operation. - /// - public interface IWord : ICommon - { - /// - /// Returns the index of the specified word in the Words collection of the Layout or IMiSelectableItem object. - /// - long Id { get; } - - /// - /// Returns the number of the region in the optical character recognition (OCR) layout where the word occurs. - /// - long RegionId { get; } - - /// - /// Returns the number of the line in the optical character recognition (OCR) layout where the word occurs. - /// - long LineId { get; } - - /// - /// Returns the recognized text as a Unicode string. - /// - string Text { get; } - - /// - /// Returns the relative confidence factor reported by the optical character recognition (OCR) engine (on a scale of 0 - /// to 999) after recognizing the specified word. - /// - short RecognitionConfidence { get; } - - /// - /// Returns the index of the font used by the specified wordthis is the font that was recognized in the text during an - /// optical character recognition (OCR) operation. - /// - long FontId { get; } - - /// - /// Rectangles - /// - IMiRects Rects { get; } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/IWords.cs b/src/Greenshot.Addon.OcrCommand/Modi/IWords.cs deleted file mode 100644 index 96fa0a75c..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/IWords.cs +++ /dev/null @@ -1,35 +0,0 @@ -// 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 . - -using System.Collections; - -namespace Greenshot.Addon.OcrCommand.Modi -{ - /// - /// The Words collection recognized in the text during an optical character recognition (OCR) operation. - /// - public interface IWords : ICommon, IEnumerable - { - int Count { get; } - - IWord this[int index] { get; } - - new IEnumerator GetEnumerator(); - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Modi/ModiLanguage.cs b/src/Greenshot.Addon.OcrCommand/Modi/ModiLanguage.cs deleted file mode 100644 index 666fffa07..000000000 --- a/src/Greenshot.Addon.OcrCommand/Modi/ModiLanguage.cs +++ /dev/null @@ -1,47 +0,0 @@ -// 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 . - -namespace Greenshot.Addon.OcrCommand.Modi -{ - public enum ModiLanguage - { - CHINESE_SIMPLIFIED = 2052, - CHINESE_TRADITIONAL = 1028, - CZECH = 5, - DANISH = 6, - DUTCH = 19, - ENGLISH = 9, - FINNISH = 11, - FRENCH = 12, - GERMAN = 7, - GREEK = 8, - HUNGARIAN = 14, - ITALIAN = 16, - JAPANESE = 17, - KOREAN = 18, - NORWEGIAN = 20, - POLISH = 21, - PORTUGUESE = 22, - RUSSIAN = 25, - SPANISH = 10, - SWEDISH = 29, - TURKISH = 31, - SYSDEFAULT = 2048 - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.OcrCommand/Program.cs b/src/Greenshot.Addon.OcrCommand/Program.cs deleted file mode 100644 index c42ea7735..000000000 --- a/src/Greenshot.Addon.OcrCommand/Program.cs +++ /dev/null @@ -1,138 +0,0 @@ -// 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 . - -using System; -using System.Collections.Generic; -using System.IO; -using Greenshot.Addon.OcrCommand.Modi; -#if DEBUG -using System.Diagnostics; -#endif - -namespace Greenshot.Addon.OcrCommand -{ - public static class Program - { - private const string Usage = "<-c> | [language] [orientimage] [straightenImage]"; - - public static int Main(string[] args) - { - if (args.Length == 0) - { - Console.WriteLine(Usage); - return -1; - } - var filename = args[0]; - var language = ModiLanguage.ENGLISH; - if (args.Length >= 2) - { - language = (ModiLanguage) Enum.Parse(typeof(ModiLanguage), args[1]); - } - var orientimage = true; - if (args.Length >= 3) - { - orientimage = bool.Parse(args[2]); - } - var straightenImage = true; - if (args.Length >= 4) - { - straightenImage = bool.Parse(args[3]); - } - try - { - if (File.Exists(filename) || "-c".Equals(filename)) - { - using (var document = COMWrapper.GetOrCreateInstance()) - { - if (document == null) - { - Console.WriteLine("MODI not installed"); - return -2; - } - if ("-c".Equals(filename)) - { - return 0; - } - document.Create(filename); - document.OCR(language, orientimage, straightenImage); - var modiImage = document.Images[0]; - var layout = modiImage.Layout; - if (layout != null) - { -#if DEBUG - if (layout.Words != null) - { - foreach (var word in ToEnumerable(layout.Words)) - { - if (word.Rects == null) - { - continue; - } - - foreach (var rect in ToEnumerable(word.Rects)) - { - Debug.WriteLine($"Rect {rect.Left},{rect.Top},{rect.Right},{rect.Bottom} - Word {word.Text} : Confidence: {word.RecognitionConfidence}"); - } - } - } -#endif - if (layout.Text != null) - { - // For for BUG-1884: - // Although trim is done in the OCR Plugin, it does make sense in the command too. - Console.WriteLine(layout.Text.Trim()); - } - } - document.Close(false); - return 0; - } - } - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - return -1; - } - - /// - /// Helper method - /// - /// IEnumerable of IMiRect - private static IEnumerable ToEnumerable(IMiRects rects) - { - for (var i = 0; i < rects.Count; i++) - { - yield return rects[i]; - } - } - - /// - /// Helper method - /// - /// IEnumerable of IWord - private static IEnumerable ToEnumerable(IWords words) - { - for (var i = 0; i < words.Count; i++) - { - yield return words[i]; - } - } - } -} \ No newline at end of file diff --git a/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj b/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj index f75477886..501c6a8ef 100644 --- a/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj +++ b/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Office Greenshot.Addon.Office - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj b/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj index a9d85013d..b14e7b488 100644 --- a/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj +++ b/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.OneDrive Greenshot.Addon.OneDrive - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj b/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj index 6a4e6d1d7..3c24ec7b7 100644 --- a/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj +++ b/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Photobucket Greenshot.Addon.Photobucket - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj b/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj index 5536a1071..65bdcc688 100644 --- a/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj +++ b/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Tfs Greenshot.Addon.Tfs - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj b/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj index ca41b76ab..b38e349da 100644 --- a/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj +++ b/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj @@ -1,9 +1,9 @@ - + Greenshot.Addon.Win10 Greenshot.Addon.Win10 - net472;netcoreapp3.0 + netcoreapp3.0 diff --git a/src/Greenshot.Addons/Greenshot.Addons.csproj b/src/Greenshot.Addons/Greenshot.Addons.csproj index 59e513742..359b1ab3b 100644 --- a/src/Greenshot.Addons/Greenshot.Addons.csproj +++ b/src/Greenshot.Addons/Greenshot.Addons.csproj @@ -1,7 +1,7 @@ - + - net472;netcoreapp3.0 + netcoreapp3.0 true diff --git a/src/Greenshot.Core/Greenshot.Core.csproj b/src/Greenshot.Core/Greenshot.Core.csproj index e6f93f574..ef21cd850 100644 --- a/src/Greenshot.Core/Greenshot.Core.csproj +++ b/src/Greenshot.Core/Greenshot.Core.csproj @@ -1,7 +1,7 @@ - + - net472;netcoreapp3.0 + netcoreapp3.0 true diff --git a/src/Greenshot.Gfx/Greenshot.Gfx.csproj b/src/Greenshot.Gfx/Greenshot.Gfx.csproj index 561371feb..745cafb12 100644 --- a/src/Greenshot.Gfx/Greenshot.Gfx.csproj +++ b/src/Greenshot.Gfx/Greenshot.Gfx.csproj @@ -1,7 +1,7 @@ - + - net472;netcoreapp3.0 + netcoreapp3.0 true 8 diff --git a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj index 893b072bc..232f9bb91 100644 --- a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj +++ b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj @@ -1,10 +1,10 @@ - + Greenshot.PerformanceTests Greenshot.PerformanceTests Exe - net472;netcoreapp3.0 + netcoreapp3.0 true @@ -63,7 +63,7 @@ - + 2.6.3 diff --git a/src/Greenshot.Tests/Greenshot.Tests.csproj b/src/Greenshot.Tests/Greenshot.Tests.csproj index f8f76a0f5..264778a4c 100644 --- a/src/Greenshot.Tests/Greenshot.Tests.csproj +++ b/src/Greenshot.Tests/Greenshot.Tests.csproj @@ -1,7 +1,7 @@ - + - net472;netcoreapp3.0 + netcoreapp3.0 true @@ -67,7 +67,7 @@ - + diff --git a/src/Greenshot.sln b/src/Greenshot.sln index 393f785b8..4ba709344 100644 --- a/src/Greenshot.sln +++ b/src/Greenshot.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.421 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28729.10 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot", "Greenshot\Greenshot.csproj", "{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}" EndProject @@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Imgur", "Gr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Jira", "Greenshot.Addon.Jira\Greenshot.Addon.Jira.csproj", "{19FEEF09-313F-43C7-819D-F1BCA782B08B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.OCR", "Greenshot.Addon.OCR\Greenshot.Addon.OCR.csproj", "{C6988EE8-2FEE-4349-9F09-F9628A0D8965}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Box", "Greenshot.Addon.Box\Greenshot.Addon.Box.csproj", "{697CF066-9077-4F22-99D9-D989CCE7282B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Dropbox", "Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj", "{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}" @@ -45,8 +43,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.OneDrive", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Tfs", "Greenshot.Addon.Tfs\Greenshot.Addon.Tfs.csproj", "{8B3643A5-AFED-49FF-8D66-6348FB102EB2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.OcrCommand", "Greenshot.Addon.OcrCommand\Greenshot.Addon.OcrCommand.csproj", "{7B8E9055-A054-4290-B537-075EBFDF8BDF}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Core", "Greenshot.Core\Greenshot.Core.csproj", "{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.InternetExplorer", "Greenshot.Addon.InternetExplorer\Greenshot.Addon.InternetExplorer.csproj", "{4CCA2717-B8A4-44F7-965B-5687107E4921}" @@ -107,14 +103,6 @@ Global {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|Any CPU.Build.0 = Release|Any CPU {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.ActiveCfg = Release|Any CPU {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.Build.0 = Release|Any CPU - {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.ActiveCfg = Debug|Any CPU - {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.Build.0 = Debug|Any CPU - {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|Any CPU - {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.Build.0 = Release|Any CPU {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|Any CPU @@ -227,14 +215,6 @@ Global {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|Any CPU.Build.0 = Release|Any CPU {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.ActiveCfg = Release|Any CPU {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.Build.0 = Release|Any CPU - {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 {BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Debug|Any CPU.Build.0 = Debug|Any CPU {BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Debug|x86.ActiveCfg = Debug|Any CPU diff --git a/src/Greenshot/Greenshot.csproj b/src/Greenshot/Greenshot.csproj index 168321381..ac1ef3214 100644 --- a/src/Greenshot/Greenshot.csproj +++ b/src/Greenshot/Greenshot.csproj @@ -2,7 +2,7 @@ WinExe - net472;netcoreapp3.0 + netcoreapp3.0 latest icons\applicationIcon\icon.ico True