Modified bitmap usage to a wrapped / abstract version (#120)

* This commit changes the usage of Bitmap to IBitmapWithNativeSupport, where it will be possible to accelerate certain operations. As this is like abstracting Bitmap, the change is quite big.
* Fixing bindings for the Editor.
* Improved the UnmanagedBitmap, and all IBitmapWithNativeSupport to support both Bitmap and BitmapSource with minimal copying. This should make integrations of newer code a lot easier.
This commit is contained in:
Robin Krom 2019-03-31 11:38:04 +02:00 committed by GitHub
commit fe4af83e1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
579 changed files with 2083 additions and 5701 deletions

View file

@ -15,12 +15,12 @@ steps:
- task: DotNetCoreInstaller@0
displayName: 'Use .NET Core sdk 3.0'
inputs:
version: '3.0.100-preview4-010520'
version: '3.0.100-preview4-010965'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.9.2'
displayName: 'Use NuGet 4.9.3'
inputs:
versionSpec: 4.9.2
versionSpec: 4.9.3
checkLatest: true
- task: NuGetCommand@2

View file

@ -49,7 +49,7 @@
</PropertyGroup>
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Tests')) And $(MSBuildProjectName.StartsWith('Greenshot'))">
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.136">
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.138">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

View file

@ -1,121 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28407.52
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot", "Greenshot\Greenshot.csproj", "{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addons", "Greenshot.Addons\Greenshot.Addons.csproj", "{5B924697-4DCD-4F98-85F1-105CB84B7341}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Win10", "Greenshot.Addon.Win10\Greenshot.Addon.Win10.csproj", "{9801F62C-540F-4BFE-9211-6405DEDE563B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Gfx", "Greenshot.Gfx\Greenshot.Gfx.csproj", "{F041C685-EB96-4ED1-9ACE-0F5BD836610F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.PerformanceTests", "Greenshot.PerformanceTests\Greenshot.PerformanceTests.csproj", "{5D594C8A-2137-46E1-8D01-B83662825C7B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Tests", "Greenshot.Tests\Greenshot.Tests.csproj", "{9B162E60-12D8-44FD-8093-7D40392F23FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.LegacyEditor", "Greenshot.Addon.LegacyEditor\Greenshot.Addon.LegacyEditor.csproj", "{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Gfx.Experimental", "Greenshot.Gfx.Experimental\Greenshot.Gfx.Experimental.csproj", "{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}"
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}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|x86.ActiveCfg = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Debug|x86.Build.0 = Debug|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|Any CPU.Build.0 = Release|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|x86.ActiveCfg = Release|Any CPU
{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}.Release|x86.Build.0 = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Debug|x86.Build.0 = Debug|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|Any CPU.Build.0 = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|x86.ActiveCfg = Release|Any CPU
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|x86.Build.0 = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|x86.ActiveCfg = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|x86.Build.0 = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|Any CPU.Build.0 = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|x86.ActiveCfg = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|x86.Build.0 = Release|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|x86.ActiveCfg = Debug|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|x86.Build.0 = Debug|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Release|Any CPU.Build.0 = Release|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Release|x86.ActiveCfg = Release|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Release|x86.Build.0 = Release|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Debug|x86.ActiveCfg = Debug|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Debug|x86.Build.0 = Debug|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Release|Any CPU.Build.0 = Release|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Release|x86.ActiveCfg = Release|Any CPU
{5D594C8A-2137-46E1-8D01-B83662825C7B}.Release|x86.Build.0 = Release|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Debug|x86.ActiveCfg = Debug|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Debug|x86.Build.0 = Debug|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Release|Any CPU.Build.0 = Release|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Release|x86.ActiveCfg = Release|Any CPU
{9B162E60-12D8-44FD-8093-7D40392F23FA}.Release|x86.Build.0 = Release|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Debug|x86.ActiveCfg = Debug|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Debug|x86.Build.0 = Debug|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Release|Any CPU.Build.0 = Release|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Release|x86.ActiveCfg = Release|Any CPU
{9F89C5A0-EB75-4F01-97EB-FBC0725733F2}.Release|x86.Build.0 = Release|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Debug|x86.ActiveCfg = Debug|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Debug|x86.Build.0 = Debug|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Release|Any CPU.Build.0 = Release|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Release|x86.ActiveCfg = Release|Any CPU
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.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
{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Debug|x86.Build.0 = Debug|Any CPU
{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Release|Any CPU.Build.0 = Release|Any CPU
{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Release|x86.ActiveCfg = Release|Any CPU
{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}.Release|x86.Build.0 = Release|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Debug|x86.ActiveCfg = Debug|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Debug|x86.Build.0 = Debug|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Release|Any CPU.Build.0 = Release|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Release|x86.ActiveCfg = Release|Any CPU
{4CCA2717-B8A4-44F7-965B-5687107E4921}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8508EA59-659A-4E08-9232-91774FBA65F2}
EndGlobalSection
EndGlobal

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,13 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
@ -49,8 +42,6 @@ using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
#endregion
namespace Greenshot.Addon.Box
{
[Destination("Box")]
@ -107,7 +98,7 @@ namespace Greenshot.Addon.Box
public override string Description => _boxLanguage.UploadMenuItem;
public override Bitmap DisplayIcon
public override IBitmapWithNativeSupport DisplayIcon
{
get
{

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,18 +17,12 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.ComponentModel;
using System.Runtime.Serialization;
using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.Box.Configuration
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Dapplo.Config.Language;
namespace Greenshot.Addon.Box.Configuration

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.ComponentModel;
using Dapplo.Config.Ini;
@ -31,8 +27,6 @@ namespace Greenshot.Addon.Box.Configuration.Impl
{
internal class BoxConfigurationImpl : IniSectionBase<IBoxConfiguration>, IBoxConfiguration
{
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -46,16 +40,8 @@ namespace Greenshot.Addon.Box.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IOAuth2Token
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2AccessToken { get; set; }
@ -64,16 +50,10 @@ namespace Greenshot.Addon.Box.Configuration.Impl
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2RefreshToken { get; set; }
#endregion
#region Implementation of IBoxConfiguration
public bool AfterUploadLinkToClipBoard { get; set; }
public bool UseSharedLink { get; set; }
public string FolderId { get; set; }
public string ClientId { get; set; }
public string ClientSecret { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.Box.Configuration.Impl
#pragma warning disable CS1591
public class BoxLanguageImpl : LanguageBase<IBoxLanguage>, IBoxLanguage
{
#region Implementation of IBoxLanguage
public string CommunicationWait { get; }
public string Configure { get; }
public string LabelAfterUpload { get; }
@ -44,7 +38,5 @@ namespace Greenshot.Addon.Box.Configuration.Impl
public string UploadFailure { get; }
public string UploadMenuItem { get; }
public string UploadSuccess { get; }
#endregion
}
}

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Box</RootNamespace>
@ -49,7 +49,7 @@
<PackageReference Include="Dapplo.HttpExtensions" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.18" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,16 +17,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.ComponentModel;
using Dapplo.Config.Ini;
using Greenshot.Core.Enums;
#endregion
namespace Greenshot.Addon.Confluence.Configuration
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Dapplo.Config.Language;
namespace Greenshot.Addon.Confluence.Configuration

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Dapplo.Config.Ini;
using Greenshot.Core.Enums;
@ -28,8 +24,6 @@ namespace Greenshot.Addon.Confluence.Configuration.Impl
{
internal class ConfluenceConfigurationImpl : IniSectionBase<IConfluenceConfiguration>, IConfluenceConfiguration
{
#region Implementation of IConfluenceConfiguration
public string Url { get; set; }
public int Timeout { get; set; }
public OutputFormats UploadFormat { get; set; }
@ -40,7 +34,5 @@ namespace Greenshot.Addon.Confluence.Configuration.Impl
public bool CopyWikiMarkupForImageToClipboard { get; set; }
public string SearchSpaceKey { get; set; }
public bool IncludePersonSpaces { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.Confluence.Configuration.Impl
#pragma warning disable CS1591
public class ConfluenceLanguageImpl : LanguageBase<IConfluenceLanguage>, IConfluenceLanguage
{
#region Implementation of IConfluenceLanguage
public string PluginSettings { get; }
public string LoginError { get; }
public string LabelUrl { get; }
@ -58,7 +52,5 @@ namespace Greenshot.Addon.Confluence.Configuration.Impl
public string Loading { get; }
public string IncludePersonSpaces { get; }
public string CommunicationWait { get; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,14 +17,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Threading;
using System.Windows;
using Autofac.Features.OwnedInstances;
@ -42,8 +35,6 @@ using Greenshot.Addons.Interfaces;
using Greenshot.Addons.Interfaces.Plugin;
using Greenshot.Gfx;
#endregion
namespace Greenshot.Addon.Confluence
{
/// <summary>
@ -53,7 +44,7 @@ namespace Greenshot.Addon.Confluence
public class ConfluenceDestination : AbstractDestination
{
private static readonly LogSource Log = new LogSource();
private static readonly Bitmap ConfluenceIcon;
private static readonly IBitmapWithNativeSupport ConfluenceIcon;
private readonly ExportNotification _exportNotification;
private readonly IConfluenceConfiguration _confluenceConfiguration;
private readonly IConfluenceLanguage _confluenceLanguage;
@ -125,7 +116,7 @@ namespace Greenshot.Addon.Confluence
public override bool IsActive => base.IsActive && !string.IsNullOrEmpty(_confluenceConfiguration.Url);
public override Bitmap DisplayIcon => ConfluenceIcon;
public override IBitmapWithNativeSupport DisplayIcon => ConfluenceIcon;
public override IEnumerable<IDestination> DynamicDestinations()
{

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Linq;
@ -34,8 +28,6 @@ using Dapplo.Confluence.Query;
using Dapplo.Log;
using Greenshot.Addon.InternetExplorer;
#endregion
namespace Greenshot.Addon.Confluence
{
/// <summary>

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Confluence</RootNamespace>
@ -55,7 +55,7 @@
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.2.21" />
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Dapplo.Confluence" Version="0.8.16" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Collections.Generic;
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,18 +17,12 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.ComponentModel;
using System.Runtime.Serialization;
using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.Dropbox.Configuration
{
/// <summary>

View file

@ -17,12 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using Dapplo.Config.Language;
#endregion
namespace Greenshot.Addon.Dropbox.Configuration
{
[Language("Dropbox")]

View file

@ -27,8 +27,6 @@ namespace Greenshot.Addon.Dropbox.Configuration.Impl
{
public class DropboxConfigurationImpl : IniSectionBase<IDropboxConfiguration>, IDropboxConfiguration
{
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -42,16 +40,8 @@ namespace Greenshot.Addon.Dropbox.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IOAuth2Token
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2AccessToken { get; set; }
@ -60,14 +50,8 @@ namespace Greenshot.Addon.Dropbox.Configuration.Impl
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2RefreshToken { get; set; }
#endregion
#region Implementation of IDropboxConfiguration
public bool AfterUploadLinkToClipBoard { get; set; }
public string ClientId { get; set; }
public string ClientSecret { get; set; }
#endregion
}
}

View file

@ -29,8 +29,6 @@ namespace Greenshot.Addon.Dropbox.Configuration.Impl
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
public class DropboxLanguageImpl: LanguageBase<IDropboxLanguage>, IDropboxLanguage
{
#region Implementation of IDropboxLanguage
public string CommunicationWait { get; }
public string Configure { get; }
public string LabelAfterUpload { get; }
@ -40,7 +38,5 @@ namespace Greenshot.Addon.Dropbox.Configuration.Impl
public string UploadFailure { get; }
public string UploadMenuItem { get; }
public string UploadSuccess { get; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,13 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
@ -50,8 +43,6 @@ using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
using Newtonsoft.Json;
#endregion
namespace Greenshot.Addon.Dropbox
{
[Destination("Dropbox")]
@ -114,7 +105,7 @@ namespace Greenshot.Addon.Dropbox
httpBehaviour.HttpSettings = httpConfiguration;
}
public override Bitmap DisplayIcon
public override IBitmapWithNativeSupport DisplayIcon
{
get
{

View file

@ -17,12 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using Newtonsoft.Json;
#endregion
namespace Greenshot.Addon.Dropbox.Entities
{
internal class CreateLinkReply

View file

@ -17,12 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using Newtonsoft.Json;
#endregion
namespace Greenshot.Addon.Dropbox.Entities
{
internal class CreateLinkRequest

View file

@ -17,12 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using Newtonsoft.Json;
#endregion
namespace Greenshot.Addon.Dropbox.Entities
{
internal class Error

View file

@ -17,14 +17,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using System.Collections.Generic;
using System.Net.Http;
using Dapplo.HttpExtensions.Support;
#endregion
namespace Greenshot.Addon.Dropbox.Entities
{
/// <summary>

View file

@ -17,14 +17,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;
#endregion
namespace Greenshot.Addon.Dropbox.Entities
{
[DataContract]

View file

@ -17,12 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using Newtonsoft.Json;
#endregion
namespace Greenshot.Addon.Dropbox.Entities
{
internal class UploadRequest

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Dropbox</RootNamespace>
@ -51,7 +51,7 @@
<PackageReference Include="Dapplo.HttpExtensions" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.18" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.IO;
using Greenshot.Addon.ExternalCommand.Entities;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
@ -30,8 +24,6 @@ using Dapplo.Config.Ini;
using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.ExternalCommand.Configuration
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Collections.Generic;
using Dapplo.Config.Ini;
using Greenshot.Addon.ExternalCommand.Entities;
@ -30,18 +26,12 @@ namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
{
internal class ExternalCommandConfigurationImpl : IniSectionBase<IExternalCommandConfiguration>, IExternalCommandConfiguration
{
#region Overrides of IniSectionBase<IExternalCommandConfiguration>
public override void AfterLoad()
{
ExternalCommandConfigurationExtensions.AfterLoad(this);
base.AfterLoad();
}
#endregion
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -55,23 +45,13 @@ namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IExternalCommandConfiguration
public IList<string> Commands { get; set; }
public IDictionary<string, string> Commandline { get; set; }
public IDictionary<string, string> Argument { get; set; }
public IDictionary<string, bool> RunInbackground { get; set; }
public IDictionary<string, CommandBehaviors> Behaviors { get; set; }
public IList<string> DeletedBuildInCommands { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
#pragma warning disable CS1591
public class ExternalCommandLanguageImpl : LanguageBase<IExternalCommandLanguage>, IExternalCommandLanguage
{
#region Implementation of IExternalCommandLanguage
public string ContextmenuConfigure { get; }
public string SettingsEdit { get; }
public string SettingsDelete { get; }
@ -45,7 +39,5 @@ namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
public string LabelCommand { get; }
public string LabelInformation { get; }
public string LabelName { get; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
namespace Greenshot.Addon.ExternalCommand.Entities

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
namespace Greenshot.Addon.ExternalCommand.Entities
{
public class ExternalCommandDefinition

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,11 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@ -36,8 +29,7 @@ using Greenshot.Addons.Components;
using Greenshot.Addons.Core;
using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
#endregion
using Greenshot.Gfx;
namespace Greenshot.Addon.ExternalCommand
{
@ -72,7 +64,7 @@ namespace Greenshot.Addon.ExternalCommand
public override string Description => _externalCommandDefinition.Name;
/// <inheritdoc />
public override Bitmap GetDisplayIcon(double dpi)
public override IBitmapWithNativeSupport GetDisplayIcon(double dpi)
{
return IconCache.IconForCommand(_externalCommandDefinition, dpi > 100);
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.IO;
@ -35,8 +29,6 @@ using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.ExternalCommand
{
/// <summary>

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.ExternalCommand</RootNamespace>
@ -40,7 +40,7 @@
<PackageReference Include="AutoProperties.Fody" Version="1.20.0" />
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.2.21" />
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.2.21" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="CliWrap" Version="2.2.0" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,18 +17,12 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Drawing;
using System.IO;
using Dapplo.Log;
using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons.Core;
#endregion
using Greenshot.Gfx;
namespace Greenshot.Addon.ExternalCommand
{
@ -47,9 +39,9 @@ namespace Greenshot.Addon.ExternalCommand
/// <param name="externalCommandDefinition">string</param>
/// <param name="useLargeIcons">true to use the large icon</param>
/// <returns>Bitmap</returns>
public static Bitmap IconForCommand(ExternalCommandDefinition externalCommandDefinition, bool useLargeIcons)
public static IBitmapWithNativeSupport IconForCommand(ExternalCommandDefinition externalCommandDefinition, bool useLargeIcons)
{
Bitmap icon = null;
IBitmapWithNativeSupport icon = null;
if (externalCommandDefinition == null)
{
return null;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Reactive.Disposables;
using Caliburn.Micro;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Caliburn.Micro;
using Greenshot.Addon.ExternalCommand.Configuration;
using Greenshot.Addon.ExternalCommand.Entities;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Linq;
using Caliburn.Micro;
using Greenshot.Addon.ExternalCommand.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
@ -30,8 +24,6 @@ using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.Flickr.Configuration
{
/// <summary>

View file

@ -17,13 +17,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
#endregion
namespace Greenshot.Addon.Flickr.Configuration
{
[Language("Flickr")]

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.ComponentModel;
using Dapplo.Config.Ini;
using Dapplo.Config.Ini.Converters;
@ -30,8 +26,6 @@ namespace Greenshot.Addon.Flickr.Configuration.Impl
{
internal class FlickrConfigurationImpl : IniSectionBase<IFlickrConfiguration>, IFlickrConfiguration
{
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -45,16 +39,8 @@ namespace Greenshot.Addon.Flickr.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IOAuth1Token
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuthToken { get; set; }
@ -64,10 +50,6 @@ namespace Greenshot.Addon.Flickr.Configuration.Impl
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuthTokenVerifier { get; set; }
#endregion
#region Implementation of IFlickrConfiguration
public bool IsPublic { get; set; }
public bool IsFamily { get; set; }
public bool IsFriend { get; set; }
@ -77,7 +59,5 @@ namespace Greenshot.Addon.Flickr.Configuration.Impl
public bool UsePageLink { get; set; }
public string ClientId { get; set; }
public string ClientSecret { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.Flickr.Configuration.Impl
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
public class FlickrLanguageImpl : LanguageBase<IFlickrLanguage>, IFlickrLanguage
{
#region Implementation of IFlickrLanguage
public string CommunicationWait { get; }
public string Configure { get; }
public string LabelAfterUpload { get; }
@ -49,7 +43,5 @@ namespace Greenshot.Addon.Flickr.Configuration.Impl
public string Public { get; }
public string Family { get; }
public string Friend { get; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
namespace Greenshot.Addon.Flickr.Configuration
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,13 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net.Http;
@ -50,8 +43,6 @@ using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
#endregion
namespace Greenshot.Addon.Flickr
{
/// <summary>
@ -129,7 +120,7 @@ namespace Greenshot.Addon.Flickr
public override string Description => _flickrLanguage.UploadMenuItem;
public override Bitmap DisplayIcon
public override IBitmapWithNativeSupport DisplayIcon
{
get
{

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Flickr</RootNamespace>
@ -49,7 +49,7 @@
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.2.21" />
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.2.21" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Collections.Generic;
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
@ -30,8 +24,6 @@ using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.GooglePhotos.Configuration
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.ComponentModel;
using Dapplo.Config.Ini;
@ -31,8 +27,6 @@ namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
{
internal class GooglePhotosConfigurationImpl : IniSectionBase<IGooglePhotosConfiguration>, IGooglePhotosConfiguration
{
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -46,16 +40,8 @@ namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IOAuth2Token
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2AccessToken { get; set; }
@ -64,17 +50,11 @@ namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2RefreshToken { get; set; }
#endregion
#region Implementation of IGooglePhotosConfiguration
public bool AfterUploadLinkToClipBoard { get; set; }
public bool AddFilename { get; set; }
public string UploadUser { get; set; }
public string UploadAlbum { get; set; }
public string ClientId { get; set; }
public string ClientSecret { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
#pragma warning disable CS1591
public class GooglePhotosLanguageImpl : LanguageBase<IGooglePhotosLanguage>, IGooglePhotosLanguage
{
#region Implementation of IGooglePhotosLanguage
public string CommunicationWait { get; }
public string Configure { get; }
public string LabelAfterUpload { get; }
@ -44,7 +38,5 @@ namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
public string UploadFailure { get; }
public string UploadMenuItem { get; }
public string UploadSuccess { get; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,13 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net.Http;
using System.Threading;
@ -48,8 +41,6 @@ using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
#endregion
namespace Greenshot.Addon.GooglePhotos
{
[Destination("GooglePhotos")]
@ -105,7 +96,7 @@ namespace Greenshot.Addon.GooglePhotos
public override string Description => _googlePhotosLanguage.UploadMenuItem;
public override Bitmap DisplayIcon
public override IBitmapWithNativeSupport DisplayIcon
{
get
{

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.GooglePhotos</RootNamespace>
@ -49,7 +49,7 @@
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.2.21" />
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.2.21" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
@ -31,8 +25,6 @@ using Dapplo.HttpExtensions.OAuth;
using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.Imgur.Configuration
{
/// <summary>

View file

@ -17,13 +17,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
#endregion
namespace Greenshot.Addon.Imgur.Configuration
{
[Language("Imgur")]

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.Imgur.Configuration.Impl
{
internal class ImgurConfigurationImpl : IniSectionBase<IImgurConfiguration>, IImgurConfiguration
{
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -48,16 +42,8 @@ namespace Greenshot.Addon.Imgur.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IOAuth2Token
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2AccessToken { get; set; }
@ -66,10 +52,6 @@ namespace Greenshot.Addon.Imgur.Configuration.Impl
[TypeConverter(typeof(StringEncryptionTypeConverter))]
public string OAuth2RefreshToken { get; set; }
#endregion
#region Implementation of IImgurConfiguration
public string ImgurApi3Url { get; set; }
public bool CopyLinkToClipboard { get; set; }
public bool UsePageLink { get; set; }
@ -84,7 +66,5 @@ namespace Greenshot.Addon.Imgur.Configuration.Impl
public IDictionary<string, string> ImgurUploadHistory { get; set; }
public int Credits { get; set; }
public IDictionary<string, ImgurImage> RuntimeImgurHistory { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.Imgur.Configuration.Impl
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
public class ImgurLanguageImpl : LanguageBase<IImgurLanguage>, IImgurLanguage
{
#region Implementation of IImgurLanguage
public string Cancel { get; }
public string ClearQuestion { get; }
public string CommunicationWait { get; }
@ -53,7 +47,5 @@ namespace Greenshot.Addon.Imgur.Configuration.Impl
public string UsePageLink { get; }
public string AnonymousAccess { get; }
public string ResetCredentialsButton { get; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,9 +17,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Windows.Media;
using Greenshot.Gfx;
using Newtonsoft.Json;
namespace Greenshot.Addon.Imgur.Entities
@ -32,7 +28,7 @@ namespace Greenshot.Addon.Imgur.Entities
public class ImgurImage
{
[JsonIgnore]
public ImageSource Image { get; set; }
public IBitmapWithNativeSupport Image { get; set; }
[JsonProperty("data")]
public ImgurData Data { get; set; }

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Imgur</RootNamespace>
@ -50,7 +50,7 @@
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.2.21" />
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,18 +17,14 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using Dapplo.HttpExtensions;
using Dapplo.HttpExtensions.Factory;
using Dapplo.HttpExtensions.JsonNet;
@ -42,8 +36,7 @@ using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addons.Core;
using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
#endregion
using Greenshot.Gfx;
namespace Greenshot.Addon.Imgur
{
@ -263,7 +256,7 @@ namespace Greenshot.Addon.Imgur
}
Log.Debug().WriteLine("Retrieving Imgur image for {0} with url {1}", imgurImage.Data.Id, imgurImage.Data.LinkThumbnail);
ImageHttpBehaviour.MakeCurrent();
imgurImage.Image = await imgurImage.Data.LinkThumbnail.GetAsAsync<BitmapSource>(token).ConfigureAwait(true);
imgurImage.Image = BitmapWrapper.FromBitmap(await imgurImage.Data.LinkThumbnail.GetAsAsync<Bitmap>(token).ConfigureAwait(true));
}
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,12 +17,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Drawing;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -32,7 +25,6 @@ using Autofac.Features.OwnedInstances;
using Dapplo.Addons;
using Dapplo.Log;
using Dapplo.Windows.Clipboard;
using Dapplo.Windows.Extensions;
using Greenshot.Addon.Imgur.Configuration;
using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addon.Imgur.ViewModels;
@ -44,8 +36,6 @@ using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
#endregion
namespace Greenshot.Addon.Imgur
{
/// <summary>
@ -88,7 +78,7 @@ namespace Greenshot.Addon.Imgur
public override string Description => _imgurLanguage.UploadMenuItem;
public override Bitmap DisplayIcon
public override IBitmapWithNativeSupport DisplayIcon
{
get
{
@ -140,7 +130,7 @@ namespace Greenshot.Addon.Imgur
using (var tmpImage = surfaceToUpload.GetBitmapForExport())
using (var thumbnail = tmpImage.CreateThumbnail(90, 90))
{
imgurImage.Image = thumbnail.ToBitmapSource();
imgurImage.Image = thumbnail;
}
if (_imgurConfiguration.AnonymousAccess && _imgurConfiguration.TrackHistory)
{

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Reactive.Disposables;
using Autofac.Features.OwnedInstances;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;

View file

@ -4,7 +4,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="clr-namespace:Greenshot.Addon.Imgur.ViewModels"
xmlns:cal="http://www.caliburnproject.org"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance viewModels:ImgurConfigViewModel,IsDesignTimeCreatable=False}"
>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,17 +17,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Accessibility;
#endregion
namespace Greenshot.Addon.InternetExplorer
{
/// <summary>
@ -365,8 +357,6 @@ namespace Greenshot.Addon.InternetExplorer
OBJID_WINDOW = 0x00000000
}
#region Interop
private static int AccessibleObjectFromWindow(IntPtr hWnd, OBJID idObject, ref IAccessible acc)
{
var guid = new Guid("{618736e0-3c3d-11cf-810c-00aa00389b71}"); // IAccessible
@ -386,7 +376,5 @@ namespace Greenshot.Addon.InternetExplorer
[DllImport("oleacc.dll", PreserveSig = false)]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern object ObjectFromLresult(UIntPtr lResult, [MarshalAs(UnmanagedType.LPStruct)] Guid refiid, IntPtr wParam);
#endregion
}
}

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.0</TargetFrameworks>
@ -30,10 +30,10 @@
<ItemGroup>
<PackageReference Include="Dapplo.Windows">
<Version>0.8.17</Version>
<Version>0.8.18</Version>
</PackageReference>
<PackageReference Include="Dapplo.Windows.Com">
<Version>0.8.17</Version>
<Version>0.8.18</Version>
</PackageReference>
<PackageReference Include="Unofficial.Microsoft.mshtml" Version="7.0.3300" />
</ItemGroup>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,14 +17,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Runtime.InteropServices;
using Dapplo.Log;
@ -37,15 +30,13 @@ using Dapplo.Windows.Desktop;
using Dapplo.Windows.Messages;
using Dapplo.Windows.User32;
using Greenshot.Addon.InternetExplorer.InternetExplorerInterop;
using Greenshot.Addons.Config.Impl;
using Greenshot.Addons.Controls;
using Greenshot.Addons.Core;
using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
using Greenshot.Gfx.Structs;
using mshtml;
#endregion
namespace Greenshot.Addon.InternetExplorer
{
/// <summary>
@ -427,7 +418,7 @@ namespace Greenshot.Addon.InternetExplorer
}
// bitmap to return
Bitmap returnBitmap = null;
IBitmapWithNativeSupport returnBitmap = null;
try
{
var pageSize = PrepareCapture(documentContainer, capture);
@ -649,15 +640,15 @@ namespace Greenshot.Addon.InternetExplorer
/// <param name="documentContainer">The document wrapped in a container</param>
/// <param name="pageSize"></param>
/// <returns>Bitmap with the page content as an image</returns>
private Bitmap CapturePage(DocumentContainer documentContainer, Size pageSize)
private IBitmapWithNativeSupport CapturePage(DocumentContainer documentContainer, Size pageSize)
{
var contentWindowDetails = documentContainer.ContentWindow;
//Create a target bitmap to draw into with the calculated page size
var returnBitmap = new Bitmap(pageSize.Width, pageSize.Height, PixelFormat.Format24bppRgb);
using (var graphicsTarget = Graphics.FromImage(returnBitmap))
var returnBitmap = new UnmanagedBitmap<Bgr24>(pageSize.Width, pageSize.Height);
using (var graphicsTarget = Graphics.FromImage(returnBitmap.NativeBitmap))
{
// Clear the target with the backgroundcolor
// Clear the target with the background color
var clearColor = documentContainer.BackgroundColor;
Log.Debug().WriteLine("Clear color: {0}", clearColor);
graphicsTarget.Clear(clearColor);
@ -665,10 +656,10 @@ namespace Greenshot.Addon.InternetExplorer
// Get the base document & draw it
DrawDocument(documentContainer, contentWindowDetails, graphicsTarget);
// Loop over the frames and clear their source area so we don't see any artefacts
// Loop over the frames and clear their source area so we don't see any artifacts
foreach (var frameDocument in documentContainer.Frames)
{
using (Brush brush = new SolidBrush(clearColor))
using (var brush = new SolidBrush(clearColor))
{
graphicsTarget.FillRectangle(brush, frameDocument.SourceRectangle);
}
@ -764,7 +755,7 @@ namespace Greenshot.Addon.InternetExplorer
targetLocation = targetLocation.Offset(targetOffset);
Log.Debug().WriteLine("After offsetting the fragment targetLocation is {0}", targetLocation);
Log.Debug().WriteLine("Drawing fragment of size {0} to {1}", fragment.Size, targetLocation);
graphicsTarget.DrawImage(fragment, targetLocation);
graphicsTarget.DrawImage(fragment.NativeBitmap, targetLocation);
graphicsTarget.Flush();
}
else

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
@ -35,8 +29,6 @@ using Dapplo.Windows.Desktop;
using mshtml;
using IServiceProvider = Greenshot.Addons.Interop.IServiceProvider;
#endregion
namespace Greenshot.Addon.InternetExplorer.InternetExplorerInterop
{
public class DocumentContainer

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,14 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.Runtime.InteropServices;
#endregion
namespace Greenshot.Addon.InternetExplorer.InternetExplorerInterop
{
// IWebBrowser: EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Threading;
using System.Threading.Tasks;

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,16 +17,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System.ComponentModel;
using Dapplo.Config.Ini;
using Greenshot.Addons.Core;
#endregion
namespace Greenshot.Addon.Jira.Configuration
{
/// <summary>

View file

@ -17,17 +17,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#region Usings
using System.ComponentModel;
using Dapplo.Config.Language;
#endregion
namespace Greenshot.Addon.Jira.Configuration
{
[Language("Jira")]
public interface IJiraLanguage : ILanguage, INotifyPropertyChanged
public interface IJiraLanguage : ILanguage
{
string Cancel { get; }

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Dapplo.Config.Ini;
using Greenshot.Core.Enums;
@ -28,8 +24,6 @@ namespace Greenshot.Addon.Jira.Configuration.Impl
{
internal class JiraConfigurationImpl : IniSectionBase<IJiraConfiguration>, IJiraConfiguration
{
#region Implementation of IFileConfiguration
public string OutputFilePath { get; set; }
public bool OutputFileAllowOverwrite { get; set; }
public string OutputFileFilenamePattern { get; set; }
@ -43,20 +37,10 @@ namespace Greenshot.Addon.Jira.Configuration.Impl
public string OptimizePNGCommand { get; set; }
public string OptimizePNGCommandArguments { get; set; }
#endregion
#region Implementation of IDestinationFileConfiguration
public bool UseOwnSettings { get; set; }
#endregion
#region Implementation of IJiraConfiguration
public string Url { get; set; }
public int Timeout { get; set; }
public int MaxEntries { get; set; }
#endregion
}
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Diagnostics.CodeAnalysis;
using Dapplo.Config.Language;
@ -33,8 +29,6 @@ namespace Greenshot.Addon.Jira.Configuration.Impl
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
public class JiraLanguageImpl : LanguageBase<IJiraLanguage>, IJiraLanguage
{
#region Implementation of IJiraLanguage
public string Cancel { get; }
public string ColumnAssignee { get; }
public string ColumnCreated { get; }
@ -55,7 +49,5 @@ namespace Greenshot.Addon.Jira.Configuration.Impl
public string UploadFailure { get; }
public string UploadMenuItem { get; }
public string UploadSuccess { get; }
#endregion
}
}

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Jira</RootNamespace>
@ -53,7 +53,7 @@
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.18" />
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.18" />
<PackageReference Include="Dapplo.Utils" Version="1.1.9" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.18" />
<PackageReference Include="Dapplo.Jira" Version="0.8.9" />
<PackageReference Include="Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Threading;
using System.Threading.Tasks;
@ -31,8 +25,6 @@ using Dapplo.Jira;
using Dapplo.Jira.Entities;
using Dapplo.Utils;
#endregion
namespace Greenshot.Addon.Jira
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;

View file

@ -1,5 +1,3 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
//
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
@ -44,8 +38,7 @@ using Greenshot.Addons.Core;
using Greenshot.Addons.Core.Credentials;
using Greenshot.Addons.Extensions;
using Greenshot.Addons.Interfaces;
#endregion
using Greenshot.Gfx;
namespace Greenshot.Addon.Jira
{
@ -78,7 +71,7 @@ namespace Greenshot.Addon.Jira
_jiraClient = JiraClient.Create(new Uri(jiraConfiguration.Url), httpConfiguration);
}
public Bitmap FavIcon { get; private set; }
public IBitmapWithNativeSupport FavIcon { get; private set; }
public IEnumerable<JiraDetails> RecentJiras => _jiraMonitor.RecentJiras;
/// <summary>
@ -130,7 +123,7 @@ namespace Greenshot.Addon.Jira
var favIconUri = _jiraClient.JiraBaseUri.AppendSegments("favicon.ico");
try
{
FavIcon = await _jiraClient.Server.GetUriContentAsync<Bitmap>(favIconUri, cancellationToken).ConfigureAwait(true);
FavIcon = BitmapWrapper.FromBitmap(await _jiraClient.Server.GetUriContentAsync<Bitmap>(favIconUri, cancellationToken).ConfigureAwait(true));
}
catch (Exception ex)
{
@ -262,9 +255,10 @@ namespace Greenshot.Addon.Jira
/// <summary>
/// Attach the content to the jira
/// </summary>
/// <param name="issueKey"></param>
/// <param name="issueKey">string</param>
/// <param name="surface">ISurface</param>
/// <param name="cancellationToken"></param>
/// <param name="filename">string</param>
/// <param name="cancellationToken">CancellationToken</param>
/// <returns>Task</returns>
public async Task AttachAsync(string issueKey, ISurface surface, string filename = null, CancellationToken cancellationToken = default)
{

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,13 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO.Compression;
using System.Windows.Forms;
using Autofac.Features.OwnedInstances;
@ -43,8 +36,6 @@ using Greenshot.Addons.Core;
using Greenshot.Addons.Interfaces;
using Greenshot.Gfx;
#endregion
namespace Greenshot.Addon.Jira
{
/// <summary>
@ -120,11 +111,11 @@ namespace Greenshot.Addon.Jira
public override bool IsDynamic => true;
public override Bitmap DisplayIcon
public override IBitmapWithNativeSupport DisplayIcon
{
get
{
Bitmap displayIcon = null;
IBitmapWithNativeSupport displayIcon = null;
if (_jiraConnector != null)
{
if (_jiraIssue != null)
@ -150,7 +141,7 @@ namespace Greenshot.Addon.Jira
{
using (var gzStream = new GZipStream(bitmapStream, CompressionMode.Decompress))
{
displayIcon = SvgBitmap.FromStream(gzStream).Bitmap;
displayIcon = SvgBitmap.FromStream(gzStream);
}
//displayIcon = BitmapHelper.FromStream(bitmapStream);
}

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,15 +17,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using Dapplo.Jira.Entities;
#endregion
namespace Greenshot.Addon.Jira
{
public class JiraDetails : IComparable<JiraDetails>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,14 +17,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
#endregion
namespace Greenshot.Addon.Jira
{
public class JiraEventArgs : EventArgs

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
namespace Greenshot.Addon.Jira
{
public enum JiraEventTypes

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,10 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
#region Usings
using System;
using System.Collections.Generic;
using System.Linq;
@ -38,8 +32,6 @@ using Dapplo.Windows.Desktop;
using Dapplo.Windows.User32;
using Greenshot.Addon.Jira.Configuration;
#endregion
namespace Greenshot.Addon.Jira
{
/// <summary>

View file

@ -1,6 +1,4 @@
#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// 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/
@ -19,8 +17,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;

Some files were not shown because too many files have changed in this diff Show more