mirror of
https://github.com/greenshot/greenshot
synced 2025-08-23 06:36:20 -07:00
Merge branch 'feature/netcoreapp3.0' of https://github.com/greenshot/greenshot into feature/netcoreapp3.0
This commit is contained in:
commit
8fad00b38f
65 changed files with 1059 additions and 913 deletions
|
@ -1,48 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<NoWarn>1685</NoWarn>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<NoWarn>1685</NoWarn>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<NoWarn>1685</NoWarn>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<NoWarn>1685</NoWarn>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<FileAlignment>4096</FileAlignment>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
68
src/Directory.Build.props
Normal file
68
src/Directory.Build.props
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<Copyright>Copyright © Greenshot 2004-2018</Copyright>
|
||||||
|
<Authors>Greenshot</Authors>
|
||||||
|
<PackageIconUrl>https://getgreenshot.org/favicon.ico</PackageIconUrl>
|
||||||
|
<RepositoryUrl>https://github.com/greenshot/greenshot</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<PackageProjectUrl>https://github.com/greenshot/greenshot</PackageProjectUrl>
|
||||||
|
<PackageLicenseUrl>https://www.gnu.org/licenses/gpl.html</PackageLicenseUrl>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
<DisableImplicitFrameworkReferences Condition="'$(TargetFramework)' == 'net461'">true</DisableImplicitFrameworkReferences>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<AssemblyVersion>1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>1.0.0</FileVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' != 'Debug' And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||||
|
<IsPackable>true</IsPackable>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$(MSBuildProjectName.Contains('Tests')) Or $(MSBuildProjectName.Contains('Demo'))">
|
||||||
|
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugSymbols>True</DebugSymbols>
|
||||||
|
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||||
|
<DebugType>Full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DebugSymbols>True</DebugSymbols>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||||
|
<!--ApplicationDefinition Include="App.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</ApplicationDefinition-->
|
||||||
|
<Page Include="**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" Exclude="App.xaml" />
|
||||||
|
<Compile Update="**\*.xaml.cs" SubType="Designer" DependentUpon="%(Filename)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
|
||||||
|
<Page Include="**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" Exclude="App.xaml" />
|
||||||
|
<Compile Update="**\*.xaml.cs" SubType="Designer" DependentUpon="%(Filename)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="!$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
|
||||||
|
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="PdbGit" Version="3.0.41">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#if !NETCOREAPP30
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -359,3 +360,4 @@ namespace Greenshot.Addon.InternetExplorer
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
|
@ -1,25 +1,43 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
<Reference Include="Accessibility" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapplo.Ini">
|
|
||||||
<Version>0.6.2</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Log" Version="1.3.11" />
|
|
||||||
<PackageReference Include="Dapplo.Windows">
|
<PackageReference Include="Dapplo.Windows">
|
||||||
<Version>0.6.6</Version>
|
<Version>0.7.16</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Windows.Com">
|
<PackageReference Include="Dapplo.Windows.Com">
|
||||||
<Version>0.6.6</Version>
|
<Version>0.7.16</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Unofficial.Microsoft.mshtml" Version="7.0.3300" />
|
<PackageReference Include="Unofficial.Microsoft.mshtml" Version="7.0.3300" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -29,7 +29,6 @@ using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Com;
|
using Dapplo.Windows.Com;
|
||||||
using Dapplo.Windows.Common.Extensions;
|
using Dapplo.Windows.Common.Extensions;
|
||||||
|
@ -38,6 +37,7 @@ using Dapplo.Windows.Desktop;
|
||||||
using Dapplo.Windows.Messages;
|
using Dapplo.Windows.Messages;
|
||||||
using Dapplo.Windows.User32;
|
using Dapplo.Windows.User32;
|
||||||
using Greenshot.Addon.InternetExplorer.IEInterop;
|
using Greenshot.Addon.InternetExplorer.IEInterop;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Controls;
|
using Greenshot.Addons.Controls;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
|
@ -57,7 +57,8 @@ namespace Greenshot.Addon.InternetExplorer
|
||||||
public static class IeCaptureHelper
|
public static class IeCaptureHelper
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly ICoreConfiguration CoreConfig = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfig = new CoreConfigurationImpl();
|
||||||
|
|
||||||
// Helper method to activate a certain IE Tab
|
// Helper method to activate a certain IE Tab
|
||||||
public static void ActivateIeTab(IInteropWindow nativeIeWindow, int tabIndex)
|
public static void ActivateIeTab(IInteropWindow nativeIeWindow, int tabIndex)
|
||||||
|
|
|
@ -108,12 +108,13 @@ namespace Greenshot.Addon.InternetExplorer {
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#if !NETCOREAPP30
|
||||||
var ieAccessible = new Accessible(directUiWd.Handle);
|
var ieAccessible = new Accessible(directUiWd.Handle);
|
||||||
foreach (var url in ieAccessible.IETabUrls)
|
foreach (var url in ieAccessible.IETabUrls)
|
||||||
{
|
{
|
||||||
yield return url;
|
yield return url;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,18 +2,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
|
@ -0,0 +1,30 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Dapplo.Windows.Common.Structs;
|
||||||
|
using Dapplo.Windows.User32.Enums;
|
||||||
|
using Greenshot.Gfx.Effects;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.LegacyEditor.Configuration.Impl
|
||||||
|
{
|
||||||
|
internal class EditorConfigurationImpl : IniSectionBase<IEditorConfiguration>, IEditorConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IEditorConfiguration
|
||||||
|
|
||||||
|
public IList<Color> RecentColors { get; set; }
|
||||||
|
public IDictionary<string, object> LastUsedFieldValues { get; set; }
|
||||||
|
public bool MatchSizeToCapture { get; set; }
|
||||||
|
public WindowPlacementFlags WindowPlacementFlags { get; set; }
|
||||||
|
public ShowWindowCommands ShowWindowCommand { get; set; }
|
||||||
|
public NativePoint WindowMinPosition { get; set; }
|
||||||
|
public NativePoint WindowMaxPosition { get; set; }
|
||||||
|
public NativeRect WindowNormalPosition { get; set; }
|
||||||
|
public bool ReuseEditor { get; set; }
|
||||||
|
public int FreehandSensitivity { get; set; }
|
||||||
|
public bool SuppressSaveDialogAtClose { get; set; }
|
||||||
|
public DropShadowEffect DropShadowEffectSettings { get; set; }
|
||||||
|
public TornEdgeEffect TornEdgeEffectSettings { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addon.LegacyEditor.Configuration.Impl
|
||||||
|
{
|
||||||
|
public class EditorLanguageImpl : LanguageBase<IEditorLanguage>, IEditorLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of IEditorLanguage
|
||||||
|
|
||||||
|
public string SettingsDestinationEditor { get; }
|
||||||
|
public string EditorAlignBottom { get; }
|
||||||
|
public string EditorAlignCenter { get; }
|
||||||
|
public string EditorAlignHorizontal { get; }
|
||||||
|
public string EditorAlignLeft { get; }
|
||||||
|
public string EditorAlignMiddle { get; }
|
||||||
|
public string EditorAlignRight { get; }
|
||||||
|
public string EditorAlignTop { get; }
|
||||||
|
public string EditorAlignVertical { get; }
|
||||||
|
public string EditorArrange { get; }
|
||||||
|
public string EditorArrowheads { get; }
|
||||||
|
public string EditorArrowheadsBoth { get; }
|
||||||
|
public string EditorArrowheadsEnd { get; }
|
||||||
|
public string EditorArrowheadsNone { get; }
|
||||||
|
public string EditorArrowheadsStart { get; }
|
||||||
|
public string EditorAutocrop { get; }
|
||||||
|
public string EditorBackcolor { get; }
|
||||||
|
public string EditorBlurRadius { get; }
|
||||||
|
public string EditorBold { get; }
|
||||||
|
public string EditorBorder { get; }
|
||||||
|
public string EditorBrightness { get; }
|
||||||
|
public string EditorCancel { get; }
|
||||||
|
public string EditorClipboardfailed { get; }
|
||||||
|
public string EditorClose { get; }
|
||||||
|
public string EditorCloseOnSave { get; }
|
||||||
|
public string EditorCloseOnSaveTitle { get; }
|
||||||
|
public string EditorConfirm { get; }
|
||||||
|
public string EditorCopyimagetoclipboard { get; }
|
||||||
|
public string EditorCopypathtoclipboard { get; }
|
||||||
|
public string EditorCopytoclipboard { get; }
|
||||||
|
public string EditorCrop { get; }
|
||||||
|
public string EditorCursortool { get; }
|
||||||
|
public string EditorCuttoclipboard { get; }
|
||||||
|
public string EditorDeleteelement { get; }
|
||||||
|
public string EditorDownonelevel { get; }
|
||||||
|
public string EditorDowntobottom { get; }
|
||||||
|
public string EditorDrawarrow { get; }
|
||||||
|
public string EditorDrawellipse { get; }
|
||||||
|
public string EditorDrawfreehand { get; }
|
||||||
|
public string EditorDrawhighlighter { get; }
|
||||||
|
public string EditorDrawline { get; }
|
||||||
|
public string EditorDrawrectangle { get; }
|
||||||
|
public string EditorDrawtextbox { get; }
|
||||||
|
public string EditorDuplicate { get; }
|
||||||
|
public string EditorEdit { get; }
|
||||||
|
public string EditorEffects { get; }
|
||||||
|
public string EditorEmail { get; }
|
||||||
|
public string EditorFile { get; }
|
||||||
|
public string EditorFontsize { get; }
|
||||||
|
public string EditorForecolor { get; }
|
||||||
|
public string EditorGrayscale { get; }
|
||||||
|
public string EditorHighlightArea { get; }
|
||||||
|
public string EditorHighlightGrayscale { get; }
|
||||||
|
public string EditorHighlightMagnify { get; }
|
||||||
|
public string EditorHighlightMode { get; }
|
||||||
|
public string EditorHighlightText { get; }
|
||||||
|
public string EditorImagesaved { get; }
|
||||||
|
public string EditorInsertwindow { get; }
|
||||||
|
public string EditorItalic { get; }
|
||||||
|
public string EditorLoadObjects { get; }
|
||||||
|
public string EditorMagnificationFactor { get; }
|
||||||
|
public string EditorMatchCaptureSize { get; }
|
||||||
|
public string EditorObfuscate { get; }
|
||||||
|
public string EditorObfuscateBlur { get; }
|
||||||
|
public string EditorObfuscateMode { get; }
|
||||||
|
public string EditorObfuscatePixelize { get; }
|
||||||
|
public string EditorObject { get; }
|
||||||
|
public string EditorOpendirinexplorer { get; }
|
||||||
|
public string EditorPastefromclipboard { get; }
|
||||||
|
public string EditorPixelSize { get; }
|
||||||
|
public string EditorPreviewQuality { get; }
|
||||||
|
public string EditorPrint { get; }
|
||||||
|
public string EditorRedo { get; }
|
||||||
|
public string EditorResetsize { get; }
|
||||||
|
public string EditorResizePercent { get; }
|
||||||
|
public string EditorResizePixel { get; }
|
||||||
|
public string EditorSave { get; }
|
||||||
|
public string EditorSaveas { get; }
|
||||||
|
public string EditorSaveObjects { get; }
|
||||||
|
public string EditorSelectall { get; }
|
||||||
|
public string EditorSenttoprinter { get; }
|
||||||
|
public string EditorShadow { get; }
|
||||||
|
public string EditorStoredtoclipboard { get; }
|
||||||
|
public string EditorThickness { get; }
|
||||||
|
public string EditorTitle { get; }
|
||||||
|
public string EditorTornEdge { get; }
|
||||||
|
public string EditorUndo { get; }
|
||||||
|
public string EditorUponelevel { get; }
|
||||||
|
public string EditorUptotop { get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,10 +30,10 @@ using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Common.Extensions;
|
using Dapplo.Windows.Common.Extensions;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
|
using Greenshot.Addon.LegacyEditor.Configuration.Impl;
|
||||||
using Greenshot.Addon.LegacyEditor.Drawing.Adorners;
|
using Greenshot.Addon.LegacyEditor.Drawing.Adorners;
|
||||||
using Greenshot.Addon.LegacyEditor.Drawing.Fields;
|
using Greenshot.Addon.LegacyEditor.Drawing.Fields;
|
||||||
using Greenshot.Addon.LegacyEditor.Drawing.Filters;
|
using Greenshot.Addon.LegacyEditor.Drawing.Filters;
|
||||||
|
@ -59,7 +59,8 @@ namespace Greenshot.Addon.LegacyEditor.Drawing
|
||||||
private const int M11 = 0;
|
private const int M11 = 0;
|
||||||
private const int M22 = 3;
|
private const int M22 = 3;
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
protected static readonly IEditorConfiguration EditorConfig = IniConfig.Current.Get<IEditorConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
protected static readonly IEditorConfiguration EditorConfig = new EditorConfigurationImpl();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// List of available Adorners
|
/// List of available Adorners
|
||||||
|
|
|
@ -24,8 +24,8 @@ using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addon.LegacyEditor.Configuration.Impl;
|
||||||
using Greenshot.Addons.Interfaces.Drawing;
|
using Greenshot.Addons.Interfaces.Drawing;
|
||||||
|
|
||||||
namespace Greenshot.Addon.LegacyEditor.Drawing.Fields
|
namespace Greenshot.Addon.LegacyEditor.Drawing.Fields
|
||||||
|
@ -37,7 +37,9 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Fields
|
||||||
public abstract class AbstractFieldHolder : IFieldHolder
|
public abstract class AbstractFieldHolder : IFieldHolder
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly IEditorConfiguration EditorConfig = IniConfig.Current.Get<IEditorConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly IEditorConfiguration EditorConfig = new EditorConfigurationImpl();
|
||||||
|
|
||||||
[NonSerialized]
|
[NonSerialized]
|
||||||
private readonly IDictionary<IField, PropertyChangedEventHandler> _handlers = new Dictionary<IField, PropertyChangedEventHandler>();
|
private readonly IDictionary<IField, PropertyChangedEventHandler> _handlers = new Dictionary<IField, PropertyChangedEventHandler>();
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Dapplo.Ini;
|
using Greenshot.Addon.LegacyEditor.Configuration.Impl;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Addons.Interfaces.Drawing;
|
using Greenshot.Addons.Interfaces.Drawing;
|
||||||
|
|
||||||
|
@ -49,7 +49,8 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Fields
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public sealed class FieldAggregator : AbstractFieldHolder
|
public sealed class FieldAggregator : AbstractFieldHolder
|
||||||
{
|
{
|
||||||
private static readonly IEditorConfiguration EditorConfig = IniConfig.Current.Get<IEditorConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly IEditorConfiguration EditorConfig = new EditorConfigurationImpl();
|
||||||
|
|
||||||
private readonly IDrawableContainerList _boundContainers;
|
private readonly IDrawableContainerList _boundContainers;
|
||||||
private bool _internalUpdateRunning;
|
private bool _internalUpdateRunning;
|
||||||
|
|
|
@ -33,12 +33,12 @@ using System.IO;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.HttpExtensions;
|
using Dapplo.HttpExtensions;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Common.Extensions;
|
using Dapplo.Windows.Common.Extensions;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Greenshot.Addon.LegacyEditor.Drawing.Fields;
|
using Greenshot.Addon.LegacyEditor.Drawing.Fields;
|
||||||
using Greenshot.Addon.LegacyEditor.Memento;
|
using Greenshot.Addon.LegacyEditor.Memento;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Controls;
|
using Greenshot.Addons.Controls;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
|
@ -57,12 +57,13 @@ namespace Greenshot.Addon.LegacyEditor.Drawing
|
||||||
public sealed class Surface : Control, ISurface, INotifyPropertyChanged
|
public sealed class Surface : Control, ISurface, INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration conf = new CoreConfigurationImpl();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of Surfaces in existance
|
/// The number of Surfaces in existance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int Count { get; private set; }
|
public static int Count { get; private set; }
|
||||||
private static readonly ICoreConfiguration conf = IniConfig.Current.Get<ICoreConfiguration>();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// all elements on the surface, needed with serialization
|
/// all elements on the surface, needed with serialization
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
using Greenshot.Addon.LegacyEditor.Configuration.Impl;
|
||||||
using Dapplo.Language;
|
|
||||||
using Greenshot.Addon.LegacyEditor.Controls;
|
using Greenshot.Addon.LegacyEditor.Controls;
|
||||||
using Greenshot.Addon.LegacyEditor.Drawing;
|
using Greenshot.Addon.LegacyEditor.Drawing;
|
||||||
using Greenshot.Addon.LegacyEditor.Forms;
|
using Greenshot.Addon.LegacyEditor.Forms;
|
||||||
|
@ -41,12 +40,12 @@ namespace Greenshot.Addon.LegacyEditor
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IEditorConfiguration>())
|
.Register(context => new EditorConfigurationImpl())
|
||||||
.As<IEditorConfiguration>()
|
.As<IEditorConfiguration>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IEditorLanguage>())
|
.Register(context => new EditorLanguageImpl())
|
||||||
.As<IEditorLanguage>()
|
.As<IEditorLanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
||||||
<Project>{5b924697-4dcd-4f98-85f1-105cb84b7341}</Project>
|
<Project>{5b924697-4dcd-4f98-85f1-105cb84b7341}</Project>
|
||||||
|
@ -30,20 +51,19 @@
|
||||||
<Version>2.0.4</Version>
|
<Version>2.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
||||||
<Version>1.0.83</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
||||||
<Version>1.0.83</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.HttpExtensions">
|
<PackageReference Include="Dapplo.HttpExtensions">
|
||||||
<Version>0.9.4</Version>
|
<Version>0.9.6</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Log" Version="1.3.11" />
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
<PackageReference Include="Dapplo.Windows.Clipboard">
|
||||||
<Version>0.6.6</Version>
|
<Version>0.7.16</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Windows.Icons">
|
<PackageReference Include="Dapplo.Windows.Icons">
|
||||||
<Version>0.6.6</Version>
|
<Version>0.7.16</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -26,8 +26,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Dapplo.Windows.User32.Enums;
|
using Dapplo.Windows.User32.Enums;
|
||||||
using Greenshot.Gfx.Effects;
|
using Greenshot.Gfx.Effects;
|
||||||
|
@ -41,7 +40,7 @@ namespace Greenshot.Addon.LegacyEditor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Editor")]
|
[IniSection("Editor")]
|
||||||
[Description("Greenshot editor configuration")]
|
[Description("Greenshot editor configuration")]
|
||||||
public interface IEditorConfiguration : IIniSection, INotifyPropertyChanged, ITransactionalProperties
|
public interface IEditorConfiguration : IIniSection
|
||||||
{
|
{
|
||||||
[Description("Last used colors")]
|
[Description("Last used colors")]
|
||||||
IList<Color> RecentColors { get; set; }
|
IList<Color> RecentColors { get; set; }
|
||||||
|
|
|
@ -17,13 +17,12 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// 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 Dapplo.Config.Language;
|
||||||
using Dapplo.Language;
|
|
||||||
|
|
||||||
namespace Greenshot.Addon.LegacyEditor
|
namespace Greenshot.Addon.LegacyEditor
|
||||||
{
|
{
|
||||||
[Language("Editor")]
|
[Language("Editor")]
|
||||||
public interface IEditorLanguage : ILanguage, INotifyPropertyChanged
|
public interface IEditorLanguage : ILanguage
|
||||||
{
|
{
|
||||||
string SettingsDestinationEditor { get; }
|
string SettingsDestinationEditor { get; }
|
||||||
|
|
||||||
|
|
|
@ -2,22 +2,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="ToastNotifications" publicKeyToken="e89d9d7314a7c797" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.4.0" newVersion="2.3.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||||
|
|
|
@ -24,9 +24,8 @@
|
||||||
using Autofac;
|
using Autofac;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Language;
|
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Controls;
|
using Greenshot.Addons.Controls;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.ViewModels;
|
using Greenshot.Addons.ViewModels;
|
||||||
|
@ -39,22 +38,18 @@ namespace Greenshot.Addons
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IUiConfiguration>())
|
.Register(context => new CoreConfigurationImpl())
|
||||||
|
.As<ICoreConfiguration>()
|
||||||
.As<IUiConfiguration>()
|
.As<IUiConfiguration>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<ICoreConfiguration>())
|
.Register(context => new GreenshotLanguageImpl())
|
||||||
.As<ICoreConfiguration>()
|
|
||||||
.SingleInstance();
|
|
||||||
|
|
||||||
builder
|
|
||||||
.Register(context => LanguageLoader.Current.Get<IGreenshotLanguage>())
|
|
||||||
.As<IGreenshotLanguage>()
|
.As<IGreenshotLanguage>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IHttpConfiguration>())
|
.Register(context => new HttpConfigurationImpl())
|
||||||
.As<IHttpConfiguration>()
|
.As<IHttpConfiguration>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
|
@ -69,10 +64,6 @@ namespace Greenshot.Addons
|
||||||
.RegisterType<PleaseWaitForm>()
|
.RegisterType<PleaseWaitForm>()
|
||||||
.AsSelf();
|
.AsSelf();
|
||||||
|
|
||||||
builder.RegisterType<SetupConfig>()
|
|
||||||
.As<IStartable>()
|
|
||||||
.SingleInstance();
|
|
||||||
|
|
||||||
builder.RegisterType<ExportNotification>()
|
builder.RegisterType<ExportNotification>()
|
||||||
.AsSelf()
|
.AsSelf()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
@ -80,15 +71,5 @@ namespace Greenshot.Addons
|
||||||
.AsSelf();
|
.AsSelf();
|
||||||
base.Load(builder);
|
base.Load(builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
private class SetupConfig : IStartable
|
|
||||||
{
|
|
||||||
public void Start()
|
|
||||||
{
|
|
||||||
// Register the after load, so it's called when the configuration is created
|
|
||||||
IniConfig.Current.AfterLoad<ICoreConfiguration>(coreConfiguration => coreConfiguration.AfterLoad());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
141
src/Greenshot.Addons/Config/Impl/CoreConfigurationImpl.cs
Normal file
141
src/Greenshot.Addons/Config/Impl/CoreConfigurationImpl.cs
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Dapplo.Windows.Common.Structs;
|
||||||
|
using Dapplo.Windows.User32.Structs;
|
||||||
|
using Greenshot.Addons.Core;
|
||||||
|
using Greenshot.Addons.Core.Enums;
|
||||||
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
namespace Greenshot.Addons.Config.Impl
|
||||||
|
{
|
||||||
|
public class CoreConfigurationImpl : IniSectionBase<ICoreConfiguration>, ICoreConfiguration
|
||||||
|
{
|
||||||
|
#region Overrides of IniSectionBase<ICoreConfiguration>
|
||||||
|
|
||||||
|
public override void AfterLoad()
|
||||||
|
{
|
||||||
|
CoreConfigurationExtensions.AfterLoad(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
#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 ICaptureConfiguration
|
||||||
|
|
||||||
|
public NativeSize Win10BorderCrop { get; set; }
|
||||||
|
public bool CaptureMousepointer { get; set; }
|
||||||
|
public bool CaptureWindowsInteractive { get; set; }
|
||||||
|
public int CaptureDelay { get; set; }
|
||||||
|
public ScreenCaptureMode ScreenCaptureMode { get; set; }
|
||||||
|
public int ScreenToCapture { get; set; }
|
||||||
|
public WindowCaptureModes WindowCaptureMode { get; set; }
|
||||||
|
public Color DWMBackgroundColor { get; set; }
|
||||||
|
public IList<string> NoGDICaptureForProduct { get; set; }
|
||||||
|
public IList<string> NoDWMCaptureForProduct { get; set; }
|
||||||
|
public bool WindowCaptureRemoveCorners { get; set; }
|
||||||
|
public IList<int> WindowCornerCutShape { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of ICoreConfiguration
|
||||||
|
|
||||||
|
public string Language { get; set; }
|
||||||
|
public string RegionHotkey { get; set; }
|
||||||
|
public string WindowHotkey { get; set; }
|
||||||
|
public string FullscreenHotkey { get; set; }
|
||||||
|
public string LastregionHotkey { get; set; }
|
||||||
|
public string IEHotkey { get; set; }
|
||||||
|
public bool IsFirstLaunch { get; set; }
|
||||||
|
public IList<string> OutputDestinations { get; set; }
|
||||||
|
public IList<string> PickerDestinations { get; set; }
|
||||||
|
public IList<ClipboardFormats> ClipboardFormats { get; set; }
|
||||||
|
public bool WindowCaptureAllChildLocations { get; set; }
|
||||||
|
public bool PlayCameraSound { get; set; }
|
||||||
|
public bool ShowTrayNotification { get; set; }
|
||||||
|
public bool OutputFileCopyPathToClipboard { get; set; }
|
||||||
|
public string OutputFileAsFullpath { get; set; }
|
||||||
|
public bool OutputPrintPromptOptions { get; set; }
|
||||||
|
public bool OutputPrintAllowRotate { get; set; }
|
||||||
|
public bool OutputPrintAllowEnlarge { get; set; }
|
||||||
|
public bool OutputPrintAllowShrink { get; set; }
|
||||||
|
public bool OutputPrintCenter { get; set; }
|
||||||
|
public bool OutputPrintInverted { get; set; }
|
||||||
|
public bool OutputPrintGrayscale { get; set; }
|
||||||
|
public bool OutputPrintMonochrome { get; set; }
|
||||||
|
public byte OutputPrintMonochromeThreshold { get; set; }
|
||||||
|
public bool OutputPrintFooter { get; set; }
|
||||||
|
public string OutputPrintFooterPattern { get; set; }
|
||||||
|
public string NotificationSound { get; set; }
|
||||||
|
public bool UseProxy { get; set; }
|
||||||
|
public bool IECapture { get; set; }
|
||||||
|
public bool IEFieldCapture { get; set; }
|
||||||
|
public IList<string> WindowClassesToCheckForIE { get; set; }
|
||||||
|
public int AutoCropDifference { get; set; }
|
||||||
|
public IList<string> IncludePlugins { get; set; }
|
||||||
|
public IList<string> ExcludePlugins { get; set; }
|
||||||
|
public IList<string> ExcludeDestinations { get; set; }
|
||||||
|
public bool CheckForUpdates { get; set; }
|
||||||
|
public int UpdateCheckInterval { get; set; }
|
||||||
|
public DateTime LastUpdateCheck { get; set; }
|
||||||
|
public bool DisableSettings { get; set; }
|
||||||
|
public bool DisableQuickSettings { get; set; }
|
||||||
|
public bool HideTrayicon { get; set; }
|
||||||
|
public bool HideExpertSettings { get; set; }
|
||||||
|
public bool ThumnailPreview { get; set; }
|
||||||
|
public bool OptimizeForRDP { get; set; }
|
||||||
|
public bool DisableRDPOptimizing { get; set; }
|
||||||
|
public bool MinimizeWorkingSetSize { get; set; }
|
||||||
|
public bool CheckForUnstable { get; set; }
|
||||||
|
public IList<string> ActiveTitleFixes { get; set; }
|
||||||
|
public IDictionary<string, string> TitleFixMatcher { get; set; }
|
||||||
|
public IDictionary<string, string> TitleFixReplacer { get; set; }
|
||||||
|
public IList<string> ExperimentalFeatures { get; set; }
|
||||||
|
public bool EnableSpecialDIBClipboardReader { get; set; }
|
||||||
|
public ClickActions LeftClickAction { get; set; }
|
||||||
|
public ClickActions DoubleClickAction { get; set; }
|
||||||
|
public bool ZoomerEnabled { get; set; }
|
||||||
|
public float ZoomerOpacity { get; set; }
|
||||||
|
public int MaxMenuItemLength { get; set; }
|
||||||
|
public string MailApiTo { get; set; }
|
||||||
|
public string MailApiCC { get; set; }
|
||||||
|
public string MailApiBCC { get; set; }
|
||||||
|
public string LastSaveWithVersion { get; set; }
|
||||||
|
public bool ProcessEXIFOrientation { get; set; }
|
||||||
|
public NativeRect LastCapturedRegion { get; set; }
|
||||||
|
public NativeSize IconSize { get; set; }
|
||||||
|
public int WebRequestTimeout { get; set; }
|
||||||
|
public int WebRequestReadWriteTimeout { get; set; }
|
||||||
|
public bool IsScrollingCaptureEnabled { get; set; }
|
||||||
|
public bool IsPortable { get; set; }
|
||||||
|
public ISet<string> Permissions { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IUiConfiguration
|
||||||
|
|
||||||
|
public WindowStartupLocation DefaultWindowStartupLocation { get; set; }
|
||||||
|
public bool AreWindowLocationsStored { get; set; }
|
||||||
|
public IDictionary<string, WindowPlacement> WindowLocations { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
155
src/Greenshot.Addons/Config/Impl/GreenshotLanguageImpl.cs
Normal file
155
src/Greenshot.Addons/Config/Impl/GreenshotLanguageImpl.cs
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
|
namespace Greenshot.Addons.Config.Impl
|
||||||
|
{
|
||||||
|
internal class GreenshotLanguageImpl : LanguageBase<IGreenshotLanguage>, IGreenshotLanguage
|
||||||
|
{
|
||||||
|
#region Implementation of ICoreTranslations
|
||||||
|
|
||||||
|
public string Cancel { get; }
|
||||||
|
public string Ok { get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Implementation of IGreenshotLanguage
|
||||||
|
|
||||||
|
public string None { get; }
|
||||||
|
public string AboutBugs { get; }
|
||||||
|
public string AboutDonations { get; }
|
||||||
|
public string AboutHost { get; }
|
||||||
|
public string AboutIcons { get; }
|
||||||
|
public string AboutLicense { get; }
|
||||||
|
public string AboutTitle { get; }
|
||||||
|
public string AboutTranslation { get; }
|
||||||
|
public string ApplicationTitle { get; }
|
||||||
|
public string BugreportCancel { get; }
|
||||||
|
public string BugreportInfo { get; }
|
||||||
|
public string BugreportTitle { get; }
|
||||||
|
public string ClipboardError { get; }
|
||||||
|
public string ClipboardInuse { get; }
|
||||||
|
public string Close { get; }
|
||||||
|
public string ColorpickerAlpha { get; }
|
||||||
|
public string ColorpickerApply { get; }
|
||||||
|
public string ColorpickerBlue { get; }
|
||||||
|
public string ColorpickerGreen { get; }
|
||||||
|
public string ColorpickerHtmlcolor { get; }
|
||||||
|
public string ColorpickerRecentcolors { get; }
|
||||||
|
public string ColorpickerRed { get; }
|
||||||
|
public string ColorpickerTitle { get; }
|
||||||
|
public string ColorpickerTransparent { get; }
|
||||||
|
public string ConfigUnauthorizedaccessWrite { get; }
|
||||||
|
public string ContextmenuAbout { get; }
|
||||||
|
public string ContextmenuCapturearea { get; }
|
||||||
|
public string ContextmenuCaptureclipboard { get; }
|
||||||
|
public string ContextmenuCapturefullscreen { get; }
|
||||||
|
public string ContextmenuCapturefullscreenAll { get; }
|
||||||
|
public string ContextmenuCapturefullscreenLeft { get; }
|
||||||
|
public string ContextmenuCapturefullscreenTop { get; }
|
||||||
|
public string ContextmenuCapturefullscreenRight { get; }
|
||||||
|
public string ContextmenuCapturefullscreenBottom { get; }
|
||||||
|
public string ContextmenuCapturelastregion { get; }
|
||||||
|
public string ContextmenuCapturewindow { get; }
|
||||||
|
public string ContextmenuDonate { get; }
|
||||||
|
public string ContextmenuExit { get; }
|
||||||
|
public string ContextmenuHelp { get; }
|
||||||
|
public string ContextmenuOpenfile { get; }
|
||||||
|
public string ContextmenuQuicksettings { get; }
|
||||||
|
public string ContextmenuSettings { get; }
|
||||||
|
public string ContextmenuCaptureie { get; }
|
||||||
|
public string ContextmenuOpenrecentcapture { get; }
|
||||||
|
public string Error { get; }
|
||||||
|
public string ErrorMultipleinstances { get; }
|
||||||
|
public string ErrorNowriteaccess { get; }
|
||||||
|
public string ErrorOpenfile { get; }
|
||||||
|
public string ErrorOpenlink { get; }
|
||||||
|
public string ErrorSave { get; }
|
||||||
|
public string ErrorSaveInvalidChars { get; }
|
||||||
|
public string HelpTitle { get; }
|
||||||
|
public string JpegqualitydialogChoosejpegquality { get; }
|
||||||
|
public string QualitydialogDontaskagain { get; }
|
||||||
|
public string QualitydialogTitle { get; }
|
||||||
|
public string SettingsReducecolors { get; }
|
||||||
|
public string PrintError { get; }
|
||||||
|
public string PrintoptionsAllowcenter { get; }
|
||||||
|
public string PrintoptionsAllowenlarge { get; }
|
||||||
|
public string PrintoptionsAllowrotate { get; }
|
||||||
|
public string PrintoptionsAllowshrink { get; }
|
||||||
|
public string PrintoptionsColors { get; }
|
||||||
|
public string PrintoptionsDontaskagain { get; }
|
||||||
|
public string PrintoptionsPagelayout { get; }
|
||||||
|
public string PrintoptionsPrintcolor { get; }
|
||||||
|
public string PrintoptionsPrintgrayscale { get; }
|
||||||
|
public string PrintoptionsPrintmonochrome { get; }
|
||||||
|
public string PrintoptionsTimestamp { get; }
|
||||||
|
public string PrintoptionsInverted { get; }
|
||||||
|
public string PrintoptionsTitle { get; }
|
||||||
|
public string QuicksettingsDestinationFile { get; }
|
||||||
|
public string SettingsAlwaysshowqualitydialog { get; }
|
||||||
|
public string SettingsAlwaysshowprintoptionsdialog { get; }
|
||||||
|
public string SettingsApplicationsettings { get; }
|
||||||
|
public string SettingsAutostartshortcut { get; }
|
||||||
|
public string SettingsCapture { get; }
|
||||||
|
public string SettingsCaptureMousepointer { get; }
|
||||||
|
public string SettingsCaptureWindowsInteractive { get; }
|
||||||
|
public string SettingsCopypathtoclipboard { get; }
|
||||||
|
public string SettingsDestination { get; }
|
||||||
|
public string SettingsDestinationClipboard { get; }
|
||||||
|
public string SettingsDestinationEditor { get; }
|
||||||
|
public string SettingsDestinationEmail { get; }
|
||||||
|
public string SettingsDestinationFile { get; }
|
||||||
|
public string SettingsDestinationFileas { get; }
|
||||||
|
public string SettingsDestinationPrinter { get; }
|
||||||
|
public string SettingsDestinationPicker { get; }
|
||||||
|
public string SettingsEditor { get; }
|
||||||
|
public string SettingsFilenamepattern { get; }
|
||||||
|
public string SettingsGeneral { get; }
|
||||||
|
public string SettingsIecapture { get; }
|
||||||
|
public string SettingsJpegquality { get; }
|
||||||
|
public string SettingsQualitysettings { get; }
|
||||||
|
public string SettingsLanguage { get; }
|
||||||
|
public string SettingsMessageFilenamepattern { get; }
|
||||||
|
public string SettingsOutput { get; }
|
||||||
|
public string SettingsPlaysound { get; }
|
||||||
|
public string SettingsPlugins { get; }
|
||||||
|
public string SettingsPluginsName { get; }
|
||||||
|
public string SettingsPluginsVersion { get; }
|
||||||
|
public string SettingsPluginsCreatedby { get; }
|
||||||
|
public string SettingsPluginsDllpath { get; }
|
||||||
|
public string SettingsPreferredfilesettings { get; }
|
||||||
|
public string SettingsPrimaryimageformat { get; }
|
||||||
|
public string SettingsPrinter { get; }
|
||||||
|
public string SettingsPrintoptions { get; }
|
||||||
|
public string SettingsRegisterhotkeys { get; }
|
||||||
|
public string SettingsShowflashlight { get; }
|
||||||
|
public string SettingsStoragelocation { get; }
|
||||||
|
public string SettingsTitle { get; }
|
||||||
|
public string SettingsTooltipFilenamepattern { get; }
|
||||||
|
public string SettingsTooltipLanguage { get; }
|
||||||
|
public string SettingsTooltipPrimaryimageformat { get; }
|
||||||
|
public string SettingsTooltipRegisterhotkeys { get; }
|
||||||
|
public string SettingsTooltipStoragelocation { get; }
|
||||||
|
public string SettingsVisualization { get; }
|
||||||
|
public string SettingsShownotify { get; }
|
||||||
|
public string SettingsWaittime { get; }
|
||||||
|
public string SettingsZoom { get; }
|
||||||
|
public string SettingsWindowscapture { get; }
|
||||||
|
public string SettingsWindowCaptureMode { get; }
|
||||||
|
public string SettingsScreenCaptureMode { get; }
|
||||||
|
public string SettingsNetwork { get; }
|
||||||
|
public string SettingsCheckperiod { get; }
|
||||||
|
public string SettingsUsedefaultproxy { get; }
|
||||||
|
public string TooltipFirststart { get; }
|
||||||
|
public string Warning { get; }
|
||||||
|
public string WarningHotkeys { get; }
|
||||||
|
public string Hotkeys { get; }
|
||||||
|
public string WaitIeCapture { get; }
|
||||||
|
public string UpdateFound { get; }
|
||||||
|
public string ExportedTo { get; }
|
||||||
|
public string LatestVersion { get; }
|
||||||
|
public string CurrentVersion { get; }
|
||||||
|
public string Expert { get; }
|
||||||
|
public string DestinationExportFailed { get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
55
src/Greenshot.Addons/Config/Impl/HttpConfigurationImpl.cs
Normal file
55
src/Greenshot.Addons/Config/Impl/HttpConfigurationImpl.cs
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Cache;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Net.Security;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
using System.Security.Principal;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
using Dapplo.HttpExtensions;
|
||||||
|
using Greenshot.Addons.Core;
|
||||||
|
|
||||||
|
namespace Greenshot.Addons.Config.Impl
|
||||||
|
{
|
||||||
|
internal class HttpConfigurationImpl : IniSectionBase<IHttpConfiguration>, IHttpConfiguration
|
||||||
|
{
|
||||||
|
#region Implementation of IHttpSettings
|
||||||
|
|
||||||
|
public IHttpSettings ShallowClone()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AllowAutoRedirect { get; set; }
|
||||||
|
public ICredentials Credentials { get; set; }
|
||||||
|
public ClientCertificateOption ClientCertificateOptions { get; set; }
|
||||||
|
public DecompressionMethods DefaultDecompressionMethods { get; set; }
|
||||||
|
public string DefaultUserAgent { get; set; }
|
||||||
|
public bool Expect100Continue { get; set; }
|
||||||
|
public int MaxAutomaticRedirections { get; set; }
|
||||||
|
public long MaxResponseContentBufferSize { get; set; }
|
||||||
|
public bool PreAuthenticate { get; set; }
|
||||||
|
public TimeSpan RequestTimeout { get; set; }
|
||||||
|
public bool UseCookies { get; set; }
|
||||||
|
public bool UseDefaultCredentials { get; set; }
|
||||||
|
public bool AllowPipelining { get; set; }
|
||||||
|
public AuthenticationLevel AuthenticationLevel { get; set; }
|
||||||
|
public X509CertificateCollection ClientCertificates { get; set; }
|
||||||
|
public TimeSpan ContinueTimeout { get; set; }
|
||||||
|
public TokenImpersonationLevel ImpersonationLevel { get; set; }
|
||||||
|
public long MaxRequestContentBufferSize { get; set; }
|
||||||
|
public int MaxResponseHeadersLength { get; set; }
|
||||||
|
public int ReadWriteTimeout { get; set; }
|
||||||
|
public RequestCacheLevel RequestCacheLevel { get; set; }
|
||||||
|
public bool UseProxy { get; set; }
|
||||||
|
public bool IgnoreSslCertificateErrors { get; set; }
|
||||||
|
public string[] ProxyBypassList { get; set; }
|
||||||
|
public bool ProxyBypassOnLocal { get; set; }
|
||||||
|
public ICredentials ProxyCredentials { get; set; }
|
||||||
|
public Uri ProxyUri { get; set; }
|
||||||
|
public bool UseDefaultCredentialsForProxy { get; set; }
|
||||||
|
public bool UseDefaultProxy { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Gdi32;
|
using Dapplo.Windows.Gdi32;
|
||||||
using Dapplo.Windows.Gdi32.Enums;
|
using Dapplo.Windows.Gdi32.Enums;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Gfx;
|
using Greenshot.Gfx;
|
||||||
|
|
||||||
|
@ -38,7 +38,9 @@ namespace Greenshot.Addons.Controls
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ContextMenuToolStripProfessionalRenderer : ToolStripProfessionalRenderer
|
public class ContextMenuToolStripProfessionalRenderer : ToolStripProfessionalRenderer
|
||||||
{
|
{
|
||||||
private static readonly ICoreConfiguration CoreConfig = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfig = new CoreConfigurationImpl();
|
||||||
|
|
||||||
private Image _scaledCheckbox;
|
private Image _scaledCheckbox;
|
||||||
private bool _newImage;
|
private bool _newImage;
|
||||||
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
|
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
|
||||||
|
|
|
@ -25,8 +25,9 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,12 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
using Dapplo.Config.Interfaces;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Desktop;
|
using Dapplo.Windows.Desktop;
|
||||||
using Dapplo.Windows.Dpi;
|
using Dapplo.Windows.Dpi;
|
||||||
|
@ -194,7 +195,8 @@ namespace Greenshot.Addons.Controls
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var section = IniConfig.Current[configBindable.SectionName];
|
// TODO: Fix this
|
||||||
|
IIniSection section = null; // IniConfig.Current[configBindable.SectionName];
|
||||||
if (section == null)
|
if (section == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -202,7 +204,7 @@ namespace Greenshot.Addons.Controls
|
||||||
|
|
||||||
// Only update the language, so get the actual value and than repopulate
|
// Only update the language, so get the actual value and than repopulate
|
||||||
var currentValue = comboxBox.GetSelectedEnum();
|
var currentValue = comboxBox.GetSelectedEnum();
|
||||||
comboxBox.Populate(section[configBindable.PropertyName].ValueType);
|
comboxBox.Populate(section.GetIniValue(configBindable.PropertyName).ValueType);
|
||||||
comboxBox.SetValue(currentValue);
|
comboxBox.SetValue(currentValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +310,8 @@ namespace Greenshot.Addons.Controls
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var section = IniConfig.Current[configBindable.SectionName];
|
// TODO: Fix this
|
||||||
|
IIniSection section = null;//IniConfig.Current[configBindable.SectionName];
|
||||||
if (section == null)
|
if (section == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -375,7 +378,8 @@ namespace Greenshot.Addons.Controls
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var section = IniConfig.Current[configBindable.SectionName];
|
// TODO: Fix this
|
||||||
|
IIniSection section = null;//IniConfig.Current[configBindable.SectionName];
|
||||||
if (section == null)
|
if (section == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -27,7 +27,7 @@ using System.Windows.Data;
|
||||||
|
|
||||||
namespace Greenshot.Addons.Controls
|
namespace Greenshot.Addons.Controls
|
||||||
{
|
{
|
||||||
public class InvertedBoolenConverter : IValueConverter
|
public class InvertedBooleanConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
|
@ -26,8 +26,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
|
@ -43,7 +43,8 @@ namespace Greenshot.Addons.Controls
|
||||||
public class SaveImageFileDialog : IDisposable
|
public class SaveImageFileDialog : IDisposable
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly ICoreConfiguration conf = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfiguration = new CoreConfigurationImpl();
|
||||||
private readonly ICaptureDetails _captureDetails;
|
private readonly ICaptureDetails _captureDetails;
|
||||||
private DirectoryInfo _eagerlyCreatedDirectory;
|
private DirectoryInfo _eagerlyCreatedDirectory;
|
||||||
private FilterOption[] _filterOptions;
|
private FilterOption[] _filterOptions;
|
||||||
|
@ -145,21 +146,21 @@ namespace Greenshot.Addons.Controls
|
||||||
string initialDirectory = null;
|
string initialDirectory = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
conf.ValidateAndCorrect();
|
CoreConfiguration.ValidateAndCorrect();
|
||||||
initialDirectory = Path.GetDirectoryName(conf.OutputFileAsFullpath);
|
initialDirectory = Path.GetDirectoryName(CoreConfiguration.OutputFileAsFullpath);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
Log.Warn().WriteLine("OutputFileAsFullpath was set to {0}, ignoring due to problem in path.", conf.OutputFileAsFullpath);
|
Log.Warn().WriteLine("OutputFileAsFullpath was set to {0}, ignoring due to problem in path.", CoreConfiguration.OutputFileAsFullpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(initialDirectory) && Directory.Exists(initialDirectory))
|
if (!string.IsNullOrEmpty(initialDirectory) && Directory.Exists(initialDirectory))
|
||||||
{
|
{
|
||||||
SaveFileDialog.InitialDirectory = initialDirectory;
|
SaveFileDialog.InitialDirectory = initialDirectory;
|
||||||
}
|
}
|
||||||
else if (Directory.Exists(conf.OutputFilePath))
|
else if (Directory.Exists(CoreConfiguration.OutputFilePath))
|
||||||
{
|
{
|
||||||
SaveFileDialog.InitialDirectory = conf.OutputFilePath;
|
SaveFileDialog.InitialDirectory = CoreConfiguration.OutputFilePath;
|
||||||
}
|
}
|
||||||
// The following property fixes a problem that the directory where we save is locked (bug #2899790)
|
// The following property fixes a problem that the directory where we save is locked (bug #2899790)
|
||||||
SaveFileDialog.RestoreDirectory = true;
|
SaveFileDialog.RestoreDirectory = true;
|
||||||
|
@ -174,7 +175,7 @@ namespace Greenshot.Addons.Controls
|
||||||
PrepareFilterOptions();
|
PrepareFilterOptions();
|
||||||
var fdf = "";
|
var fdf = "";
|
||||||
var preselect = 0;
|
var preselect = 0;
|
||||||
var outputFileFormatAsString = Enum.GetName(typeof(OutputFormats), conf.OutputFileFormat);
|
var outputFileFormatAsString = Enum.GetName(typeof(OutputFormats), CoreConfiguration.OutputFileFormat);
|
||||||
for (var i = 0; i < _filterOptions.Length; i++)
|
for (var i = 0; i < _filterOptions.Length; i++)
|
||||||
{
|
{
|
||||||
var fo = _filterOptions[i];
|
var fo = _filterOptions[i];
|
||||||
|
@ -223,7 +224,7 @@ namespace Greenshot.Addons.Controls
|
||||||
private void ApplySuggestedValues()
|
private void ApplySuggestedValues()
|
||||||
{
|
{
|
||||||
// build the full path and set dialog properties
|
// build the full path and set dialog properties
|
||||||
FileName = FilenameHelper.GetFilenameWithoutExtensionFromPattern(conf.OutputFileFilenamePattern, _captureDetails);
|
FileName = FilenameHelper.GetFilenameWithoutExtensionFromPattern(CoreConfiguration.OutputFileFilenamePattern, _captureDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CleanUp()
|
private void CleanUp()
|
||||||
|
|
|
@ -26,13 +26,14 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Windows.Common.Extensions;
|
using Dapplo.Windows.Common.Extensions;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Dapplo.Windows.Desktop;
|
using Dapplo.Windows.Desktop;
|
||||||
using Dapplo.Windows.DesktopWindowsManager;
|
using Dapplo.Windows.DesktopWindowsManager;
|
||||||
|
using Dapplo.Windows.DesktopWindowsManager.Structs;
|
||||||
using Dapplo.Windows.User32;
|
using Dapplo.Windows.User32;
|
||||||
using Dapplo.Windows.User32.Enums;
|
using Dapplo.Windows.User32.Enums;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
@ -47,7 +48,8 @@ namespace Greenshot.Addons.Controls
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class ThumbnailForm : FormWithoutActivation
|
public sealed class ThumbnailForm : FormWithoutActivation
|
||||||
{
|
{
|
||||||
private static readonly ICoreConfiguration conf = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration coreConfiguration = new CoreConfigurationImpl();
|
||||||
|
|
||||||
private IntPtr _thumbnailHandle = IntPtr.Zero;
|
private IntPtr _thumbnailHandle = IntPtr.Zero;
|
||||||
|
|
||||||
|
@ -57,9 +59,9 @@ namespace Greenshot.Addons.Controls
|
||||||
FormBorderStyle = FormBorderStyle.None;
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
TopMost = false;
|
TopMost = false;
|
||||||
Enabled = false;
|
Enabled = false;
|
||||||
if (conf.WindowCaptureMode == WindowCaptureModes.Auto || conf.WindowCaptureMode == WindowCaptureModes.Aero)
|
if (coreConfiguration.WindowCaptureMode == WindowCaptureModes.Auto || coreConfiguration.WindowCaptureMode == WindowCaptureModes.Aero)
|
||||||
{
|
{
|
||||||
BackColor = Color.FromArgb(255, conf.DWMBackgroundColor.R, conf.DWMBackgroundColor.G, conf.DWMBackgroundColor.B);
|
BackColor = Color.FromArgb(255, coreConfiguration.DWMBackgroundColor.R, coreConfiguration.DWMBackgroundColor.G, coreConfiguration.DWMBackgroundColor.B);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,13 +34,13 @@ using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Dapplo.Windows.Gdi32.Enums;
|
using Dapplo.Windows.Gdi32.Enums;
|
||||||
using Dapplo.Windows.Gdi32.Structs;
|
using Dapplo.Windows.Gdi32.Structs;
|
||||||
using Dapplo.Windows.User32;
|
using Dapplo.Windows.User32;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Addons.Interfaces.Plugin;
|
using Greenshot.Addons.Interfaces.Plugin;
|
||||||
|
@ -101,7 +101,8 @@ EndSelection:<<<<<<<4
|
||||||
private const int BITMAPFILEHEADER_LENGTH = 14;
|
private const int BITMAPFILEHEADER_LENGTH = 14;
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly object ClipboardLockObject = new object();
|
private static readonly object ClipboardLockObject = new object();
|
||||||
private static readonly ICoreConfiguration CoreConfig = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfig = new CoreConfigurationImpl();
|
||||||
private static readonly string FORMAT_FILECONTENTS = "FileContents";
|
private static readonly string FORMAT_FILECONTENTS = "FileContents";
|
||||||
private static readonly string FORMAT_PNG = "PNG";
|
private static readonly string FORMAT_PNG = "PNG";
|
||||||
private static readonly string FORMAT_PNG_OFFICEART = "PNG+Office Art";
|
private static readonly string FORMAT_PNG_OFFICEART = "PNG+Office Art";
|
||||||
|
|
|
@ -29,8 +29,8 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
|
|
||||||
|
@ -53,7 +53,8 @@ namespace Greenshot.Addons.Core
|
||||||
private static readonly Regex CmdVarRegexp = new Regex(@"%(?<variable>[^%]+)%", RegexOptions.Compiled);
|
private static readonly Regex CmdVarRegexp = new Regex(@"%(?<variable>[^%]+)%", RegexOptions.Compiled);
|
||||||
|
|
||||||
private static readonly Regex SplitRegexp = new Regex(";(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)", RegexOptions.Compiled);
|
private static readonly Regex SplitRegexp = new Regex(";(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)", RegexOptions.Compiled);
|
||||||
private static readonly ICoreConfiguration CoreConfig = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfig = new CoreConfigurationImpl();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove invalid characters from the fully qualified filename
|
/// Remove invalid characters from the fully qualified filename
|
||||||
|
|
|
@ -27,8 +27,9 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Dapplo.Ini;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
using Dapplo.Config.Attributes;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Greenshot.Addons.Core.Enums;
|
using Greenshot.Addons.Core.Enums;
|
||||||
using Greenshot.Core.Configuration;
|
using Greenshot.Core.Configuration;
|
||||||
|
@ -42,7 +43,7 @@ namespace Greenshot.Addons.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Core")]
|
[IniSection("Core")]
|
||||||
[Description("Greenshot core configuration")]
|
[Description("Greenshot core configuration")]
|
||||||
public interface ICoreConfiguration : IIniSection, IFileConfiguration, ICaptureConfiguration, INotifyPropertyChanged, IWriteProtectProperties, IDefaultValue, ITagging, ITransactionalProperties
|
public interface ICoreConfiguration : IIniSection, IFileConfiguration, ICaptureConfiguration, IUiConfiguration
|
||||||
{
|
{
|
||||||
[Description("The language in IETF format (e.g. en-US)")]
|
[Description("The language in IETF format (e.g. en-US)")]
|
||||||
string Language { get; set; }
|
string Language { get; set; }
|
||||||
|
@ -294,7 +295,7 @@ namespace Greenshot.Addons.Core
|
||||||
|
|
||||||
[Description("Defines the base size of the icons (e.g. for the buttons in the editor), default value 16,16 anything bigger will cause scaling")]
|
[Description("Defines the base size of the icons (e.g. for the buttons in the editor), default value 16,16 anything bigger will cause scaling")]
|
||||||
[DefaultValue("16,16")]
|
[DefaultValue("16,16")]
|
||||||
Size IconSize { get; set; }
|
NativeSize IconSize { get; set; }
|
||||||
|
|
||||||
[Description("The connect timeout value for webrequets, these are seconds")]
|
[Description("The connect timeout value for webrequets, these are seconds")]
|
||||||
[DefaultValue(100)]
|
[DefaultValue(100)]
|
||||||
|
|
|
@ -24,9 +24,8 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.HttpExtensions;
|
using Dapplo.HttpExtensions;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ namespace Greenshot.Addons.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Network")]
|
[IniSection("Network")]
|
||||||
[Description("Greenshot network configuration")]
|
[Description("Greenshot network configuration")]
|
||||||
public interface IHttpConfiguration : IIniSection, IHttpSettings, INotifyPropertyChanged, IWriteProtectProperties, IDefaultValue, ITransactionalProperties
|
public interface IHttpConfiguration : IIniSection, IHttpSettings
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -35,11 +35,10 @@ using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Language;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Clipboard;
|
using Dapplo.Windows.Clipboard;
|
||||||
using Dapplo.Windows.Common;
|
using Dapplo.Windows.Common;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Controls;
|
using Greenshot.Addons.Controls;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Addons.Interfaces.Plugin;
|
using Greenshot.Addons.Interfaces.Plugin;
|
||||||
|
@ -58,7 +57,8 @@ namespace Greenshot.Addons.Core
|
||||||
public static class ImageOutput
|
public static class ImageOutput
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly ICoreConfiguration CoreConfig = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfig = new CoreConfigurationImpl();
|
||||||
private static readonly int PROPERTY_TAG_SOFTWARE_USED = 0x0131;
|
private static readonly int PROPERTY_TAG_SOFTWARE_USED = 0x0131;
|
||||||
private static readonly Cache<string, string> TmpFileCache = new Cache<string, string>(10 * 60 * 60, RemoveExpiredTmpFile);
|
private static readonly Cache<string, string> TmpFileCache = new Cache<string, string>(10 * 60 * 60, RemoveExpiredTmpFile);
|
||||||
|
|
||||||
|
@ -139,8 +139,8 @@ namespace Greenshot.Addons.Core
|
||||||
var outputSettings = new SurfaceOutputSettings(FormatForFilename(fileNameWithExtension));
|
var outputSettings = new SurfaceOutputSettings(FormatForFilename(fileNameWithExtension));
|
||||||
if (CoreConfig.OutputFilePromptQuality)
|
if (CoreConfig.OutputFilePromptQuality)
|
||||||
{
|
{
|
||||||
// TODO: Resolve
|
// TODO: Resolve, was static reference
|
||||||
var qualityDialog = new QualityDialog(outputSettings, CoreConfig, LanguageLoader.Current.Get<IGreenshotLanguage>());
|
var qualityDialog = new QualityDialog(outputSettings, CoreConfig, new GreenshotLanguageImpl());
|
||||||
qualityDialog.ShowDialog();
|
qualityDialog.ShowDialog();
|
||||||
}
|
}
|
||||||
// TODO: For now we always overwrite, should be changed
|
// TODO: For now we always overwrite, should be changed
|
||||||
|
|
|
@ -28,7 +28,6 @@ using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.App;
|
using Dapplo.Windows.App;
|
||||||
using Dapplo.Windows.Common;
|
using Dapplo.Windows.Common;
|
||||||
|
@ -36,10 +35,12 @@ using Dapplo.Windows.Common.Extensions;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Dapplo.Windows.Desktop;
|
using Dapplo.Windows.Desktop;
|
||||||
using Dapplo.Windows.DesktopWindowsManager;
|
using Dapplo.Windows.DesktopWindowsManager;
|
||||||
|
using Dapplo.Windows.DesktopWindowsManager.Structs;
|
||||||
using Dapplo.Windows.Gdi32;
|
using Dapplo.Windows.Gdi32;
|
||||||
using Dapplo.Windows.Icons;
|
using Dapplo.Windows.Icons;
|
||||||
using Dapplo.Windows.Kernel32;
|
using Dapplo.Windows.Kernel32;
|
||||||
using Dapplo.Windows.User32.Enums;
|
using Dapplo.Windows.User32.Enums;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
using Greenshot.Gfx;
|
using Greenshot.Gfx;
|
||||||
|
@ -55,7 +56,8 @@ namespace Greenshot.Addons.Core
|
||||||
public static class InteropWindowCaptureExtensions
|
public static class InteropWindowCaptureExtensions
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly ICoreConfiguration CoreConfiguration = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfiguration = new CoreConfigurationImpl();
|
||||||
private static Color _transparentColor = Color.Transparent;
|
private static Color _transparentColor = Color.Transparent;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -29,10 +29,10 @@ using System.ComponentModel;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Icons;
|
using Dapplo.Windows.Icons;
|
||||||
using Dapplo.Windows.Icons.Enums;
|
using Dapplo.Windows.Icons.Enums;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Interfaces.Forms;
|
using Greenshot.Addons.Interfaces.Forms;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ namespace Greenshot.Addons.Core
|
||||||
}
|
}
|
||||||
|
|
||||||
_isHooked = true;
|
_isHooked = true;
|
||||||
var coreConfiguration = IniConfig.Current.Get<ICoreConfiguration>();
|
var coreConfiguration = new CoreConfigurationImpl();
|
||||||
coreConfiguration.PropertyChanged += OnIconSizeChanged;
|
coreConfiguration.PropertyChanged += OnIconSizeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Common;
|
using Dapplo.Windows.Common;
|
||||||
using Dapplo.Windows.Common.Extensions;
|
using Dapplo.Windows.Common.Extensions;
|
||||||
|
@ -43,6 +42,7 @@ using Dapplo.Windows.Icons;
|
||||||
using Dapplo.Windows.User32;
|
using Dapplo.Windows.User32;
|
||||||
using Dapplo.Windows.User32.Enums;
|
using Dapplo.Windows.User32.Enums;
|
||||||
using Dapplo.Windows.User32.Structs;
|
using Dapplo.Windows.User32.Structs;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Interfaces;
|
using Greenshot.Addons.Interfaces;
|
||||||
using Greenshot.Gfx;
|
using Greenshot.Gfx;
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@ namespace Greenshot.Addons.Core
|
||||||
public static class WindowCapture
|
public static class WindowCapture
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private static readonly ICoreConfiguration Configuration = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration Configuration = new CoreConfigurationImpl();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to cleanup the unmanged resource in the iconInfo for the CaptureCursor method
|
/// Used to cleanup the unmanged resource in the iconInfo for the CaptureCursor method
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
using Dapplo.Utils.Extensions;
|
using Dapplo.Utils.Extensions;
|
||||||
|
|
||||||
namespace Greenshot.Addons.Extensions
|
namespace Greenshot.Addons.Extensions
|
||||||
|
|
|
@ -1,162 +1,75 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
|
<PackageReference Include="System.ComponentModel.Composition" Version="4.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Interfaces\IGreenshotContract.cs" />
|
<Compile Remove="Interfaces\IGreenshotContract.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Autofac" Version="4.8.1" />
|
|
||||||
<PackageReference Include="Caliburn.Micro" Version="3.2.0" />
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
<PackageReference Include="CommonServiceLocator">
|
||||||
<Version>2.0.4</Version>
|
<Version>2.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Addons" Version="1.1.3" />
|
|
||||||
<PackageReference Include="Dapplo.Addons.Config" Version="1.1.3" />
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
||||||
<Version>1.0.83</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Toasts">
|
<PackageReference Include="Dapplo.CaliburnMicro.Toasts">
|
||||||
<Version>1.0.83</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
||||||
<Version>1.0.83</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.HttpExtensions">
|
||||||
|
<Version>0.9.6</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
||||||
<Version>0.9.4</Version>
|
<Version>0.9.6</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
||||||
<Version>0.9.4</Version>
|
<Version>0.9.6</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Ini" Version="0.6.2" />
|
|
||||||
<PackageReference Include="Dapplo.InterfaceImpl" Version="0.3.2" />
|
|
||||||
<PackageReference Include="Dapplo.Language" Version="0.6.2" />
|
|
||||||
<PackageReference Include="Dapplo.Log" Version="1.3.11" />
|
|
||||||
<PackageReference Include="Dapplo.Utils" Version="1.1.3" />
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
<PackageReference Include="Dapplo.Windows.Clipboard">
|
||||||
<Version>0.6.6</Version>
|
<Version>0.7.16</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Windows.Icons">
|
<PackageReference Include="Dapplo.Windows.Icons">
|
||||||
<Version>0.6.6</Version>
|
<Version>0.7.16</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Windows.Kernel32" Version="0.6.6" />
|
|
||||||
<PackageReference Include="Dapplo.Windows.Messages" Version="0.6.6" />
|
|
||||||
<PackageReference Include="MahApps.Metro.IconPacks">
|
<PackageReference Include="MahApps.Metro.IconPacks">
|
||||||
<Version>2.3.0</Version>
|
<Version>3.0.0-alpha0082</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Svg">
|
<PackageReference Include="Svg">
|
||||||
<Version>2.3.0</Version>
|
<Version>2.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.ComponentModel.Composition" Version="4.5.0" />
|
|
||||||
<PackageReference Include="System.Reactive" Version="4.1.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Controls\AnimatingForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotRadioButton.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\MovableShowColorForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\MovableShowColorForm.Designer.cs">
|
|
||||||
<DependentUpon>MovableShowColorForm.cs</DependentUpon>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\FormWithoutActivation.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotButton.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotCheckBox.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotComboBox.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotGroupBox.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotLabel.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotTextBox.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotToolStripMenuItem.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\HotkeyControl.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\BackgroundForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\BackgroundForm.Designer.cs">
|
|
||||||
<DependentUpon>BackgroundForm.cs</DependentUpon>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotToolStripButton.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotToolStripLabel.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\GreenshotToolDropDownButton.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\PleaseWaitForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\PleaseWaitForm.Designer.cs">
|
|
||||||
<DependentUpon>PleaseWaitForm.cs</DependentUpon>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\QualityDialog.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\QualityDialog.Designer.cs">
|
|
||||||
<DependentUpon>QualityDialog.cs</DependentUpon>
|
|
||||||
</None>
|
|
||||||
<None Include="Controls\ThumbnailForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Core\GreenshotResources.resx">
|
|
||||||
<DependentUpon>GreenshotResources.cs</DependentUpon>
|
|
||||||
</None>
|
|
||||||
<None Include="Interfaces\IGreenshotContract.cs" />
|
|
||||||
<Page Update="Views\ExportNotificationView.xaml">
|
|
||||||
<Generator>MSBuild:None</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Update="Views\FileConfigPartView.xaml">
|
|
||||||
<Generator>MSBuild:None</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Update="Views\UploadView.xaml">
|
|
||||||
<Generator>MSBuild:None</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\FileConfigPartView.xaml">
|
|
||||||
<Generator>MSBuild:None</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\ExportNotificationView.xaml">
|
|
||||||
<Generator>MSBuild:None</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Views\UploadView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:None</Generator>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Greenshot.Addons
|
namespace Greenshot.Addons
|
||||||
{
|
{
|
||||||
[Language("Core")]
|
[Language("Core")]
|
||||||
public interface IGreenshotLanguage : ILanguage, INotifyPropertyChanged, Dapplo.CaliburnMicro.Translations.ICoreTranslations
|
public interface IGreenshotLanguage : ILanguage, Dapplo.CaliburnMicro.Translations.ICoreTranslations
|
||||||
{
|
{
|
||||||
string None { get; }
|
string None { get; }
|
||||||
string AboutBugs { get; }
|
string AboutBugs { get; }
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Dapplo.Ini;
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
using Greenshot.Gfx.Effects;
|
using Greenshot.Gfx.Effects;
|
||||||
|
@ -35,7 +35,8 @@ namespace Greenshot.Addons.Interfaces.Plugin
|
||||||
{
|
{
|
||||||
public class SurfaceOutputSettings
|
public class SurfaceOutputSettings
|
||||||
{
|
{
|
||||||
private static readonly ICoreConfiguration CoreConfig = IniConfig.Current.Get<ICoreConfiguration>();
|
// TODO: Solve, was static reference!
|
||||||
|
private static readonly ICoreConfiguration CoreConfig = new CoreConfigurationImpl();
|
||||||
private bool _disableReduceColors;
|
private bool _disableReduceColors;
|
||||||
private bool _reduceColors;
|
private bool _reduceColors;
|
||||||
|
|
||||||
|
|
|
@ -2,26 +2,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.3.0" newVersion="2.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="ToastNotifications" publicKeyToken="e89d9d7314a7c797" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.4.0" newVersion="2.3.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||||
|
|
|
@ -37,6 +37,7 @@ using Dapplo.Windows.Common.Extensions;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Dapplo.Windows.Desktop;
|
using Dapplo.Windows.Desktop;
|
||||||
using Dapplo.Windows.DesktopWindowsManager;
|
using Dapplo.Windows.DesktopWindowsManager;
|
||||||
|
using Dapplo.Windows.DesktopWindowsManager.Structs;
|
||||||
using Dapplo.Windows.Gdi32;
|
using Dapplo.Windows.Gdi32;
|
||||||
using Dapplo.Windows.User32;
|
using Dapplo.Windows.User32;
|
||||||
using Dapplo.Windows.User32.Structs;
|
using Dapplo.Windows.User32.Structs;
|
||||||
|
|
|
@ -1,31 +1,44 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
<PackageReference Include="Dapplo.Log" Version="1.3.11" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<PackageReference Include="Dapplo.Windows" Version="0.6.6" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<PackageReference Include="Dapplo.Windows.DesktopWindowsManager" Version="0.6.6" />
|
<Reference Include="System" />
|
||||||
<PackageReference Include="Dapplo.Windows.Gdi32" Version="0.6.6" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<PackageReference Include="Dapplo.Windows.Icons">
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Version>0.6.6</Version>
|
<Reference Include="System.IO.Compression" />
|
||||||
</PackageReference>
|
<Reference Include="System.Net.Http" />
|
||||||
<PackageReference Include="Dapplo.Windows.User32" Version="0.6.6" />
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
<PackageReference Include="Dapplo.Windows.Icons">
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
<Version>0.7.16</Version>
|
||||||
<Name>Greenshot.Gfx</Name>
|
</PackageReference>
|
||||||
</ProjectReference>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -2,18 +2,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
|
@ -1,67 +1,40 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk.Wpf">
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Greenshot.Gfx.Experimental</RootNamespace>
|
|
||||||
<AssemblyName>Greenshot.Gfx.Experimental</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<Optimize>true</Optimize>
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
</ItemGroup>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Numerics" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="BoxBlurSpan.cs" />
|
<Compile Remove="Interfaces\IGreenshotContract.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Structs\Bgra32.cs" />
|
|
||||||
<Compile Include="Structs\Rgb24.cs" />
|
|
||||||
<Compile Include="Structs\SpanInfo.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="app.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Buffers">
|
<PackageReference Include="System.Buffers">
|
||||||
<Version>4.5.0</Version>
|
<Version>4.5.0</Version>
|
||||||
|
@ -73,8 +46,15 @@
|
||||||
<Version>4.5.0</Version>
|
<Version>4.5.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
|
||||||
<Version>4.5.1</Version>
|
<Version>4.5.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
||||||
|
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
||||||
|
<Name>Greenshot.Gfx</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -1,35 +0,0 @@
|
||||||
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.Gfx.Experimental")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("Greenshot.Gfx.Experimental")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("14894a45-aa2c-4bc3-85a3-e388d0bdc1ca")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
|
@ -2,22 +2,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||||
|
|
|
@ -1,25 +1,43 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommonServiceLocator">
|
<PackageReference Include="CommonServiceLocator">
|
||||||
<Version>2.0.4</Version>
|
<Version>2.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
||||||
<Version>1.0.83</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.Log" Version="1.3.11" />
|
|
||||||
<PackageReference Include="Dapplo.Windows.Common" Version="0.6.6" />
|
|
||||||
<PackageReference Include="Dapplo.Windows.Dpi" Version="0.6.6" />
|
|
||||||
<PackageReference Include="Svg">
|
<PackageReference Include="Svg">
|
||||||
<Version>2.3.0</Version>
|
<Version>2.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -26,8 +26,8 @@ using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using Dapplo.CaliburnMicro.Extensions;
|
using Dapplo.CaliburnMicro.Extensions;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Windows.Desktop;
|
using Dapplo.Windows.Desktop;
|
||||||
|
using Greenshot.Addons.Config.Impl;
|
||||||
using Greenshot.Addons.Core;
|
using Greenshot.Addons.Core;
|
||||||
using Greenshot.Core;
|
using Greenshot.Core;
|
||||||
using Greenshot.Core.Enums;
|
using Greenshot.Core.Enums;
|
||||||
|
@ -81,8 +81,7 @@ namespace Greenshot.Tests
|
||||||
[WpfFact]
|
[WpfFact]
|
||||||
public async Task Test_CaptureFlow_DwmWindowSource()
|
public async Task Test_CaptureFlow_DwmWindowSource()
|
||||||
{
|
{
|
||||||
var iniConfig = new IniConfig("Greenshot.Tests", "Greenshot.Tests");
|
ICoreConfiguration config = new CoreConfigurationImpl();
|
||||||
var config = iniConfig.Get<ICoreConfiguration>();
|
|
||||||
|
|
||||||
var windowToCapture = InteropWindowQuery.GetTopLevelWindows().First(window => window.GetCaption().Contains("Notepad"));
|
var windowToCapture = InteropWindowQuery.GetTopLevelWindows().First(window => window.GetCaption().Contains("Notepad"));
|
||||||
var bounds = windowToCapture.GetInfo().Bounds;
|
var bounds = windowToCapture.GetInfo().Bounds;
|
||||||
|
|
|
@ -1,42 +1,15 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFrameworks>net461</TargetFrameworks>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{9B162E60-12D8-44FD-8093-7D40392F23FA}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Greenshot.Tests</RootNamespace>
|
|
||||||
<AssemblyName>Greenshot.Tests</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<Optimize>true</Optimize>
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
</ItemGroup>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
|
@ -62,50 +35,9 @@
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="CommandlineTests.cs" />
|
<None Include="IniTests.cs" />
|
||||||
<Compile Include="IniTests.cs" />
|
|
||||||
<Compile Include="QuantizeTests.cs" />
|
|
||||||
<Compile Include="Extensions\ByteArrayExtensions.cs" />
|
|
||||||
<Compile Include="BlurTests.cs" />
|
|
||||||
<Compile Include="Implementation\BoxBlurOld.cs" />
|
|
||||||
<Compile Include="Murmur3Tests.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="CaptureTests.cs" />
|
|
||||||
<Compile Include="StitchTests.cs" />
|
|
||||||
<Compile Include="UpdateTests.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj">
|
|
||||||
<Project>{ad7cffe2-40e7-46cf-a172-d48cf7ae9a12}</Project>
|
|
||||||
<Name>Greenshot.Addon.Dropbox</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
|
||||||
<Project>{5b924697-4dcd-4f98-85f1-105cb84b7341}</Project>
|
|
||||||
<Name>Greenshot.Addons</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
|
||||||
<Project>{bf35190d-b2a7-4cfa-b397-51cb384cf0d7}</Project>
|
|
||||||
<Name>Greenshot.Core</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Gfx.Experimental\Greenshot.Gfx.Experimental.csproj">
|
|
||||||
<Project>{14894a45-aa2c-4bc3-85a3-e388d0bdc1ca}</Project>
|
|
||||||
<Name>Greenshot.Gfx.Experimental</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
|
||||||
<Project>{f041c685-eb96-4ed1-9ace-0f5bd836610f}</Project>
|
|
||||||
<Name>Greenshot.Gfx</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\Greenshot\Greenshot.csproj">
|
|
||||||
<Project>{cd642bf4-d815-4d67-a0b5-c69f0b8231af}</Project>
|
|
||||||
<Name>Greenshot</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="TestFiles\scroll0.png">
|
<None Include="TestFiles\scroll0.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
@ -121,13 +53,12 @@
|
||||||
<None Include="TestFiles\scroll70.png">
|
<None Include="TestFiles\scroll70.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="TestFiles\project-feed.xml">
|
<None Include="TestFiles\project-feed.xml">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BenchmarkDotNet">
|
<PackageReference Include="BenchmarkDotNet">
|
||||||
<Version>0.11.1</Version>
|
<Version>0.11.1</Version>
|
||||||
|
@ -139,13 +70,13 @@
|
||||||
<Version>2.0.4</Version>
|
<Version>2.0.4</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
||||||
<Version>1.0.75</Version>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
||||||
<Version>0.8.46</Version>
|
<Version>0.9.6</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
|
||||||
<Version>2.6.1</Version>
|
<Version>2.6.2</Version>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -165,7 +96,7 @@
|
||||||
<Version>4.3.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Reflection.TypeExtensions">
|
<PackageReference Include="System.Reflection.TypeExtensions">
|
||||||
<Version>4.5.0</Version>
|
<Version>4.5.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
|
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation">
|
||||||
<Version>4.3.0</Version>
|
<Version>4.3.0</Version>
|
||||||
|
@ -183,7 +114,7 @@
|
||||||
<Version>4.3.1</Version>
|
<Version>4.3.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="xunit">
|
<PackageReference Include="xunit">
|
||||||
<Version>2.4.0</Version>
|
<Version>2.4.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="xunit.abstractions">
|
<PackageReference Include="xunit.abstractions">
|
||||||
<Version>2.0.3</Version>
|
<Version>2.0.3</Version>
|
||||||
|
@ -192,16 +123,25 @@
|
||||||
<Version>0.10.0</Version>
|
<Version>0.10.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="xunit.core">
|
<PackageReference Include="xunit.core">
|
||||||
<Version>2.4.0</Version>
|
<Version>2.4.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="xunit.runner.visualstudio">
|
<PackageReference Include="xunit.runner.visualstudio">
|
||||||
<Version>2.4.0</Version>
|
<Version>2.4.1</Version>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Xunit.StaFact">
|
<PackageReference Include="Xunit.StaFact">
|
||||||
<Version>0.2.17</Version>
|
<Version>0.3.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Gfx.Experimental\Greenshot.Gfx.Experimental.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
|
<ProjectReference Include="..\Greenshot\Greenshot.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -1,35 +0,0 @@
|
||||||
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.Tests")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("Greenshot")]
|
|
||||||
[assembly: AssemblyProduct("Greenshot.Tests")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © Greenshot 2007-2018")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("9b162e60-12d8-44fd-8093-7d40392f23fa")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
|
@ -2,110 +2,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.DotNet.PlatformAbstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.4.3.0" newVersion="1.4.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="xunit.core" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.4.0.4049" newVersion="2.4.0.4049" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="xunit.execution.desktop" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.4.0.4049" newVersion="2.4.0.4049" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.Serialization.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="ToastNotifications" publicKeyToken="e89d9d7314a7c797" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.4.0" newVersion="2.3.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="CommandLine" publicKeyToken="de6f01bd326f8c32" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.3.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||||
|
|
|
@ -10,34 +10,6 @@
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<probing privatePath="Addons" />
|
<probing privatePath="Addons" />
|
||||||
<probing privatePath="App\Greenshot" />
|
<probing privatePath="App\Greenshot" />
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.8.1.0" newVersion="4.8.1.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.4.3.0" newVersion="1.4.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="ToastNotifications" publicKeyToken="e89d9d7314a7c797" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.3.4.0" newVersion="2.3.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Reactive" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Greenshot.Components
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This startup action starts the MainForm
|
/// This startup action starts the MainForm
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Service(nameof(MainFormStartup), nameof(FormsStartup), nameof(CaliburnServices.IniSectionService), TaskSchedulerName = "ui")]
|
[Service(nameof(MainFormStartup), nameof(FormsStartup), nameof(CaliburnServices.ConfigurationService), TaskSchedulerName = "ui")]
|
||||||
public class MainFormStartup : IStartup, IShutdown
|
public class MainFormStartup : IStartup, IShutdown
|
||||||
{
|
{
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace Greenshot.Components
|
||||||
/// Create to fix the sometimes wrongly played sample, especially after first start from IDE
|
/// Create to fix the sometimes wrongly played sample, especially after first start from IDE
|
||||||
/// See: http://www.codeproject.com/KB/audio-video/soundplayerbug.aspx?msg=2487569
|
/// See: http://www.codeproject.com/KB/audio-video/soundplayerbug.aspx?msg=2487569
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Service(nameof(SoundHelper), nameof(CaliburnServices.IniSectionService))]
|
[Service(nameof(SoundHelper), nameof(CaliburnServices.ConfigurationService))]
|
||||||
public class SoundHelper : IStartup, IShutdown
|
public class SoundHelper : IStartup, IShutdown
|
||||||
{
|
{
|
||||||
private readonly ICoreConfiguration _coreConfiguration;
|
private readonly ICoreConfiguration _coreConfiguration;
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.Language;
|
using Dapplo.Config.Language;
|
||||||
|
|
||||||
namespace Greenshot.Configuration
|
namespace Greenshot.Configuration
|
||||||
{
|
{
|
||||||
[Language("Config")]
|
[Language("Config")]
|
||||||
public interface IConfigTranslations : Dapplo.CaliburnMicro.Translations.IConfigTranslations, ILanguage, INotifyPropertyChanged
|
public interface IConfigTranslations : Dapplo.CaliburnMicro.Translations.IConfigTranslations, ILanguage
|
||||||
{
|
{
|
||||||
[DefaultValue("Theme")]
|
[DefaultValue("Theme")]
|
||||||
string Theme { get; }
|
string Theme { get; }
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Dapplo.CaliburnMicro.Metro;
|
using Dapplo.CaliburnMicro.Metro;
|
||||||
using Dapplo.Ini;
|
using Dapplo.Config.Ini;
|
||||||
using Dapplo.InterfaceImpl.Extensions;
|
|
||||||
|
|
||||||
namespace Greenshot.Configuration
|
namespace Greenshot.Configuration
|
||||||
{
|
{
|
||||||
[IniSection("Metro")]
|
[IniSection("Metro")]
|
||||||
public interface IMetroConfiguration : IIniSection, ITransactionalProperties
|
public interface IMetroConfiguration : IIniSection
|
||||||
{
|
{
|
||||||
[DefaultValue(Themes.BaseLight)]
|
[DefaultValue(Themes.BaseLight)]
|
||||||
Themes Theme { get; set; }
|
Themes Theme { get; set; }
|
||||||
|
|
34
src/Greenshot/Configuration/Impl/ConfigTranslationsImpl.cs
Normal file
34
src/Greenshot/Configuration/Impl/ConfigTranslationsImpl.cs
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#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.Configuration.Impl
|
||||||
|
{
|
||||||
|
internal class ConfigTranslationsImpl : LanguageBase<IConfigTranslations>, IConfigTranslations
|
||||||
|
{
|
||||||
|
public string Filter { get; }
|
||||||
|
|
||||||
|
public string Theme { get; }
|
||||||
|
}
|
||||||
|
}
|
34
src/Greenshot/Configuration/Impl/MetroConfigurationImpl.cs
Normal file
34
src/Greenshot/Configuration/Impl/MetroConfigurationImpl.cs
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#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.CaliburnMicro.Metro;
|
||||||
|
using Dapplo.Config.Ini;
|
||||||
|
|
||||||
|
namespace Greenshot.Configuration.Impl
|
||||||
|
{
|
||||||
|
internal class MetroConfigurationImpl : IniSectionBase<IMetroConfiguration>, IMetroConfiguration
|
||||||
|
{
|
||||||
|
public Themes Theme { get; set; }
|
||||||
|
public ThemeAccents ThemeAccent { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,7 +33,6 @@ using System.Security.Permissions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dapplo.CaliburnMicro;
|
using Dapplo.CaliburnMicro;
|
||||||
using Greenshot.Helpers;
|
using Greenshot.Helpers;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Log;
|
using Dapplo.Log;
|
||||||
using Dapplo.Windows.Common.Structs;
|
using Dapplo.Windows.Common.Structs;
|
||||||
using Greenshot.Addons;
|
using Greenshot.Addons;
|
||||||
|
|
|
@ -2,82 +2,15 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ApplicationIcon>icons\applicationIcon\icon.ico</ApplicationIcon>
|
<ApplicationIcon>icons\applicationIcon\icon.ico</ApplicationIcon>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<ApplicationManifest>greenshot.manifest</ApplicationManifest>
|
<ApplicationManifest>greenshot.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' ">
|
||||||
<Compile Remove="Components\GreenshotClient.cs" />
|
|
||||||
<Compile Remove="Components\GreenshotServer.cs" />
|
|
||||||
<Compile Remove="Components\UpdateService.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<FrameworkReference Include="Microsoft.DesktopUI" />
|
<FrameworkReference Include="Microsoft.DesktopUI" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Autofac.Extras.CommonServiceLocator">
|
|
||||||
<Version>5.0.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="CommandLineParser">
|
|
||||||
<Version>2.3.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="CommonServiceLocator">
|
|
||||||
<Version>2.0.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="ControlzEx" Version="3.0.2.4" />
|
|
||||||
<PackageReference Include="Dapplo.Addons.Bootstrapper" Version="1.1.3" />
|
|
||||||
<PackageReference Include="Dapplo.Addons.Config">
|
|
||||||
<Version>1.1.3</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
|
||||||
<Version>1.0.83</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Metro">
|
|
||||||
<Version>1.0.83</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Toasts">
|
|
||||||
<Version>1.0.83</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
|
||||||
<Version>1.0.83</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
|
||||||
<Version>0.9.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
|
||||||
<Version>0.9.4</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Log" Version="1.3.11" />
|
|
||||||
<PackageReference Include="Dapplo.Log.LogFile">
|
|
||||||
<Version>1.3.11</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Log.Loggers">
|
|
||||||
<Version>1.3.11</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Clipboard">
|
|
||||||
<Version>0.6.6</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Icons">
|
|
||||||
<Version>0.6.6</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Dapplo.Windows.Input" Version="0.6.6" />
|
|
||||||
<PackageReference Include="Dapplo.Windows.Multimedia">
|
|
||||||
<Version>0.6.6</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="gong-wpf-dragdrop">
|
|
||||||
<Version>1.1.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="MahApps.Metro.IconPacks">
|
|
||||||
<Version>2.3.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Svg">
|
|
||||||
<Version>2.3.0</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="System.Collections">
|
<PackageReference Include="System.Collections">
|
||||||
<Version>4.3.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -117,79 +50,95 @@
|
||||||
<PackageReference Include="System.Runtime.Extensions">
|
<PackageReference Include="System.Runtime.Extensions">
|
||||||
<Version>4.3.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="ToastNotifications" Version="2.3.4" />
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Net.Http.WebRequest" />
|
||||||
|
<Reference Include="System.Runtime.Caching" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Windows" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Greenshot.Addon.InternetExplorer\Greenshot.Addon.InternetExplorer.csproj">
|
<PackageReference Include="Autofac.Extras.CommonServiceLocator">
|
||||||
<Name>Greenshot.Addon.InternetExplorer</Name>
|
<Version>5.0.0</Version>
|
||||||
</ProjectReference>
|
</PackageReference>
|
||||||
<ProjectReference Include="..\Greenshot.Addon.LegacyEditor\Greenshot.Addon.LegacyEditor.csproj">
|
<PackageReference Include="CommandLineParser">
|
||||||
<Name>Greenshot.Addon.LegacyEditor</Name>
|
<Version>2.3.0</Version>
|
||||||
</ProjectReference>
|
</PackageReference>
|
||||||
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj">
|
<PackageReference Include="CommonServiceLocator">
|
||||||
<Name>Greenshot.Core</Name>
|
<Version>2.0.4</Version>
|
||||||
</ProjectReference>
|
</PackageReference>
|
||||||
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj">
|
<PackageReference Include="Dapplo.CaliburnMicro.Configuration">
|
||||||
<Name>Greenshot.Gfx</Name>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</ProjectReference>
|
</PackageReference>
|
||||||
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj">
|
<PackageReference Include="Dapplo.CaliburnMicro.Metro">
|
||||||
<Name>Greenshot.Addons</Name>
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
</ProjectReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.CaliburnMicro.Toasts">
|
||||||
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.CaliburnMicro.Translations">
|
||||||
|
<Version>1.1.1-gd01f910204</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.HttpExtensions.JsonNet">
|
||||||
|
<Version>0.9.6</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.HttpExtensions.OAuth">
|
||||||
|
<Version>0.9.6</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.Log.LogFile">
|
||||||
|
<Version>1.3.11</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.Log.Loggers">
|
||||||
|
<Version>1.3.11</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.Windows.Clipboard">
|
||||||
|
<Version>0.7.16</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.Windows.Icons">
|
||||||
|
<Version>0.7.16</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Dapplo.Windows.Multimedia">
|
||||||
|
<Version>0.7.16</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="gong-wpf-dragdrop">
|
||||||
|
<Version>1.1.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MahApps.Metro.IconPacks">
|
||||||
|
<Version>3.0.0-alpha0082</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Svg">
|
||||||
|
<Version>2.3.0</Version>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Components\GreenshotClient.cs" />
|
<ProjectReference Include="..\Greenshot.Addon.LegacyEditor\Greenshot.Addon.LegacyEditor.csproj" />
|
||||||
<None Include="Components\GreenshotServer.cs" />
|
<ProjectReference Include="..\Greenshot.Core\Greenshot.Core.csproj" />
|
||||||
<None Include="Components\UpdateService.cs" />
|
<ProjectReference Include="..\Greenshot.Gfx\Greenshot.Gfx.csproj" />
|
||||||
<None Include="Ui\Configuration\Views\ClipboardDestinationConfigView.xaml">
|
<ProjectReference Include="..\Greenshot.Addons\Greenshot.Addons.csproj" />
|
||||||
<Generator>MSBuild:Compile</Generator>
|
</ItemGroup>
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
<ItemGroup>
|
||||||
<None Include="Ui\Configuration\Views\DestinationPickerConfigView.xaml">
|
<Compile Remove="Components\GreenshotClient.cs" />
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Compile Remove="Components\GreenshotServer.cs" />
|
||||||
<SubType>Designer</SubType>
|
<Compile Remove="Components\UpdateService.cs" />
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\ConfigView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\CaptureConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\PrintConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\OutputConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\NetworkConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\GeneralConfigView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Configuration\Views\UiConfigView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Misc\Views\ErrorView.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Misc\Views\SplashView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</None>
|
|
||||||
<None Include="Ui\Notifications\Views\UpdateNotificationView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -26,11 +26,10 @@ using Autofac.Features.AttributeFilters;
|
||||||
using Dapplo.Addons;
|
using Dapplo.Addons;
|
||||||
using Dapplo.CaliburnMicro.Configuration;
|
using Dapplo.CaliburnMicro.Configuration;
|
||||||
using Dapplo.CaliburnMicro.Security;
|
using Dapplo.CaliburnMicro.Security;
|
||||||
using Dapplo.Ini;
|
|
||||||
using Dapplo.Language;
|
|
||||||
using Greenshot.Addons.Components;
|
using Greenshot.Addons.Components;
|
||||||
using Greenshot.Components;
|
using Greenshot.Components;
|
||||||
using Greenshot.Configuration;
|
using Greenshot.Configuration;
|
||||||
|
using Greenshot.Configuration.Impl;
|
||||||
using Greenshot.Forms;
|
using Greenshot.Forms;
|
||||||
using Greenshot.Helpers;
|
using Greenshot.Helpers;
|
||||||
using Greenshot.Ui.Configuration.ViewModels;
|
using Greenshot.Ui.Configuration.ViewModels;
|
||||||
|
@ -46,12 +45,12 @@ namespace Greenshot
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<IMetroConfiguration>())
|
.Register(context => new MetroConfigurationImpl())
|
||||||
.As<IMetroConfiguration>()
|
.As<IMetroConfiguration>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => LanguageLoader.Current.Get<IConfigTranslations>())
|
.Register(context => new ConfigTranslationsImpl())
|
||||||
.As<IConfigTranslations>()
|
.As<IConfigTranslations>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
d:DataContext="{d:DesignInstance viewModels:CaptureConfigViewModel,IsDesignTimeCreatable=False}"
|
d:DataContext="{d:DesignInstance viewModels:CaptureConfigViewModel,IsDesignTimeCreatable=False}"
|
||||||
>
|
>
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<controls:InvertedBoolenConverter x:Key="InvertedBoolenConverter" />
|
<controls:InvertedBooleanConverter x:Key="InvertedBooleanConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<GroupBox Header="{Binding GreenshotLanguage.SettingsCapture}">
|
<GroupBox Header="{Binding GreenshotLanguage.SettingsCapture}">
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<mah:NumericUpDown Value="{Binding CoreConfiguration.CaptureDelay}" Maximum="1000" Minimum="0"></mah:NumericUpDown>
|
<mah:NumericUpDown Value="{Binding CoreConfiguration.CaptureDelay}" Maximum="1000" Minimum="0"></mah:NumericUpDown>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<CheckBox Content="{Binding GreenshotLanguage.SettingsCaptureWindowsInteractive}" IsChecked="{Binding CoreConfiguration.CaptureWindowsInteractive}" />
|
<CheckBox Content="{Binding GreenshotLanguage.SettingsCaptureWindowsInteractive}" IsChecked="{Binding CoreConfiguration.CaptureWindowsInteractive}" />
|
||||||
<DockPanel LastChildFill="True" IsEnabled="{Binding CoreConfiguration.CaptureWindowsInteractive,Converter={StaticResource InvertedBoolenConverter}}">
|
<DockPanel LastChildFill="True" IsEnabled="{Binding CoreConfiguration.CaptureWindowsInteractive,Converter={StaticResource InvertedBooleanConverter}}">
|
||||||
<Label Content="{Binding GreenshotLanguage.SettingsWindowCaptureMode}" Width="100" />
|
<Label Content="{Binding GreenshotLanguage.SettingsWindowCaptureMode}" Width="100" />
|
||||||
<ComboBox SelectedValue="{Binding SelectedWindowCaptureMode}" ItemsSource="{Binding WindowCaptureModes}" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
<ComboBox SelectedValue="{Binding SelectedWindowCaptureMode}" ItemsSource="{Binding WindowCaptureModes}" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="Dapplo.Windows" value="https://ci.appveyor.com/nuget/dapplo-windows-pjnkjqjp7t6a" />
|
|
||||||
<add key="Dapplo.Addons" value="https://ci.appveyor.com/nuget/dapplo-addons-8psw2ibvh832" />
|
<add key="Dapplo.Addons" value="https://ci.appveyor.com/nuget/dapplo-addons-8psw2ibvh832" />
|
||||||
|
<add key="Dapplo.Config" value="https://ci.appveyor.com/nuget/dapplo-config-85fagsv5oequ" />
|
||||||
<add key="Dapplo.CaliburnMicro" value="https://ci.appveyor.com/nuget/dapplo-caliburnmicro-46kaa8k8ft4i" />
|
<add key="Dapplo.CaliburnMicro" value="https://ci.appveyor.com/nuget/dapplo-caliburnmicro-46kaa8k8ft4i" />
|
||||||
<add key="Dapplo.HttpExtensions" value="https://ci.appveyor.com/nuget/dapplo-httpextensions-6qa60p3t5ixy" />
|
<add key="Dapplo.HttpExtensions" value="https://ci.appveyor.com/nuget/dapplo-httpextensions-6qa60p3t5ixy" />
|
||||||
|
<add key="Dapplo.Windows" value="https://ci.appveyor.com/nuget/dapplo-windows-pjnkjqjp7t6a" />
|
||||||
|
<add key="myget.dotnetcore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||||
|
<add key="dotnet-core-latest" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
Loading…
Add table
Add a link
Reference in a new issue