mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 22:34:27 -07:00
Made the other projects, except Dapplo.Addons.Win10, available and they compile. The Addons are not tested yet.
This commit is contained in:
parent
384749ffd6
commit
d72ee8c943
141 changed files with 2164 additions and 2453 deletions
|
@ -24,8 +24,7 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -37,7 +36,7 @@ namespace Greenshot.Addon.Confluence
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Confluence")]
|
[IniSection("Confluence")]
|
||||||
[Description("Greenshot Confluence Plugin configuration")]
|
[Description("Greenshot Confluence Plugin configuration")]
|
||||||
public interface IConfluenceConfiguration : IIniSection, ITransactionalProperties, INotifyPropertyChanged
|
public interface IConfluenceConfiguration : IIniSection
|
||||||
{
|
{
|
||||||
[Description("Url to Confluence system, including wsdl.")]
|
[Description("Url to Confluence system, including wsdl.")]
|
||||||
[DefaultValue("https://confluence")]
|
[DefaultValue("https://confluence")]
|
|
@ -22,12 +22,12 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Addon.Confluence
|
namespace Greenshot.Addon.Confluence
|
||||||
{
|
{
|
||||||
[Language("Confluence")]
|
[Language("Confluence")]
|
||||||
public interface IConfluenceLanguage : ILanguage, INotifyPropertyChanged
|
public interface IConfluenceLanguage : ILanguage
|
||||||
{
|
{
|
||||||
string PluginSettings { get; }
|
string PluginSettings { get; }
|
||||||
string LoginError { get; }
|
string LoginError { get; }
|
|
@ -0,0 +1,46 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Confluence.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class ConfluenceConfigurationImpl : IniSectionBase<IConfluenceConfiguration>, IConfluenceConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IConfluenceConfiguration
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Confluence.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class ConfluenceLanguageImpl : LanguageBase<IConfluenceLanguage>, IConfluenceLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of IConfluenceLanguage
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,8 +24,9 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.Confluence.Configuration.Impl;
|
||||||
using Greenshot.Addon.Confluence.ViewModels;
|
using Greenshot.Addon.Confluence.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,19 +38,22 @@ namespace Greenshot.Addon.Confluence
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IConfluenceConfiguration>())
|
.RegisterType<ConfluenceConfigurationImpl>()
|
||||||
.As<IConfluenceConfiguration>()
|
.As<IConfluenceConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IConfluenceLanguage>())
|
.RegisterType<ConfluenceLanguageImpl>()
|
||||||
.As<IConfluenceLanguage>()
|
.As<IConfluenceLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.RegisterType<ConfluenceDestination>()
|
.RegisterType<ConfluenceDestination>()
|
||||||
.As<IDestination>()
|
.As<IDestination>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.RegisterType<ConfluenceConfigViewModel>()
|
.RegisterType<ConfluenceConfigViewModel>()
|
||||||
.As<IConfigScreen>()
|
.As<IConfigScreen>()
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
Dapplo.HttpExtensions.JsonSimple
|
Dapplo.HttpExtensions.JsonSimple
|
||||||
</IncludeAssemblies>
|
</IncludeAssemblies>
|
||||||
</Costura>
|
</Costura>
|
||||||
|
<AutoProperties />
|
||||||
</Weavers>
|
</Weavers>
|
|
@ -1,29 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{C3052651-598A-44E2-AAB3-2E41311D50F9}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.Confluence</RootNamespace>
|
<RootNamespace>Greenshot.Addon.Confluence</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.Confluence</AssemblyName>
|
<AssemblyName>Greenshot.Addon.Confluence</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -31,11 +24,8 @@
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Data" />
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.EnterpriseServices" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
<Reference Include="System.Runtime.Caching" />
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
@ -46,93 +36,34 @@
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xaml" />
|
<Reference Include="System.Xaml" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq">
|
<Reference Include="System.Xml.Linq" />
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="UIAutomationClient">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="UIAutomationTypes">
|
|
||||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="UIAutomationClient" />
|
||||||
|
<Reference Include="UIAutomationTypes" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ConfluenceAddonModule.cs" />
|
<Resource Include="Images\Confluence.ico" />
|
||||||
<Compile Include="IConfluenceLanguage.cs" />
|
|
||||||
<Compile Include="IConfluenceConfiguration.cs" />
|
|
||||||
<Compile Include="ConfluenceDestination.cs" />
|
|
||||||
<Compile Include="ConfluenceUtils.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="ViewModels\ConfluenceConfigViewModel.cs" />
|
|
||||||
<Resource Include="Images\Confluence.ico" />
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Languages\language_confluence-de-DE.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_confluence-en-US.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_confluence-nl-NL.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="Views\ConfluenceConfigView.xaml">
|
<ProjectReference Include="..\Greenshot.Addon.InternetExplorer\Greenshot.Addon.InternetExplorer.csproj" />
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<SubType>Designer</SubType>
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
</Page>
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addon.InternetExplorer\Greenshot.Addon.InternetExplorer.csproj">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Project>{4cca2717-b8a4-44f7-965b-5687107e4921}</Project>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<Name>Greenshot.Addon.InternetExplorer</Name>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.11" />
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.11" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<Name>Greenshot.Core</Name>
|
<PackageReference Include="Dapplo.Confluence" Version="0.8.12" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
|
||||||
<Name>Greenshot.Addons</Name>
|
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="FodyWeavers.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Confluence">
|
|
||||||
<Version>0.7.19</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonSimple">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
</Project>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.Confluence")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("Confluence Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -12,11 +12,11 @@
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net471' ">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
|
|
@ -26,7 +26,7 @@ using System.IO;
|
||||||
using Greenshot.Addon.ExternalCommand.Entities;
|
using Greenshot.Addon.ExternalCommand.Entities;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
namespace Greenshot.Addon.ExternalCommand
|
namespace Greenshot.Addon.ExternalCommand.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper extensions for the external command configuration
|
/// Helper extensions for the external command configuration
|
|
@ -25,21 +25,20 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addon.ExternalCommand.Entities;
|
using Greenshot.Addon.ExternalCommand.Entities;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.ExternalCommand
|
namespace Greenshot.Addon.ExternalCommand.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of FlickrConfiguration.
|
/// Description of FlickrConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("ExternalCommand")]
|
[IniSection("ExternalCommand")]
|
||||||
[Description("Greenshot ExternalCommand Plugin configuration")]
|
[Description("Greenshot ExternalCommand Plugin configuration")]
|
||||||
public interface IExternalCommandConfiguration : IIniSection, IDestinationFileConfiguration, ITransactionalProperties, INotifyPropertyChanged
|
public interface IExternalCommandConfiguration : IIniSection, IDestinationFileConfiguration
|
||||||
{
|
{
|
||||||
[Description("The commands that are available.")]
|
[Description("The commands that are available.")]
|
||||||
IList<string> Commands { get; set; }
|
IList<string> Commands { get; set; }
|
|
@ -22,9 +22,9 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Addon.ExternalCommand
|
namespace Greenshot.Addon.ExternalCommand.Configuration
|
||||||
{
|
{
|
||||||
[Language("ExternalCommand")]
|
[Language("ExternalCommand")]
|
||||||
public interface IExternalCommandLanguage : ILanguage, INotifyPropertyChanged
|
public interface IExternalCommandLanguage : ILanguage, INotifyPropertyChanged
|
|
@ -0,0 +1,77 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Entities;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class ExternalCommandConfigurationImpl : IniSectionBase<IExternalCommandConfiguration>, IExternalCommandConfiguration
|
||||||
|
{
|
||||||
|
#region Overrides of IniSectionBase<IExternalCommandConfiguration>
|
||||||
|
|
||||||
|
public override void AfterLoad()
|
||||||
|
{
|
||||||
|
ExternalCommandConfigurationExtensions.AfterLoad(this);
|
||||||
|
base.AfterLoad();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IFileConfiguration
|
||||||
|
|
||||||
|
public string OutputFilePath { get; set; }
|
||||||
|
public bool OutputFileAllowOverwrite { get; set; }
|
||||||
|
public string OutputFileFilenamePattern { get; set; }
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IDestinationFileConfiguration
|
||||||
|
|
||||||
|
public bool UseOwnSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IExternalCommandConfiguration
|
||||||
|
|
||||||
|
public IList<string> Commands { get; set; }
|
||||||
|
public IDictionary<string, string> Commandline { get; set; }
|
||||||
|
public IDictionary<string, string> Argument { get; set; }
|
||||||
|
public IDictionary<string, bool> RunInbackground { get; set; }
|
||||||
|
public IDictionary<string, CommandBehaviors> Behaviors { get; set; }
|
||||||
|
public IList<string> DeletedBuildInCommands { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class ExternalCommandLanguageImpl : LanguageBase<IExternalCommandLanguage>, IExternalCommandLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration.Impl;
|
||||||
using Greenshot.Addon.ExternalCommand.ViewModels;
|
using Greenshot.Addon.ExternalCommand.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,13 +39,15 @@ namespace Greenshot.Addon.ExternalCommand
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IExternalCommandConfiguration>())
|
.RegisterType<ExternalCommandConfigurationImpl>()
|
||||||
.As<IExternalCommandConfiguration>()
|
.As<IExternalCommandConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IExternalCommandLanguage>())
|
.RegisterType<ExternalCommandLanguageImpl>()
|
||||||
.As<IExternalCommandLanguage>()
|
.As<IExternalCommandLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
|
@ -60,20 +64,7 @@ namespace Greenshot.Addon.ExternalCommand
|
||||||
.AsSelf()
|
.AsSelf()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder.RegisterType<SetupConfig>()
|
|
||||||
.As<IStartable>()
|
|
||||||
.SingleInstance();
|
|
||||||
|
|
||||||
base.Load(builder);
|
base.Load(builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
private class SetupConfig : IStartable
|
|
||||||
{
|
|
||||||
public void Start()
|
|
||||||
{
|
|
||||||
IniConfig.Current.AfterLoad<IExternalCommandConfiguration>(externalCommandConfiguration => externalCommandConfiguration.AfterLoad());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CliWrap;
|
using CliWrap;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||||
using Greenshot.Addon.ExternalCommand.Entities;
|
using Greenshot.Addon.ExternalCommand.Entities;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
@ -83,31 +84,30 @@ namespace Greenshot.Addon.ExternalCommand
|
||||||
|
|
||||||
var fullPath = captureDetails.Filename ?? surface.SaveNamedTmpFile(CoreConfiguration, _externalCommandConfiguration);
|
var fullPath = captureDetails.Filename ?? surface.SaveNamedTmpFile(CoreConfiguration, _externalCommandConfiguration);
|
||||||
|
|
||||||
using (var cli = new Cli(_externalCommandDefinition.Command))
|
var cli = new Cli(_externalCommandDefinition.Command);
|
||||||
|
var arguments = string.Format(_externalCommandDefinition.Arguments, fullPath);
|
||||||
|
// Execute
|
||||||
|
cli.SetArguments(arguments);
|
||||||
|
var output = await cli.ExecuteAsync().ConfigureAwait(true);
|
||||||
|
|
||||||
|
if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris))
|
||||||
{
|
{
|
||||||
var arguments = string.Format(_externalCommandDefinition.Arguments, fullPath);
|
var uriMatches = UriRegexp.Matches(output.StandardOutput);
|
||||||
// Execute
|
if (uriMatches.Count > 0)
|
||||||
var output = await cli.ExecuteAsync(arguments).ConfigureAwait(true);
|
|
||||||
|
|
||||||
if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris))
|
|
||||||
{
|
{
|
||||||
var uriMatches = UriRegexp.Matches(output.StandardOutput);
|
exportInformation.Uri = uriMatches[0].Groups[1].Value;
|
||||||
if (uriMatches.Count > 0)
|
|
||||||
{
|
|
||||||
exportInformation.Uri = uriMatches[0].Groups[1].Value;
|
|
||||||
|
|
||||||
using (var clipboardAccessToken = ClipboardNative.Access())
|
using (var clipboardAccessToken = ClipboardNative.Access())
|
||||||
{
|
{
|
||||||
clipboardAccessToken.ClearContents();
|
clipboardAccessToken.ClearContents();
|
||||||
clipboardAccessToken.SetAsUrl(exportInformation.Uri);
|
clipboardAccessToken.SetAsUrl(exportInformation.Uri);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit))
|
if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit))
|
||||||
{
|
{
|
||||||
File.Delete(fullPath);
|
File.Delete(fullPath);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_exportNotification.NotifyOfExport(this, exportInformation, surface);
|
_exportNotification.NotifyOfExport(this, exportInformation, surface);
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Linq;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro;
|
using Dapplo.CaliburnMicro;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
@ -41,7 +42,7 @@ namespace Greenshot.Addon.ExternalCommand
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Generate the external command destinations
|
/// Generate the external command destinations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Service(nameof(ExternalCommandDestinationProvider), nameof(CaliburnServices.IniSectionService))]
|
[Service(nameof(ExternalCommandDestinationProvider), nameof(CaliburnServices.ConfigurationService))]
|
||||||
public sealed class ExternalCommandDestinationProvider : IStartup, IDestinationProvider
|
public sealed class ExternalCommandDestinationProvider : IStartup, IDestinationProvider
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
|
|
4
src/Greenshot.Addon.ExternalCommand/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.ExternalCommand/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -1,42 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{47F23C86-604E-4CC3-8767-B3D4088F30BB}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.ExternalCommand</RootNamespace>
|
<RootNamespace>Greenshot.Addon.ExternalCommand</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.ExternalCommand</AssemblyName>
|
<AssemblyName>Greenshot.Addon.ExternalCommand</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -53,121 +33,22 @@
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Entities\CommandBehaviors.cs" />
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Compile Include="Entities\ExternalCommandDefinition.cs" />
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<Compile Include="ExternalCommandConfigurationExtensions.cs" />
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
<Compile Include="ExternalCommandDestination.cs" />
|
|
||||||
<Compile Include="ExternalCommandDestinationProvider.cs" />
|
|
||||||
<Compile Include="IExternalCommandLanguage.cs" />
|
|
||||||
<Compile Include="IconCache.cs" />
|
|
||||||
<Compile Include="ExternalCommandAddonModule.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="IExternalCommandConfiguration.cs" />
|
|
||||||
<Compile Include="ViewModels\ExternalCommandConfigViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\ExternalCommandDetailsViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\ExternalCommandMasterViewModel.cs" />
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Languages\language_externalcommandplugin-en-US.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<Name>Greenshot.Core</Name>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
<PackageReference Include="CliWrap" Version="2.1.0" />
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<Name>Greenshot.Gfx</Name>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</ProjectReference>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
|
||||||
<Name>Greenshot.Addons</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-cs-CZ.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-de-DE.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-fr-FR.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-id-ID.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-it-IT.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-kab-DZ.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-ko-KR.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-lv-LV.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-pl-PL.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-pt-PT.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-ru-RU.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-sk-SK.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-sr-RS.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-sv-SE.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-uk-UA.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-zh-CN.xml" />
|
|
||||||
<Content Include="Languages\language_externalcommandplugin-zh-TW.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="Views\ExternalCommandConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\ExternalCommandDetailsView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\ExternalCommandMasterView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CliWrap">
|
|
||||||
<Version>1.8.5</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
</Project>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\CliWrap.dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
|
|
||||||
<RegisterForComInterop>False</RegisterForComInterop>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<BaseAddress>4194304</BaseAddress>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
|
||||||
<RegisterForComInterop>False</RegisterForComInterop>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<BaseAddress>4194304</BaseAddress>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<Optimize>False</Optimize>
|
|
||||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
|
|
||||||
<DebugType>Full</DebugType>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
|
||||||
<DebugType>None</DebugType>
|
|
||||||
<DebugSymbols>false</DebugSymbols>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.ExternalCommand")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("External command Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -25,6 +25,7 @@ using System.Reactive.Disposables;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||||
using Greenshot.Addon.ExternalCommand.Entities;
|
using Greenshot.Addon.ExternalCommand.Entities;
|
||||||
|
|
||||||
namespace Greenshot.Addon.ExternalCommand.ViewModels
|
namespace Greenshot.Addon.ExternalCommand.ViewModels
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
|
using Greenshot.Addon.ExternalCommand.Configuration;
|
||||||
using Greenshot.Addon.ExternalCommand.Entities;
|
using Greenshot.Addon.ExternalCommand.Entities;
|
||||||
|
|
||||||
namespace Greenshot.Addon.ExternalCommand.ViewModels
|
namespace Greenshot.Addon.ExternalCommand.ViewModels
|
||||||
|
|
|
@ -25,14 +25,13 @@
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.HttpExtensions.OAuth;
|
using Dapplo.HttpExtensions.OAuth;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Flickr
|
namespace Greenshot.Addon.Flickr.Configuration
|
||||||
{
|
{
|
||||||
public enum SafetyLevel
|
public enum SafetyLevel
|
||||||
{
|
{
|
||||||
|
@ -46,7 +45,7 @@ namespace Greenshot.Addon.Flickr
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Flickr")]
|
[IniSection("Flickr")]
|
||||||
[Description("Greenshot Flickr Plugin configuration")]
|
[Description("Greenshot Flickr Plugin configuration")]
|
||||||
public interface IFlickrConfiguration : IIniSection, IDestinationFileConfiguration, INotifyPropertyChanged, ITransactionalProperties, IOAuth1Token
|
public interface IFlickrConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth1Token
|
||||||
{
|
{
|
||||||
[Description("IsPublic.")]
|
[Description("IsPublic.")]
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
|
@ -20,11 +20,11 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Flickr
|
namespace Greenshot.Addon.Flickr.Configuration
|
||||||
{
|
{
|
||||||
[Language("Flickr")]
|
[Language("Flickr")]
|
||||||
public interface IFlickrLanguage : ILanguage, INotifyPropertyChanged
|
public interface IFlickrLanguage : ILanguage, INotifyPropertyChanged
|
|
@ -0,0 +1,76 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Flickr.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class FlickrConfigurationImpl : IniSectionBase<IFlickrConfiguration>, IFlickrConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IFileConfiguration
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IDestinationFileConfiguration
|
||||||
|
|
||||||
|
public bool UseOwnSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IOAuth1Token
|
||||||
|
|
||||||
|
public string OAuthToken { get; set; }
|
||||||
|
public string OAuthTokenSecret { get; set; }
|
||||||
|
public string OAuthTokenVerifier { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IFlickrConfiguration
|
||||||
|
|
||||||
|
public bool IsPublic { get; set; }
|
||||||
|
public bool IsFamily { get; set; }
|
||||||
|
public bool IsFriend { get; set; }
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Flickr.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class FlickrLanguageImpl : LanguageBase<IFlickrLanguage>, IFlickrLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.Flickr.Configuration;
|
||||||
|
using Greenshot.Addon.Flickr.Configuration.Impl;
|
||||||
using Greenshot.Addon.Flickr.ViewModels;
|
using Greenshot.Addon.Flickr.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,13 +39,15 @@ namespace Greenshot.Addon.Flickr
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IFlickrConfiguration>())
|
.RegisterType<FlickrConfigurationImpl>()
|
||||||
.As<IFlickrConfiguration>()
|
.As<IFlickrConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IFlickrLanguage>())
|
.RegisterType<FlickrLanguageImpl>()
|
||||||
.As<IFlickrLanguage>()
|
.As<IFlickrLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
|
|
|
@ -41,6 +41,7 @@ using Dapplo.HttpExtensions.Extensions;
|
||||||
using Dapplo.HttpExtensions.OAuth;
|
using Dapplo.HttpExtensions.OAuth;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
|
using Greenshot.Addon.Flickr.Configuration;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
using Greenshot.Addons.Controls;
|
using Greenshot.Addons.Controls;
|
||||||
|
|
4
src/Greenshot.Addon.Flickr/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.Flickr/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -1,42 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.Flickr</RootNamespace>
|
<RootNamespace>Greenshot.Addon.Flickr</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.Flickr</AssemblyName>
|
<AssemblyName>Greenshot.Addon.Flickr</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -57,85 +37,26 @@
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="FlickrAddonModule.cs" />
|
<EmbeddedResource Include="flickr.png" />
|
||||||
<Compile Include="FlickrDestination.cs" />
|
|
||||||
<Compile Include="IFlickrConfiguration.cs" />
|
|
||||||
<Compile Include="IFlickrLanguage.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="ViewModels\FlickrConfigViewModel.cs" />
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Languages\language_flickrplugin-en-US.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="flickr.png" />
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<Name>Greenshot.Addons</Name>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.11" />
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<Name>Greenshot.Core</Name>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</ProjectReference>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Languages\language_flickrplugin-cs-CZ.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-de-DE.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-fr-FR.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-id-ID.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-it-IT.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-ja-JP.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-kab-DZ.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-ko-KR.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-lv-LV.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-pl-PL.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-pt-PT.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-ru-RU.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-sr-Cyrl-RS.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-sv-SE.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-uk-UA.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-zh-CN.xml" />
|
|
||||||
<Resource Include="Languages\language_flickrplugin-zh-TW.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="Views\FlickrConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
</Project>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
<PreBuildEvent>
|
|
||||||
</PreBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.Flickr")]
|
|
||||||
[assembly: AssemblyDescription("A plugin to upload images to Flickr")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot & F. Noel")]
|
|
||||||
[assembly: AssemblyProduct("Flickr Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2012")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -25,6 +25,7 @@ using System.Collections.Generic;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
|
using Greenshot.Addon.Flickr.Configuration;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.Extensions;
|
using Greenshot.Addons.Extensions;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
|
|
@ -25,21 +25,20 @@
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.HttpExtensions.OAuth;
|
using Dapplo.HttpExtensions.OAuth;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.GooglePhotos
|
namespace Greenshot.Addon.GooglePhotos.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of GooglePhotosConfiguration.
|
/// Description of GooglePhotosConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("GooglePhotos")]
|
[IniSection("GooglePhotos")]
|
||||||
[Description("Greenshot Google Photos Plugin configuration")]
|
[Description("Greenshot Google Photos Plugin configuration")]
|
||||||
public interface IGooglePhotosConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token, ITransactionalProperties
|
public interface IGooglePhotosConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token
|
||||||
{
|
{
|
||||||
[Description("After upload send Google Photos link to clipboard.")]
|
[Description("After upload send Google Photos link to clipboard.")]
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
|
@ -1,7 +1,7 @@
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Addon.GooglePhotos
|
namespace Greenshot.Addon.GooglePhotos.Configuration
|
||||||
{
|
{
|
||||||
[Language("GooglePhotos")]
|
[Language("GooglePhotos")]
|
||||||
public interface IGooglePhotosLanguage : ILanguage, INotifyPropertyChanged
|
public interface IGooglePhotosLanguage : ILanguage, INotifyPropertyChanged
|
|
@ -0,0 +1,74 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class GooglePhotosConfigurationImpl : IniSectionBase<IGooglePhotosConfiguration>, IGooglePhotosConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IFileConfiguration
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IDestinationFileConfiguration
|
||||||
|
|
||||||
|
public bool UseOwnSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IOAuth2Token
|
||||||
|
|
||||||
|
public string OAuth2AccessToken { get; set; }
|
||||||
|
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||||
|
public string OAuth2RefreshToken { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IGooglePhotosConfiguration
|
||||||
|
|
||||||
|
public bool AfterUploadLinkToClipBoard { get; set; }
|
||||||
|
public bool AddFilename { get; set; }
|
||||||
|
public string UploadUser { get; set; }
|
||||||
|
public string UploadAlbum { get; set; }
|
||||||
|
public string ClientId { get; set; }
|
||||||
|
public string ClientSecret { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class GooglePhotosLanguageImpl : LanguageBase<IGooglePhotosLanguage>, IGooglePhotosLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
4
src/Greenshot.Addon.GooglePhotos/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.GooglePhotos/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.GooglePhotos.Configuration;
|
||||||
|
using Greenshot.Addon.GooglePhotos.Configuration.Impl;
|
||||||
using Greenshot.Addon.GooglePhotos.ViewModels;
|
using Greenshot.Addon.GooglePhotos.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,13 +39,15 @@ namespace Greenshot.Addon.GooglePhotos
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IGooglePhotosConfiguration>())
|
.RegisterType<GooglePhotosConfigurationImpl>()
|
||||||
.As<IGooglePhotosConfiguration>()
|
.As<IGooglePhotosConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IGooglePhotosLanguage>())
|
.RegisterType<GooglePhotosLanguageImpl>()
|
||||||
.As<IGooglePhotosLanguage>()
|
.As<IGooglePhotosLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
|
|
|
@ -39,6 +39,7 @@ using Dapplo.HttpExtensions.OAuth;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Utils;
|
using Dapplo.Utils;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
|
using Greenshot.Addon.GooglePhotos.Configuration;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
using Greenshot.Addons.Controls;
|
using Greenshot.Addons.Controls;
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{1893A2E4-A78A-4713-A8E7-E70058DABEE0}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.GooglePhotos</RootNamespace>
|
<RootNamespace>Greenshot.Addon.GooglePhotos</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.GooglePhotos</AssemblyName>
|
<AssemblyName>Greenshot.Addon.GooglePhotos</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -43,76 +37,26 @@
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<EmbeddedResource Include="GooglePhotos.png" />
|
||||||
<Compile Include="GooglePhotosAddonModule.cs" />
|
|
||||||
<Compile Include="IGooglePhotosLanguage.cs" />
|
|
||||||
<Compile Include="IGooglePhotosConfiguration.cs" />
|
|
||||||
<Compile Include="GooglePhotosDestination.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="ViewModels\GooglePhotosConfigViewModel.cs" />
|
|
||||||
<Content Include="Languages\language_googlephotosplugin-en-US.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-cs-CZ.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-de-DE.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-id-ID.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-kab-DZ.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-ko-KR.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-lv-LV.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-pl-PL.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-pt-PT.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-sv-SE.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-zh-TW.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-fr-FR.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-it-IT.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-ru-RU.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-uk-UA.xml" />
|
|
||||||
<None Include="Languages\language_googlephotosplugin-zh-CN.xml" />
|
|
||||||
<EmbeddedResource Include="GooglePhotos.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<Name>Greenshot.Addons</Name>
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
|
||||||
<Name>Greenshot.Core</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="Views\GooglePhotosConfigView.xaml">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<SubType>Designer</SubType>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</Page>
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.11" />
|
||||||
</ItemGroup>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<ItemGroup>
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<PackageReference Include="CommonServiceLocator">
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Version>2.0.4</Version>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
</Project>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
<PreBuildEvent>
|
|
||||||
</PreBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.GooglePhotos")]
|
|
||||||
[assembly: AssemblyDescription("A plugin to upload images to Google Photos")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot & F. Noel")]
|
|
||||||
[assembly: AssemblyProduct("GooglePhotos Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2012")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -24,6 +24,7 @@
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
|
using Greenshot.Addon.GooglePhotos.Configuration;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
|
||||||
|
|
|
@ -26,22 +26,21 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.HttpExtensions.OAuth;
|
using Dapplo.HttpExtensions.OAuth;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addon.Imgur.Entities;
|
using Greenshot.Addon.Imgur.Entities;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Imgur
|
namespace Greenshot.Addon.Imgur.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of ImgurConfiguration.
|
/// Description of ImgurConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Imgur")]
|
[IniSection("Imgur")]
|
||||||
[Description("Greenshot Imgur Plugin configuration")]
|
[Description("Greenshot Imgur Plugin configuration")]
|
||||||
public interface IImgurConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token, ITransactionalProperties, INotifyPropertyChanged
|
public interface IImgurConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token
|
||||||
{
|
{
|
||||||
[Description("Url to Imgur system.")]
|
[Description("Url to Imgur system.")]
|
||||||
[DefaultValue("https://api.imgur.com/3")]
|
[DefaultValue("https://api.imgur.com/3")]
|
|
@ -20,11 +20,11 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Imgur
|
namespace Greenshot.Addon.Imgur.Configuration
|
||||||
{
|
{
|
||||||
[Language("Imgur")]
|
[Language("Imgur")]
|
||||||
public interface IImgurLanguage : ILanguage, INotifyPropertyChanged
|
public interface IImgurLanguage : ILanguage, INotifyPropertyChanged
|
|
@ -0,0 +1,84 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Addon.Imgur.Entities;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Imgur.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class ImgurConfigurationImpl : IniSectionBase<IImgurConfiguration>, IImgurConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IFileConfiguration
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IDestinationFileConfiguration
|
||||||
|
|
||||||
|
public bool UseOwnSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IOAuth2Token
|
||||||
|
|
||||||
|
public string OAuth2AccessToken { get; set; }
|
||||||
|
public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
|
||||||
|
public string OAuth2RefreshToken { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IImgurConfiguration
|
||||||
|
|
||||||
|
public string ImgurApi3Url { get; set; }
|
||||||
|
public bool CopyLinkToClipboard { get; set; }
|
||||||
|
public bool UsePageLink { get; set; }
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Imgur.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class ImgurLanguageImpl : LanguageBase<IImgurLanguage>, IImgurLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
4
src/Greenshot.Addon.Imgur/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.Imgur/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -1,44 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.Imgur</RootNamespace>
|
<RootNamespace>Greenshot.Addon.Imgur</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.Imgur</AssemblyName>
|
<AssemblyName>Greenshot.Addon.Imgur</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -59,87 +37,28 @@
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Entities\ImgurData.cs" />
|
<EmbeddedResource Include="Imgur.png" />
|
||||||
<Compile Include="Entities\ImgurImage.cs" />
|
|
||||||
<Compile Include="ImgurAddonModule.cs" />
|
|
||||||
<Compile Include="IImgurLanguage.cs" />
|
|
||||||
<Compile Include="ImgurApi.cs" />
|
|
||||||
<Compile Include="ImgurDestination.cs" />
|
|
||||||
<Compile Include="IImgurConfiguration.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="ViewModels\ImgurHistoryViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\ImgurConfigViewModel.cs" />
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Languages\language_imgurplugin-de-DE.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_imgurplugin-en-US.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_imgurplugin-fr-FR.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_imgurplugin-nl-NL.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_imgurplugin-zh-CN.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<Name>Greenshot.Core</Name>
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
|
||||||
<Name>Greenshot.Addons</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="Views\ImgurHistoryView.xaml">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<SubType>Designer</SubType>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</Page>
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.11" />
|
||||||
<Page Include="Views\ImgurConfigView.xaml">
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.11" />
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<SubType>Designer</SubType>
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
</Page>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MahApps.Metro" Version="1.6.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
</Project>
|
||||||
<EmbeddedResource Include="Imgur.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="MahApps.Metro">
|
|
||||||
<Version>1.6.5</Version>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.Imgur.Configuration;
|
||||||
|
using Greenshot.Addon.Imgur.Configuration.Impl;
|
||||||
using Greenshot.Addon.Imgur.ViewModels;
|
using Greenshot.Addon.Imgur.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,13 +39,15 @@ namespace Greenshot.Addon.Imgur
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IImgurConfiguration>())
|
.RegisterType<ImgurConfigurationImpl>()
|
||||||
.As<IImgurConfiguration>()
|
.As<IImgurConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IImgurLanguage>())
|
.RegisterType<ImgurLanguageImpl>()
|
||||||
.As<IImgurLanguage>()
|
.As<IImgurLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
|
|
|
@ -37,6 +37,7 @@ using Dapplo.HttpExtensions.JsonNet;
|
||||||
using Dapplo.HttpExtensions.OAuth;
|
using Dapplo.HttpExtensions.OAuth;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Utils;
|
using Dapplo.Utils;
|
||||||
|
using Greenshot.Addon.Imgur.Configuration;
|
||||||
using Greenshot.Addon.Imgur.Entities;
|
using Greenshot.Addon.Imgur.Entities;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Extensions;
|
using Greenshot.Addons.Extensions;
|
||||||
|
|
|
@ -33,6 +33,7 @@ using Dapplo.Addons;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
using Dapplo.Windows.Extensions;
|
using Dapplo.Windows.Extensions;
|
||||||
|
using Greenshot.Addon.Imgur.Configuration;
|
||||||
using Greenshot.Addon.Imgur.Entities;
|
using Greenshot.Addon.Imgur.Entities;
|
||||||
using Greenshot.Addon.Imgur.ViewModels;
|
using Greenshot.Addon.Imgur.ViewModels;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.Imgur")]
|
|
||||||
[assembly: AssemblyDescription("A plugin to upload images to Imgur")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("Imgur Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -28,6 +28,7 @@ using Caliburn.Micro;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
using Dapplo.HttpExtensions.OAuth;
|
using Dapplo.HttpExtensions.OAuth;
|
||||||
|
using Greenshot.Addon.Imgur.Configuration;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ using Caliburn.Micro;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
|
using Greenshot.Addon.Imgur.Configuration;
|
||||||
using Greenshot.Addon.Imgur.Entities;
|
using Greenshot.Addon.Imgur.Entities;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Extensions;
|
using Greenshot.Addons.Extensions;
|
||||||
|
|
|
@ -24,20 +24,19 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Jira
|
namespace Greenshot.Addon.Jira.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of JiraConfiguration.
|
/// Description of JiraConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Jira")]
|
[IniSection("Jira")]
|
||||||
[Description("Greenshot Jira Plugin configuration")]
|
[Description("Greenshot Jira Plugin configuration")]
|
||||||
public interface IJiraConfiguration : IIniSection, IDestinationFileConfiguration, INotifyPropertyChanged, ITransactionalProperties
|
public interface IJiraConfiguration : IIniSection, IDestinationFileConfiguration
|
||||||
{
|
{
|
||||||
[Description("Base url to Jira system, without anything else")]
|
[Description("Base url to Jira system, without anything else")]
|
||||||
[DefaultValue("https://jira")]
|
[DefaultValue("https://jira")]
|
|
@ -20,11 +20,11 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Jira
|
namespace Greenshot.Addon.Jira.Configuration
|
||||||
{
|
{
|
||||||
[Language("Jira")]
|
[Language("Jira")]
|
||||||
public interface IJiraLanguage : ILanguage, INotifyPropertyChanged
|
public interface IJiraLanguage : ILanguage, INotifyPropertyChanged
|
|
@ -0,0 +1,62 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Jira.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class JiraConfigurationImpl : IniSectionBase<IJiraConfiguration>, IJiraConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IFileConfiguration
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IDestinationFileConfiguration
|
||||||
|
|
||||||
|
public bool UseOwnSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IJiraConfiguration
|
||||||
|
|
||||||
|
public string Url { get; set; }
|
||||||
|
public int Timeout { get; set; }
|
||||||
|
public int MaxEntries { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Jira.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class JiraLanguageImpl : LanguageBase<IJiraLanguage>, IJiraLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,4 +5,5 @@
|
||||||
Dapplo.Jira
|
Dapplo.Jira
|
||||||
</IncludeAssemblies>
|
</IncludeAssemblies>
|
||||||
</Costura>
|
</Costura>
|
||||||
|
<AutoProperties />
|
||||||
</Weavers>
|
</Weavers>
|
|
@ -1,44 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{19FEEF09-313F-43C7-819D-F1BCA782B08B}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.Jira</RootNamespace>
|
<RootNamespace>Greenshot.Addon.Jira</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.Jira</AssemblyName>
|
<AssemblyName>Greenshot.Addon.Jira</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -61,139 +39,29 @@
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="IJiraLanguage.cs" />
|
<EmbeddedResource Include="jira.svgz" />
|
||||||
<Compile Include="JiraAddonModule.cs" />
|
|
||||||
<Compile Include="IssueTypeBitmapCache.cs" />
|
|
||||||
<Compile Include="JiraConnector.cs" />
|
|
||||||
<Compile Include="IJiraConfiguration.cs" />
|
|
||||||
<Compile Include="JiraDestination.cs" />
|
|
||||||
<Compile Include="JiraDetails.cs" />
|
|
||||||
<Compile Include="JiraEventArgs.cs" />
|
|
||||||
<Compile Include="JiraEventTypes.cs" />
|
|
||||||
<Compile Include="JiraMonitor.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="ViewModels\JiraViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\JiraConfigViewModel.cs" />
|
|
||||||
<None Include="app.config" />
|
|
||||||
<EmbeddedResource Include="jira.svgz" />
|
|
||||||
<None Include="Languages\language_jiraplugin-de-DE.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_jiraplugin-en-US.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_jiraplugin-fr-FR.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_jiraplugin-nl-NL.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_jiraplugin-zh-CN.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<Name>Greenshot.Addons</Name>
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
<Private>False</Private>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
|
||||||
<Name>Greenshot.Core</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="FodyWeavers.xml" />
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
</ItemGroup>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<ItemGroup>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
<Resource Include="Languages\language_jiraplugin-cs-CZ.xml" />
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.11" />
|
||||||
<Resource Include="Languages\language_jiraplugin-id-ID.xml" />
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.11" />
|
||||||
<Resource Include="Languages\language_jiraplugin-it-IT.xml" />
|
<PackageReference Include="Dapplo.Utils" Version="1.1.9" />
|
||||||
<Resource Include="Languages\language_jiraplugin-ja-JP.xml" />
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<Resource Include="Languages\language_jiraplugin-kab-DZ.xml" />
|
<PackageReference Include="Dapplo.Jira" Version="0.8.5" />
|
||||||
<Resource Include="Languages\language_jiraplugin-ko-KR.xml" />
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<Resource Include="Languages\language_jiraplugin-lv-LV.xml" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Resource Include="Languages\language_jiraplugin-pl-PL.xml" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<Resource Include="Languages\language_jiraplugin-pt-PT.xml" />
|
|
||||||
<Resource Include="Languages\language_jiraplugin-ru-RU.xml" />
|
|
||||||
<Resource Include="Languages\language_jiraplugin-sr-Cyrl-RS.xml" />
|
|
||||||
<Resource Include="Languages\language_jiraplugin-sr-RS.xml" />
|
|
||||||
<Resource Include="Languages\language_jiraplugin-sv-SE.xml" />
|
|
||||||
<Resource Include="Languages\language_jiraplugin-uk-UA.xml" />
|
|
||||||
<Resource Include="Languages\language_jiraplugin-zh-TW.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="Views\JiraConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\JiraView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Jira">
|
|
||||||
<Version>0.7.15</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
</Project>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\Svg.dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
|
|
||||||
<RegisterForComInterop>False</RegisterForComInterop>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<BaseAddress>4194304</BaseAddress>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
|
||||||
<RegisterForComInterop>False</RegisterForComInterop>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<BaseAddress>4194304</BaseAddress>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<Optimize>False</Optimize>
|
|
||||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
|
|
||||||
<DebugType>Full</DebugType>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
|
||||||
<DebugType>None</DebugType>
|
|
||||||
<DebugSymbols>false</DebugSymbols>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.Jira.Configuration;
|
||||||
|
using Greenshot.Addon.Jira.Configuration.Impl;
|
||||||
using Greenshot.Addon.Jira.ViewModels;
|
using Greenshot.Addon.Jira.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,17 +39,19 @@ namespace Greenshot.Addon.Jira
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IJiraConfiguration>())
|
.RegisterType<JiraConfigurationImpl>()
|
||||||
.As<IJiraConfiguration>()
|
.As<IJiraConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IJiraLanguage>())
|
.RegisterType<JiraLanguageImpl>()
|
||||||
.As<IJiraLanguage>()
|
.As<IJiraLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.RegisterType<JiraDestination>()
|
.RegisterType<JiraDestination>()
|
||||||
.As<IDestination>()
|
.As<IDestination>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
builder
|
builder
|
||||||
|
|
|
@ -34,9 +34,12 @@ using System.Windows.Media.Imaging;
|
||||||
using Dapplo.HttpExtensions;
|
using Dapplo.HttpExtensions;
|
||||||
using Dapplo.HttpExtensions.Extensions;
|
using Dapplo.HttpExtensions.Extensions;
|
||||||
using Dapplo.Jira;
|
using Dapplo.Jira;
|
||||||
|
#if !NETCOREAPP3_0
|
||||||
using Dapplo.Jira.Converters;
|
using Dapplo.Jira.Converters;
|
||||||
|
#endif
|
||||||
using Dapplo.Jira.Entities;
|
using Dapplo.Jira.Entities;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.Jira.Configuration;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Core.Credentials;
|
using Greenshot.Addons.Core.Credentials;
|
||||||
using Greenshot.Addons.Extensions;
|
using Greenshot.Addons.Extensions;
|
||||||
|
@ -102,7 +105,9 @@ namespace Greenshot.Addon.Jira
|
||||||
|
|
||||||
public void UpdateSvgSize(int size)
|
public void UpdateSvgSize(int size)
|
||||||
{
|
{
|
||||||
|
#if !NETCOREAPP3_0
|
||||||
_jiraClient.Behaviour.SetConfig(new SvgConfiguration { Width = size, Height = size });
|
_jiraClient.Behaviour.SetConfig(new SvgConfiguration { Width = size, Height = size });
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -34,6 +34,7 @@ using Dapplo.Addons;
|
||||||
using Dapplo.HttpExtensions;
|
using Dapplo.HttpExtensions;
|
||||||
using Dapplo.Jira.Entities;
|
using Dapplo.Jira.Entities;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.Jira.Configuration;
|
||||||
using Greenshot.Addon.Jira.ViewModels;
|
using Greenshot.Addon.Jira.ViewModels;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
|
@ -36,6 +36,7 @@ using Dapplo.Jira;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Desktop;
|
using Dapplo.Windows.Desktop;
|
||||||
using Dapplo.Windows.User32;
|
using Dapplo.Windows.User32;
|
||||||
|
using Greenshot.Addon.Jira.Configuration;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ namespace Greenshot.Addon.Jira
|
||||||
/// It keeps a list of the last "accessed" jiras, and makes it easy to upload to one.
|
/// It keeps a list of the last "accessed" jiras, and makes it easy to upload to one.
|
||||||
/// Make sure this is instanciated on the UI thread!
|
/// Make sure this is instanciated on the UI thread!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Service(nameof(JiraMonitor), nameof(CaliburnServices.IniSectionService), TaskSchedulerName = "ui")]
|
[Service(nameof(JiraMonitor), nameof(CaliburnServices.ConfigurationService), TaskSchedulerName = "ui")]
|
||||||
public class JiraMonitor : IStartup, IShutdown
|
public class JiraMonitor : IStartup, IShutdown
|
||||||
{
|
{
|
||||||
private readonly IJiraConfiguration _jiraConfiguration;
|
private readonly IJiraConfiguration _jiraConfiguration;
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.Jira")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("Jira Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -24,6 +24,7 @@
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
|
using Greenshot.Addon.Jira.Configuration;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ using System.Windows;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
using Dapplo.Jira.Entities;
|
using Dapplo.Jira.Entities;
|
||||||
|
using Greenshot.Addon.Jira.Configuration;
|
||||||
|
|
||||||
namespace Greenshot.Addon.Jira.ViewModels
|
namespace Greenshot.Addon.Jira.ViewModels
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,17 +21,16 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
namespace Greenshot.Addon.Lutim {
|
namespace Greenshot.Addon.Lutim.Configuration {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of LutimConfiguration.
|
/// Description of LutimConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Lutim")]
|
[IniSection("Lutim")]
|
||||||
[Description("Greenshot Lutim Plugin configuration")]
|
[Description("Greenshot Lutim Plugin configuration")]
|
||||||
public interface ILutimConfiguration : IIniSection, IDestinationFileConfiguration, ITransactionalProperties, INotifyPropertyChanged
|
public interface ILutimConfiguration : IIniSection, IDestinationFileConfiguration
|
||||||
{
|
{
|
||||||
[Description("Url to Lutim system.")]
|
[Description("Url to Lutim system.")]
|
||||||
[DefaultValue("https://lut.im/")]
|
[DefaultValue("https://lut.im/")]
|
|
@ -22,7 +22,7 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Addon.Lutim
|
namespace Greenshot.Addon.Lutim
|
||||||
{
|
{
|
|
@ -0,0 +1,65 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Addon.Lutim.Entities;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Lutim.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class LutimConfigurationImpl : IniSectionBase<ILutimConfiguration>, ILutimConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IFileConfiguration
|
||||||
|
|
||||||
|
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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IDestinationFileConfiguration
|
||||||
|
|
||||||
|
public bool UseOwnSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of ILutimConfiguration
|
||||||
|
|
||||||
|
public string LutimUrl { get; set; }
|
||||||
|
public bool CopyLinkToClipboard { get; set; }
|
||||||
|
public IDictionary<string, string> LutimUploadHistory { get; set; }
|
||||||
|
public IDictionary<string, LutimInfo> RuntimeLutimHistory { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Lutim.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class LutimLanguageImpl : LanguageBase<ILutimLanguage>, ILutimLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
4
src/Greenshot.Addon.Lutim/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.Lutim/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -1,42 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{D106F86C-CD3D-44FF-B151-2A5D47268B5C}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.Lutim</RootNamespace>
|
<RootNamespace>Greenshot.Addon.Lutim</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.Lutim</AssemblyName>
|
<AssemblyName>Greenshot.Addon.Lutim</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
|
@ -57,101 +37,28 @@
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Entities\AddResult.cs" />
|
<EmbeddedResource Include="Lutim.png" />
|
||||||
<Compile Include="Entities\LutimInfo.cs" />
|
|
||||||
<Compile Include="LutimAddonModule.cs" />
|
|
||||||
<Compile Include="ILutimLanguage.cs" />
|
|
||||||
<Compile Include="LutimDestination.cs" />
|
|
||||||
<Compile Include="ILutimConfiguration.cs" />
|
|
||||||
<Compile Include="LutimApi.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="ViewModels\LutimConfigViewModel.cs" />
|
|
||||||
<Compile Include="ViewModels\LutimHistoryViewModel.cs" />
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Languages\language_lutimplugin-de-DE.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_lutimplugin-en-US.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_lutimplugin-fr-FR.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_lutimplugin-nl-NL.xml">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_lutimplugin-zh-CN.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Lutim.png" />
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<Name>Greenshot.Core</Name>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet" Version="0.9.11" />
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth" Version="0.9.11" />
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<Name>Greenshot.Gfx</Name>
|
<PackageReference Include="MahApps.Metro" Version="1.6.5" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Project>{5b924697-4dcd-4f98-85f1-105cb84b7341}</Project>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<Name>Greenshot.Addons</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Languages\language_lutimplugin-cs-CZ.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-id-ID.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-it-IT.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-ko-KR.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-lv-LV.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-pl-PL.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-pt-PT.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-ru-RU.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-sk-SK.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-sr-RS.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-sv-SE.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-uk-UA.xml" />
|
|
||||||
<Content Include="Languages\language_lutimplugin-zh-TW.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="Views\LutimConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\LutimHistoryView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
|
||||||
<Version>0.8.46</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="MahApps.Metro">
|
|
||||||
<Version>1.6.5</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<PreBuildEvent>
|
|
||||||
</PreBuildEvent>
|
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
</Project>
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.Lutim.Configuration;
|
||||||
|
using Greenshot.Addon.Lutim.Configuration.Impl;
|
||||||
using Greenshot.Addon.Lutim.ViewModels;
|
using Greenshot.Addon.Lutim.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
|
@ -37,17 +39,19 @@ namespace Greenshot.Addon.Lutim
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<ILutimConfiguration>())
|
.RegisterType<LutimConfigurationImpl>()
|
||||||
.As<ILutimConfiguration>()
|
.As<ILutimConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<ILutimLanguage>())
|
.RegisterType<LutimLanguageImpl>()
|
||||||
.As<ILutimLanguage>()
|
.As<ILutimLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.RegisterType<LutimDestination>()
|
.RegisterType<LutimDestination>()
|
||||||
.As<IDestination>()
|
.As<IDestination>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
builder
|
builder
|
||||||
|
|
|
@ -27,6 +27,7 @@ using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Dapplo.HttpExtensions;
|
using Dapplo.HttpExtensions;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.Lutim.Configuration;
|
||||||
using Greenshot.Addon.Lutim.Entities;
|
using Greenshot.Addon.Lutim.Entities;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
|
|
|
@ -28,6 +28,7 @@ using Autofac.Features.OwnedInstances;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
|
using Greenshot.Addon.Lutim.Configuration;
|
||||||
using Greenshot.Addon.Lutim.Entities;
|
using Greenshot.Addon.Lutim.Entities;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
|
@ -1,44 +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.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.Lutim")]
|
|
||||||
[assembly: AssemblyDescription("A plugin to upload images to Lutim")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("Lutim Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -24,6 +24,7 @@
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
|
using Greenshot.Addon.Lutim.Configuration;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ using Caliburn.Micro;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
|
using Greenshot.Addon.Lutim.Configuration;
|
||||||
using Greenshot.Addon.Lutim.Entities;
|
using Greenshot.Addon.Lutim.Entities;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Extensions;
|
using Greenshot.Addons.Extensions;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace Greenshot.Addon.OCR
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("OCR")]
|
[IniSection("OCR")]
|
||||||
[Description("Greenshot OCR Plugin configuration")]
|
[Description("Greenshot OCR Plugin configuration")]
|
||||||
public interface IOCRConfiguration : IIniSection<IOCRConfiguration>
|
public interface IOcrConfiguration : IIniSection
|
||||||
{
|
{
|
||||||
[Description("Language for OCR")]
|
[Description("Language for OCR")]
|
||||||
[DefaultValue ("miLANG_ENGLISH")]
|
[DefaultValue ("miLANG_ENGLISH")]
|
|
@ -18,7 +18,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Addon.OCR
|
namespace Greenshot.Addon.OCR
|
||||||
{
|
{
|
|
@ -0,0 +1,38 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.OCR.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class OcrConfigurationImpl : IniSectionBase<IOcrConfiguration>, IOcrConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IOcrConfiguration
|
||||||
|
|
||||||
|
public string Language { get; set; }
|
||||||
|
public bool Orientimage { get; set; }
|
||||||
|
public bool StraightenImage { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
#region Greenshot GNU General Public License
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
// Greenshot - a free and open source screenshot tool
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
@ -21,12 +21,18 @@
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Office.OfficeInterop
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.OCR.Configuration.Impl
|
||||||
{
|
{
|
||||||
public enum MsoScaleFrom
|
public class OcrLanguageImpl : LanguageBase<IOcrLanguage>, IOcrLanguage
|
||||||
{
|
{
|
||||||
msoScaleFromTopLeft = 0,
|
#region Implementation of IOcrLanguage
|
||||||
msoScaleFromMiddle = 1,
|
|
||||||
msoScaleFromBottomRight = 2
|
public string Language { get; }
|
||||||
}
|
public string OrientImage { get; }
|
||||||
}
|
public string StraightenImage { get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
4
src/Greenshot.Addon.OCR/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.OCR/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -1,43 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{C6988EE8-2FEE-4349-9F09-F9628A0D8965}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.OCR</RootNamespace>
|
<RootNamespace>Greenshot.Addon.OCR</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.OCR</AssemblyName>
|
<AssemblyName>Greenshot.Addon.OCR</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>netcoreapp3.0;net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<FileUpgradeFlags>
|
|
||||||
</FileUpgradeFlags>
|
|
||||||
<OldToolsVersion>3.5</OldToolsVersion>
|
|
||||||
<UpgradeBackupLocation>
|
|
||||||
</UpgradeBackupLocation>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
|
@ -50,97 +30,24 @@
|
||||||
<Reference Include="System.Windows" />
|
<Reference Include="System.Windows" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xaml" />
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="IOcrLanguage.cs" />
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Compile Include="ModiLanguage.cs" />
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<Compile Include="IOCRConfiguration.cs" />
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
<Compile Include="OcrDestination.cs" />
|
|
||||||
<Compile Include="OcrAddonModule.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="SettingsForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="SettingsForm.Designer.cs">
|
|
||||||
<DependentUpon>SettingsForm.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="Languages\language_ocrplugin-de-DE.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_ocrplugin-en-US.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_ocrplugin-fr-FR.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_ocrplugin-nl-NL.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Languages\language_ocrplugin-zh-CN.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<Name>Greenshot.Core</Name>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<Name>Greenshot.Gfx</Name>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
|
||||||
<Name>Greenshot.Addons</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
</Project>
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
|
|
||||||
<RegisterForComInterop>False</RegisterForComInterop>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<BaseAddress>4194304</BaseAddress>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
|
||||||
<RegisterForComInterop>False</RegisterForComInterop>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
<BaseAddress>4194304</BaseAddress>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
|
||||||
<DebugType>Full</DebugType>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<Optimize>False</Optimize>
|
|
||||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
||||||
<DebugType>None</DebugType>
|
|
||||||
<DebugSymbols>false</DebugSymbols>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>True</Optimize>
|
|
||||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -51,11 +51,11 @@ namespace Greenshot.Addon.OCR
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private const int MinWidth = 130;
|
private const int MinWidth = 130;
|
||||||
private const int MinHeight = 130;
|
private const int MinHeight = 130;
|
||||||
private readonly IOCRConfiguration _ocrConfiguration;
|
private readonly IOcrConfiguration _ocrConfiguration;
|
||||||
private readonly string _ocrCommand;
|
private readonly string _ocrCommand;
|
||||||
|
|
||||||
public OcrDestination(
|
public OcrDestination(
|
||||||
IOCRConfiguration ocrConfiguration,
|
IOcrConfiguration ocrConfiguration,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
ExportNotification exportNotification
|
ExportNotification exportNotification
|
||||||
|
|
|
@ -26,8 +26,9 @@ using System.IO;
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.Addons.Bootstrapper.Resolving;
|
using Dapplo.Addons.Bootstrapper.Resolving;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.OCR.Configuration.Impl;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
|
||||||
namespace Greenshot.Addon.OCR
|
namespace Greenshot.Addon.OCR
|
||||||
|
@ -63,17 +64,19 @@ namespace Greenshot.Addon.OCR
|
||||||
if (HasModi())
|
if (HasModi())
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IOCRConfiguration>())
|
.RegisterType<OcrConfigurationImpl>()
|
||||||
.As<IOCRConfiguration>()
|
.As<IOcrConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IOcrLanguage>())
|
.RegisterType<OcrLanguageImpl>()
|
||||||
.As<IOcrLanguage>()
|
.As<IOcrLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.RegisterType<OcrDestination>()
|
.RegisterType<OcrDestination>()
|
||||||
.As<IDestination>()
|
.As<IDestination>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
#region Greenshot GNU General Public License
|
|
||||||
|
|
||||||
// Greenshot - a free and open source screenshot tool
|
|
||||||
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
//
|
|
||||||
// For more information see: http://getgreenshot.org/
|
|
||||||
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Greenshot.Addon.OCR")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("OCR Plugin")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// This sets the default COM visibility of types in the assembly to invisible.
|
|
||||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
|
||||||
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The assembly version, replaced by build scripts
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyInformationalVersion("1.3.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.3.0.0")]
|
|
|
@ -35,9 +35,9 @@ namespace Greenshot.Addon.OCR
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class SettingsForm : GreenshotForm
|
public partial class SettingsForm : GreenshotForm
|
||||||
{
|
{
|
||||||
private readonly IOCRConfiguration config;
|
private readonly IOcrConfiguration config;
|
||||||
|
|
||||||
public SettingsForm(string[] languages, IOcrLanguage ocrLanguage, IOCRConfiguration config) : base(ocrLanguage)
|
public SettingsForm(string[] languages, IOcrLanguage ocrLanguage, IOcrConfiguration config) : base(ocrLanguage)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// The InitializeComponent() call is required for Windows Forms designer support.
|
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||||
|
|
|
@ -24,21 +24,20 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Greenshot.Addon.Office.OfficeInterop;
|
using Greenshot.Addon.Office.OfficeInterop;
|
||||||
using Microsoft.Office.Interop.PowerPoint;
|
using Microsoft.Office.Interop.PowerPoint;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addon.Office
|
namespace Greenshot.Addon.Office.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Office configuration
|
/// Office configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Office")]
|
[IniSection("Office")]
|
||||||
[Description("Greenshot Office configuration")]
|
[Description("Greenshot Office configuration")]
|
||||||
public interface IOfficeConfiguration : IIniSection, ITransactionalProperties, INotifyPropertyChanged
|
public interface IOfficeConfiguration : IIniSection
|
||||||
{
|
{
|
||||||
[Description("Default type for emails. (Text, Html)")]
|
[Description("Default type for emails. (Text, Html)")]
|
||||||
[DefaultValue(EmailFormat.Html)]
|
[DefaultValue(EmailFormat.Html)]
|
|
@ -18,9 +18,9 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Addon.Office
|
namespace Greenshot.Addon.Office.Configuration
|
||||||
{
|
{
|
||||||
[Language("Office")]
|
[Language("Office")]
|
||||||
public interface IOfficeLanguage : ILanguage, INotifyPropertyChanged
|
public interface IOfficeLanguage : ILanguage, INotifyPropertyChanged
|
|
@ -0,0 +1,23 @@
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Greenshot.Addon.Office.OfficeInterop;
|
||||||
|
using Microsoft.Office.Interop.PowerPoint;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Office.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class OfficeConfigurationImpl : IniSectionBase<IOfficeConfiguration>, IOfficeConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
#region Greenshot GNU General Public License
|
||||||
|
|
||||||
|
// Greenshot - a free and open source screenshot tool
|
||||||
|
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
//
|
||||||
|
// For more information see: http://getgreenshot.org/
|
||||||
|
// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 1 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.Office.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class OfficeLanguageImpl : LanguageBase<IOfficeLanguage>, IOfficeLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of 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; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,12 +29,14 @@ using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.Office.Configuration;
|
||||||
using Greenshot.Addon.Office.OfficeExport;
|
using Greenshot.Addon.Office.OfficeExport;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Addons.Interfaces.Plugin;
|
using Greenshot.Addons.Interfaces.Plugin;
|
||||||
|
using Greenshot.Addons.Resources;
|
||||||
using Microsoft.Office.Interop.Outlook;
|
using Microsoft.Office.Interop.Outlook;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -54,13 +56,14 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
|
|
||||||
private readonly IOfficeConfiguration _officeConfiguration;
|
private readonly IOfficeConfiguration _officeConfiguration;
|
||||||
private readonly ExportNotification _exportNotification;
|
private readonly ExportNotification _exportNotification;
|
||||||
private static readonly Bitmap MailIcon = GreenshotResources.GetBitmap("Email.Image");
|
private static readonly Bitmap MailIcon = GreenshotResources.Instance.GetBitmap("Email.Image");
|
||||||
private readonly string _exePath;
|
private readonly string _exePath;
|
||||||
private readonly bool _isActiveFlag;
|
private readonly bool _isActiveFlag;
|
||||||
private readonly string _outlookInspectorCaption;
|
private readonly string _outlookInspectorCaption;
|
||||||
private readonly OlObjectClass _outlookInspectorType;
|
private readonly OlObjectClass _outlookInspectorType;
|
||||||
|
private readonly OutlookExporter _outlookExporter;
|
||||||
|
|
||||||
public OutlookDestination(
|
public OutlookDestination(
|
||||||
IOfficeConfiguration officeConfiguration,
|
IOfficeConfiguration officeConfiguration,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
@ -68,6 +71,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
) : base(coreConfiguration, greenshotLanguage)
|
) : base(coreConfiguration, greenshotLanguage)
|
||||||
{
|
{
|
||||||
_officeConfiguration = officeConfiguration;
|
_officeConfiguration = officeConfiguration;
|
||||||
|
_outlookExporter = new OutlookExporter(officeConfiguration);
|
||||||
_exportNotification = exportNotification;
|
_exportNotification = exportNotification;
|
||||||
if (EmailConfigHelper.HasOutlook())
|
if (EmailConfigHelper.HasOutlook())
|
||||||
{
|
{
|
||||||
|
@ -121,7 +125,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
|
|
||||||
public override IEnumerable<IDestination> DynamicDestinations()
|
public override IEnumerable<IDestination> DynamicDestinations()
|
||||||
{
|
{
|
||||||
var inspectorCaptions = OutlookExporter.RetrievePossibleTargets();
|
var inspectorCaptions = _outlookExporter.RetrievePossibleTargets();
|
||||||
if (inspectorCaptions == null)
|
if (inspectorCaptions == null)
|
||||||
{
|
{
|
||||||
yield break;
|
yield break;
|
||||||
|
@ -169,14 +173,14 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
|
|
||||||
if (_outlookInspectorCaption != null)
|
if (_outlookInspectorCaption != null)
|
||||||
{
|
{
|
||||||
OutlookExporter.ExportToInspector(_outlookInspectorCaption, tmpFile, attachmentName);
|
_outlookExporter.ExportToInspector(_outlookInspectorCaption, tmpFile, attachmentName);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!manuallyInitiated)
|
if (!manuallyInitiated)
|
||||||
{
|
{
|
||||||
var inspectorCaptions = OutlookExporter.RetrievePossibleTargets();
|
var inspectorCaptions = _outlookExporter.RetrievePossibleTargets();
|
||||||
if (inspectorCaptions != null && inspectorCaptions.Count > 0)
|
if (inspectorCaptions != null && inspectorCaptions.Count > 0)
|
||||||
{
|
{
|
||||||
var destinations = new List<IDestination>
|
var destinations = new List<IDestination>
|
||||||
|
@ -193,7 +197,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
exportInformation.ExportMade = OutlookExporter.ExportToOutlook(_officeConfiguration.OutlookEmailFormat, tmpFile,
|
exportInformation.ExportMade = _outlookExporter.ExportToOutlook(_officeConfiguration.OutlookEmailFormat, tmpFile,
|
||||||
FilenameHelper.FillPattern(_officeConfiguration.EmailSubjectPattern, captureDetails, false), attachmentName, _officeConfiguration.EmailTo, _officeConfiguration.EmailCC,
|
FilenameHelper.FillPattern(_officeConfiguration.EmailSubjectPattern, captureDetails, false), attachmentName, _officeConfiguration.EmailTo, _officeConfiguration.EmailCC,
|
||||||
_officeConfiguration.EmailBCC, null);
|
_officeConfiguration.EmailBCC, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Greenshot.Addon.Office.Configuration;
|
||||||
using Greenshot.Addon.Office.OfficeExport;
|
using Greenshot.Addon.Office.OfficeExport;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
@ -45,21 +46,26 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
[Destination("Powerpoint", DestinationOrder.Powerpoint)]
|
[Destination("Powerpoint", DestinationOrder.Powerpoint)]
|
||||||
public class PowerpointDestination : AbstractDestination
|
public class PowerpointDestination : AbstractDestination
|
||||||
{
|
{
|
||||||
|
private readonly IOfficeConfiguration _officeConfiguration;
|
||||||
private readonly ExportNotification _exportNotification;
|
private readonly ExportNotification _exportNotification;
|
||||||
private const int IconApplication = 0;
|
|
||||||
private const int IconPresentation = 1;
|
|
||||||
|
|
||||||
private readonly string _exePath;
|
private readonly string _exePath;
|
||||||
private readonly string _presentationName;
|
private readonly string _presentationName;
|
||||||
|
private readonly PowerpointExporter _powerpointExporter;
|
||||||
|
|
||||||
|
private const int IconApplication = 0;
|
||||||
|
private const int IconPresentation = 1;
|
||||||
|
|
||||||
public PowerpointDestination(
|
public PowerpointDestination(
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
IOfficeConfiguration officeConfiguration,
|
||||||
ExportNotification exportNotification
|
ExportNotification exportNotification
|
||||||
) : base(coreConfiguration, greenshotLanguage)
|
) : base(coreConfiguration, greenshotLanguage)
|
||||||
{
|
{
|
||||||
|
_officeConfiguration = officeConfiguration;
|
||||||
_exportNotification = exportNotification;
|
_exportNotification = exportNotification;
|
||||||
|
_powerpointExporter = new PowerpointExporter(officeConfiguration);
|
||||||
_exePath = PluginUtils.GetExePath("POWERPNT.EXE");
|
_exePath = PluginUtils.GetExePath("POWERPNT.EXE");
|
||||||
if (_exePath != null && !File.Exists(_exePath))
|
if (_exePath != null && !File.Exists(_exePath))
|
||||||
{
|
{
|
||||||
|
@ -70,7 +76,8 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
public PowerpointDestination(string presentationName,
|
public PowerpointDestination(string presentationName,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, exportNotification)
|
IOfficeConfiguration officeConfiguration,
|
||||||
|
ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, officeConfiguration, exportNotification)
|
||||||
{
|
{
|
||||||
_presentationName = presentationName;
|
_presentationName = presentationName;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +110,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
|
|
||||||
public override IEnumerable<IDestination> DynamicDestinations()
|
public override IEnumerable<IDestination> DynamicDestinations()
|
||||||
{
|
{
|
||||||
return PowerpointExporter.GetPowerpointPresentations().Select(presentationName => new PowerpointDestination(presentationName, CoreConfiguration, GreenshotLanguage, _exportNotification));
|
return _powerpointExporter.GetPowerpointPresentations().Select(presentationName => new PowerpointDestination(presentationName, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
|
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
|
||||||
|
@ -118,22 +125,22 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
}
|
}
|
||||||
if (_presentationName != null)
|
if (_presentationName != null)
|
||||||
{
|
{
|
||||||
exportInformation.ExportMade = PowerpointExporter.ExportToPresentation(_presentationName, tmpFile, imageSize, captureDetails.Title);
|
exportInformation.ExportMade = _powerpointExporter.ExportToPresentation(_presentationName, tmpFile, imageSize, captureDetails.Title);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!manuallyInitiated)
|
if (!manuallyInitiated)
|
||||||
{
|
{
|
||||||
var presentations = PowerpointExporter.GetPowerpointPresentations().ToList();
|
var presentations = _powerpointExporter.GetPowerpointPresentations().ToList();
|
||||||
if (presentations.Count > 0)
|
if (presentations.Count > 0)
|
||||||
{
|
{
|
||||||
var destinations = new List<IDestination>
|
var destinations = new List<IDestination>
|
||||||
{
|
{
|
||||||
new PowerpointDestination(CoreConfiguration, GreenshotLanguage, _exportNotification)
|
new PowerpointDestination(CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification)
|
||||||
};
|
};
|
||||||
foreach (var presentation in presentations)
|
foreach (var presentation in presentations)
|
||||||
{
|
{
|
||||||
destinations.Add(new PowerpointDestination(presentation, CoreConfiguration, GreenshotLanguage, _exportNotification));
|
destinations.Add(new PowerpointDestination(presentation, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
|
||||||
}
|
}
|
||||||
// Return the ExportInformation from the picker without processing, as this indirectly comes from us self
|
// Return the ExportInformation from the picker without processing, as this indirectly comes from us self
|
||||||
return ShowPickerMenu(false, surface, captureDetails, destinations);
|
return ShowPickerMenu(false, surface, captureDetails, destinations);
|
||||||
|
@ -141,7 +148,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
}
|
}
|
||||||
else if (!exportInformation.ExportMade)
|
else if (!exportInformation.ExportMade)
|
||||||
{
|
{
|
||||||
exportInformation.ExportMade = PowerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title);
|
exportInformation.ExportMade = _powerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_exportNotification.NotifyOfExport(this, exportInformation, surface);
|
_exportNotification.NotifyOfExport(this, exportInformation, surface);
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.Office.Configuration;
|
||||||
using Greenshot.Addon.Office.OfficeExport;
|
using Greenshot.Addon.Office.OfficeExport;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
@ -47,20 +48,25 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
[Destination("Word", DestinationOrder.Word)]
|
[Destination("Word", DestinationOrder.Word)]
|
||||||
public class WordDestination : AbstractDestination
|
public class WordDestination : AbstractDestination
|
||||||
{
|
{
|
||||||
|
private readonly IOfficeConfiguration _officeConfiguration;
|
||||||
private readonly ExportNotification _exportNotification;
|
private readonly ExportNotification _exportNotification;
|
||||||
private const int IconApplication = 0;
|
private const int IconApplication = 0;
|
||||||
private const int IconDocument = 1;
|
private const int IconDocument = 1;
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private readonly string _exePath;
|
private readonly string _exePath;
|
||||||
private readonly string _documentCaption;
|
private readonly string _documentCaption;
|
||||||
|
private readonly WordExporter _wordExporter;
|
||||||
|
|
||||||
public WordDestination(
|
public WordDestination(
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
IOfficeConfiguration officeConfiguration,
|
||||||
ExportNotification exportNotification
|
ExportNotification exportNotification
|
||||||
) : base(coreConfiguration, greenshotLanguage)
|
) : base(coreConfiguration, greenshotLanguage)
|
||||||
{
|
{
|
||||||
|
_officeConfiguration = officeConfiguration;
|
||||||
_exportNotification = exportNotification;
|
_exportNotification = exportNotification;
|
||||||
|
_wordExporter = new WordExporter(officeConfiguration);
|
||||||
_exePath = PluginUtils.GetExePath("WINWORD.EXE");
|
_exePath = PluginUtils.GetExePath("WINWORD.EXE");
|
||||||
if (_exePath != null && !File.Exists(_exePath))
|
if (_exePath != null && !File.Exists(_exePath))
|
||||||
{
|
{
|
||||||
|
@ -71,7 +77,8 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
protected WordDestination(string wordCaption,
|
protected WordDestination(string wordCaption,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, exportNotification)
|
IOfficeConfiguration officeConfiguration,
|
||||||
|
ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, officeConfiguration, exportNotification)
|
||||||
{
|
{
|
||||||
_documentCaption = wordCaption;
|
_documentCaption = wordCaption;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +96,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
|
|
||||||
public override IEnumerable<IDestination> DynamicDestinations()
|
public override IEnumerable<IDestination> DynamicDestinations()
|
||||||
{
|
{
|
||||||
return WordExporter.GetWordDocuments().Select(wordCaption => new WordDestination(wordCaption, CoreConfiguration, GreenshotLanguage, _exportNotification));
|
return _wordExporter.GetWordDocuments().Select(wordCaption => new WordDestination(wordCaption, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
|
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
|
||||||
|
@ -104,14 +111,14 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
|
_wordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
|
_wordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -126,16 +133,16 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
{
|
{
|
||||||
if (!manuallyInitiated)
|
if (!manuallyInitiated)
|
||||||
{
|
{
|
||||||
var documents = WordExporter.GetWordDocuments().ToList();
|
var documents = _wordExporter.GetWordDocuments().ToList();
|
||||||
if (documents.Count > 0)
|
if (documents.Count > 0)
|
||||||
{
|
{
|
||||||
var destinations = new List<IDestination>
|
var destinations = new List<IDestination>
|
||||||
{
|
{
|
||||||
new WordDestination(CoreConfiguration, GreenshotLanguage, _exportNotification)
|
new WordDestination(CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification)
|
||||||
};
|
};
|
||||||
foreach (var document in documents)
|
foreach (var document in documents)
|
||||||
{
|
{
|
||||||
destinations.Add(new WordDestination(document, CoreConfiguration, GreenshotLanguage, _exportNotification));
|
destinations.Add(new WordDestination(document, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
|
||||||
}
|
}
|
||||||
// Return the ExportInformation from the picker without processing, as this indirectly comes from us self
|
// Return the ExportInformation from the picker without processing, as this indirectly comes from us self
|
||||||
return ShowPickerMenu(false, surface, captureDetails, destinations);
|
return ShowPickerMenu(false, surface, captureDetails, destinations);
|
||||||
|
@ -143,7 +150,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WordExporter.InsertIntoNewDocument(tmpFile, null, null);
|
_wordExporter.InsertIntoNewDocument(tmpFile, null, null);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
@ -151,7 +158,7 @@ namespace Greenshot.Addon.Office.Destinations
|
||||||
// Retry once, just in case
|
// Retry once, just in case
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WordExporter.InsertIntoNewDocument(tmpFile, null, null);
|
_wordExporter.InsertIntoNewDocument(tmpFile, null, null);
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
4
src/Greenshot.Addon.Office/FodyWeavers.xml
Normal file
4
src/Greenshot.Addon.Office/FodyWeavers.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Weavers>
|
||||||
|
<AutoProperties />
|
||||||
|
</Weavers>
|
|
@ -1,27 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
|
||||||
<Import Project="..\CommonProject.properties" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Greenshot.Addon.Office</RootNamespace>
|
<RootNamespace>Greenshot.Addon.Office</RootNamespace>
|
||||||
<AssemblyName>Greenshot.Addon.Office</AssemblyName>
|
<AssemblyName>Greenshot.Addon.Office</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworks>net471</TargetFrameworks>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
|
||||||
<NoStdLib>False</NoStdLib>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<None Include="Languages\language*.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net471'">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -40,82 +36,27 @@
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Destinations\OutlookDestination.cs" />
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Compile Include="Destinations\ExcelDestination.cs" />
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<Compile Include="Destinations\OneNoteDestination.cs" />
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
<Compile Include="Destinations\PowerpointDestination.cs" />
|
|
||||||
<Compile Include="Destinations\WordDestination.cs" />
|
|
||||||
<Compile Include="IOfficeLanguage.cs" />
|
|
||||||
<Compile Include="IOfficeConfiguration.cs" />
|
|
||||||
<Compile Include="OfficeInterop\EmailFormat.cs" />
|
|
||||||
<Compile Include="OfficeInterop\OfficeVersions.cs" />
|
|
||||||
<Compile Include="OfficeAddonModule.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="OfficeExport\ExcelExporter.cs" />
|
|
||||||
<Compile Include="OfficeExport\OneNoteExporter.cs" />
|
|
||||||
<Compile Include="OfficeExport\OutlookEmailExporter.cs" />
|
|
||||||
<Compile Include="OfficeExport\PowerpointExporter.cs" />
|
|
||||||
<Compile Include="OfficeExport\WordExporter.cs" />
|
|
||||||
<Compile Include="ViewModels\OfficeConfigViewModel.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<PackageReference Include="AutoProperties.Fody" Version="1.19.0" />
|
||||||
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.1.11-gd26115c7d3" />
|
||||||
<Name>Greenshot.Addons</Name>
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.1.11-gd26115c7d3" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.7.19" />
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0" />
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
<PackageReference Include="Microsoft.Office.Interop.Excel" Version="15.0.4795.1000" />
|
||||||
<Name>Greenshot.Core</Name>
|
<PackageReference Include="Microsoft.Office.Interop.Outlook" Version="15.0.4797.1003" />
|
||||||
</ProjectReference>
|
<PackageReference Include="Microsoft.Office.Interop.PowerPoint" Version="15.0.4420.1017" />
|
||||||
</ItemGroup>
|
<PackageReference Include="Microsoft.Office.Interop.Word" Version="15.0.4797.1003" />
|
||||||
<ItemGroup>
|
<PackageReference Include="MicrosoftOfficeCore" Version="15.0.0" />
|
||||||
<None Include="app.config" />
|
<PackageReference Include="Fody" Version="3.2.16">
|
||||||
</ItemGroup>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<ItemGroup>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<Page Include="Views\OfficeConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.75</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.5.112</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Interop.Microsoft.Office.Interop.OneNote">
|
|
||||||
<Version>1.1.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.Office.Interop.Excel">
|
|
||||||
<Version>15.0.4795.1000</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.Office.Interop.Outlook">
|
|
||||||
<Version>15.0.4797.1003</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.Office.Interop.PowerPoint">
|
|
||||||
<Version>15.0.4420.1017</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.Office.Interop.Word">
|
|
||||||
<Version>15.0.4797.1003</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="MicrosoftOfficeCore">
|
|
||||||
<Version>15.0.0</Version>
|
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
</Project>
|
||||||
<PropertyGroup>
|
|
||||||
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
|
|
||||||
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
|
|
||||||
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
using Greenshot.Addon.Office.Configuration;
|
||||||
|
using Greenshot.Addon.Office.Configuration.Impl;
|
||||||
using Greenshot.Addon.Office.Destinations;
|
using Greenshot.Addon.Office.Destinations;
|
||||||
using Greenshot.Addon.Office.ViewModels;
|
using Greenshot.Addon.Office.ViewModels;
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
@ -88,14 +90,16 @@ namespace Greenshot.Addon.Office
|
||||||
if (hasDestination)
|
if (hasDestination)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IOfficeConfiguration>())
|
.RegisterType<OfficeConfigurationImpl>()
|
||||||
.As<IOfficeConfiguration>()
|
.As<IOfficeConfiguration>()
|
||||||
|
.As<IIniSection>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IOfficeLanguage>())
|
.RegisterType<OfficeLanguageImpl>()
|
||||||
.As<IOfficeLanguage>()
|
.As<IOfficeLanguage>()
|
||||||
|
.As<ILanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
|
|
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