mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 22:34:27 -07:00
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.
This commit is contained in:
parent
0561394194
commit
34ae1b5709
574 changed files with 1751 additions and 5473 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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")]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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")]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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")]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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}"
|
||||
>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,13 +640,13 @@ 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 background color
|
||||
var clearColor = documentContainer.BackgroundColor;
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.Linq;
|
||||
|
|
|
@ -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.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Greenshot.Addon.LegacyEditor
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -9,8 +9,6 @@ namespace Greenshot.Addon.LegacyEditor.Configuration.Impl
|
|||
{
|
||||
internal class EditorConfigurationImpl : IniSectionBase<IEditorConfiguration>, IEditorConfiguration
|
||||
{
|
||||
#region Implementation of IEditorConfiguration
|
||||
|
||||
public IList<Color> RecentColors { get; set; }
|
||||
public IDictionary<string, object> LastUsedFieldValues { get; set; }
|
||||
public bool MatchSizeToCapture { get; set; }
|
||||
|
@ -24,7 +22,5 @@ namespace Greenshot.Addon.LegacyEditor.Configuration.Impl
|
|||
public bool SuppressSaveDialogAtClose { get; set; }
|
||||
public DropShadowEffect DropShadowEffectSettings { get; set; }
|
||||
public TornEdgeEffect TornEdgeEffectSettings { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue