mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 14:24:43 -07:00
Removed Fody usage
This commit is contained in:
parent
dd25cf3dbf
commit
509daf5982
118 changed files with 174 additions and 2831 deletions
|
@ -15,7 +15,7 @@ steps:
|
|||
- task: DotNetCoreInstaller@0
|
||||
displayName: 'Install .NET Core SDK 3.0'
|
||||
inputs:
|
||||
version: '3.0.100-preview8-013280'
|
||||
version: '3.0.100-preview8-013393'
|
||||
|
||||
- task: NuGetToolInstaller@0
|
||||
displayName: 'Use NuGet 5.0.2'
|
||||
|
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Box.Configuration;
|
||||
using Greenshot.Addon.Box.Configuration.Impl;
|
||||
using Greenshot.Addon.Box.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -36,13 +35,13 @@ namespace Greenshot.Addon.Box
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<BoxConfigurationImpl>()
|
||||
.Register(c => IniSection<IBoxConfiguration>.Create())
|
||||
.As<IBoxConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<BoxLanguageImpl>()
|
||||
.Register(c => Language<IBoxLanguage>.Create())
|
||||
.As<IBoxLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -26,11 +26,11 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Autofac.Features.OwnedInstances;
|
||||
using Caliburn.Micro;
|
||||
using Dapplo.Addons;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Dapplo.HttpExtensions.OAuth;
|
||||
using Dapplo.Log;
|
||||
using Dapplo.Utils;
|
||||
using Dapplo.Windows.Clipboard;
|
||||
using Greenshot.Addon.Box.Configuration;
|
||||
using Greenshot.Addon.Box.Entities;
|
||||
|
@ -200,7 +200,7 @@ namespace Greenshot.Addon.Box
|
|||
// Use UploadProgress
|
||||
if (progress != null)
|
||||
{
|
||||
oauthHttpBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100))); };
|
||||
oauthHttpBehaviour.UploadProgress = percent => { Execute.OnUIThread(() => progress.Report((int)(percent * 100))); };
|
||||
}
|
||||
|
||||
oauthHttpBehaviour.OnHttpMessageHandlerCreated = httpMessageHandler => new OAuth2HttpMessageHandler(_oauth2Settings, oauthHttpBehaviour, httpMessageHandler);
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Box.Configuration.Impl
|
||||
{
|
||||
internal class BoxConfigurationImpl : IniSectionBase<IBoxConfiguration>, IBoxConfiguration
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2AccessToken { get; set; }
|
||||
|
||||
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2RefreshToken { get; set; }
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Box.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IBoxLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
internal class BoxLanguageImpl : LanguageBase<IBoxLanguage>, IBoxLanguage
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string LabelAfterUpload { get; }
|
||||
public string LabelAfterUploadLinkToClipBoard { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -21,12 +21,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using Dapplo.Config.Ini;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Confluence.Configuration.Impl
|
||||
{
|
||||
internal class ConfluenceConfigurationImpl : IniSectionBase<IConfluenceConfiguration>, IConfluenceConfiguration
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public string Url { get; set; }
|
||||
public int Timeout { get; set; }
|
||||
public OutputFormats UploadFormat { get; set; }
|
||||
public int UploadJpegQuality { get; set; }
|
||||
public bool UploadReduceColors { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public bool OpenPageAfterUpload { get; set; }
|
||||
public bool CopyWikiMarkupForImageToClipboard { get; set; }
|
||||
public string SearchSpaceKey { get; set; }
|
||||
public bool IncludePersonSpaces { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Confluence.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IConfluenceLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
internal class ConfluenceLanguageImpl : LanguageBase<IConfluenceLanguage>, IConfluenceLanguage
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public string PluginSettings { get; }
|
||||
public string LoginError { get; }
|
||||
public string LabelUrl { get; }
|
||||
public string LabelTimeout { get; }
|
||||
public string LabelUser { get; }
|
||||
public string LabelPassword { get; }
|
||||
public string LoginTitle { get; }
|
||||
public string Ok { get; }
|
||||
public string Cancel { get; }
|
||||
public string OpenPageAfterUpload { get; }
|
||||
public string UploadFormat { get; }
|
||||
public string CopyWikimarkup { get; }
|
||||
public string Filename { get; }
|
||||
public string Upload { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string OpenPages { get; }
|
||||
public string SearchPages { get; }
|
||||
public string BrowsePages { get; }
|
||||
public string SearchText { get; }
|
||||
public string Search { get; }
|
||||
public string Loading { get; }
|
||||
public string IncludePersonSpaces { get; }
|
||||
public string CommunicationWait { get; }
|
||||
}
|
||||
}
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Confluence.Configuration;
|
||||
using Greenshot.Addon.Confluence.Configuration.Impl;
|
||||
using Greenshot.Addon.Confluence.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Confluence
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<ConfluenceConfigurationImpl>()
|
||||
.Register(c => IniSection<IConfluenceConfiguration>.Create())
|
||||
.As<IConfluenceConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<ConfluenceLanguageImpl>()
|
||||
.Register(c => Language<IConfluenceLanguage>.Create())
|
||||
.As<IConfluenceLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Confluence</RootNamespace>
|
||||
|
@ -24,11 +24,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Dapplo.Confluence" Version="0.8.20" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Dapplo.Confluence" Version="0.8.22" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub: https://github.com/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Dropbox.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// Implementation of the IDropboxConfiguration
|
||||
/// </summary>
|
||||
public class DropboxConfigurationImpl : IniSectionBase<IDropboxConfiguration>, IDropboxConfiguration
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2AccessToken { get; set; }
|
||||
|
||||
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2RefreshToken { get; set; }
|
||||
|
||||
public bool AfterUploadLinkToClipBoard { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub: https://github.com/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Dropbox.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IDropboxLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
public class DropboxLanguageImpl: LanguageBase<IDropboxLanguage>, IDropboxLanguage
|
||||
{
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string LabelAfterUpload { get; }
|
||||
public string LabelAfterUploadLinkToClipBoard { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
}
|
||||
}
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Dropbox.Configuration;
|
||||
using Greenshot.Addon.Dropbox.Configuration.Impl;
|
||||
using Greenshot.Addon.Dropbox.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Dropbox
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<DropboxConfigurationImpl>()
|
||||
.Register(c => IniSection<IDropboxConfiguration>.Create())
|
||||
.As<IDropboxConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<DropboxLanguageImpl>()
|
||||
.Register(c => Language<IDropboxLanguage>.Create())
|
||||
.As<IDropboxLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -26,11 +26,11 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Autofac.Features.OwnedInstances;
|
||||
using Caliburn.Micro;
|
||||
using Dapplo.Addons;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Dapplo.HttpExtensions.OAuth;
|
||||
using Dapplo.Log;
|
||||
using Dapplo.Utils;
|
||||
using Dapplo.Windows.Clipboard;
|
||||
using Greenshot.Addon.Dropbox.Configuration;
|
||||
using Greenshot.Addon.Dropbox.Entities;
|
||||
|
@ -212,7 +212,7 @@ namespace Greenshot.Addon.Dropbox
|
|||
// Use UploadProgress
|
||||
if (progress != null)
|
||||
{
|
||||
oAuthHttpBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100))); };
|
||||
oAuthHttpBehaviour.UploadProgress = percent => { Execute.OnUIThread(() => progress.Report((int)(percent * 100))); };
|
||||
}
|
||||
oAuthHttpBehaviour.MakeCurrent();
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Dropbox</RootNamespace>
|
||||
|
@ -21,12 +21,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Dapplo.Config.Ini;
|
||||
using Greenshot.Addon.ExternalCommand.Entities;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
|
||||
{
|
||||
internal class ExternalCommandConfigurationImpl : IniSectionBase<IExternalCommandConfiguration>, IExternalCommandConfiguration
|
||||
{
|
||||
public override void AfterLoad()
|
||||
{
|
||||
ExternalCommandConfigurationExtensions.AfterLoad(this);
|
||||
base.AfterLoad();
|
||||
}
|
||||
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IExternalCommandLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
public class ExternalCommandLanguageImpl : LanguageBase<IExternalCommandLanguage>, IExternalCommandLanguage
|
||||
{
|
||||
public string ContextmenuConfigure { get; }
|
||||
public string SettingsEdit { get; }
|
||||
public string SettingsDelete { get; }
|
||||
public string SettingsNew { get; }
|
||||
public string SettingsDetailTitle { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string LabelArgument { get; }
|
||||
public string LabelCommand { get; }
|
||||
public string LabelInformation { get; }
|
||||
public string LabelName { get; }
|
||||
}
|
||||
}
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||
using Greenshot.Addon.ExternalCommand.Configuration.Impl;
|
||||
using Greenshot.Addon.ExternalCommand.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,21 @@ namespace Greenshot.Addon.ExternalCommand
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<ExternalCommandConfigurationImpl>()
|
||||
.Register(c =>
|
||||
{
|
||||
var config = IniSection<IExternalCommandConfiguration>.Create();
|
||||
config.RegisterAfterLoad(iniSection =>
|
||||
{
|
||||
config.AfterLoad();
|
||||
});
|
||||
return config;
|
||||
})
|
||||
.As<IExternalCommandConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<ExternalCommandLanguageImpl>()
|
||||
.Register(c => Language<IExternalCommandLanguage>.Create())
|
||||
.As<IExternalCommandLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.ExternalCommand</RootNamespace>
|
||||
|
@ -19,11 +19,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.22.0" />
|
||||
<PackageReference Include="CliWrap" Version="2.3.1" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Flickr.Configuration.Impl
|
||||
{
|
||||
internal class FlickrConfigurationImpl : IniSectionBase<IFlickrConfiguration>, IFlickrConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuthToken { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuthTokenSecret { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuthTokenVerifier { get; set; }
|
||||
|
||||
public bool IsPublic { get; set; }
|
||||
public bool IsFamily { get; set; }
|
||||
public bool IsFriend { get; set; }
|
||||
public SafetyLevel SafetyLevel { get; set; }
|
||||
public bool HiddenFromSearch { get; set; }
|
||||
public bool AfterUploadLinkToClipBoard { get; set; }
|
||||
public bool UsePageLink { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Flickr.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IFlickrLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
public class FlickrLanguageImpl : LanguageBase<IFlickrLanguage>, IFlickrLanguage
|
||||
{
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string LabelAfterUpload { get; }
|
||||
public string LabelAfterUploadLinkToClipBoard { get; }
|
||||
public string LabelHiddenFromSearch { get; }
|
||||
public string LabelSafetyLevel { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
public string Public { get; }
|
||||
public string Family { get; }
|
||||
public string Friend { get; }
|
||||
}
|
||||
}
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Flickr.Configuration;
|
||||
using Greenshot.Addon.Flickr.Configuration.Impl;
|
||||
using Greenshot.Addon.Flickr.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Flickr
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<FlickrConfigurationImpl>()
|
||||
.Register(c => IniSection<IFlickrConfiguration>.Create())
|
||||
.As<IFlickrConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<FlickrLanguageImpl>()
|
||||
.Register(c => Language<IFlickrLanguage>.Create())
|
||||
.As<IFlickrLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Flickr</RootNamespace>
|
||||
|
@ -21,12 +21,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
|
||||
{
|
||||
internal class GooglePhotosConfigurationImpl : IniSectionBase<IGooglePhotosConfiguration>, IGooglePhotosConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2AccessToken { get; set; }
|
||||
|
||||
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2RefreshToken { get; set; }
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IGooglePhotosLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
public class GooglePhotosLanguageImpl : LanguageBase<IGooglePhotosLanguage>, IGooglePhotosLanguage
|
||||
{
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string LabelAfterUpload { get; }
|
||||
public string LabelAfterUploadLinkToClipBoard { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.GooglePhotos.Configuration;
|
||||
using Greenshot.Addon.GooglePhotos.Configuration.Impl;
|
||||
using Greenshot.Addon.GooglePhotos.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.GooglePhotos
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<GooglePhotosConfigurationImpl>()
|
||||
.Register(c => IniSection<IGooglePhotosConfiguration>.Create())
|
||||
.As<IGooglePhotosConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<GooglePhotosLanguageImpl>()
|
||||
.Register(c => Language<IGooglePhotosLanguage>.Create())
|
||||
.As<IGooglePhotosLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -26,11 +26,11 @@ using System.Threading.Tasks;
|
|||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using Autofac.Features.OwnedInstances;
|
||||
using Caliburn.Micro;
|
||||
using Dapplo.Addons;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Dapplo.HttpExtensions.OAuth;
|
||||
using Dapplo.Log;
|
||||
using Dapplo.Utils;
|
||||
using Dapplo.Windows.Clipboard;
|
||||
using Greenshot.Addon.GooglePhotos.Configuration;
|
||||
using Greenshot.Addons;
|
||||
|
@ -177,7 +177,7 @@ namespace Greenshot.Addon.GooglePhotos
|
|||
// Use UploadProgress
|
||||
if (progress != null)
|
||||
{
|
||||
oAuthHttpBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100)), token); };
|
||||
oAuthHttpBehaviour.UploadProgress = percent => { Execute.OnUIThread(() => progress.Report((int)(percent * 100))); };
|
||||
}
|
||||
oAuthHttpBehaviour.OnHttpMessageHandlerCreated = httpMessageHandler => new OAuth2HttpMessageHandler(_oAuth2Settings, oAuthHttpBehaviour, httpMessageHandler);
|
||||
if (_googlePhotosConfiguration.AddFilename)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.GooglePhotos</RootNamespace>
|
||||
|
@ -21,12 +21,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Addon.Imgur.Entities;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Imgur.Configuration.Impl
|
||||
{
|
||||
internal class ImgurConfigurationImpl : IniSectionBase<IImgurConfiguration>, IImgurConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2AccessToken { get; set; }
|
||||
|
||||
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2RefreshToken { get; set; }
|
||||
|
||||
public string ImgurApi3Url { get; set; }
|
||||
public bool CopyLinkToClipboard { get; set; }
|
||||
public bool UsePageLink { get; set; }
|
||||
public bool AnonymousAccess { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
public string ApiUrl { get; set; }
|
||||
public bool AddTitle { get; set; }
|
||||
public bool AddFilename { get; set; }
|
||||
public string FilenamePattern { get; set; }
|
||||
public bool TrackHistory { get; set; }
|
||||
public IDictionary<string, string> ImgurUploadHistory { get; set; }
|
||||
public int Credits { get; set; }
|
||||
public IDictionary<string, ImgurImage> RuntimeImgurHistory { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Imgur.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IImgurLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
public class ImgurLanguageImpl : LanguageBase<IImgurLanguage>, IImgurLanguage
|
||||
{
|
||||
public string Cancel { get; }
|
||||
public string ClearQuestion { get; }
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string DeleteQuestion { get; }
|
||||
public string DeleteTitle { get; }
|
||||
public string History { get; }
|
||||
public string LabelClear { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string LabelUrl { get; }
|
||||
public string Ok { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
public string UsePageLink { get; }
|
||||
public string AnonymousAccess { get; }
|
||||
public string ResetCredentialsButton { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Imgur</RootNamespace>
|
||||
|
@ -23,11 +23,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0391" />
|
||||
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0409" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Imgur.Configuration;
|
||||
using Greenshot.Addon.Imgur.Configuration.Impl;
|
||||
using Greenshot.Addon.Imgur.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Imgur
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<ImgurConfigurationImpl>()
|
||||
.Register(c => IniSection<IImgurConfiguration>.Create())
|
||||
.As<IImgurConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<ImgurLanguageImpl>()
|
||||
.Register(c => Language<IImgurLanguage>.Create())
|
||||
.As<IImgurLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -25,12 +25,12 @@ using System.Net;
|
|||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Caliburn.Micro;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Dapplo.HttpExtensions.Factory;
|
||||
using Dapplo.HttpExtensions.JsonNet;
|
||||
using Dapplo.HttpExtensions.OAuth;
|
||||
using Dapplo.Log;
|
||||
using Dapplo.Utils;
|
||||
using Greenshot.Addon.Imgur.Configuration;
|
||||
using Greenshot.Addon.Imgur.Entities;
|
||||
using Greenshot.Addons.Core;
|
||||
|
@ -101,7 +101,7 @@ namespace Greenshot.Addon.Imgur
|
|||
var localBehaviour = Behaviour.ShallowClone();
|
||||
if (progress != null)
|
||||
{
|
||||
localBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100)), token); };
|
||||
localBehaviour.UploadProgress = percent => Execute.OnUIThread(() => progress.Report((int)(percent * 100)));
|
||||
}
|
||||
|
||||
using (var imageStream = new MemoryStream())
|
||||
|
@ -132,7 +132,7 @@ namespace Greenshot.Addon.Imgur
|
|||
var localBehaviour = Behaviour.ShallowClone();
|
||||
if (progress != null)
|
||||
{
|
||||
localBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100)), token); };
|
||||
localBehaviour.UploadProgress = percent => Execute.OnUIThread(() => progress.Report((int) (percent * 100)));
|
||||
}
|
||||
var oauthHttpBehaviour = OAuth2HttpBehaviourFactory.Create(oAuth2Settings, localBehaviour);
|
||||
using (var imageStream = new MemoryStream())
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapplo.Windows.Com" Version="0.8.34" />
|
||||
<PackageReference Include="Dapplo.Windows.Com" Version="0.9.5" />
|
||||
<PackageReference Include="Unofficial.Microsoft.mshtml" Version="7.0.3300" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using Dapplo.Config.Ini;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Jira.Configuration.Impl
|
||||
{
|
||||
internal class JiraConfigurationImpl : IniSectionBase<IJiraConfiguration>, IJiraConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
public string Url { get; set; }
|
||||
public int Timeout { get; set; }
|
||||
public int MaxEntries { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Jira.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IJiraLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
public class JiraLanguageImpl : LanguageBase<IJiraLanguage>, IJiraLanguage
|
||||
{
|
||||
public string Cancel { get; }
|
||||
public string ColumnAssignee { get; }
|
||||
public string ColumnCreated { get; }
|
||||
public string ColumnId { get; }
|
||||
public string ColumnReporter { get; }
|
||||
public string ColumnSummary { get; }
|
||||
public string CommunicationWait { get; }
|
||||
public string LabelComment { get; }
|
||||
public string LabelFilename { get; }
|
||||
public string LabelJira { get; }
|
||||
public string LabelJirafilter { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string LabelUrl { get; }
|
||||
public string LoginError { get; }
|
||||
public string LoginTitle { get; }
|
||||
public string Ok { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -3,14 +3,14 @@
|
|||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Jira</RootNamespace>
|
||||
<AssemblyName>Greenshot.Addon.Jira</AssemblyName>
|
||||
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Languages\language*.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<EmbeddedResource Include="jira.svgz" />
|
||||
<EmbeddedResource Include="jira.svgz" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -20,11 +20,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Dapplo.Jira" Version="0.8.17" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Dapplo.Jira" Version="0.8.19" />
|
||||
<PackageReference Include="DynamicData" Version="6.12.9" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Dapplo.Jira;
|
||||
using Dapplo.Jira.Entities;
|
||||
using Dapplo.Utils;
|
||||
|
||||
namespace Greenshot.Addon.Jira
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the bach for the IssueType bitmaps
|
||||
/// </summary>
|
||||
public class IssueTypeBitmapCache : AsyncMemoryCache<IssueType, BitmapSource>
|
||||
{
|
||||
private readonly IJiraClient _jiraClient;
|
||||
|
||||
public IssueTypeBitmapCache(IJiraClient jiraClient)
|
||||
{
|
||||
_jiraClient = jiraClient;
|
||||
// Set the expire timeout to an hour
|
||||
ExpireTimeSpan = TimeSpan.FromHours(4);
|
||||
}
|
||||
|
||||
protected override string CreateKey(IssueType keyObject)
|
||||
{
|
||||
return keyObject.Name;
|
||||
}
|
||||
|
||||
protected override async Task<BitmapSource> CreateAsync(IssueType issueType, CancellationToken cancellationToken = new CancellationToken())
|
||||
{
|
||||
return await _jiraClient.Server.GetUriContentAsync<BitmapSource>(issueType.IconUri, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
|
@ -17,20 +17,22 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Dapplo.Jira.Entities;
|
||||
|
||||
namespace Greenshot.Configuration.Impl
|
||||
namespace Greenshot.Addon.Jira
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IConfigTranslations and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// This is a cached item
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
internal class ConfigTranslationsImpl : LanguageBase<IConfigTranslations>, IConfigTranslations
|
||||
public class IssueTypeIcon
|
||||
{
|
||||
public string Filter { get; }
|
||||
|
||||
public string Theme { get; }
|
||||
public IssueTypeIcon(IssueType key, BitmapSource icon)
|
||||
{
|
||||
Key = key;
|
||||
Icon = icon;
|
||||
}
|
||||
public IssueType Key { get; }
|
||||
public BitmapSource Icon { get; }
|
||||
}
|
||||
}
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Jira.Configuration;
|
||||
using Greenshot.Addon.Jira.Configuration.Impl;
|
||||
using Greenshot.Addon.Jira.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Jira
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<JiraConfigurationImpl>()
|
||||
.Register(c => IniSection<IJiraConfiguration>.Create())
|
||||
.As<IJiraConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<JiraLanguageImpl>()
|
||||
.Register(c => Language<IJiraLanguage>.Create())
|
||||
.As<IJiraLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -21,6 +21,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Reactive.Concurrency;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
@ -31,6 +32,7 @@ using Dapplo.Jira;
|
|||
using Dapplo.Jira.Converters;
|
||||
using Dapplo.Jira.Entities;
|
||||
using Dapplo.Log;
|
||||
using DynamicData;
|
||||
using Greenshot.Addon.Jira.Configuration;
|
||||
using Greenshot.Addons.Core;
|
||||
using Greenshot.Addons.Core.Credentials;
|
||||
|
@ -52,7 +54,7 @@ namespace Greenshot.Addon.Jira
|
|||
|
||||
// Used to remove the wsdl information from the old SOAP Uri
|
||||
public const string DefaultPostfix = "/rpc/soap/jirasoapservice-v2?wsdl";
|
||||
private IssueTypeBitmapCache _issueTypeBitmapCache;
|
||||
private readonly SourceCache<IssueTypeIcon, IssueType> _issueTypeBitmapCache = new SourceCache<IssueTypeIcon, IssueType>(icon => icon.Key);
|
||||
private readonly IJiraClient _jiraClient;
|
||||
private DateTimeOffset _loggedInTime = DateTimeOffset.MinValue;
|
||||
|
||||
|
@ -110,10 +112,9 @@ namespace Greenshot.Addon.Jira
|
|||
return false;
|
||||
}
|
||||
|
||||
_issueTypeBitmapCache = new IssueTypeBitmapCache(_jiraClient);
|
||||
try
|
||||
{
|
||||
await _jiraClient.Session.StartAsync(user, password, cancellationToken).ConfigureAwait(true);
|
||||
_jiraClient.SetBasicAuthentication(user, password);
|
||||
await _jiraMonitor.AddJiraInstanceAsync(_jiraClient, cancellationToken).ConfigureAwait(true);
|
||||
|
||||
var favIconUri = _jiraClient.JiraBaseUri.AppendSegments("favicon.ico");
|
||||
|
@ -187,37 +188,28 @@ namespace Greenshot.Addon.Jira
|
|||
/// <summary>
|
||||
/// End the session, if there was one
|
||||
/// </summary>
|
||||
public async Task LogoutAsync(CancellationToken cancellationToken = default)
|
||||
public Task LogoutAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (_jiraClient != null && IsLoggedIn)
|
||||
{
|
||||
// TODO: Remove Jira Client?
|
||||
//_jiraMonitor.Dispose();
|
||||
await _jiraClient.Session.EndAsync(cancellationToken);
|
||||
//_jiraMonitor.Dispose();
|
||||
IsLoggedIn = false;
|
||||
}
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// check the login credentials, to prevent timeouts of the session, or makes a login
|
||||
/// Do not use ConfigureAwait to call this, as it will move await from the UI thread.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task CheckCredentialsAsync(CancellationToken cancellationToken = default)
|
||||
private Task CheckCredentialsAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (IsLoggedIn)
|
||||
{
|
||||
if (_loggedInTime.AddMinutes(_jiraConfiguration.Timeout - 1).CompareTo(DateTime.Now) < 0)
|
||||
{
|
||||
await LogoutAsync(cancellationToken);
|
||||
await LoginAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await LoginAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
// TODO: Do we need to do something?
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the favourite filters
|
||||
|
@ -304,8 +296,19 @@ namespace Greenshot.Addon.Jira
|
|||
/// <param name="cancellationToken">CancellationToken</param>
|
||||
/// <returns>Bitmap</returns>
|
||||
public async Task<BitmapSource> GetIssueTypeBitmapAsync(Issue issue, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await _issueTypeBitmapCache.GetOrCreateAsync(issue.Fields.IssueType, cancellationToken).ConfigureAwait(false);
|
||||
{
|
||||
var result = _issueTypeBitmapCache.Lookup(issue.Fields.IssueType);
|
||||
if (result.HasValue)
|
||||
{
|
||||
return result.Value.Icon;
|
||||
}
|
||||
|
||||
_issueTypeBitmapCache.ExpireAfter(icon => TimeSpan.FromMinutes(30), Scheduler.Default);
|
||||
var bitmap = await _jiraClient.Server.GetUriContentAsync<BitmapSource>(issue.Fields.IssueType.IconUri, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var item = new IssueTypeIcon(issue.Fields.IssueType, bitmap);
|
||||
_issueTypeBitmapCache.AddOrUpdate(item);
|
||||
return bitmap;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Windows.Common.Structs;
|
||||
using Dapplo.Windows.User32.Enums;
|
||||
using Greenshot.Gfx.Effects;
|
||||
|
||||
namespace Greenshot.Addon.LegacyEditor.Configuration.Impl
|
||||
{
|
||||
internal class EditorConfigurationImpl : IniSectionBase<IEditorConfiguration>, IEditorConfiguration
|
||||
{
|
||||
public IList<Color> RecentColors { get; set; }
|
||||
public IDictionary<string, object> LastUsedFieldValues { get; set; }
|
||||
public bool MatchSizeToCapture { get; set; }
|
||||
public WindowPlacementFlags WindowPlacementFlags { get; set; }
|
||||
public ShowWindowCommands ShowWindowCommand { get; set; }
|
||||
public NativePoint WindowMinPosition { get; set; }
|
||||
public NativePoint WindowMaxPosition { get; set; }
|
||||
public NativeRect WindowNormalPosition { get; set; }
|
||||
public bool ReuseEditor { get; set; }
|
||||
public int FreehandSensitivity { get; set; }
|
||||
public bool SuppressSaveDialogAtClose { get; set; }
|
||||
public DropShadowEffect DropShadowEffectSettings { get; set; }
|
||||
public TornEdgeEffect TornEdgeEffectSettings { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.LegacyEditor.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IEditorLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
public class EditorLanguageImpl : LanguageBase<IEditorLanguage>, IEditorLanguage
|
||||
{
|
||||
public string SettingsDestinationEditor { get; }
|
||||
public string EditorAlignBottom { get; }
|
||||
public string EditorAlignCenter { get; }
|
||||
public string EditorAlignHorizontal { get; }
|
||||
public string EditorAlignLeft { get; }
|
||||
public string EditorAlignMiddle { get; }
|
||||
public string EditorAlignRight { get; }
|
||||
public string EditorAlignTop { get; }
|
||||
public string EditorAlignVertical { get; }
|
||||
public string EditorArrange { get; }
|
||||
public string EditorArrowheads { get; }
|
||||
public string EditorArrowheadsBoth { get; }
|
||||
public string EditorArrowheadsEnd { get; }
|
||||
public string EditorArrowheadsNone { get; }
|
||||
public string EditorArrowheadsStart { get; }
|
||||
public string EditorAutocrop { get; }
|
||||
public string EditorBackcolor { get; }
|
||||
public string EditorBlurRadius { get; }
|
||||
public string EditorBold { get; }
|
||||
public string EditorBorder { get; }
|
||||
public string EditorBrightness { get; }
|
||||
public string EditorCancel { get; }
|
||||
public string EditorClipboardfailed { get; }
|
||||
public string EditorClose { get; }
|
||||
public string EditorCloseOnSave { get; }
|
||||
public string EditorCloseOnSaveTitle { get; }
|
||||
public string EditorConfirm { get; }
|
||||
public string EditorCopyimagetoclipboard { get; }
|
||||
public string EditorCopypathtoclipboard { get; }
|
||||
public string EditorCopytoclipboard { get; }
|
||||
public string EditorCrop { get; }
|
||||
public string EditorCursortool { get; }
|
||||
public string EditorCuttoclipboard { get; }
|
||||
public string EditorDeleteelement { get; }
|
||||
public string EditorDownonelevel { get; }
|
||||
public string EditorDowntobottom { get; }
|
||||
public string EditorDrawarrow { get; }
|
||||
public string EditorDrawellipse { get; }
|
||||
public string EditorDrawfreehand { get; }
|
||||
public string EditorDrawhighlighter { get; }
|
||||
public string EditorDrawline { get; }
|
||||
public string EditorDrawrectangle { get; }
|
||||
public string EditorDrawtextbox { get; }
|
||||
public string EditorDuplicate { get; }
|
||||
public string EditorEdit { get; }
|
||||
public string EditorEffects { get; }
|
||||
public string EditorEmail { get; }
|
||||
public string EditorFile { get; }
|
||||
public string EditorFontsize { get; }
|
||||
public string EditorForecolor { get; }
|
||||
public string EditorGrayscale { get; }
|
||||
public string EditorHighlightArea { get; }
|
||||
public string EditorHighlightGrayscale { get; }
|
||||
public string EditorHighlightMagnify { get; }
|
||||
public string EditorHighlightMode { get; }
|
||||
public string EditorHighlightText { get; }
|
||||
public string EditorImagesaved { get; }
|
||||
public string EditorInsertwindow { get; }
|
||||
public string EditorItalic { get; }
|
||||
public string EditorLoadObjects { get; }
|
||||
public string EditorMagnificationFactor { get; }
|
||||
public string EditorMatchCaptureSize { get; }
|
||||
public string EditorObfuscate { get; }
|
||||
public string EditorObfuscateBlur { get; }
|
||||
public string EditorObfuscateMode { get; }
|
||||
public string EditorObfuscatePixelize { get; }
|
||||
public string EditorObject { get; }
|
||||
public string EditorOpendirinexplorer { get; }
|
||||
public string EditorPastefromclipboard { get; }
|
||||
public string EditorPixelSize { get; }
|
||||
public string EditorPreviewQuality { get; }
|
||||
public string EditorPrint { get; }
|
||||
public string EditorRedo { get; }
|
||||
public string EditorResetsize { get; }
|
||||
public string EditorResizePercent { get; }
|
||||
public string EditorResizePixel { get; }
|
||||
public string EditorSave { get; }
|
||||
public string EditorSaveas { get; }
|
||||
public string EditorSaveObjects { get; }
|
||||
public string EditorSelectall { get; }
|
||||
public string EditorSenttoprinter { get; }
|
||||
public string EditorShadow { get; }
|
||||
public string EditorStoredtoclipboard { get; }
|
||||
public string EditorThickness { get; }
|
||||
public string EditorTitle { get; }
|
||||
public string EditorTornEdge { get; }
|
||||
public string EditorUndo { get; }
|
||||
public string EditorUponelevel { get; }
|
||||
public string EditorUptotop { get; }
|
||||
}
|
||||
}
|
|
@ -22,7 +22,6 @@ using Dapplo.Addons;
|
|||
using Dapplo.CaliburnMicro.Configuration;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.LegacyEditor.Configuration.Impl;
|
||||
using Greenshot.Addon.LegacyEditor.Controls;
|
||||
using Greenshot.Addon.LegacyEditor.Drawing;
|
||||
using Greenshot.Addon.LegacyEditor.Forms;
|
||||
|
@ -38,13 +37,13 @@ namespace Greenshot.Addon.LegacyEditor
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<EditorConfigurationImpl>()
|
||||
.Register(c => IniSection<IEditorConfiguration>.Create())
|
||||
.As<IEditorConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<EditorLanguageImpl>()
|
||||
.Register(c => Language<IEditorLanguage>.Create())
|
||||
.As<IEditorLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -107,12 +107,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.22.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,49 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Dapplo.Config.Ini;
|
||||
using Greenshot.Addon.Lutim.Entities;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Lutim.Configuration.Impl
|
||||
{
|
||||
internal class LutimConfigurationImpl : IniSectionBase<ILutimConfiguration>, ILutimConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
public string LutimUrl { get; set; }
|
||||
public bool CopyLinkToClipboard { get; set; }
|
||||
public IDictionary<string, string> LutimUploadHistory { get; set; }
|
||||
public IDictionary<string, LutimInfo> RuntimeLutimHistory { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Lutim.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements ILutimLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
public class LutimLanguageImpl : LanguageBase<ILutimLanguage>, ILutimLanguage
|
||||
{
|
||||
public string Cancel { get; }
|
||||
public string ClearQuestion { get; }
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string DeleteQuestion { get; }
|
||||
public string DeleteTitle { get; }
|
||||
public string History { get; }
|
||||
public string LabelClear { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string LabelUrl { get; }
|
||||
public string Ok { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
public string UsePageLink { get; }
|
||||
public string AnonymousAccess { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Lutim</RootNamespace>
|
||||
|
@ -23,11 +23,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0391" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0409" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Lutim.Configuration;
|
||||
using Greenshot.Addon.Lutim.Configuration.Impl;
|
||||
using Greenshot.Addon.Lutim.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Lutim
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<LutimConfigurationImpl>()
|
||||
.Register(c => IniSection<ILutimConfiguration>.Create())
|
||||
.As<ILutimConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<LutimLanguageImpl>()
|
||||
.Register(c => Language<ILutimLanguage>.Create())
|
||||
.As<ILutimLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using Dapplo.Config.Ini;
|
||||
using Greenshot.Addon.Office.OfficeInterop;
|
||||
using Microsoft.Office.Interop.PowerPoint;
|
||||
|
||||
namespace Greenshot.Addon.Office.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IOfficeConfiguration and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
internal class OfficeConfigurationImpl : IniSectionBase<IOfficeConfiguration>, IOfficeConfiguration
|
||||
{
|
||||
public EmailFormat OutlookEmailFormat { get; set; }
|
||||
public string EmailSubjectPattern { get; set; }
|
||||
public string EmailTo { get; set; }
|
||||
public string EmailCC { get; set; }
|
||||
public string EmailBCC { get; set; }
|
||||
public bool OutlookAllowExportInMeetings { get; set; }
|
||||
public bool WordLockAspectRatio { get; set; }
|
||||
public bool PowerpointLockAspectRatio { get; set; }
|
||||
public PpSlideLayout PowerpointSlideLayout { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Office.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IOfficeLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
public class OfficeLanguageImpl : LanguageBase<IOfficeLanguage>, IOfficeLanguage
|
||||
{
|
||||
public string SettingsTitle { get; }
|
||||
public string WordLockaspect { get; }
|
||||
public string OutlookAllowmeetings { get; }
|
||||
public string OutlookSubjectPattern { get; }
|
||||
public string OutlookEmailFormat { get; }
|
||||
public string OutlookEmailIncludeSignature { get; }
|
||||
public string OutlookEmailTo { get; }
|
||||
public string OutlookEmailCc { get; }
|
||||
public string OutlookEmailBcc { get; }
|
||||
public string PowerpointSlideLayout { get; }
|
||||
public string PowerpointLockaspect { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Office</RootNamespace>
|
||||
|
@ -18,7 +18,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.22.0" />
|
||||
<PackageReference Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.Office.Interop.Excel" Version="15.0.4795.1000" />
|
||||
<PackageReference Include="Microsoft.Office.Interop.Outlook" Version="15.0.4797.1003" />
|
||||
|
@ -28,9 +27,5 @@
|
|||
<PackageReference Include="Unofficial.Microsoft.mshtml" Version="7.0.3300">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -24,7 +24,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Office.Configuration;
|
||||
using Greenshot.Addon.Office.Configuration.Impl;
|
||||
using Greenshot.Addon.Office.Destinations;
|
||||
using Greenshot.Addon.Office.OfficeExport;
|
||||
using Greenshot.Addon.Office.ViewModels;
|
||||
|
@ -117,14 +116,14 @@ namespace Greenshot.Addon.Office
|
|||
if (hasDestination)
|
||||
{
|
||||
builder
|
||||
.RegisterType<OfficeConfigurationImpl>()
|
||||
.Register(c => IniSection<IOfficeConfiguration>.Create())
|
||||
.As<IOfficeConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
|
||||
builder
|
||||
.RegisterType<OfficeLanguageImpl>()
|
||||
.Register(c => Language<IOfficeLanguage>.Create())
|
||||
.As<IOfficeLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.OneDrive.Configuration.Impl
|
||||
{
|
||||
internal class OneDriveConfigurationImpl : IniSectionBase<IOneDriveConfiguration>, IOneDriveConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2AccessToken { get; set; }
|
||||
|
||||
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuth2RefreshToken { get; set; }
|
||||
|
||||
public bool AfterUploadLinkToClipBoard { get; set; }
|
||||
public OneDriveLinkType LinkType { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.OneDrive.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IOneDriveLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
public class OneDriveLanguageImpl : LanguageBase<IOneDriveLanguage>, IOneDriveLanguage
|
||||
{
|
||||
public string CommunicationWait { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string LabelLinkType { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UsePageLink { get; }
|
||||
public string ResetCredentialsButton { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.OneDrive</RootNamespace>
|
||||
|
@ -21,12 +21,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.OneDrive.Configuration;
|
||||
using Greenshot.Addon.OneDrive.Configuration.Impl;
|
||||
using Greenshot.Addon.OneDrive.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.OneDrive
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<OneDriveConfigurationImpl>()
|
||||
.Register(c => IniSection<IOneDriveConfiguration>.Create())
|
||||
.As<IOneDriveConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<OneDriveLanguageImpl>()
|
||||
.Register(c => Language<IOneDriveLanguage>.Create())
|
||||
.As<IOneDriveLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -25,12 +25,12 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Autofac.Features.OwnedInstances;
|
||||
using Caliburn.Micro;
|
||||
using Dapplo.Addons;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Dapplo.HttpExtensions.JsonNet;
|
||||
using Dapplo.HttpExtensions.OAuth;
|
||||
using Dapplo.Log;
|
||||
using Dapplo.Utils;
|
||||
using Dapplo.Windows.Clipboard;
|
||||
using Greenshot.Addon.OneDrive.Configuration;
|
||||
using Greenshot.Addon.OneDrive.Entities;
|
||||
|
@ -224,7 +224,7 @@ namespace Greenshot.Addon.OneDrive
|
|||
var localBehaviour = _oneDriveHttpBehaviour.ShallowClone();
|
||||
if (progress != null)
|
||||
{
|
||||
localBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100)), token); };
|
||||
localBehaviour.UploadProgress = percent => { Execute.OnUIThread(() => progress.Report((int)(percent * 100))); };
|
||||
}
|
||||
var oauthHttpBehaviour = OAuth2HttpBehaviourFactory.Create(oAuth2Settings, localBehaviour);
|
||||
using (var imageStream = new MemoryStream())
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.ComponentModel;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Ini.Converters;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Photobucket.Configuration.Impl
|
||||
{
|
||||
internal class PhotobucketConfigurationImpl : IniSectionBase<IPhotobucketConfiguration>, IPhotobucketConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuthToken { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuthTokenSecret { get; set; }
|
||||
|
||||
[TypeConverter(typeof(StringEncryptionTypeConverter))]
|
||||
public string OAuthTokenVerifier { get; set; }
|
||||
|
||||
public bool UsePageLink { get; set; }
|
||||
public string SubDomain { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Album { get; set; }
|
||||
public int Credits { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Photobucket.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IPhotobucketLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
#pragma warning disable CS1591
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
public class PhotobucketLanguageImpl : LanguageBase<IPhotobucketLanguage>, IPhotobucketLanguage
|
||||
{
|
||||
public string CommunicationWait { get; }
|
||||
public string Configure { get; }
|
||||
public string LabelClear { get; }
|
||||
public string LabelUploadFormat { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UploadSuccess { get; }
|
||||
public string UsePageLink { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Photobucket</RootNamespace>
|
||||
|
@ -21,12 +21,4 @@
|
|||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Photobucket.Configuration;
|
||||
using Greenshot.Addon.Photobucket.Configuration.Impl;
|
||||
using Greenshot.Addon.Photobucket.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -35,13 +34,13 @@ namespace Greenshot.Addon.Photobucket
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<PhotobucketConfigurationImpl>()
|
||||
.Register(c => IniSection<IPhotobucketConfiguration>.Create())
|
||||
.As<IPhotobucketConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<PhotobucketLanguageImpl>()
|
||||
.Register(c => Language<IPhotobucketLanguage>.Create())
|
||||
.As<IPhotobucketLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -24,12 +24,12 @@ using System.Net.Http;
|
|||
using System.Net.Http.Headers;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Caliburn.Micro;
|
||||
using Dapplo.Addons;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Dapplo.HttpExtensions.Extensions;
|
||||
using Dapplo.HttpExtensions.OAuth;
|
||||
using Dapplo.Log;
|
||||
using Dapplo.Utils;
|
||||
using Greenshot.Addon.Photobucket.Configuration;
|
||||
using Greenshot.Addons;
|
||||
using Greenshot.Addons.Components;
|
||||
|
@ -265,7 +265,7 @@ namespace Greenshot.Addon.Photobucket
|
|||
// Use UploadProgress
|
||||
if (progress != null)
|
||||
{
|
||||
oAuthHttpBehaviour.UploadProgress = percent => { UiContext.RunOn(() => progress.Report((int)(percent * 100)), token); };
|
||||
oAuthHttpBehaviour.UploadProgress = percent => { Execute.OnUIThread(() => progress.Report((int)(percent * 100))); };
|
||||
}
|
||||
_oAuthHttpBehaviour.MakeCurrent();
|
||||
if (_photobucketConfiguration.Username == null || _photobucketConfiguration.SubDomain == null)
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using Dapplo.Config.Ini;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addon.Tfs.Configuration.Impl
|
||||
{
|
||||
internal class TfsConfigurationImpl : IniSectionBase<ITfsConfiguration>, ITfsConfiguration
|
||||
{
|
||||
public string OutputFilePath { get; set; }
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
public bool UseOwnSettings { get; set; }
|
||||
|
||||
public bool AfterUploadLinkToClipBoard { get; set; }
|
||||
public Uri TfsUri { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addon.Tfs.Configuration.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements ITfsLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
public class TfsLanguageImpl : LanguageBase<ITfsLanguage>, ITfsLanguage
|
||||
{
|
||||
public string CommunicationWait { get; }
|
||||
public string LabelUrl { get; }
|
||||
public string LabelApiKey { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string UploadFailure { get; }
|
||||
public string UploadMenuItem { get; }
|
||||
public string UsePageLink { get; }
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<AutoProperties />
|
||||
</Weavers>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AutoProperties" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Greenshot.Addon.Tfs</RootNamespace>
|
||||
|
@ -22,11 +22,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoProperties.Fody" Version="1.21.0" />
|
||||
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0391" />
|
||||
<PackageReference Include="Fody" Version="4.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0409" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addon.Tfs.Configuration;
|
||||
using Greenshot.Addon.Tfs.Configuration.Impl;
|
||||
using Greenshot.Addon.Tfs.ViewModels;
|
||||
using Greenshot.Addons.Components;
|
||||
|
||||
|
@ -36,18 +35,17 @@ namespace Greenshot.Addon.Tfs
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<TfsConfigurationImpl>()
|
||||
.Register(c => IniSection<ITfsConfiguration>.Create())
|
||||
.As<ITfsConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
||||
builder
|
||||
.RegisterType<TfsLanguageImpl>()
|
||||
.Register(c => Language<ITfsLanguage>.Create())
|
||||
.As<ITfsLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance();
|
||||
|
||||
|
||||
builder
|
||||
.RegisterType<TfsDestination>()
|
||||
.As<IDestination>()
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace Greenshot.Addon.Tfs.ViewModels
|
|||
/// <inheritdoc />
|
||||
protected override void OnDeactivate(bool close)
|
||||
{
|
||||
var ignoreTask = TfsClient.UpdateWorkItems();
|
||||
_ = TfsClient.UpdateWorkItems();
|
||||
_disposables.Dispose();
|
||||
base.OnDeactivate(close);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ using Dapplo.CaliburnMicro.Configuration;
|
|||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Config.Language;
|
||||
using Greenshot.Addons.Components;
|
||||
using Greenshot.Addons.Config.Impl;
|
||||
using Greenshot.Addons.Controls;
|
||||
using Greenshot.Addons.Core;
|
||||
using Greenshot.Addons.Resources;
|
||||
|
@ -40,7 +39,15 @@ namespace Greenshot.Addons
|
|||
protected override void Load(ContainerBuilder builder)
|
||||
{
|
||||
builder
|
||||
.RegisterType<CoreConfigurationImpl>()
|
||||
.Register(c =>
|
||||
{
|
||||
var coreConfiguration = IniSection<ICoreConfiguration>.Create();
|
||||
coreConfiguration.RegisterAfterLoad(iniSection =>
|
||||
{
|
||||
coreConfiguration.AfterLoad();
|
||||
});
|
||||
return coreConfiguration;
|
||||
})
|
||||
.As<ICoreConfiguration>()
|
||||
.As<IUiConfiguration>()
|
||||
.As<IIniSection>()
|
||||
|
@ -57,7 +64,7 @@ namespace Greenshot.Addons
|
|||
});
|
||||
|
||||
builder
|
||||
.RegisterType<GreenshotLanguageImpl>()
|
||||
.Register(c => Language<IGreenshotLanguage>.Create())
|
||||
.As<IGreenshotLanguage>()
|
||||
.As<ILanguage>()
|
||||
.SingleInstance()
|
||||
|
@ -68,7 +75,7 @@ namespace Greenshot.Addons
|
|||
});
|
||||
|
||||
builder
|
||||
.RegisterType<HttpConfigurationImpl>()
|
||||
.Register(c => IniSection<IHttpConfiguration>.Create())
|
||||
.As<IHttpConfiguration>()
|
||||
.As<IIniSection>()
|
||||
.SingleInstance();
|
||||
|
|
|
@ -1,332 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.Windows.Common.Structs;
|
||||
using Dapplo.Windows.User32.Structs;
|
||||
using Greenshot.Addons.Core;
|
||||
using Greenshot.Addons.Core.Enums;
|
||||
using Greenshot.Core.Enums;
|
||||
|
||||
namespace Greenshot.Addons.Config.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// Implementation of the ICoreConfiguration
|
||||
/// </summary>
|
||||
public class CoreConfigurationImpl : IniSectionBase<ICoreConfiguration>, ICoreConfiguration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void AfterLoad()
|
||||
{
|
||||
CoreConfigurationExtensions.AfterLoad(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string OutputFilePath { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputFileAllowOverwrite { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string OutputFileFilenamePattern { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public OutputFormats OutputFileFormat { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputFileReduceColors { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputFileAutoReduceColors { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int OutputFileReduceColorsTo { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int OutputFileJpegQuality { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputFilePromptQuality { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public uint OutputFileIncrementingNumber { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string OptimizePNGCommand { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string OptimizePNGCommandArguments { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public NativeSize Win10BorderCrop { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool CaptureMousepointer { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool CaptureWindowsInteractive { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int CaptureDelay { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ScreenCaptureMode ScreenCaptureMode { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int ScreenToCapture { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public WindowCaptureModes WindowCaptureMode { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public Color DWMBackgroundColor { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> NoGDICaptureForProduct { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> NoDWMCaptureForProduct { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool WindowCaptureRemoveCorners { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<int> WindowCornerCutShape { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Language { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string RegionHotkey { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string WindowHotkey { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string FullscreenHotkey { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string LastregionHotkey { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string IEHotkey { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsFirstLaunch { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> OutputDestinations { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> PickerDestinations { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<ClipboardFormats> ClipboardFormats { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool WindowCaptureAllChildLocations { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool PlayCameraSound { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool ShowTrayNotification { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputFileCopyPathToClipboard { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string OutputFileAsFullpath { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintPromptOptions { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintAllowRotate { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintAllowEnlarge { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintAllowShrink { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintCenter { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintInverted { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintGrayscale { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintMonochrome { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public byte OutputPrintMonochromeThreshold { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OutputPrintFooter { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string OutputPrintFooterPattern { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string NotificationSound { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool UseProxy { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IECapture { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IEFieldCapture { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> WindowClassesToCheckForIE { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int AutoCropDifference { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> IncludePlugins { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> ExcludePlugins { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> ExcludeDestinations { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool CheckForUpdates { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int UpdateCheckInterval { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateTime LastUpdateCheck { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool DisableSettings { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool DisableQuickSettings { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HideTrayicon { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HideExpertSettings { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool ThumnailPreview { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool OptimizeForRDP { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool DisableRDPOptimizing { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool MinimizeWorkingSetSize { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool CheckForUnstable { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> ActiveTitleFixes { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IDictionary<string, string> TitleFixMatcher { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IDictionary<string, string> TitleFixReplacer { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IList<string> ExperimentalFeatures { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool EnableSpecialDIBClipboardReader { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ClickActions LeftClickAction { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ClickActions DoubleClickAction { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool ZoomerEnabled { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public float ZoomerOpacity { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int MaxMenuItemLength { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string MailApiTo { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string MailApiCC { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string MailApiBCC { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string LastSaveWithVersion { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool ProcessEXIFOrientation { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public NativeRect LastCapturedRegion { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public NativeSize IconSize { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int WebRequestTimeout { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public int WebRequestReadWriteTimeout { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsScrollingCaptureEnabled { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsPortable { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public ISet<string> Permissions { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public WindowStartupLocation DefaultWindowStartupLocation { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool AreWindowLocationsStored { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IDictionary<string, WindowPlacement> WindowLocations { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,172 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Dapplo.Config.Language;
|
||||
|
||||
namespace Greenshot.Addons.Config.Impl
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements IGreenshotLanguage and takes care of storing, all setters are replaced via AutoProperties.Fody
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
|
||||
#pragma warning disable CS1591
|
||||
internal class GreenshotLanguageImpl : LanguageBase<IGreenshotLanguage>, IGreenshotLanguage
|
||||
{
|
||||
public string Cancel { get; }
|
||||
public string Ok { get; }
|
||||
|
||||
public string None { get; }
|
||||
public string AboutBugs { get; }
|
||||
public string AboutDonations { get; }
|
||||
public string AboutHost { get; }
|
||||
public string AboutIcons { get; }
|
||||
public string AboutLicense { get; }
|
||||
public string AboutTitle { get; }
|
||||
public string AboutTranslation { get; }
|
||||
public string ApplicationTitle { get; }
|
||||
public string BugreportCancel { get; }
|
||||
public string BugreportInfo { get; }
|
||||
public string BugreportTitle { get; }
|
||||
public string ClipboardError { get; }
|
||||
public string ClipboardInuse { get; }
|
||||
public string Close { get; }
|
||||
public string ColorpickerAlpha { get; }
|
||||
public string ColorpickerApply { get; }
|
||||
public string ColorpickerBlue { get; }
|
||||
public string ColorpickerGreen { get; }
|
||||
public string ColorpickerHtmlcolor { get; }
|
||||
public string ColorpickerRecentcolors { get; }
|
||||
public string ColorpickerRed { get; }
|
||||
public string ColorpickerTitle { get; }
|
||||
public string ColorpickerTransparent { get; }
|
||||
public string ConfigUnauthorizedaccessWrite { get; }
|
||||
public string ContextmenuAbout { get; }
|
||||
public string ContextmenuCapturearea { get; }
|
||||
public string ContextmenuCaptureclipboard { get; }
|
||||
public string ContextmenuCapturefullscreen { get; }
|
||||
public string ContextmenuCapturefullscreenAll { get; }
|
||||
public string ContextmenuCapturefullscreenLeft { get; }
|
||||
public string ContextmenuCapturefullscreenTop { get; }
|
||||
public string ContextmenuCapturefullscreenRight { get; }
|
||||
public string ContextmenuCapturefullscreenBottom { get; }
|
||||
public string ContextmenuCapturelastregion { get; }
|
||||
public string ContextmenuCapturewindow { get; }
|
||||
public string ContextmenuDonate { get; }
|
||||
public string ContextmenuExit { get; }
|
||||
public string ContextmenuHelp { get; }
|
||||
public string ContextmenuOpenfile { get; }
|
||||
public string ContextmenuQuicksettings { get; }
|
||||
public string ContextmenuSettings { get; }
|
||||
public string ContextmenuCaptureie { get; }
|
||||
public string ContextmenuOpenrecentcapture { get; }
|
||||
public string Error { get; }
|
||||
public string ErrorMultipleinstances { get; }
|
||||
public string ErrorNowriteaccess { get; }
|
||||
public string ErrorOpenfile { get; }
|
||||
public string ErrorOpenlink { get; }
|
||||
public string ErrorSave { get; }
|
||||
public string ErrorSaveInvalidChars { get; }
|
||||
public string HelpTitle { get; }
|
||||
public string JpegqualitydialogChoosejpegquality { get; }
|
||||
public string QualitydialogDontaskagain { get; }
|
||||
public string QualitydialogTitle { get; }
|
||||
public string SettingsReducecolors { get; }
|
||||
public string PrintError { get; }
|
||||
public string PrintoptionsAllowcenter { get; }
|
||||
public string PrintoptionsAllowenlarge { get; }
|
||||
public string PrintoptionsAllowrotate { get; }
|
||||
public string PrintoptionsAllowshrink { get; }
|
||||
public string PrintoptionsColors { get; }
|
||||
public string PrintoptionsDontaskagain { get; }
|
||||
public string PrintoptionsPagelayout { get; }
|
||||
public string PrintoptionsPrintcolor { get; }
|
||||
public string PrintoptionsPrintgrayscale { get; }
|
||||
public string PrintoptionsPrintmonochrome { get; }
|
||||
public string PrintoptionsTimestamp { get; }
|
||||
public string PrintoptionsInverted { get; }
|
||||
public string PrintoptionsTitle { get; }
|
||||
public string QuicksettingsDestinationFile { get; }
|
||||
public string SettingsAlwaysshowqualitydialog { get; }
|
||||
public string SettingsAlwaysshowprintoptionsdialog { get; }
|
||||
public string SettingsApplicationsettings { get; }
|
||||
public string SettingsAutostartshortcut { get; }
|
||||
public string SettingsCapture { get; }
|
||||
public string SettingsCaptureMousepointer { get; }
|
||||
public string SettingsCaptureWindowsInteractive { get; }
|
||||
public string SettingsCopypathtoclipboard { get; }
|
||||
public string SettingsDestination { get; }
|
||||
public string SettingsDestinationClipboard { get; }
|
||||
public string SettingsDestinationEditor { get; }
|
||||
public string SettingsDestinationEmail { get; }
|
||||
public string SettingsDestinationFile { get; }
|
||||
public string SettingsDestinationFileas { get; }
|
||||
public string SettingsDestinationPrinter { get; }
|
||||
public string SettingsDestinationPicker { get; }
|
||||
public string SettingsEditor { get; }
|
||||
public string SettingsFilenamepattern { get; }
|
||||
public string SettingsGeneral { get; }
|
||||
public string SettingsIecapture { get; }
|
||||
public string SettingsJpegquality { get; }
|
||||
public string SettingsQualitysettings { get; }
|
||||
public string SettingsLanguage { get; }
|
||||
public string SettingsMessageFilenamepattern { get; }
|
||||
public string SettingsOutput { get; }
|
||||
public string SettingsPlaysound { get; }
|
||||
public string SettingsPlugins { get; }
|
||||
public string SettingsPluginsName { get; }
|
||||
public string SettingsPluginsVersion { get; }
|
||||
public string SettingsPluginsCreatedby { get; }
|
||||
public string SettingsPluginsDllpath { get; }
|
||||
public string SettingsPreferredfilesettings { get; }
|
||||
public string SettingsPrimaryimageformat { get; }
|
||||
public string SettingsPrinter { get; }
|
||||
public string SettingsPrintoptions { get; }
|
||||
public string SettingsRegisterhotkeys { get; }
|
||||
public string SettingsShowflashlight { get; }
|
||||
public string SettingsStoragelocation { get; }
|
||||
public string SettingsTitle { get; }
|
||||
public string SettingsTooltipFilenamepattern { get; }
|
||||
public string SettingsTooltipLanguage { get; }
|
||||
public string SettingsTooltipPrimaryimageformat { get; }
|
||||
public string SettingsTooltipRegisterhotkeys { get; }
|
||||
public string SettingsTooltipStoragelocation { get; }
|
||||
public string SettingsVisualization { get; }
|
||||
public string SettingsShownotify { get; }
|
||||
public string SettingsWaittime { get; }
|
||||
public string SettingsZoom { get; }
|
||||
public string SettingsWindowscapture { get; }
|
||||
public string SettingsWindowCaptureMode { get; }
|
||||
public string SettingsScreenCaptureMode { get; }
|
||||
public string SettingsNetwork { get; }
|
||||
public string SettingsCheckperiod { get; }
|
||||
public string SettingsUsedefaultproxy { get; }
|
||||
public string TooltipFirststart { get; }
|
||||
public string Warning { get; }
|
||||
public string WarningHotkeys { get; }
|
||||
public string Hotkeys { get; }
|
||||
public string WaitIeCapture { get; }
|
||||
public string UpdateFound { get; }
|
||||
public string ExportedTo { get; }
|
||||
public string LatestVersion { get; }
|
||||
public string CurrentVersion { get; }
|
||||
public string Expert { get; }
|
||||
public string DestinationExportFailed { get; }
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
// Greenshot - a free and open source screenshot tool
|
||||
// Copyright (C) 2007-2019 Thomas Braun, Jens Klingen, Robin Krom
|
||||
//
|
||||
// For more information see: http://getgreenshot.org/
|
||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Cache;
|
||||
using System.Net.Http;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Security.Principal;
|
||||
using Dapplo.Config.Ini;
|
||||
using Dapplo.HttpExtensions;
|
||||
using Greenshot.Addons.Core;
|
||||
|
||||
namespace Greenshot.Addons.Config.Impl
|
||||
{
|
||||
internal class HttpConfigurationImpl : IniSectionBase<IHttpConfiguration>, IHttpConfiguration
|
||||
{
|
||||
public bool AllowAutoRedirect { get; set; }
|
||||
public ICredentials Credentials { get; set; }
|
||||
public ClientCertificateOption ClientCertificateOptions { get; set; }
|
||||
public DecompressionMethods DefaultDecompressionMethods { get; set; }
|
||||
public string DefaultUserAgent { get; set; }
|
||||
public bool Expect100Continue { get; set; }
|
||||
public int MaxAutomaticRedirections { get; set; }
|
||||
public long MaxResponseContentBufferSize { get; set; }
|
||||
public bool PreAuthenticate { get; set; }
|
||||
public TimeSpan RequestTimeout { get; set; }
|
||||
public bool UseCookies { get; set; }
|
||||
public bool UseDefaultCredentials { get; set; }
|
||||
public AuthenticationLevel AuthenticationLevel { get; set; }
|
||||
public X509CertificateCollection ClientCertificates { get; set; }
|
||||
public int MaxConnectionsPerServer { get; set; }
|
||||
public Uri ProxyUri { get; set; }
|
||||
public string[] ProxyBypassList { get; set; }
|
||||
public bool ProxyBypassOnLocal { get; set; }
|
||||
public ICredentials ProxyCredentials { get; set; }
|
||||
public long MaxRequestContentBufferSize { get; set; }
|
||||
public int MaxResponseHeadersLength { get; set; }
|
||||
public bool UseProxy { get; set; }
|
||||
public bool IgnoreSslCertificateErrors { get; set; }
|
||||
public bool UseDefaultCredentialsForProxy { get; set; }
|
||||
public bool UseDefaultProxy { get; set; }
|
||||
public TimeSpan ContinueTimeout { get; set; }
|
||||
public bool AllowPipelining { get; set; }
|
||||
|
||||
public TokenImpersonationLevel ImpersonationLevel { get; set; }
|
||||
public RequestCacheLevel RequestCacheLevel { get; set; }
|
||||
public int ReadWriteTimeout { get; set; }
|
||||
|
||||
IHttpSettings IHttpSettings.ShallowClone()
|
||||
{
|
||||
return ShallowClone() as IHttpSettings;
|
||||
}
|
||||
}
|
||||
}
|
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