Fix for Windows 10 destinations.

This commit is contained in:
Robin 2018-05-22 23:56:42 +02:00
commit 17405088bf
4 changed files with 60 additions and 34 deletions

View file

@ -54,11 +54,11 @@
<Reference Include="CommonServiceLocator, Version=2.0.3.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.3.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.Addons, Version=1.0.36.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.Addons, Version=1.0.38.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.Addons.1.0.36-beta\lib\net45\Dapplo.Addons.dll</HintPath> <HintPath>..\packages\Dapplo.Addons.1.0.38-beta\lib\net45\Dapplo.Addons.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.Addons.Bootstrapper, Version=1.0.36.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.Addons.Bootstrapper, Version=1.0.38.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.Addons.Bootstrapper.1.0.36-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll</HintPath> <HintPath>..\packages\Dapplo.Addons.Bootstrapper.1.0.38-beta\lib\net45\Dapplo.Addons.Bootstrapper.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.CaliburnMicro, Version=1.0.38.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.CaliburnMicro, Version=1.0.38.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.CaliburnMicro.1.0.38-beta\lib\net45\Dapplo.CaliburnMicro.dll</HintPath> <HintPath>..\packages\Dapplo.CaliburnMicro.1.0.38-beta\lib\net45\Dapplo.CaliburnMicro.dll</HintPath>
@ -66,14 +66,14 @@
<Reference Include="Dapplo.CaliburnMicro.Translations, Version=1.0.38.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.CaliburnMicro.Translations, Version=1.0.38.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.CaliburnMicro.Translations.1.0.38-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll</HintPath> <HintPath>..\packages\Dapplo.CaliburnMicro.Translations.1.0.38-beta\lib\net45\Dapplo.CaliburnMicro.Translations.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.Ini, Version=0.5.27.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.Ini, Version=0.5.28.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.Ini.0.5.27\lib\net45\Dapplo.Ini.dll</HintPath> <HintPath>..\packages\Dapplo.Ini.0.5.28\lib\net45\Dapplo.Ini.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.InterfaceImpl, Version=0.2.12.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.InterfaceImpl, Version=0.2.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.InterfaceImpl.0.2.12\lib\net45\Dapplo.InterfaceImpl.dll</HintPath> <HintPath>..\packages\Dapplo.InterfaceImpl.0.2.12\lib\net45\Dapplo.InterfaceImpl.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.Language, Version=0.5.27.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.Language, Version=0.5.28.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.Language.0.5.27\lib\net45\Dapplo.Language.dll</HintPath> <HintPath>..\packages\Dapplo.Language.0.5.28\lib\net45\Dapplo.Language.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dapplo.Log, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Dapplo.Log, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.Log.1.2.1\lib\net45\Dapplo.Log.dll</HintPath> <HintPath>..\packages\Dapplo.Log.1.2.1\lib\net45\Dapplo.Log.dll</HintPath>

View file

@ -0,0 +1,48 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2016 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 Autofac;
using Dapplo.Addons;
using Dapplo.Windows.Common;
using Greenshot.Addons.Components;
namespace Greenshot.Addon.Win10
{
/// <inheritdoc />
public class Win10AddonModule : AddonModule
{
protected override void Load(ContainerBuilder builder)
{
if (!WindowsVersion.IsWindows10OrLater)
{
builder
.RegisterType<Win10OcrDestination>()
.As<IDestination>()
.SingleInstance();
builder
.RegisterType<Win10ShareDestination>()
.As<IDestination>()
.SingleInstance();
}
base.Load(builder);
}
}
}

View file

@ -1,22 +0,0 @@
using Autofac;
using Greenshot.Addons.Components;
namespace Greenshot.Addon.Win10
{
/// <inheritdoc />
public class Win10AutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
// TODO: Check Winows version
builder
.RegisterType<Win10OcrDestination>()
.As<IDestination>()
.SingleInstance();
builder
.RegisterType<Win10ShareDestination>()
.As<IDestination>()
.SingleInstance();
}
}
}

View file

@ -6,13 +6,13 @@
<package id="Caliburn.Micro" version="3.2.0" targetFramework="net452" /> <package id="Caliburn.Micro" version="3.2.0" targetFramework="net452" />
<package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net452" /> <package id="Caliburn.Micro.Core" version="3.2.0" targetFramework="net452" />
<package id="CommonServiceLocator" version="2.0.3" targetFramework="net452" /> <package id="CommonServiceLocator" version="2.0.3" targetFramework="net452" />
<package id="Dapplo.Addons" version="1.0.36-beta" targetFramework="net452" /> <package id="Dapplo.Addons" version="1.0.38-beta" targetFramework="net452" />
<package id="Dapplo.Addons.Bootstrapper" version="1.0.36-beta" targetFramework="net452" /> <package id="Dapplo.Addons.Bootstrapper" version="1.0.38-beta" targetFramework="net452" />
<package id="Dapplo.CaliburnMicro" version="1.0.38-beta" targetFramework="net452" /> <package id="Dapplo.CaliburnMicro" version="1.0.38-beta" targetFramework="net452" />
<package id="Dapplo.CaliburnMicro.Translations" version="1.0.38-beta" targetFramework="net452" /> <package id="Dapplo.CaliburnMicro.Translations" version="1.0.38-beta" targetFramework="net452" />
<package id="Dapplo.Ini" version="0.5.27" targetFramework="net452" /> <package id="Dapplo.Ini" version="0.5.28" targetFramework="net452" />
<package id="Dapplo.InterfaceImpl" version="0.2.12" targetFramework="net452" /> <package id="Dapplo.InterfaceImpl" version="0.2.12" targetFramework="net452" />
<package id="Dapplo.Language" version="0.5.27" targetFramework="net452" /> <package id="Dapplo.Language" version="0.5.28" targetFramework="net452" />
<package id="Dapplo.Log" version="1.2.1" targetFramework="net452" /> <package id="Dapplo.Log" version="1.2.1" targetFramework="net452" />
<package id="Dapplo.Utils" version="1.0.158" targetFramework="net452" /> <package id="Dapplo.Utils" version="1.0.158" targetFramework="net452" />
<package id="Dapplo.Windows" version="0.5.56" targetFramework="net452" /> <package id="Dapplo.Windows" version="0.5.56" targetFramework="net452" />