diff --git a/src/Greenshot.Addon.Confluence/IConfluenceConfiguration.cs b/src/Greenshot.Addon.Confluence/Configuration/IConfluenceConfiguration.cs
similarity index 91%
rename from src/Greenshot.Addon.Confluence/IConfluenceConfiguration.cs
rename to src/Greenshot.Addon.Confluence/Configuration/IConfluenceConfiguration.cs
index b2888bb83..910197c68 100644
--- a/src/Greenshot.Addon.Confluence/IConfluenceConfiguration.cs
+++ b/src/Greenshot.Addon.Confluence/Configuration/IConfluenceConfiguration.cs
@@ -24,8 +24,7 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
+using Dapplo.Config.Ini;
using Greenshot.Core.Enums;
#endregion
@@ -37,7 +36,7 @@ namespace Greenshot.Addon.Confluence
///
[IniSection("Confluence")]
[Description("Greenshot Confluence Plugin configuration")]
- public interface IConfluenceConfiguration : IIniSection, ITransactionalProperties, INotifyPropertyChanged
+ public interface IConfluenceConfiguration : IIniSection
{
[Description("Url to Confluence system, including wsdl.")]
[DefaultValue("https://confluence")]
diff --git a/src/Greenshot.Addon.Confluence/IConfluenceLanguage.cs b/src/Greenshot.Addon.Confluence/Configuration/IConfluenceLanguage.cs
similarity index 92%
rename from src/Greenshot.Addon.Confluence/IConfluenceLanguage.cs
rename to src/Greenshot.Addon.Confluence/Configuration/IConfluenceLanguage.cs
index a277c983b..c515f2597 100644
--- a/src/Greenshot.Addon.Confluence/IConfluenceLanguage.cs
+++ b/src/Greenshot.Addon.Confluence/Configuration/IConfluenceLanguage.cs
@@ -22,12 +22,12 @@
#endregion
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
namespace Greenshot.Addon.Confluence
{
[Language("Confluence")]
- public interface IConfluenceLanguage : ILanguage, INotifyPropertyChanged
+ public interface IConfluenceLanguage : ILanguage
{
string PluginSettings { get; }
string LoginError { get; }
diff --git a/src/Greenshot.Addon.Confluence/Configuration/Impl/ConfluenceConfigurationImpl.cs b/src/Greenshot.Addon.Confluence/Configuration/Impl/ConfluenceConfigurationImpl.cs
new file mode 100644
index 000000000..5d81feca2
--- /dev/null
+++ b/src/Greenshot.Addon.Confluence/Configuration/Impl/ConfluenceConfigurationImpl.cs
@@ -0,0 +1,46 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Confluence.Configuration.Impl
+{
+ public class ConfluenceConfigurationImpl : IniSectionBase, IConfluenceConfiguration
+ {
+ #region Implementation of IConfluenceConfiguration
+
+ public string Url { get; set; }
+ public int Timeout { get; set; }
+ public OutputFormats UploadFormat { get; set; }
+ public int UploadJpegQuality { get; set; }
+ public bool UploadReduceColors { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public bool OpenPageAfterUpload { get; set; }
+ public bool CopyWikiMarkupForImageToClipboard { get; set; }
+ public string SearchSpaceKey { get; set; }
+ public bool IncludePersonSpaces { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Confluence/Configuration/Impl/ConfluenceLanguageImpl.cs b/src/Greenshot.Addon.Confluence/Configuration/Impl/ConfluenceLanguageImpl.cs
new file mode 100644
index 000000000..b0c57963a
--- /dev/null
+++ b/src/Greenshot.Addon.Confluence/Configuration/Impl/ConfluenceLanguageImpl.cs
@@ -0,0 +1,58 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Confluence.Configuration.Impl
+{
+ public class ConfluenceLanguageImpl : LanguageBase, IConfluenceLanguage
+ {
+ #region Implementation of IConfluenceLanguage
+
+ public string PluginSettings { get; }
+ public string LoginError { get; }
+ public string LabelUrl { get; }
+ public string LabelTimeout { get; }
+ public string LabelUser { get; }
+ public string LabelPassword { get; }
+ public string LoginTitle { get; }
+ public string Ok { get; }
+ public string Cancel { get; }
+ public string OpenPageAfterUpload { get; }
+ public string UploadFormat { get; }
+ public string CopyWikimarkup { get; }
+ public string Filename { get; }
+ public string Upload { get; }
+ public string UploadMenuItem { get; }
+ public string OpenPages { get; }
+ public string SearchPages { get; }
+ public string BrowsePages { get; }
+ public string SearchText { get; }
+ public string Search { get; }
+ public string Loading { get; }
+ public string IncludePersonSpaces { get; }
+ public string CommunicationWait { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Confluence/ConfluenceAddonModule.cs b/src/Greenshot.Addon.Confluence/ConfluenceAddonModule.cs
index 3df62fa52..d2663d22e 100644
--- a/src/Greenshot.Addon.Confluence/ConfluenceAddonModule.cs
+++ b/src/Greenshot.Addon.Confluence/ConfluenceAddonModule.cs
@@ -24,8 +24,9 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Confluence.Configuration.Impl;
using Greenshot.Addon.Confluence.ViewModels;
using Greenshot.Addons.Components;
@@ -37,19 +38,22 @@ namespace Greenshot.Addon.Confluence
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
.RegisterType()
.As()
.SingleInstance();
+
builder
.RegisterType()
.As()
diff --git a/src/Greenshot.Addon.Confluence/FodyWeavers.xml b/src/Greenshot.Addon.Confluence/FodyWeavers.xml
index e258ea534..06305152a 100644
--- a/src/Greenshot.Addon.Confluence/FodyWeavers.xml
+++ b/src/Greenshot.Addon.Confluence/FodyWeavers.xml
@@ -6,4 +6,5 @@
Dapplo.HttpExtensions.JsonSimple
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj b/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj
index d4b77927a..66d173e0b 100644
--- a/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj
+++ b/src/Greenshot.Addon.Confluence/Greenshot.Addon.Confluence.csproj
@@ -1,29 +1,22 @@
-
-
-
+
+
- {C3052651-598A-44E2-AAB3-2E41311D50F9}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Confluence
Greenshot.Addon.Confluence
- v4.6.1
- Properties
- False
- False
- 4
- false
-
-
-
-
-
- 3.5
-
-
+ netcoreapp3.0;net471
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -31,11 +24,8 @@
-
- 3.5
-
+
-
@@ -46,93 +36,34 @@
-
- 3.5
-
-
- 3.0
-
-
- 3.0
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- Never
-
-
- Never
-
-
- Never
-
+
+
-
- MSBuild:Compile
- Designer
-
+
+
+
+
+
-
- {4cca2717-b8a4-44f7-965b-5687107e4921}
- Greenshot.Addon.InternetExplorer
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
- False
-
-
-
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.7.19
-
-
- 0.8.46
-
-
- 0.8.46
-
-
- 0.5.112
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.Confluence/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Confluence/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2b8386382..000000000
--- a/src/Greenshot.Addon.Confluence/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Confluence")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Confluence Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj b/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj
index 224d59284..be6284a84 100644
--- a/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj
+++ b/src/Greenshot.Addon.Dropbox/Greenshot.Addon.Dropbox.csproj
@@ -12,11 +12,11 @@
-
+
-
+
diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandConfigurationExtensions.cs b/src/Greenshot.Addon.ExternalCommand/Configuration/ExternalCommandConfigurationExtensions.cs
similarity index 96%
rename from src/Greenshot.Addon.ExternalCommand/ExternalCommandConfigurationExtensions.cs
rename to src/Greenshot.Addon.ExternalCommand/Configuration/ExternalCommandConfigurationExtensions.cs
index 8b2377e46..09dd9177c 100644
--- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandConfigurationExtensions.cs
+++ b/src/Greenshot.Addon.ExternalCommand/Configuration/ExternalCommandConfigurationExtensions.cs
@@ -26,7 +26,7 @@ using System.IO;
using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons.Core;
-namespace Greenshot.Addon.ExternalCommand
+namespace Greenshot.Addon.ExternalCommand.Configuration
{
///
/// Helper extensions for the external command configuration
diff --git a/src/Greenshot.Addon.ExternalCommand/IExternalCommandConfiguration.cs b/src/Greenshot.Addon.ExternalCommand/Configuration/IExternalCommandConfiguration.cs
similarity index 89%
rename from src/Greenshot.Addon.ExternalCommand/IExternalCommandConfiguration.cs
rename to src/Greenshot.Addon.ExternalCommand/Configuration/IExternalCommandConfiguration.cs
index 6d3796a38..ff71ec3af 100644
--- a/src/Greenshot.Addon.ExternalCommand/IExternalCommandConfiguration.cs
+++ b/src/Greenshot.Addon.ExternalCommand/Configuration/IExternalCommandConfiguration.cs
@@ -25,21 +25,20 @@
using System.Collections.Generic;
using System.ComponentModel;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
+using Dapplo.Config.Ini;
using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.ExternalCommand
+namespace Greenshot.Addon.ExternalCommand.Configuration
{
///
/// Description of FlickrConfiguration.
///
[IniSection("ExternalCommand")]
[Description("Greenshot ExternalCommand Plugin configuration")]
- public interface IExternalCommandConfiguration : IIniSection, IDestinationFileConfiguration, ITransactionalProperties, INotifyPropertyChanged
+ public interface IExternalCommandConfiguration : IIniSection, IDestinationFileConfiguration
{
[Description("The commands that are available.")]
IList Commands { get; set; }
diff --git a/src/Greenshot.Addon.ExternalCommand/IExternalCommandLanguage.cs b/src/Greenshot.Addon.ExternalCommand/Configuration/IExternalCommandLanguage.cs
similarity index 92%
rename from src/Greenshot.Addon.ExternalCommand/IExternalCommandLanguage.cs
rename to src/Greenshot.Addon.ExternalCommand/Configuration/IExternalCommandLanguage.cs
index 88f978307..6da773915 100644
--- a/src/Greenshot.Addon.ExternalCommand/IExternalCommandLanguage.cs
+++ b/src/Greenshot.Addon.ExternalCommand/Configuration/IExternalCommandLanguage.cs
@@ -22,9 +22,9 @@
#endregion
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
-namespace Greenshot.Addon.ExternalCommand
+namespace Greenshot.Addon.ExternalCommand.Configuration
{
[Language("ExternalCommand")]
public interface IExternalCommandLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.ExternalCommand/Configuration/Impl/ExternalCommandConfigurationImpl.cs b/src/Greenshot.Addon.ExternalCommand/Configuration/Impl/ExternalCommandConfigurationImpl.cs
new file mode 100644
index 000000000..5f4c84286
--- /dev/null
+++ b/src/Greenshot.Addon.ExternalCommand/Configuration/Impl/ExternalCommandConfigurationImpl.cs
@@ -0,0 +1,77 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using System.Collections.Generic;
+using Dapplo.Config.Ini;
+using Greenshot.Addon.ExternalCommand.Entities;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
+{
+ public class ExternalCommandConfigurationImpl : IniSectionBase, IExternalCommandConfiguration
+ {
+ #region Overrides of IniSectionBase
+
+ public override void AfterLoad()
+ {
+ ExternalCommandConfigurationExtensions.AfterLoad(this);
+ base.AfterLoad();
+ }
+
+ #endregion
+
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IExternalCommandConfiguration
+
+ public IList Commands { get; set; }
+ public IDictionary Commandline { get; set; }
+ public IDictionary Argument { get; set; }
+ public IDictionary RunInbackground { get; set; }
+ public IDictionary Behaviors { get; set; }
+ public IList DeletedBuildInCommands { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.ExternalCommand/Configuration/Impl/ExternalCommandLanguageImpl.cs b/src/Greenshot.Addon.ExternalCommand/Configuration/Impl/ExternalCommandLanguageImpl.cs
new file mode 100644
index 000000000..fce8fa3c3
--- /dev/null
+++ b/src/Greenshot.Addon.ExternalCommand/Configuration/Impl/ExternalCommandLanguageImpl.cs
@@ -0,0 +1,45 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.ExternalCommand.Configuration.Impl
+{
+ public class ExternalCommandLanguageImpl : LanguageBase, IExternalCommandLanguage
+ {
+ #region Implementation of IExternalCommandLanguage
+
+ public string ContextmenuConfigure { get; }
+ public string SettingsEdit { get; }
+ public string SettingsDelete { get; }
+ public string SettingsNew { get; }
+ public string SettingsDetailTitle { get; }
+ public string SettingsTitle { get; }
+ public string LabelArgument { get; }
+ public string LabelCommand { get; }
+ public string LabelInformation { get; }
+ public string LabelName { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandAddonModule.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandAddonModule.cs
index 0a40ef8f2..51e898cbd 100644
--- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandAddonModule.cs
+++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.ExternalCommand.Configuration;
+using Greenshot.Addon.ExternalCommand.Configuration.Impl;
using Greenshot.Addon.ExternalCommand.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +39,15 @@ namespace Greenshot.Addon.ExternalCommand
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
@@ -60,20 +64,7 @@ namespace Greenshot.Addon.ExternalCommand
.AsSelf()
.SingleInstance();
- builder.RegisterType()
- .As()
- .SingleInstance();
-
base.Load(builder);
}
-
- ///
- private class SetupConfig : IStartable
- {
- public void Start()
- {
- IniConfig.Current.AfterLoad(externalCommandConfiguration => externalCommandConfiguration.AfterLoad());
- }
- }
}
}
diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs
index bece4adc2..2264e41da 100644
--- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs
+++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestination.cs
@@ -29,6 +29,7 @@ using System.Text.RegularExpressions;
using System.Threading.Tasks;
using CliWrap;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.ExternalCommand.Configuration;
using Greenshot.Addon.ExternalCommand.Entities;
using Greenshot.Addons;
using Greenshot.Addons.Components;
@@ -83,31 +84,30 @@ namespace Greenshot.Addon.ExternalCommand
var fullPath = captureDetails.Filename ?? surface.SaveNamedTmpFile(CoreConfiguration, _externalCommandConfiguration);
- using (var cli = new Cli(_externalCommandDefinition.Command))
+ var cli = new Cli(_externalCommandDefinition.Command);
+ var arguments = string.Format(_externalCommandDefinition.Arguments, fullPath);
+ // Execute
+ cli.SetArguments(arguments);
+ var output = await cli.ExecuteAsync().ConfigureAwait(true);
+
+ if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris))
{
- var arguments = string.Format(_externalCommandDefinition.Arguments, fullPath);
- // Execute
- var output = await cli.ExecuteAsync(arguments).ConfigureAwait(true);
-
- if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.ParseOutputForUris))
+ var uriMatches = UriRegexp.Matches(output.StandardOutput);
+ if (uriMatches.Count > 0)
{
- var uriMatches = UriRegexp.Matches(output.StandardOutput);
- if (uriMatches.Count > 0)
- {
- exportInformation.Uri = uriMatches[0].Groups[1].Value;
+ exportInformation.Uri = uriMatches[0].Groups[1].Value;
- using (var clipboardAccessToken = ClipboardNative.Access())
- {
- clipboardAccessToken.ClearContents();
- clipboardAccessToken.SetAsUrl(exportInformation.Uri);
- }
+ using (var clipboardAccessToken = ClipboardNative.Access())
+ {
+ clipboardAccessToken.ClearContents();
+ clipboardAccessToken.SetAsUrl(exportInformation.Uri);
}
}
+ }
- if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit))
- {
- File.Delete(fullPath);
- }
+ if (_externalCommandDefinition.CommandBehavior.HasFlag(CommandBehaviors.DeleteOnExit))
+ {
+ File.Delete(fullPath);
}
_exportNotification.NotifyOfExport(this, exportInformation, surface);
diff --git a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs
index c4c39158a..2547b00fc 100644
--- a/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs
+++ b/src/Greenshot.Addon.ExternalCommand/ExternalCommandDestinationProvider.cs
@@ -30,6 +30,7 @@ using System.Linq;
using Dapplo.Addons;
using Dapplo.CaliburnMicro;
using Dapplo.Log;
+using Greenshot.Addon.ExternalCommand.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Core;
@@ -41,7 +42,7 @@ namespace Greenshot.Addon.ExternalCommand
///
/// Generate the external command destinations
///
- [Service(nameof(ExternalCommandDestinationProvider), nameof(CaliburnServices.IniSectionService))]
+ [Service(nameof(ExternalCommandDestinationProvider), nameof(CaliburnServices.ConfigurationService))]
public sealed class ExternalCommandDestinationProvider : IStartup, IDestinationProvider
{
private static readonly LogSource Log = new LogSource();
diff --git a/src/Greenshot.Addon.ExternalCommand/FodyWeavers.xml b/src/Greenshot.Addon.ExternalCommand/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.ExternalCommand/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj b/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj
index 9dfa21515..0e66eeb2e 100644
--- a/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj
+++ b/src/Greenshot.Addon.ExternalCommand/Greenshot.Addon.ExternalCommand.csproj
@@ -1,42 +1,22 @@
-
-
-
+
+
- {47F23C86-604E-4CC3-8767-B3D4088F30BB}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.ExternalCommand
Greenshot.Addon.ExternalCommand
- v4.6.1
- Properties
- False
- False
- 4
- false
- OnBuildSuccess
-
-
-
-
-
- 3.5
+ netcoreapp3.0;net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -53,121 +33,22 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
-
-
- 1.8.5
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.5.112
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\CliWrap.dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
- False
- Off
- 4194304
- x86
- 4096
-
-
- False
- Off
- 4194304
- AnyCPU
- 4096
-
-
- DEBUG;TRACE
- False
- True
- Full
- true
-
-
- TRACE
- True
- False
- None
- false
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.ExternalCommand/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.ExternalCommand/Properties/AssemblyInfo.cs
deleted file mode 100644
index 9290dcebc..000000000
--- a/src/Greenshot.Addon.ExternalCommand/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.ExternalCommand")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("External command Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandConfigViewModel.cs b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandConfigViewModel.cs
index 739dd836f..d9d79f3e9 100644
--- a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandConfigViewModel.cs
+++ b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandConfigViewModel.cs
@@ -25,6 +25,7 @@ using System.Reactive.Disposables;
using Caliburn.Micro;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.ExternalCommand.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandDetailsViewModel.cs b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandDetailsViewModel.cs
index a4b48561d..567e5f782 100644
--- a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandDetailsViewModel.cs
+++ b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandDetailsViewModel.cs
@@ -22,6 +22,7 @@
#endregion
using Caliburn.Micro;
+using Greenshot.Addon.ExternalCommand.Configuration;
using Greenshot.Addon.ExternalCommand.Entities;
namespace Greenshot.Addon.ExternalCommand.ViewModels
diff --git a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs
index e2abd8f67..b42a6abd4 100644
--- a/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs
+++ b/src/Greenshot.Addon.ExternalCommand/ViewModels/ExternalCommandMasterViewModel.cs
@@ -23,6 +23,7 @@
using System.Linq;
using Caliburn.Micro;
+using Greenshot.Addon.ExternalCommand.Configuration;
using Greenshot.Addon.ExternalCommand.Entities;
namespace Greenshot.Addon.ExternalCommand.ViewModels
diff --git a/src/Greenshot.Addon.Flickr/IFlickrConfiguration.cs b/src/Greenshot.Addon.Flickr/Configuration/IFlickrConfiguration.cs
similarity index 91%
rename from src/Greenshot.Addon.Flickr/IFlickrConfiguration.cs
rename to src/Greenshot.Addon.Flickr/Configuration/IFlickrConfiguration.cs
index 98f90de05..43f8b175a 100644
--- a/src/Greenshot.Addon.Flickr/IFlickrConfiguration.cs
+++ b/src/Greenshot.Addon.Flickr/Configuration/IFlickrConfiguration.cs
@@ -25,14 +25,13 @@
using System.ComponentModel;
using System.Runtime.Serialization;
+using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.Flickr
+namespace Greenshot.Addon.Flickr.Configuration
{
public enum SafetyLevel
{
@@ -46,7 +45,7 @@ namespace Greenshot.Addon.Flickr
///
[IniSection("Flickr")]
[Description("Greenshot Flickr Plugin configuration")]
- public interface IFlickrConfiguration : IIniSection, IDestinationFileConfiguration, INotifyPropertyChanged, ITransactionalProperties, IOAuth1Token
+ public interface IFlickrConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth1Token
{
[Description("IsPublic.")]
[DefaultValue(true)]
diff --git a/src/Greenshot.Addon.Flickr/IFlickrLanguage.cs b/src/Greenshot.Addon.Flickr/Configuration/IFlickrLanguage.cs
similarity index 92%
rename from src/Greenshot.Addon.Flickr/IFlickrLanguage.cs
rename to src/Greenshot.Addon.Flickr/Configuration/IFlickrLanguage.cs
index a238f9f20..316a4fb9a 100644
--- a/src/Greenshot.Addon.Flickr/IFlickrLanguage.cs
+++ b/src/Greenshot.Addon.Flickr/Configuration/IFlickrLanguage.cs
@@ -20,11 +20,11 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
#endregion
-namespace Greenshot.Addon.Flickr
+namespace Greenshot.Addon.Flickr.Configuration
{
[Language("Flickr")]
public interface IFlickrLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.Flickr/Configuration/Impl/FlickrConfigurationImpl.cs b/src/Greenshot.Addon.Flickr/Configuration/Impl/FlickrConfigurationImpl.cs
new file mode 100644
index 000000000..002261d41
--- /dev/null
+++ b/src/Greenshot.Addon.Flickr/Configuration/Impl/FlickrConfigurationImpl.cs
@@ -0,0 +1,76 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Flickr.Configuration.Impl
+{
+ public class FlickrConfigurationImpl : IniSectionBase, IFlickrConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IOAuth1Token
+
+ public string OAuthToken { get; set; }
+ public string OAuthTokenSecret { get; set; }
+ public string OAuthTokenVerifier { get; set; }
+
+ #endregion
+
+ #region Implementation of IFlickrConfiguration
+
+ public bool IsPublic { get; set; }
+ public bool IsFamily { get; set; }
+ public bool IsFriend { get; set; }
+ public SafetyLevel SafetyLevel { get; set; }
+ public bool HiddenFromSearch { get; set; }
+ public bool AfterUploadLinkToClipBoard { get; set; }
+ public bool UsePageLink { get; set; }
+ public string ClientId { get; set; }
+ public string ClientSecret { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Flickr/Configuration/Impl/FlickrLanguageImpl.cs b/src/Greenshot.Addon.Flickr/Configuration/Impl/FlickrLanguageImpl.cs
new file mode 100644
index 000000000..8490fb58f
--- /dev/null
+++ b/src/Greenshot.Addon.Flickr/Configuration/Impl/FlickrLanguageImpl.cs
@@ -0,0 +1,49 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Flickr.Configuration.Impl
+{
+ public class FlickrLanguageImpl : LanguageBase, IFlickrLanguage
+ {
+ #region Implementation of IFlickrLanguage
+
+ public string CommunicationWait { get; }
+ public string Configure { get; }
+ public string LabelAfterUpload { get; }
+ public string LabelAfterUploadLinkToClipBoard { get; }
+ public string LabelHiddenFromSearch { get; }
+ public string LabelSafetyLevel { get; }
+ public string LabelUploadFormat { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UploadSuccess { get; }
+ public string Public { get; }
+ public string Family { get; }
+ public string Friend { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Flickr/FlickrAddonModule.cs b/src/Greenshot.Addon.Flickr/FlickrAddonModule.cs
index 6de005a52..b7f08a5a4 100644
--- a/src/Greenshot.Addon.Flickr/FlickrAddonModule.cs
+++ b/src/Greenshot.Addon.Flickr/FlickrAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Flickr.Configuration;
+using Greenshot.Addon.Flickr.Configuration.Impl;
using Greenshot.Addon.Flickr.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +39,15 @@ namespace Greenshot.Addon.Flickr
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.Flickr/FlickrDestination.cs b/src/Greenshot.Addon.Flickr/FlickrDestination.cs
index b3b6da9eb..d2c899a5b 100644
--- a/src/Greenshot.Addon.Flickr/FlickrDestination.cs
+++ b/src/Greenshot.Addon.Flickr/FlickrDestination.cs
@@ -41,6 +41,7 @@ using Dapplo.HttpExtensions.Extensions;
using Dapplo.HttpExtensions.OAuth;
using Dapplo.Log;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.Flickr.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Controls;
diff --git a/src/Greenshot.Addon.Flickr/FodyWeavers.xml b/src/Greenshot.Addon.Flickr/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.Flickr/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj b/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj
index d1158818c..b1d8a2cf3 100644
--- a/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj
+++ b/src/Greenshot.Addon.Flickr/Greenshot.Addon.Flickr.csproj
@@ -1,42 +1,22 @@
-
-
-
+
+
- {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Flickr
Greenshot.Addon.Flickr
- v4.6.1
- Properties
- False
- False
- 4
- false
- Always
- 3.5
-
-
-
-
-
+ netcoreapp3.0;net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -57,85 +37,26 @@
+
-
-
-
-
-
-
-
-
- Always
- Designer
-
+
+
-
+
+
+
+
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.5.112
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.Flickr/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Flickr/Properties/AssemblyInfo.cs
deleted file mode 100644
index d2d2e05f5..000000000
--- a/src/Greenshot.Addon.Flickr/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Flickr")]
-[assembly: AssemblyDescription("A plugin to upload images to Flickr")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot & F. Noel")]
-[assembly: AssemblyProduct("Flickr Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Flickr/ViewModels/FlickrConfigViewModel.cs b/src/Greenshot.Addon.Flickr/ViewModels/FlickrConfigViewModel.cs
index aebcc0814..5f3f94ec2 100644
--- a/src/Greenshot.Addon.Flickr/ViewModels/FlickrConfigViewModel.cs
+++ b/src/Greenshot.Addon.Flickr/ViewModels/FlickrConfigViewModel.cs
@@ -25,6 +25,7 @@ using System.Collections.Generic;
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.Flickr.Configuration;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.Extensions;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.GooglePhotos/IGooglePhotosConfiguration.cs b/src/Greenshot.Addon.GooglePhotos/Configuration/IGooglePhotosConfiguration.cs
similarity index 91%
rename from src/Greenshot.Addon.GooglePhotos/IGooglePhotosConfiguration.cs
rename to src/Greenshot.Addon.GooglePhotos/Configuration/IGooglePhotosConfiguration.cs
index 6441957a9..b5451d7f4 100644
--- a/src/Greenshot.Addon.GooglePhotos/IGooglePhotosConfiguration.cs
+++ b/src/Greenshot.Addon.GooglePhotos/Configuration/IGooglePhotosConfiguration.cs
@@ -25,21 +25,20 @@
using System.ComponentModel;
using System.Runtime.Serialization;
+using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.GooglePhotos
+namespace Greenshot.Addon.GooglePhotos.Configuration
{
///
/// Description of GooglePhotosConfiguration.
///
[IniSection("GooglePhotos")]
[Description("Greenshot Google Photos Plugin configuration")]
- public interface IGooglePhotosConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token, ITransactionalProperties
+ public interface IGooglePhotosConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token
{
[Description("After upload send Google Photos link to clipboard.")]
[DefaultValue(true)]
diff --git a/src/Greenshot.Addon.GooglePhotos/IGooglePhotosLanguage.cs b/src/Greenshot.Addon.GooglePhotos/Configuration/IGooglePhotosLanguage.cs
similarity index 82%
rename from src/Greenshot.Addon.GooglePhotos/IGooglePhotosLanguage.cs
rename to src/Greenshot.Addon.GooglePhotos/Configuration/IGooglePhotosLanguage.cs
index b21fbba72..ba998c941 100644
--- a/src/Greenshot.Addon.GooglePhotos/IGooglePhotosLanguage.cs
+++ b/src/Greenshot.Addon.GooglePhotos/Configuration/IGooglePhotosLanguage.cs
@@ -1,7 +1,7 @@
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
-namespace Greenshot.Addon.GooglePhotos
+namespace Greenshot.Addon.GooglePhotos.Configuration
{
[Language("GooglePhotos")]
public interface IGooglePhotosLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.GooglePhotos/Configuration/Impl/GooglePhotosConfigurationImpl.cs b/src/Greenshot.Addon.GooglePhotos/Configuration/Impl/GooglePhotosConfigurationImpl.cs
new file mode 100644
index 000000000..db4418dcf
--- /dev/null
+++ b/src/Greenshot.Addon.GooglePhotos/Configuration/Impl/GooglePhotosConfigurationImpl.cs
@@ -0,0 +1,74 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using System;
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
+{
+ public class GooglePhotosConfigurationImpl : IniSectionBase, IGooglePhotosConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IOAuth2Token
+
+ public string OAuth2AccessToken { get; set; }
+ public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
+ public string OAuth2RefreshToken { get; set; }
+
+ #endregion
+
+ #region Implementation of IGooglePhotosConfiguration
+
+ public bool AfterUploadLinkToClipBoard { get; set; }
+ public bool AddFilename { get; set; }
+ public string UploadUser { get; set; }
+ public string UploadAlbum { get; set; }
+ public string ClientId { get; set; }
+ public string ClientSecret { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.GooglePhotos/Configuration/Impl/GooglePhotosLanguageImpl.cs b/src/Greenshot.Addon.GooglePhotos/Configuration/Impl/GooglePhotosLanguageImpl.cs
new file mode 100644
index 000000000..52220ba00
--- /dev/null
+++ b/src/Greenshot.Addon.GooglePhotos/Configuration/Impl/GooglePhotosLanguageImpl.cs
@@ -0,0 +1,44 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.GooglePhotos.Configuration.Impl
+{
+ public class GooglePhotosLanguageImpl : LanguageBase, IGooglePhotosLanguage
+ {
+ #region Implementation of IGooglePhotosLanguage
+
+ public string CommunicationWait { get; }
+ public string Configure { get; }
+ public string LabelAfterUpload { get; }
+ public string LabelAfterUploadLinkToClipBoard { get; }
+ public string LabelUploadFormat { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UploadSuccess { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.GooglePhotos/FodyWeavers.xml b/src/Greenshot.Addon.GooglePhotos/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.GooglePhotos/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.GooglePhotos/GooglePhotosAddonModule.cs b/src/Greenshot.Addon.GooglePhotos/GooglePhotosAddonModule.cs
index b4484e816..68d76015e 100644
--- a/src/Greenshot.Addon.GooglePhotos/GooglePhotosAddonModule.cs
+++ b/src/Greenshot.Addon.GooglePhotos/GooglePhotosAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.GooglePhotos.Configuration;
+using Greenshot.Addon.GooglePhotos.Configuration.Impl;
using Greenshot.Addon.GooglePhotos.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +39,15 @@ namespace Greenshot.Addon.GooglePhotos
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs b/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs
index 369e5b552..920099295 100644
--- a/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs
+++ b/src/Greenshot.Addon.GooglePhotos/GooglePhotosDestination.cs
@@ -39,6 +39,7 @@ using Dapplo.HttpExtensions.OAuth;
using Dapplo.Log;
using Dapplo.Utils;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.GooglePhotos.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Controls;
diff --git a/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj b/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj
index a4f15bc80..27b2eda3c 100644
--- a/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj
+++ b/src/Greenshot.Addon.GooglePhotos/Greenshot.Addon.GooglePhotos.csproj
@@ -1,28 +1,22 @@
-
-
-
+
+
- {1893A2E4-A78A-4713-A8E7-E70058DABEE0}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.GooglePhotos
Greenshot.Addon.GooglePhotos
- v4.6.1
- Properties
- False
- False
- 4
- false
- Always
-
-
- 3.5
-
-
-
+ netcoreapp3.0;net471
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -43,76 +37,26 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
+
+
+
+
-
- MSBuild:Compile
- Designer
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.5.112
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.GooglePhotos/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.GooglePhotos/Properties/AssemblyInfo.cs
deleted file mode 100644
index 3affa2f93..000000000
--- a/src/Greenshot.Addon.GooglePhotos/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.GooglePhotos")]
-[assembly: AssemblyDescription("A plugin to upload images to Google Photos")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot & F. Noel")]
-[assembly: AssemblyProduct("GooglePhotos Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.GooglePhotos/ViewModels/GooglePhotosConfigViewModel.cs b/src/Greenshot.Addon.GooglePhotos/ViewModels/GooglePhotosConfigViewModel.cs
index 06d18fef9..42903e014 100644
--- a/src/Greenshot.Addon.GooglePhotos/ViewModels/GooglePhotosConfigViewModel.cs
+++ b/src/Greenshot.Addon.GooglePhotos/ViewModels/GooglePhotosConfigViewModel.cs
@@ -24,6 +24,7 @@
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.GooglePhotos.Configuration;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.Imgur/IImgurConfiguration.cs b/src/Greenshot.Addon.Imgur/Configuration/IImgurConfiguration.cs
similarity index 92%
rename from src/Greenshot.Addon.Imgur/IImgurConfiguration.cs
rename to src/Greenshot.Addon.Imgur/Configuration/IImgurConfiguration.cs
index 15d021fb3..d2791f6df 100644
--- a/src/Greenshot.Addon.Imgur/IImgurConfiguration.cs
+++ b/src/Greenshot.Addon.Imgur/Configuration/IImgurConfiguration.cs
@@ -26,22 +26,21 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
+using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.Imgur
+namespace Greenshot.Addon.Imgur.Configuration
{
///
/// Description of ImgurConfiguration.
///
[IniSection("Imgur")]
[Description("Greenshot Imgur Plugin configuration")]
- public interface IImgurConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token, ITransactionalProperties, INotifyPropertyChanged
+ public interface IImgurConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token
{
[Description("Url to Imgur system.")]
[DefaultValue("https://api.imgur.com/3")]
diff --git a/src/Greenshot.Addon.Imgur/IImgurLanguage.cs b/src/Greenshot.Addon.Imgur/Configuration/IImgurLanguage.cs
similarity index 92%
rename from src/Greenshot.Addon.Imgur/IImgurLanguage.cs
rename to src/Greenshot.Addon.Imgur/Configuration/IImgurLanguage.cs
index f012f8be5..d740058c7 100644
--- a/src/Greenshot.Addon.Imgur/IImgurLanguage.cs
+++ b/src/Greenshot.Addon.Imgur/Configuration/IImgurLanguage.cs
@@ -20,11 +20,11 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
#endregion
-namespace Greenshot.Addon.Imgur
+namespace Greenshot.Addon.Imgur.Configuration
{
[Language("Imgur")]
public interface IImgurLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.Imgur/Configuration/Impl/ImgurConfigurationImpl.cs b/src/Greenshot.Addon.Imgur/Configuration/Impl/ImgurConfigurationImpl.cs
new file mode 100644
index 000000000..3e9dfde17
--- /dev/null
+++ b/src/Greenshot.Addon.Imgur/Configuration/Impl/ImgurConfigurationImpl.cs
@@ -0,0 +1,84 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using Dapplo.Config.Ini;
+using Greenshot.Addon.Imgur.Entities;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Imgur.Configuration.Impl
+{
+ public class ImgurConfigurationImpl : IniSectionBase, IImgurConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IOAuth2Token
+
+ public string OAuth2AccessToken { get; set; }
+ public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
+ public string OAuth2RefreshToken { get; set; }
+
+ #endregion
+
+ #region Implementation of IImgurConfiguration
+
+ public string ImgurApi3Url { get; set; }
+ public bool CopyLinkToClipboard { get; set; }
+ public bool UsePageLink { get; set; }
+ public bool AnonymousAccess { get; set; }
+ public string ClientId { get; set; }
+ public string ClientSecret { get; set; }
+ public string ApiUrl { get; set; }
+ public bool AddTitle { get; set; }
+ public bool AddFilename { get; set; }
+ public string FilenamePattern { get; set; }
+ public bool TrackHistory { get; set; }
+ public IDictionary ImgurUploadHistory { get; set; }
+ public int Credits { get; set; }
+ public IDictionary RuntimeImgurHistory { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Imgur/Configuration/Impl/ImgurLanguageImpl.cs b/src/Greenshot.Addon.Imgur/Configuration/Impl/ImgurLanguageImpl.cs
new file mode 100644
index 000000000..6623cc5ce
--- /dev/null
+++ b/src/Greenshot.Addon.Imgur/Configuration/Impl/ImgurLanguageImpl.cs
@@ -0,0 +1,53 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Imgur.Configuration.Impl
+{
+ public class ImgurLanguageImpl : LanguageBase, IImgurLanguage
+ {
+ #region Implementation of IImgurLanguage
+
+ public string Cancel { get; }
+ public string ClearQuestion { get; }
+ public string CommunicationWait { get; }
+ public string Configure { get; }
+ public string DeleteQuestion { get; }
+ public string DeleteTitle { get; }
+ public string History { get; }
+ public string LabelClear { get; }
+ public string LabelUploadFormat { get; }
+ public string LabelUrl { get; }
+ public string Ok { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UploadSuccess { get; }
+ public string UsePageLink { get; }
+ public string AnonymousAccess { get; }
+ public string ResetCredentialsButton { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Imgur/FodyWeavers.xml b/src/Greenshot.Addon.Imgur/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.Imgur/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj b/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj
index 4de2e80c4..5bf040da5 100644
--- a/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj
+++ b/src/Greenshot.Addon.Imgur/Greenshot.Addon.Imgur.csproj
@@ -1,44 +1,22 @@
-
-
-
+
+
- {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Imgur
Greenshot.Addon.Imgur
- v4.6.1
- Properties
- False
- False
- 4
- false
- Always
-
-
-
- 3.5
-
-
-
-
+ netcoreapp3.0;net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -59,87 +37,28 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
- Never
-
-
- Never
-
-
- Never
-
-
- Never
-
-
+
+
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
+
+
+
+
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
-
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.8.46
-
-
- 0.5.112
-
-
- 1.6.5
-
-
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.Imgur/ImgurAddonModule.cs b/src/Greenshot.Addon.Imgur/ImgurAddonModule.cs
index 5715462de..901d12f21 100644
--- a/src/Greenshot.Addon.Imgur/ImgurAddonModule.cs
+++ b/src/Greenshot.Addon.Imgur/ImgurAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Imgur.Configuration;
+using Greenshot.Addon.Imgur.Configuration.Impl;
using Greenshot.Addon.Imgur.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +39,15 @@ namespace Greenshot.Addon.Imgur
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.Imgur/ImgurApi.cs b/src/Greenshot.Addon.Imgur/ImgurApi.cs
index c9f9d0066..3bb538680 100644
--- a/src/Greenshot.Addon.Imgur/ImgurApi.cs
+++ b/src/Greenshot.Addon.Imgur/ImgurApi.cs
@@ -37,6 +37,7 @@ using Dapplo.HttpExtensions.JsonNet;
using Dapplo.HttpExtensions.OAuth;
using Dapplo.Log;
using Dapplo.Utils;
+using Greenshot.Addon.Imgur.Configuration;
using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addons.Core;
using Greenshot.Addons.Extensions;
diff --git a/src/Greenshot.Addon.Imgur/ImgurDestination.cs b/src/Greenshot.Addon.Imgur/ImgurDestination.cs
index b5dec259d..e8a724fb7 100644
--- a/src/Greenshot.Addon.Imgur/ImgurDestination.cs
+++ b/src/Greenshot.Addon.Imgur/ImgurDestination.cs
@@ -33,6 +33,7 @@ using Dapplo.Addons;
using Dapplo.Log;
using Dapplo.Windows.Clipboard;
using Dapplo.Windows.Extensions;
+using Greenshot.Addon.Imgur.Configuration;
using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addon.Imgur.ViewModels;
using Greenshot.Addons;
diff --git a/src/Greenshot.Addon.Imgur/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Imgur/Properties/AssemblyInfo.cs
deleted file mode 100644
index 4b782793d..000000000
--- a/src/Greenshot.Addon.Imgur/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Imgur")]
-[assembly: AssemblyDescription("A plugin to upload images to Imgur")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Imgur Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Imgur/ViewModels/ImgurConfigViewModel.cs b/src/Greenshot.Addon.Imgur/ViewModels/ImgurConfigViewModel.cs
index f0dfccf97..cfa003269 100644
--- a/src/Greenshot.Addon.Imgur/ViewModels/ImgurConfigViewModel.cs
+++ b/src/Greenshot.Addon.Imgur/ViewModels/ImgurConfigViewModel.cs
@@ -28,6 +28,7 @@ using Caliburn.Micro;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
using Dapplo.HttpExtensions.OAuth;
+using Greenshot.Addon.Imgur.Configuration;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.Imgur/ViewModels/ImgurHistoryViewModel.cs b/src/Greenshot.Addon.Imgur/ViewModels/ImgurHistoryViewModel.cs
index e8787450a..6df2c0892 100644
--- a/src/Greenshot.Addon.Imgur/ViewModels/ImgurHistoryViewModel.cs
+++ b/src/Greenshot.Addon.Imgur/ViewModels/ImgurHistoryViewModel.cs
@@ -32,6 +32,7 @@ using Caliburn.Micro;
using Dapplo.CaliburnMicro.Extensions;
using Dapplo.Log;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.Imgur.Configuration;
using Greenshot.Addon.Imgur.Entities;
using Greenshot.Addons;
using Greenshot.Addons.Extensions;
diff --git a/src/Greenshot.Addon.Jira/IJiraConfiguration.cs b/src/Greenshot.Addon.Jira/Configuration/IJiraConfiguration.cs
similarity index 88%
rename from src/Greenshot.Addon.Jira/IJiraConfiguration.cs
rename to src/Greenshot.Addon.Jira/Configuration/IJiraConfiguration.cs
index 4ed08b321..06a62eb5f 100644
--- a/src/Greenshot.Addon.Jira/IJiraConfiguration.cs
+++ b/src/Greenshot.Addon.Jira/Configuration/IJiraConfiguration.cs
@@ -24,20 +24,19 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
+using Dapplo.Config.Ini;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.Jira
+namespace Greenshot.Addon.Jira.Configuration
{
///
/// Description of JiraConfiguration.
///
[IniSection("Jira")]
[Description("Greenshot Jira Plugin configuration")]
- public interface IJiraConfiguration : IIniSection, IDestinationFileConfiguration, INotifyPropertyChanged, ITransactionalProperties
+ public interface IJiraConfiguration : IIniSection, IDestinationFileConfiguration
{
[Description("Base url to Jira system, without anything else")]
[DefaultValue("https://jira")]
diff --git a/src/Greenshot.Addon.Jira/IJiraLanguage.cs b/src/Greenshot.Addon.Jira/Configuration/IJiraLanguage.cs
similarity index 92%
rename from src/Greenshot.Addon.Jira/IJiraLanguage.cs
rename to src/Greenshot.Addon.Jira/Configuration/IJiraLanguage.cs
index 9618c2d28..7a4783b78 100644
--- a/src/Greenshot.Addon.Jira/IJiraLanguage.cs
+++ b/src/Greenshot.Addon.Jira/Configuration/IJiraLanguage.cs
@@ -20,11 +20,11 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
#endregion
-namespace Greenshot.Addon.Jira
+namespace Greenshot.Addon.Jira.Configuration
{
[Language("Jira")]
public interface IJiraLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.Jira/Configuration/Impl/JiraConfigurationImpl.cs b/src/Greenshot.Addon.Jira/Configuration/Impl/JiraConfigurationImpl.cs
new file mode 100644
index 000000000..bd0598a9c
--- /dev/null
+++ b/src/Greenshot.Addon.Jira/Configuration/Impl/JiraConfigurationImpl.cs
@@ -0,0 +1,62 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Jira.Configuration.Impl
+{
+ public class JiraConfigurationImpl : IniSectionBase, IJiraConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IJiraConfiguration
+
+ public string Url { get; set; }
+ public int Timeout { get; set; }
+ public int MaxEntries { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Jira/Configuration/Impl/JiraLanguageImpl.cs b/src/Greenshot.Addon.Jira/Configuration/Impl/JiraLanguageImpl.cs
new file mode 100644
index 000000000..d87092338
--- /dev/null
+++ b/src/Greenshot.Addon.Jira/Configuration/Impl/JiraLanguageImpl.cs
@@ -0,0 +1,55 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Jira.Configuration.Impl
+{
+ public class JiraLanguageImpl : LanguageBase, IJiraLanguage
+ {
+ #region Implementation of IJiraLanguage
+
+ public string Cancel { get; }
+ public string ColumnAssignee { get; }
+ public string ColumnCreated { get; }
+ public string ColumnId { get; }
+ public string ColumnReporter { get; }
+ public string ColumnSummary { get; }
+ public string CommunicationWait { get; }
+ public string LabelComment { get; }
+ public string LabelFilename { get; }
+ public string LabelJira { get; }
+ public string LabelJirafilter { get; }
+ public string LabelUploadFormat { get; }
+ public string LabelUrl { get; }
+ public string LoginError { get; }
+ public string LoginTitle { get; }
+ public string Ok { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UploadSuccess { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Jira/FodyWeavers.xml b/src/Greenshot.Addon.Jira/FodyWeavers.xml
index 288d3ebdd..3610b174d 100644
--- a/src/Greenshot.Addon.Jira/FodyWeavers.xml
+++ b/src/Greenshot.Addon.Jira/FodyWeavers.xml
@@ -5,4 +5,5 @@
Dapplo.Jira
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj b/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj
index b3af0d055..fc9b0d6cf 100644
--- a/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj
+++ b/src/Greenshot.Addon.Jira/Greenshot.Addon.Jira.csproj
@@ -1,44 +1,22 @@
-
-
-
+
+
- {19FEEF09-313F-43C7-819D-F1BCA782B08B}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Jira
Greenshot.Addon.Jira
- v4.6.1
- Properties
- False
- False
- 4
- false
- OnBuildSuccess
-
-
-
- 3.5
-
-
-
-
+ net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -61,139 +39,29 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
+
+
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
- False
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.8.46
-
-
- 0.7.15
-
-
- 0.5.112
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\Svg.dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
-
- False
- Off
- 4194304
- x86
- 4096
-
-
- False
- Off
- 4194304
- AnyCPU
- 4096
-
-
- DEBUG;TRACE
- False
- True
- Full
- true
-
-
- TRACE
- True
- False
- None
- false
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.Jira/JiraAddonModule.cs b/src/Greenshot.Addon.Jira/JiraAddonModule.cs
index 885f82411..e78c9cd2c 100644
--- a/src/Greenshot.Addon.Jira/JiraAddonModule.cs
+++ b/src/Greenshot.Addon.Jira/JiraAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Jira.Configuration;
+using Greenshot.Addon.Jira.Configuration.Impl;
using Greenshot.Addon.Jira.ViewModels;
using Greenshot.Addons.Components;
@@ -37,17 +39,19 @@ namespace Greenshot.Addon.Jira
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .RegisterType()
+ .RegisterType()
.As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.Jira/JiraConnector.cs b/src/Greenshot.Addon.Jira/JiraConnector.cs
index a1da3b5c6..9e195a747 100644
--- a/src/Greenshot.Addon.Jira/JiraConnector.cs
+++ b/src/Greenshot.Addon.Jira/JiraConnector.cs
@@ -34,9 +34,12 @@ using System.Windows.Media.Imaging;
using Dapplo.HttpExtensions;
using Dapplo.HttpExtensions.Extensions;
using Dapplo.Jira;
+#if !NETCOREAPP3_0
using Dapplo.Jira.Converters;
+#endif
using Dapplo.Jira.Entities;
using Dapplo.Log;
+using Greenshot.Addon.Jira.Configuration;
using Greenshot.Addons.Core;
using Greenshot.Addons.Core.Credentials;
using Greenshot.Addons.Extensions;
@@ -102,7 +105,9 @@ namespace Greenshot.Addon.Jira
public void UpdateSvgSize(int size)
{
+#if !NETCOREAPP3_0
_jiraClient.Behaviour.SetConfig(new SvgConfiguration { Width = size, Height = size });
+#endif
}
///
diff --git a/src/Greenshot.Addon.Jira/JiraDestination.cs b/src/Greenshot.Addon.Jira/JiraDestination.cs
index 3e72477f6..8e426e454 100644
--- a/src/Greenshot.Addon.Jira/JiraDestination.cs
+++ b/src/Greenshot.Addon.Jira/JiraDestination.cs
@@ -34,6 +34,7 @@ using Dapplo.Addons;
using Dapplo.HttpExtensions;
using Dapplo.Jira.Entities;
using Dapplo.Log;
+using Greenshot.Addon.Jira.Configuration;
using Greenshot.Addon.Jira.ViewModels;
using Greenshot.Addons;
using Greenshot.Addons.Components;
diff --git a/src/Greenshot.Addon.Jira/JiraMonitor.cs b/src/Greenshot.Addon.Jira/JiraMonitor.cs
index 110db6bd6..e329c124d 100644
--- a/src/Greenshot.Addon.Jira/JiraMonitor.cs
+++ b/src/Greenshot.Addon.Jira/JiraMonitor.cs
@@ -36,6 +36,7 @@ using Dapplo.Jira;
using Dapplo.Log;
using Dapplo.Windows.Desktop;
using Dapplo.Windows.User32;
+using Greenshot.Addon.Jira.Configuration;
#endregion
@@ -46,7 +47,7 @@ namespace Greenshot.Addon.Jira
/// It keeps a list of the last "accessed" jiras, and makes it easy to upload to one.
/// Make sure this is instanciated on the UI thread!
///
- [Service(nameof(JiraMonitor), nameof(CaliburnServices.IniSectionService), TaskSchedulerName = "ui")]
+ [Service(nameof(JiraMonitor), nameof(CaliburnServices.ConfigurationService), TaskSchedulerName = "ui")]
public class JiraMonitor : IStartup, IShutdown
{
private readonly IJiraConfiguration _jiraConfiguration;
diff --git a/src/Greenshot.Addon.Jira/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Jira/Properties/AssemblyInfo.cs
deleted file mode 100644
index 71bb42f97..000000000
--- a/src/Greenshot.Addon.Jira/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Jira")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Jira Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Jira/ViewModels/JiraConfigViewModel.cs b/src/Greenshot.Addon.Jira/ViewModels/JiraConfigViewModel.cs
index 4b1a2c2ca..58aa7ef00 100644
--- a/src/Greenshot.Addon.Jira/ViewModels/JiraConfigViewModel.cs
+++ b/src/Greenshot.Addon.Jira/ViewModels/JiraConfigViewModel.cs
@@ -24,6 +24,7 @@
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.Jira.Configuration;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.Jira/ViewModels/JiraViewModel.cs b/src/Greenshot.Addon.Jira/ViewModels/JiraViewModel.cs
index e82d146ef..ea593fbbe 100644
--- a/src/Greenshot.Addon.Jira/ViewModels/JiraViewModel.cs
+++ b/src/Greenshot.Addon.Jira/ViewModels/JiraViewModel.cs
@@ -29,6 +29,7 @@ using System.Windows;
using Caliburn.Micro;
using Dapplo.CaliburnMicro.Extensions;
using Dapplo.Jira.Entities;
+using Greenshot.Addon.Jira.Configuration;
namespace Greenshot.Addon.Jira.ViewModels
{
diff --git a/src/Greenshot.Addon.Lutim/ILutimConfiguration.cs b/src/Greenshot.Addon.Lutim/Configuration/ILutimConfiguration.cs
similarity index 92%
rename from src/Greenshot.Addon.Lutim/ILutimConfiguration.cs
rename to src/Greenshot.Addon.Lutim/Configuration/ILutimConfiguration.cs
index 1e193f83b..0428717fa 100644
--- a/src/Greenshot.Addon.Lutim/ILutimConfiguration.cs
+++ b/src/Greenshot.Addon.Lutim/Configuration/ILutimConfiguration.cs
@@ -21,17 +21,16 @@
using System.Collections.Generic;
using System.ComponentModel;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
+using Dapplo.Config.Ini;
using Greenshot.Addons.Core;
-namespace Greenshot.Addon.Lutim {
+namespace Greenshot.Addon.Lutim.Configuration {
///
/// Description of LutimConfiguration.
///
[IniSection("Lutim")]
[Description("Greenshot Lutim Plugin configuration")]
- public interface ILutimConfiguration : IIniSection, IDestinationFileConfiguration, ITransactionalProperties, INotifyPropertyChanged
+ public interface ILutimConfiguration : IIniSection, IDestinationFileConfiguration
{
[Description("Url to Lutim system.")]
[DefaultValue("https://lut.im/")]
diff --git a/src/Greenshot.Addon.Lutim/ILutimLanguage.cs b/src/Greenshot.Addon.Lutim/Configuration/ILutimLanguage.cs
similarity index 94%
rename from src/Greenshot.Addon.Lutim/ILutimLanguage.cs
rename to src/Greenshot.Addon.Lutim/Configuration/ILutimLanguage.cs
index 726b39934..6c4275296 100644
--- a/src/Greenshot.Addon.Lutim/ILutimLanguage.cs
+++ b/src/Greenshot.Addon.Lutim/Configuration/ILutimLanguage.cs
@@ -22,7 +22,7 @@
#endregion
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
namespace Greenshot.Addon.Lutim
{
diff --git a/src/Greenshot.Addon.Lutim/Configuration/Impl/LutimConfigurationImpl.cs b/src/Greenshot.Addon.Lutim/Configuration/Impl/LutimConfigurationImpl.cs
new file mode 100644
index 000000000..36aab443b
--- /dev/null
+++ b/src/Greenshot.Addon.Lutim/Configuration/Impl/LutimConfigurationImpl.cs
@@ -0,0 +1,65 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using System.Collections.Generic;
+using Dapplo.Config.Ini;
+using Greenshot.Addon.Lutim.Entities;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Lutim.Configuration.Impl
+{
+ public class LutimConfigurationImpl : IniSectionBase, ILutimConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of ILutimConfiguration
+
+ public string LutimUrl { get; set; }
+ public bool CopyLinkToClipboard { get; set; }
+ public IDictionary LutimUploadHistory { get; set; }
+ public IDictionary RuntimeLutimHistory { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Lutim/Configuration/Impl/LutimLanguageImpl.cs b/src/Greenshot.Addon.Lutim/Configuration/Impl/LutimLanguageImpl.cs
new file mode 100644
index 000000000..f4a1016f5
--- /dev/null
+++ b/src/Greenshot.Addon.Lutim/Configuration/Impl/LutimLanguageImpl.cs
@@ -0,0 +1,52 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Lutim.Configuration.Impl
+{
+ public class LutimLanguageImpl : LanguageBase, ILutimLanguage
+ {
+ #region Implementation of ILutimLanguage
+
+ public string Cancel { get; }
+ public string ClearQuestion { get; }
+ public string CommunicationWait { get; }
+ public string Configure { get; }
+ public string DeleteQuestion { get; }
+ public string DeleteTitle { get; }
+ public string History { get; }
+ public string LabelClear { get; }
+ public string LabelUploadFormat { get; }
+ public string LabelUrl { get; }
+ public string Ok { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UploadSuccess { get; }
+ public string UsePageLink { get; }
+ public string AnonymousAccess { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Lutim/FodyWeavers.xml b/src/Greenshot.Addon.Lutim/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.Lutim/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj b/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj
index 3005d5a50..73cdc19d9 100644
--- a/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj
+++ b/src/Greenshot.Addon.Lutim/Greenshot.Addon.Lutim.csproj
@@ -1,42 +1,22 @@
-
-
-
+
+
- {D106F86C-CD3D-44FF-B151-2A5D47268B5C}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Lutim
Greenshot.Addon.Lutim
- v4.6.1
- Properties
- False
- False
- 4
- false
- Always
-
-
-
- 3.5
-
-
+ netcoreapp3.0;net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -57,101 +37,28 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
- Never
-
-
- Never
-
-
- Never
-
-
- Never
-
-
+
+
-
+
+
+
+
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5b924697-4dcd-4f98-85f1-105cb84b7341}
- Greenshot.Addons
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.5.112
-
-
- 1.6.5
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
-
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Lutim/LutimAddonModule.cs b/src/Greenshot.Addon.Lutim/LutimAddonModule.cs
index eb7fa3f57..3e7e483bb 100644
--- a/src/Greenshot.Addon.Lutim/LutimAddonModule.cs
+++ b/src/Greenshot.Addon.Lutim/LutimAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Lutim.Configuration;
+using Greenshot.Addon.Lutim.Configuration.Impl;
using Greenshot.Addon.Lutim.ViewModels;
using Greenshot.Addons.Components;
@@ -37,17 +39,19 @@ namespace Greenshot.Addon.Lutim
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .RegisterType()
+ .RegisterType()
.As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.Lutim/LutimApi.cs b/src/Greenshot.Addon.Lutim/LutimApi.cs
index e82c73746..53b185615 100644
--- a/src/Greenshot.Addon.Lutim/LutimApi.cs
+++ b/src/Greenshot.Addon.Lutim/LutimApi.cs
@@ -27,6 +27,7 @@ using System.Threading;
using System.Threading.Tasks;
using Dapplo.HttpExtensions;
using Dapplo.Log;
+using Greenshot.Addon.Lutim.Configuration;
using Greenshot.Addon.Lutim.Entities;
using Greenshot.Addons.Core;
using Greenshot.Addons.Interfaces;
diff --git a/src/Greenshot.Addon.Lutim/LutimDestination.cs b/src/Greenshot.Addon.Lutim/LutimDestination.cs
index 62a396451..dfbcb0668 100644
--- a/src/Greenshot.Addon.Lutim/LutimDestination.cs
+++ b/src/Greenshot.Addon.Lutim/LutimDestination.cs
@@ -28,6 +28,7 @@ using Autofac.Features.OwnedInstances;
using Dapplo.Addons;
using Dapplo.Log;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.Lutim.Configuration;
using Greenshot.Addon.Lutim.Entities;
using Greenshot.Addons;
using Greenshot.Addons.Components;
diff --git a/src/Greenshot.Addon.Lutim/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Lutim/Properties/AssemblyInfo.cs
deleted file mode 100644
index 23bd8e87a..000000000
--- a/src/Greenshot.Addon.Lutim/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Greenshot - a free and open source screenshot tool
- * Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
- *
- * For more information see: http://getgreenshot.org/
- * The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Greenshot.Addon.Lutim")]
-[assembly: AssemblyDescription("A plugin to upload images to Lutim")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Lutim Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Lutim/ViewModels/LutimConfigViewModel.cs b/src/Greenshot.Addon.Lutim/ViewModels/LutimConfigViewModel.cs
index f31293de7..c047d4c16 100644
--- a/src/Greenshot.Addon.Lutim/ViewModels/LutimConfigViewModel.cs
+++ b/src/Greenshot.Addon.Lutim/ViewModels/LutimConfigViewModel.cs
@@ -24,6 +24,7 @@
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.Lutim.Configuration;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.Lutim/ViewModels/LutimHistoryViewModel.cs b/src/Greenshot.Addon.Lutim/ViewModels/LutimHistoryViewModel.cs
index 1b2501f42..f1f0038da 100644
--- a/src/Greenshot.Addon.Lutim/ViewModels/LutimHistoryViewModel.cs
+++ b/src/Greenshot.Addon.Lutim/ViewModels/LutimHistoryViewModel.cs
@@ -31,6 +31,7 @@ using Caliburn.Micro;
using Dapplo.CaliburnMicro.Extensions;
using Dapplo.Log;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.Lutim.Configuration;
using Greenshot.Addon.Lutim.Entities;
using Greenshot.Addons;
using Greenshot.Addons.Extensions;
diff --git a/src/Greenshot.Addon.OCR/IOCRConfiguration.cs b/src/Greenshot.Addon.OCR/Configuration/IOcrConfiguration.cs
similarity index 91%
rename from src/Greenshot.Addon.OCR/IOCRConfiguration.cs
rename to src/Greenshot.Addon.OCR/Configuration/IOcrConfiguration.cs
index fe2ff9d84..8edad1465 100644
--- a/src/Greenshot.Addon.OCR/IOCRConfiguration.cs
+++ b/src/Greenshot.Addon.OCR/Configuration/IOcrConfiguration.cs
@@ -24,7 +24,7 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Ini;
+using Dapplo.Config.Ini;
#endregion
@@ -35,7 +35,7 @@ namespace Greenshot.Addon.OCR
///
[IniSection("OCR")]
[Description("Greenshot OCR Plugin configuration")]
- public interface IOCRConfiguration : IIniSection
+ public interface IOcrConfiguration : IIniSection
{
[Description("Language for OCR")]
[DefaultValue ("miLANG_ENGLISH")]
diff --git a/src/Greenshot.Addon.OCR/IOcrLanguage.cs b/src/Greenshot.Addon.OCR/Configuration/IOcrLanguage.cs
similarity index 95%
rename from src/Greenshot.Addon.OCR/IOcrLanguage.cs
rename to src/Greenshot.Addon.OCR/Configuration/IOcrLanguage.cs
index 7aa37cf84..368db787c 100644
--- a/src/Greenshot.Addon.OCR/IOcrLanguage.cs
+++ b/src/Greenshot.Addon.OCR/Configuration/IOcrLanguage.cs
@@ -18,7 +18,7 @@
// along with this program. If not, see .
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
namespace Greenshot.Addon.OCR
{
diff --git a/src/Greenshot.Addon.OCR/Configuration/Impl/OcrConfigurationImpl.cs b/src/Greenshot.Addon.OCR/Configuration/Impl/OcrConfigurationImpl.cs
new file mode 100644
index 000000000..7530d1637
--- /dev/null
+++ b/src/Greenshot.Addon.OCR/Configuration/Impl/OcrConfigurationImpl.cs
@@ -0,0 +1,38 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Ini;
+
+namespace Greenshot.Addon.OCR.Configuration.Impl
+{
+ public class OcrConfigurationImpl : IniSectionBase, IOcrConfiguration
+ {
+ #region Implementation of IOcrConfiguration
+
+ public string Language { get; set; }
+ public bool Orientimage { get; set; }
+ public bool StraightenImage { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Office/OfficeInterop/MsoScaleFrom.cs b/src/Greenshot.Addon.OCR/Configuration/Impl/OcrLanguageImpl.cs
similarity index 67%
rename from src/Greenshot.Addon.Office/OfficeInterop/MsoScaleFrom.cs
rename to src/Greenshot.Addon.OCR/Configuration/Impl/OcrLanguageImpl.cs
index 17abf08f1..5dadd4fd3 100644
--- a/src/Greenshot.Addon.Office/OfficeInterop/MsoScaleFrom.cs
+++ b/src/Greenshot.Addon.OCR/Configuration/Impl/OcrLanguageImpl.cs
@@ -1,4 +1,4 @@
-#region Greenshot GNU General Public License
+#region Greenshot GNU General Public License
// Greenshot - a free and open source screenshot tool
// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
@@ -21,12 +21,18 @@
#endregion
-namespace Greenshot.Addon.Office.OfficeInterop
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.OCR.Configuration.Impl
{
- public enum MsoScaleFrom
- {
- msoScaleFromTopLeft = 0,
- msoScaleFromMiddle = 1,
- msoScaleFromBottomRight = 2
- }
-}
\ No newline at end of file
+ public class OcrLanguageImpl : LanguageBase, IOcrLanguage
+ {
+ #region Implementation of IOcrLanguage
+
+ public string Language { get; }
+ public string OrientImage { get; }
+ public string StraightenImage { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.OCR/FodyWeavers.xml b/src/Greenshot.Addon.OCR/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.OCR/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj b/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj
index a46eeb26d..3d0112c98 100644
--- a/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj
+++ b/src/Greenshot.Addon.OCR/Greenshot.Addon.OCR.csproj
@@ -1,43 +1,23 @@
-
-
-
+
+
- {C6988EE8-2FEE-4349-9F09-F9628A0D8965}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.OCR
Greenshot.Addon.OCR
- v4.6.1
- Properties
- False
- False
- 4
- false
- OnBuildSuccess
-
-
-
- 3.5
-
-
+ netcoreapp3.0;net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
-
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
@@ -50,97 +30,24 @@
+
+
-
-
-
-
-
-
-
- Form
-
-
- SettingsForm.cs
-
-
-
- Always
-
-
- Always
-
-
- Always
-
-
- Always
-
-
+
+
+
+
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.5.112
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
- False
- Off
- 4194304
- x86
- 4096
-
-
- False
- Off
- 4194304
- AnyCPU
- 4096
-
-
- Full
- true
- DEBUG;TRACE
- False
- True
-
-
- None
- false
- TRACE
- True
- False
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.OCR/OCRDestination.cs b/src/Greenshot.Addon.OCR/OCRDestination.cs
index e6e02e5ff..7c9389668 100644
--- a/src/Greenshot.Addon.OCR/OCRDestination.cs
+++ b/src/Greenshot.Addon.OCR/OCRDestination.cs
@@ -51,11 +51,11 @@ namespace Greenshot.Addon.OCR
private static readonly LogSource Log = new LogSource();
private const int MinWidth = 130;
private const int MinHeight = 130;
- private readonly IOCRConfiguration _ocrConfiguration;
+ private readonly IOcrConfiguration _ocrConfiguration;
private readonly string _ocrCommand;
public OcrDestination(
- IOCRConfiguration ocrConfiguration,
+ IOcrConfiguration ocrConfiguration,
ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage,
ExportNotification exportNotification
diff --git a/src/Greenshot.Addon.OCR/OcrAddonModule.cs b/src/Greenshot.Addon.OCR/OcrAddonModule.cs
index af7bbda80..70413f0f2 100644
--- a/src/Greenshot.Addon.OCR/OcrAddonModule.cs
+++ b/src/Greenshot.Addon.OCR/OcrAddonModule.cs
@@ -26,8 +26,9 @@ using System.IO;
using Autofac;
using Dapplo.Addons;
using Dapplo.Addons.Bootstrapper.Resolving;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.OCR.Configuration.Impl;
using Greenshot.Addons.Components;
namespace Greenshot.Addon.OCR
@@ -63,17 +64,19 @@ namespace Greenshot.Addon.OCR
if (HasModi())
{
builder
- .Register(context => IniConfig.Current.Get())
- .As()
+ .RegisterType()
+ .As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .RegisterType()
+ .RegisterType()
.As()
.SingleInstance();
}
diff --git a/src/Greenshot.Addon.OCR/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.OCR/Properties/AssemblyInfo.cs
deleted file mode 100644
index 631cee31a..000000000
--- a/src/Greenshot.Addon.OCR/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.OCR")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("OCR Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.OCR/SettingsForm.cs b/src/Greenshot.Addon.OCR/SettingsForm.cs
index 37b09b7d0..152fa53a7 100644
--- a/src/Greenshot.Addon.OCR/SettingsForm.cs
+++ b/src/Greenshot.Addon.OCR/SettingsForm.cs
@@ -35,9 +35,9 @@ namespace Greenshot.Addon.OCR
///
public partial class SettingsForm : GreenshotForm
{
- private readonly IOCRConfiguration config;
+ private readonly IOcrConfiguration config;
- public SettingsForm(string[] languages, IOcrLanguage ocrLanguage, IOCRConfiguration config) : base(ocrLanguage)
+ public SettingsForm(string[] languages, IOcrLanguage ocrLanguage, IOcrConfiguration config) : base(ocrLanguage)
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
diff --git a/src/Greenshot.Addon.Office/IOfficeConfiguration.cs b/src/Greenshot.Addon.Office/Configuration/IOfficeConfiguration.cs
similarity index 90%
rename from src/Greenshot.Addon.Office/IOfficeConfiguration.cs
rename to src/Greenshot.Addon.Office/Configuration/IOfficeConfiguration.cs
index 6cd1dc4a1..1af7798cd 100644
--- a/src/Greenshot.Addon.Office/IOfficeConfiguration.cs
+++ b/src/Greenshot.Addon.Office/Configuration/IOfficeConfiguration.cs
@@ -24,21 +24,20 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
+using Dapplo.Config.Ini;
using Greenshot.Addon.Office.OfficeInterop;
using Microsoft.Office.Interop.PowerPoint;
#endregion
-namespace Greenshot.Addon.Office
+namespace Greenshot.Addon.Office.Configuration
{
///
/// Office configuration
///
[IniSection("Office")]
[Description("Greenshot Office configuration")]
- public interface IOfficeConfiguration : IIniSection, ITransactionalProperties, INotifyPropertyChanged
+ public interface IOfficeConfiguration : IIniSection
{
[Description("Default type for emails. (Text, Html)")]
[DefaultValue(EmailFormat.Html)]
diff --git a/src/Greenshot.Addon.Office/IOfficeLanguage.cs b/src/Greenshot.Addon.Office/Configuration/IOfficeLanguage.cs
similarity index 92%
rename from src/Greenshot.Addon.Office/IOfficeLanguage.cs
rename to src/Greenshot.Addon.Office/Configuration/IOfficeLanguage.cs
index d9dcc257e..951d8d3ef 100644
--- a/src/Greenshot.Addon.Office/IOfficeLanguage.cs
+++ b/src/Greenshot.Addon.Office/Configuration/IOfficeLanguage.cs
@@ -18,9 +18,9 @@
// along with this program. If not, see .
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
-namespace Greenshot.Addon.Office
+namespace Greenshot.Addon.Office.Configuration
{
[Language("Office")]
public interface IOfficeLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.Office/Configuration/Impl/OfficeConfigurationImpl.cs b/src/Greenshot.Addon.Office/Configuration/Impl/OfficeConfigurationImpl.cs
new file mode 100644
index 000000000..02cc62f38
--- /dev/null
+++ b/src/Greenshot.Addon.Office/Configuration/Impl/OfficeConfigurationImpl.cs
@@ -0,0 +1,23 @@
+using Dapplo.Config.Ini;
+using Greenshot.Addon.Office.OfficeInterop;
+using Microsoft.Office.Interop.PowerPoint;
+
+namespace Greenshot.Addon.Office.Configuration.Impl
+{
+ public class OfficeConfigurationImpl : IniSectionBase, IOfficeConfiguration
+ {
+ #region Implementation of IOfficeConfiguration
+
+ public EmailFormat OutlookEmailFormat { get; set; }
+ public string EmailSubjectPattern { get; set; }
+ public string EmailTo { get; set; }
+ public string EmailCC { get; set; }
+ public string EmailBCC { get; set; }
+ public bool OutlookAllowExportInMeetings { get; set; }
+ public bool WordLockAspectRatio { get; set; }
+ public bool PowerpointLockAspectRatio { get; set; }
+ public PpSlideLayout PowerpointSlideLayout { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Office/Configuration/Impl/OfficeLanguageImpl.cs b/src/Greenshot.Addon.Office/Configuration/Impl/OfficeLanguageImpl.cs
new file mode 100644
index 000000000..e48259ed4
--- /dev/null
+++ b/src/Greenshot.Addon.Office/Configuration/Impl/OfficeLanguageImpl.cs
@@ -0,0 +1,46 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Office.Configuration.Impl
+{
+ public class OfficeLanguageImpl : LanguageBase, IOfficeLanguage
+ {
+ #region Implementation of IOfficeLanguage
+
+ public string SettingsTitle { get; }
+ public string WordLockaspect { get; }
+ public string OutlookAllowmeetings { get; }
+ public string OutlookSubjectPattern { get; }
+ public string OutlookEmailFormat { get; }
+ public string OutlookEmailIncludeSignature { get; }
+ public string OutlookEmailTo { get; }
+ public string OutlookEmailCc { get; }
+ public string OutlookEmailBcc { get; }
+ public string PowerpointSlideLayout { get; }
+ public string PowerpointLockaspect { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs b/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs
index 25428d7d1..e9ca28251 100644
--- a/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs
+++ b/src/Greenshot.Addon.Office/Destinations/OutlookDestination.cs
@@ -29,12 +29,14 @@ using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Dapplo.Log;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addon.Office.OfficeExport;
using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Core;
using Greenshot.Addons.Interfaces;
using Greenshot.Addons.Interfaces.Plugin;
+using Greenshot.Addons.Resources;
using Microsoft.Office.Interop.Outlook;
#endregion
@@ -54,13 +56,14 @@ namespace Greenshot.Addon.Office.Destinations
private readonly IOfficeConfiguration _officeConfiguration;
private readonly ExportNotification _exportNotification;
- private static readonly Bitmap MailIcon = GreenshotResources.GetBitmap("Email.Image");
+ private static readonly Bitmap MailIcon = GreenshotResources.Instance.GetBitmap("Email.Image");
private readonly string _exePath;
private readonly bool _isActiveFlag;
private readonly string _outlookInspectorCaption;
private readonly OlObjectClass _outlookInspectorType;
+ private readonly OutlookExporter _outlookExporter;
- public OutlookDestination(
+ public OutlookDestination(
IOfficeConfiguration officeConfiguration,
ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage,
@@ -68,6 +71,7 @@ namespace Greenshot.Addon.Office.Destinations
) : base(coreConfiguration, greenshotLanguage)
{
_officeConfiguration = officeConfiguration;
+ _outlookExporter = new OutlookExporter(officeConfiguration);
_exportNotification = exportNotification;
if (EmailConfigHelper.HasOutlook())
{
@@ -121,7 +125,7 @@ namespace Greenshot.Addon.Office.Destinations
public override IEnumerable DynamicDestinations()
{
- var inspectorCaptions = OutlookExporter.RetrievePossibleTargets();
+ var inspectorCaptions = _outlookExporter.RetrievePossibleTargets();
if (inspectorCaptions == null)
{
yield break;
@@ -169,14 +173,14 @@ namespace Greenshot.Addon.Office.Destinations
if (_outlookInspectorCaption != null)
{
- OutlookExporter.ExportToInspector(_outlookInspectorCaption, tmpFile, attachmentName);
+ _outlookExporter.ExportToInspector(_outlookInspectorCaption, tmpFile, attachmentName);
exportInformation.ExportMade = true;
}
else
{
if (!manuallyInitiated)
{
- var inspectorCaptions = OutlookExporter.RetrievePossibleTargets();
+ var inspectorCaptions = _outlookExporter.RetrievePossibleTargets();
if (inspectorCaptions != null && inspectorCaptions.Count > 0)
{
var destinations = new List
@@ -193,7 +197,7 @@ namespace Greenshot.Addon.Office.Destinations
}
else
{
- exportInformation.ExportMade = OutlookExporter.ExportToOutlook(_officeConfiguration.OutlookEmailFormat, tmpFile,
+ exportInformation.ExportMade = _outlookExporter.ExportToOutlook(_officeConfiguration.OutlookEmailFormat, tmpFile,
FilenameHelper.FillPattern(_officeConfiguration.EmailSubjectPattern, captureDetails, false), attachmentName, _officeConfiguration.EmailTo, _officeConfiguration.EmailCC,
_officeConfiguration.EmailBCC, null);
}
diff --git a/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs b/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs
index 03d1635a8..141ea71d1 100644
--- a/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs
+++ b/src/Greenshot.Addon.Office/Destinations/PowerpointDestination.cs
@@ -28,6 +28,7 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addon.Office.OfficeExport;
using Greenshot.Addons;
using Greenshot.Addons.Components;
@@ -45,21 +46,26 @@ namespace Greenshot.Addon.Office.Destinations
[Destination("Powerpoint", DestinationOrder.Powerpoint)]
public class PowerpointDestination : AbstractDestination
{
+ private readonly IOfficeConfiguration _officeConfiguration;
private readonly ExportNotification _exportNotification;
- private const int IconApplication = 0;
- private const int IconPresentation = 1;
private readonly string _exePath;
private readonly string _presentationName;
+ private readonly PowerpointExporter _powerpointExporter;
+ private const int IconApplication = 0;
+ private const int IconPresentation = 1;
- public PowerpointDestination(
+ public PowerpointDestination(
ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage,
+ IOfficeConfiguration officeConfiguration,
ExportNotification exportNotification
) : base(coreConfiguration, greenshotLanguage)
{
+ _officeConfiguration = officeConfiguration;
_exportNotification = exportNotification;
+ _powerpointExporter = new PowerpointExporter(officeConfiguration);
_exePath = PluginUtils.GetExePath("POWERPNT.EXE");
if (_exePath != null && !File.Exists(_exePath))
{
@@ -70,7 +76,8 @@ namespace Greenshot.Addon.Office.Destinations
public PowerpointDestination(string presentationName,
ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage,
- ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, exportNotification)
+ IOfficeConfiguration officeConfiguration,
+ ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, officeConfiguration, exportNotification)
{
_presentationName = presentationName;
}
@@ -103,7 +110,7 @@ namespace Greenshot.Addon.Office.Destinations
public override IEnumerable DynamicDestinations()
{
- return PowerpointExporter.GetPowerpointPresentations().Select(presentationName => new PowerpointDestination(presentationName, CoreConfiguration, GreenshotLanguage, _exportNotification));
+ return _powerpointExporter.GetPowerpointPresentations().Select(presentationName => new PowerpointDestination(presentationName, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
}
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
@@ -118,22 +125,22 @@ namespace Greenshot.Addon.Office.Destinations
}
if (_presentationName != null)
{
- exportInformation.ExportMade = PowerpointExporter.ExportToPresentation(_presentationName, tmpFile, imageSize, captureDetails.Title);
+ exportInformation.ExportMade = _powerpointExporter.ExportToPresentation(_presentationName, tmpFile, imageSize, captureDetails.Title);
}
else
{
if (!manuallyInitiated)
{
- var presentations = PowerpointExporter.GetPowerpointPresentations().ToList();
+ var presentations = _powerpointExporter.GetPowerpointPresentations().ToList();
if (presentations.Count > 0)
{
var destinations = new List
{
- new PowerpointDestination(CoreConfiguration, GreenshotLanguage, _exportNotification)
+ new PowerpointDestination(CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification)
};
foreach (var presentation in presentations)
{
- destinations.Add(new PowerpointDestination(presentation, CoreConfiguration, GreenshotLanguage, _exportNotification));
+ destinations.Add(new PowerpointDestination(presentation, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
}
// Return the ExportInformation from the picker without processing, as this indirectly comes from us self
return ShowPickerMenu(false, surface, captureDetails, destinations);
@@ -141,7 +148,7 @@ namespace Greenshot.Addon.Office.Destinations
}
else if (!exportInformation.ExportMade)
{
- exportInformation.ExportMade = PowerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title);
+ exportInformation.ExportMade = _powerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title);
}
}
_exportNotification.NotifyOfExport(this, exportInformation, surface);
diff --git a/src/Greenshot.Addon.Office/Destinations/WordDestination.cs b/src/Greenshot.Addon.Office/Destinations/WordDestination.cs
index b74ed4c71..1bea29698 100644
--- a/src/Greenshot.Addon.Office/Destinations/WordDestination.cs
+++ b/src/Greenshot.Addon.Office/Destinations/WordDestination.cs
@@ -30,6 +30,7 @@ using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Dapplo.Log;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addon.Office.OfficeExport;
using Greenshot.Addons;
using Greenshot.Addons.Components;
@@ -47,20 +48,25 @@ namespace Greenshot.Addon.Office.Destinations
[Destination("Word", DestinationOrder.Word)]
public class WordDestination : AbstractDestination
{
+ private readonly IOfficeConfiguration _officeConfiguration;
private readonly ExportNotification _exportNotification;
private const int IconApplication = 0;
private const int IconDocument = 1;
private static readonly LogSource Log = new LogSource();
private readonly string _exePath;
private readonly string _documentCaption;
+ private readonly WordExporter _wordExporter;
- public WordDestination(
+ public WordDestination(
ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage,
+ IOfficeConfiguration officeConfiguration,
ExportNotification exportNotification
) : base(coreConfiguration, greenshotLanguage)
{
+ _officeConfiguration = officeConfiguration;
_exportNotification = exportNotification;
+ _wordExporter = new WordExporter(officeConfiguration);
_exePath = PluginUtils.GetExePath("WINWORD.EXE");
if (_exePath != null && !File.Exists(_exePath))
{
@@ -71,7 +77,8 @@ namespace Greenshot.Addon.Office.Destinations
protected WordDestination(string wordCaption,
ICoreConfiguration coreConfiguration,
IGreenshotLanguage greenshotLanguage,
- ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, exportNotification)
+ IOfficeConfiguration officeConfiguration,
+ ExportNotification exportNotification) : this(coreConfiguration, greenshotLanguage, officeConfiguration, exportNotification)
{
_documentCaption = wordCaption;
}
@@ -89,7 +96,7 @@ namespace Greenshot.Addon.Office.Destinations
public override IEnumerable DynamicDestinations()
{
- return WordExporter.GetWordDocuments().Select(wordCaption => new WordDestination(wordCaption, CoreConfiguration, GreenshotLanguage, _exportNotification));
+ return _wordExporter.GetWordDocuments().Select(wordCaption => new WordDestination(wordCaption, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
}
protected override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails)
@@ -104,14 +111,14 @@ namespace Greenshot.Addon.Office.Destinations
{
try
{
- WordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
+ _wordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
exportInformation.ExportMade = true;
}
catch (Exception)
{
try
{
- WordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
+ _wordExporter.InsertIntoExistingDocument(_documentCaption, tmpFile);
exportInformation.ExportMade = true;
}
catch (Exception ex)
@@ -126,16 +133,16 @@ namespace Greenshot.Addon.Office.Destinations
{
if (!manuallyInitiated)
{
- var documents = WordExporter.GetWordDocuments().ToList();
+ var documents = _wordExporter.GetWordDocuments().ToList();
if (documents.Count > 0)
{
var destinations = new List
{
- new WordDestination(CoreConfiguration, GreenshotLanguage, _exportNotification)
+ new WordDestination(CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification)
};
foreach (var document in documents)
{
- destinations.Add(new WordDestination(document, CoreConfiguration, GreenshotLanguage, _exportNotification));
+ destinations.Add(new WordDestination(document, CoreConfiguration, GreenshotLanguage, _officeConfiguration, _exportNotification));
}
// Return the ExportInformation from the picker without processing, as this indirectly comes from us self
return ShowPickerMenu(false, surface, captureDetails, destinations);
@@ -143,7 +150,7 @@ namespace Greenshot.Addon.Office.Destinations
}
try
{
- WordExporter.InsertIntoNewDocument(tmpFile, null, null);
+ _wordExporter.InsertIntoNewDocument(tmpFile, null, null);
exportInformation.ExportMade = true;
}
catch (Exception)
@@ -151,7 +158,7 @@ namespace Greenshot.Addon.Office.Destinations
// Retry once, just in case
try
{
- WordExporter.InsertIntoNewDocument(tmpFile, null, null);
+ _wordExporter.InsertIntoNewDocument(tmpFile, null, null);
exportInformation.ExportMade = true;
}
catch (Exception ex)
diff --git a/src/Greenshot.Addon.Office/FodyWeavers.xml b/src/Greenshot.Addon.Office/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.Office/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj b/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj
index d8f0985e6..9a52b8553 100644
--- a/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj
+++ b/src/Greenshot.Addon.Office/Greenshot.Addon.Office.csproj
@@ -1,27 +1,23 @@
-
-
-
+
+
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Debug
- x86
- Library
Greenshot.Addon.Office
Greenshot.Addon.Office
- v4.6.1
- Properties
- OnBuildSuccess
- False
- False
- 4
- false
-
-
-
+ net471
+
-
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
True
@@ -40,82 +36,27 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.5.112
-
-
- 1.1.0
-
-
- 15.0.4795.1000
-
-
- 15.0.4797.1003
-
-
- 15.0.4420.1017
-
-
- 15.0.4797.1003
-
-
- 15.0.0
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.Office/OfficeAddonModule.cs b/src/Greenshot.Addon.Office/OfficeAddonModule.cs
index b54f44be0..9ccd20344 100644
--- a/src/Greenshot.Addon.Office/OfficeAddonModule.cs
+++ b/src/Greenshot.Addon.Office/OfficeAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Office.Configuration;
+using Greenshot.Addon.Office.Configuration.Impl;
using Greenshot.Addon.Office.Destinations;
using Greenshot.Addon.Office.ViewModels;
using Greenshot.Addons.Components;
@@ -88,14 +90,16 @@ namespace Greenshot.Addon.Office
if (hasDestination)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.Office/OfficeExport/OutlookEmailExporter.cs b/src/Greenshot.Addon.Office/OfficeExport/OutlookEmailExporter.cs
index 231fdf797..9c3fc8408 100644
--- a/src/Greenshot.Addon.Office/OfficeExport/OutlookEmailExporter.cs
+++ b/src/Greenshot.Addon.Office/OfficeExport/OutlookEmailExporter.cs
@@ -28,9 +28,9 @@ using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
-using Dapplo.Ini;
using Dapplo.Log;
using Dapplo.Windows.Interop;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addon.Office.OfficeInterop;
using mshtml;
using Microsoft.Office.Interop.Outlook;
@@ -49,6 +49,8 @@ namespace Greenshot.Addon.Office.OfficeExport
///
public class OutlookExporter
{
+ private readonly IOfficeConfiguration _officeConfiguration;
+
// The signature key can be found at:
// HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\\9375CFF0413111d3B88A00104B2A6676\ [New Signature]
private const string ProfilesKey = @"Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\";
@@ -58,10 +60,16 @@ namespace Greenshot.Addon.Office.OfficeExport
// Schema definitions for the MAPI properties, see: http://msdn.microsoft.com/en-us/library/aa454438.aspx and: http://msdn.microsoft.com/en-us/library/bb446117.aspx
private const string AttachmentContentId = @"http://schemas.microsoft.com/mapi/proptag/0x3712001E";
private static readonly LogSource Log = new LogSource();
- private static readonly IOfficeConfiguration Conf = IniConfig.Current.Get();
private static readonly string SignaturePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"Microsoft\Signatures");
private static Version _outlookVersion;
private static string _currentUser;
+ private readonly WordExporter _wordExporter;
+
+ public OutlookExporter(IOfficeConfiguration officeConfiguration)
+ {
+ _officeConfiguration = officeConfiguration;
+ _wordExporter = new WordExporter(officeConfiguration);
+ }
///
/// Export the image stored in tmpFile to the Inspector with the caption
@@ -70,7 +78,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Path to image file
/// name of the attachment (used as the tooltip of the image)
/// true if it worked
- public static bool ExportToInspector(string inspectorCaption, string tmpFile, string attachmentName)
+ public bool ExportToInspector(string inspectorCaption, string tmpFile, string attachmentName)
{
using (var outlookApplication = GetOrCreateOutlookApplication())
{
@@ -100,7 +108,7 @@ namespace Greenshot.Addon.Office.OfficeExport
}
break;
case AppointmentItem appointmentItem:
- if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && Conf.OutlookAllowExportInMeetings)
+ if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && _officeConfiguration.OutlookAllowExportInMeetings)
{
if (!string.IsNullOrEmpty(appointmentItem.Organizer) && appointmentItem.Organizer.Equals(_currentUser))
{
@@ -151,7 +159,7 @@ namespace Greenshot.Addon.Office.OfficeExport
}
break;
case AppointmentItem appointmentItem:
- if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && Conf.OutlookAllowExportInMeetings)
+ if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && _officeConfiguration.OutlookAllowExportInMeetings)
{
if (!string.IsNullOrEmpty(appointmentItem.Organizer) && !appointmentItem.Organizer.Equals(_currentUser))
{
@@ -194,7 +202,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
///
- private static bool ExportToInspector(IDisposableCom<_Inspector> inspector, IDisposableCom<_Explorer> explorer, OlObjectClass itemClass, MailItem mailItem, string tmpFile, string attachmentName)
+ private bool ExportToInspector(IDisposableCom<_Inspector> inspector, IDisposableCom<_Explorer> explorer, OlObjectClass itemClass, MailItem mailItem, string tmpFile, string attachmentName)
{
bool isMail = OlObjectClass.olMail.Equals(itemClass);
bool isAppointment = OlObjectClass.olAppointment.Equals(itemClass);
@@ -240,7 +248,7 @@ namespace Greenshot.Addon.Office.OfficeExport
{
try
{
- if (WordExporter.InsertIntoExistingDocument(application, wordDocument, tmpFile, null, null))
+ if (_wordExporter.InsertIntoExistingDocument(application, wordDocument, tmpFile, null, null))
{
Log.Info().WriteLine("Inserted into Wordmail");
return true;
@@ -396,7 +404,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
///
- private static void ExportToNewEmail(IDisposableCom outlookApplication, EmailFormat format, string tmpFile, string subject, string attachmentName, string to, string cc, string bcc, string url)
+ private void ExportToNewEmail(IDisposableCom outlookApplication, EmailFormat format, string tmpFile, string subject, string attachmentName, string to, string cc, string bcc, string url)
{
using (var newItem = DisposableCom.Create((MailItem)outlookApplication.ComObject.CreateItem(OlItemType.olMailItem)))
{
@@ -543,7 +551,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
/// true if it worked, false if not
- public static bool ExportToOutlook(EmailFormat format, string tmpFile, string subject, string attachmentName, string to, string cc, string bcc, string url)
+ public bool ExportToOutlook(EmailFormat format, string tmpFile, string subject, string attachmentName, string to, string cc, string bcc, string url)
{
bool exported = false;
try
@@ -569,7 +577,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Call this to get the running Outlook application, or create a new instance
///
/// IDisposableCom for Outlook.Application
- private static IDisposableCom GetOrCreateOutlookApplication()
+ private IDisposableCom GetOrCreateOutlookApplication()
{
IDisposableCom outlookApplication = GetOutlookApplication();
if (outlookApplication == null)
@@ -584,7 +592,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Call this to get the running Outlook application, returns null if there isn't any.
///
/// IDisposableCom for Outlook.Application or null
- private static IDisposableCom GetOutlookApplication()
+ private IDisposableCom GetOutlookApplication()
{
IDisposableCom outlookApplication;
try
@@ -607,7 +615,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Helper method to get the Outlook signature
///
///
- private static string GetOutlookSignature(EmailFormat format)
+ private string GetOutlookSignature(EmailFormat format)
{
using (RegistryKey profilesKey = Registry.CurrentUser.OpenSubKey(ProfilesKey, false))
{
@@ -673,7 +681,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Initialize static outlook variables like version and currentuser
///
///
- private static void InitializeVariables(IDisposableCom outlookApplication)
+ private void InitializeVariables(IDisposableCom outlookApplication)
{
if ((outlookApplication == null) || (outlookApplication.ComObject == null) || (_outlookVersion != null))
{
@@ -709,7 +717,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// A method to retrieve all inspectors which can act as an export target
///
/// IDictionary with inspector captions (window title) and object class
- public static IDictionary RetrievePossibleTargets()
+ public IDictionary RetrievePossibleTargets()
{
IDictionary inspectorCaptions = new SortedDictionary();
try
@@ -744,7 +752,7 @@ namespace Greenshot.Addon.Office.OfficeExport
}
break;
case AppointmentItem appointmentItem:
- if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && Conf.OutlookAllowExportInMeetings)
+ if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && _officeConfiguration.OutlookAllowExportInMeetings)
{
if (!string.IsNullOrEmpty(appointmentItem.Organizer) && appointmentItem.Organizer.Equals(_currentUser))
{
@@ -787,7 +795,7 @@ namespace Greenshot.Addon.Office.OfficeExport
inspectorCaptions.Add(caption, mailItem.Class);
break;
case AppointmentItem appointmentItem:
- if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && Conf.OutlookAllowExportInMeetings)
+ if ((_outlookVersion.Major >= (int)OfficeVersions.Office2010) && _officeConfiguration.OutlookAllowExportInMeetings)
{
if (!string.IsNullOrEmpty(appointmentItem.Organizer) && !appointmentItem.Organizer.Equals(_currentUser))
{
diff --git a/src/Greenshot.Addon.Office/OfficeExport/PowerpointExporter.cs b/src/Greenshot.Addon.Office/OfficeExport/PowerpointExporter.cs
index 15fa32215..913995e90 100644
--- a/src/Greenshot.Addon.Office/OfficeExport/PowerpointExporter.cs
+++ b/src/Greenshot.Addon.Office/OfficeExport/PowerpointExporter.cs
@@ -27,9 +27,10 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Runtime.InteropServices;
-using Dapplo.Ini;
+using Dapplo.Config.Ini;
using Dapplo.Log;
using Dapplo.Windows.Interop;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addon.Office.OfficeInterop;
using Microsoft.Office.Core;
using Microsoft.Office.Interop.PowerPoint;
@@ -39,11 +40,16 @@ using Shape = Microsoft.Office.Interop.PowerPoint.Shape;
namespace Greenshot.Addon.Office.OfficeExport
{
- public static class PowerpointExporter
+ public class PowerpointExporter
{
private static readonly LogSource Log = new LogSource();
- private static readonly IOfficeConfiguration OfficeConfig = IniConfig.Current.Get();
- private static Version _powerpointVersion;
+ private readonly IOfficeConfiguration _officeConfiguration;
+ private Version _powerpointVersion;
+
+ public PowerpointExporter(IOfficeConfiguration officeConfiguration)
+ {
+ _officeConfiguration = officeConfiguration;
+ }
///
/// Internal method to add a picture to a presentation
@@ -52,7 +58,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
///
- private static void AddPictureToPresentation(IDisposableCom presentation, string tmpFile, Size imageSize, string title)
+ private void AddPictureToPresentation(IDisposableCom presentation, string tmpFile, Size imageSize, string title)
{
if (presentation != null)
{
@@ -75,7 +81,7 @@ namespace Greenshot.Addon.Office.OfficeExport
{
using (var slides = DisposableCom.Create(presentation.ComObject.Slides))
{
- slide = DisposableCom.Create(slides.ComObject.Add(slides.ComObject.Count + 1, OfficeConfig.PowerpointSlideLayout));
+ slide = DisposableCom.Create(slides.ComObject.Add(slides.ComObject.Count + 1, _officeConfiguration.PowerpointSlideLayout));
}
using (var shapes = DisposableCom.Create(slide.ComObject.Shapes))
@@ -122,7 +128,7 @@ namespace Greenshot.Addon.Office.OfficeExport
{
using (var shape = DisposableCom.Create(shapes.ComObject.AddPicture(tmpFile, MsoTriState.msoFalse, MsoTriState.msoTrue, 0, 0, width, height)))
{
- if (OfficeConfig.PowerpointLockAspectRatio)
+ if (_officeConfiguration.PowerpointLockAspectRatio)
{
shape.ComObject.LockAspectRatio = MsoTriState.msoTrue;
}
@@ -200,7 +206,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Size of the image
/// A string with the image title
///
- public static bool ExportToPresentation(string presentationName, string tmpFile, Size imageSize, string title)
+ public bool ExportToPresentation(string presentationName, string tmpFile, Size imageSize, string title)
{
using (var powerpointApplication = GetPowerPointApplication())
{
@@ -243,7 +249,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Call this to get the running PowerPoint application, or create a new instance
///
/// ComDisposable for PowerPoint.Application
- private static IDisposableCom GetOrCreatePowerPointApplication()
+ private IDisposableCom GetOrCreatePowerPointApplication()
{
IDisposableCom powerPointApplication = GetPowerPointApplication();
if (powerPointApplication == null)
@@ -258,7 +264,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Call this to get the running PowerPoint application, returns null if there isn't any.
///
/// ComDisposable for PowerPoint.Application or null
- private static IDisposableCom GetPowerPointApplication()
+ private IDisposableCom GetPowerPointApplication()
{
IDisposableCom powerPointApplication;
try
@@ -281,7 +287,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Get the captions of all the open powerpoint presentations
///
///
- public static IEnumerable GetPowerpointPresentations()
+ public IEnumerable GetPowerpointPresentations()
{
using (var powerpointApplication = GetPowerPointApplication())
{
@@ -323,7 +329,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Initialize static powerpoint variables like version
///
/// IPowerpointApplication
- private static void InitializeVariables(IDisposableCom powerpointApplication)
+ private void InitializeVariables(IDisposableCom powerpointApplication)
{
if ((powerpointApplication == null) || (powerpointApplication.ComObject == null) || (_powerpointVersion != null))
{
@@ -343,7 +349,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
///
- public static bool InsertIntoNewPresentation(string tmpFile, Size imageSize, string title)
+ public bool InsertIntoNewPresentation(string tmpFile, Size imageSize, string title)
{
bool isPictureAdded = false;
using (var powerpointApplication = GetOrCreatePowerPointApplication())
@@ -372,7 +378,7 @@ namespace Greenshot.Addon.Office.OfficeExport
return isPictureAdded;
}
- private static bool IsAfter2003()
+ private bool IsAfter2003()
{
return _powerpointVersion.Major > (int)OfficeVersions.Office2003;
}
diff --git a/src/Greenshot.Addon.Office/OfficeExport/WordExporter.cs b/src/Greenshot.Addon.Office/OfficeExport/WordExporter.cs
index c4152aae5..b91ba34cc 100644
--- a/src/Greenshot.Addon.Office/OfficeExport/WordExporter.cs
+++ b/src/Greenshot.Addon.Office/OfficeExport/WordExporter.cs
@@ -22,9 +22,9 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using Dapplo.Ini;
using Dapplo.Log;
using Dapplo.Windows.Interop;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addon.Office.OfficeInterop;
using Microsoft.Office.Core;
using Microsoft.Office.Interop.Word;
@@ -34,11 +34,16 @@ using Version = System.Version;
namespace Greenshot.Addon.Office.OfficeExport
{
- public static class WordExporter
+ public class WordExporter
{
private static readonly LogSource Log = new LogSource();
private static Version _wordVersion;
- private static readonly IOfficeConfiguration Config = IniConfig.Current.Get();
+ private readonly IOfficeConfiguration _officeConfiguration;
+
+ public WordExporter(IOfficeConfiguration officeConfiguration)
+ {
+ _officeConfiguration = officeConfiguration;
+ }
///
/// Helper method to add the file as image to the selection
@@ -46,13 +51,13 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
///
- private static IDisposableCom AddPictureToSelection(IDisposableCom selection, string tmpFile)
+ private IDisposableCom AddPictureToSelection(IDisposableCom selection, string tmpFile)
{
using (var shapes = DisposableCom.Create(selection.ComObject.InlineShapes))
{
var shape = DisposableCom.Create(shapes.ComObject.AddPicture(tmpFile, false, true, Type.Missing));
// Lock aspect ratio
- if (Config.WordLockAspectRatio)
+ if (_officeConfiguration.WordLockAspectRatio)
{
shape.ComObject.LockAspectRatio = MsoTriState.msoTrue;
}
@@ -66,7 +71,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Call this to get the running Word application, or create a new instance
///
/// ComDisposable for Word.Application
- private static IDisposableCom GetOrCreateWordApplication()
+ private IDisposableCom GetOrCreateWordApplication()
{
IDisposableCom wordApplication = GetWordApplication();
if (wordApplication == null)
@@ -81,7 +86,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Call this to get the running Word application, returns null if there isn't any.
///
/// ComDisposable for Word.Application or null
- private static IDisposableCom GetWordApplication()
+ private IDisposableCom GetWordApplication()
{
IDisposableCom wordApplication;
try
@@ -104,7 +109,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Get the captions of all the open word documents
///
///
- public static IEnumerable GetWordDocuments()
+ public IEnumerable GetWordDocuments()
{
using (var wordApplication = GetWordApplication())
{
@@ -143,7 +148,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Initialize static word variables like version
///
///
- private static void InitializeVariables(IDisposableCom wordApplication)
+ private void InitializeVariables(IDisposableCom wordApplication)
{
if ((wordApplication == null) || (wordApplication.ComObject == null) || (_wordVersion != null))
{
@@ -162,7 +167,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
///
///
- public static bool InsertIntoExistingDocument(string wordCaption, string tmpFile)
+ public bool InsertIntoExistingDocument(string wordCaption, string tmpFile)
{
using (var wordApplication = GetWordApplication())
{
@@ -199,7 +204,7 @@ namespace Greenshot.Addon.Office.OfficeExport
///
/// tooltip of the image
///
- internal static bool InsertIntoExistingDocument(IDisposableCom wordApplication, IDisposableCom<_Document> wordDocument, string tmpFile, string address, string tooltip)
+ internal bool InsertIntoExistingDocument(IDisposableCom wordApplication, IDisposableCom<_Document> wordDocument, string tmpFile, string address, string tooltip)
{
// Bug #1517: image will be inserted into that document, where the focus was last. It will not inserted into the chosen one.
// Solution: Make sure the selected document is active, otherwise the insert will be made in a different document!
@@ -289,7 +294,7 @@ namespace Greenshot.Addon.Office.OfficeExport
}
}
- public static void InsertIntoNewDocument(string tmpFile, string address, string tooltip)
+ public void InsertIntoNewDocument(string tmpFile, string address, string tooltip)
{
using (var wordApplication = GetOrCreateWordApplication())
{
@@ -367,7 +372,7 @@ namespace Greenshot.Addon.Office.OfficeExport
/// Check if the used version is higher than Office 2003
///
///
- private static bool IsAfter2003()
+ private bool IsAfter2003()
{
return _wordVersion.Major > (int)OfficeVersions.Office2003;
}
diff --git a/src/Greenshot.Addon.Office/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Office/Properties/AssemblyInfo.cs
deleted file mode 100644
index dc524c2bb..000000000
--- a/src/Greenshot.Addon.Office/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Office")]
-[assembly: AssemblyDescription("A plugin to export images to Office applications")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Office Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Office/ViewModels/OfficeConfigViewModel.cs b/src/Greenshot.Addon.Office/ViewModels/OfficeConfigViewModel.cs
index 475e31495..aec01b673 100644
--- a/src/Greenshot.Addon.Office/ViewModels/OfficeConfigViewModel.cs
+++ b/src/Greenshot.Addon.Office/ViewModels/OfficeConfigViewModel.cs
@@ -25,6 +25,7 @@ using System.Collections.Generic;
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.Office.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.Extensions;
diff --git a/src/Greenshot.Addon.OneDrive/IOneDriveConfiguration.cs b/src/Greenshot.Addon.OneDrive/Configuration/IOneDriveConfiguration.cs
similarity index 88%
rename from src/Greenshot.Addon.OneDrive/IOneDriveConfiguration.cs
rename to src/Greenshot.Addon.OneDrive/Configuration/IOneDriveConfiguration.cs
index f1c133630..d729dd396 100644
--- a/src/Greenshot.Addon.OneDrive/IOneDriveConfiguration.cs
+++ b/src/Greenshot.Addon.OneDrive/Configuration/IOneDriveConfiguration.cs
@@ -25,18 +25,17 @@
using System.ComponentModel;
using System.Runtime.Serialization;
+using Dapplo.Config.Ini;
using Dapplo.HttpExtensions.OAuth;
-using Dapplo.Ini;
-using Dapplo.InterfaceImpl.Extensions;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.OneDrive
+namespace Greenshot.Addon.OneDrive.Configuration
{
[IniSection("OneDrive")]
[Description("Greenshot OneDrive Addon configuration")]
- public interface IOneDriveConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token, ITransactionalProperties, INotifyPropertyChanged
+ public interface IOneDriveConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth2Token
{
[Description("After upload copy OneDrive link to clipboard.")]
[DefaultValue("true")]
diff --git a/src/Greenshot.Addon.OneDrive/IOneDriveLanguage.cs b/src/Greenshot.Addon.OneDrive/Configuration/IOneDriveLanguage.cs
similarity index 94%
rename from src/Greenshot.Addon.OneDrive/IOneDriveLanguage.cs
rename to src/Greenshot.Addon.OneDrive/Configuration/IOneDriveLanguage.cs
index c924699e5..377bfd237 100644
--- a/src/Greenshot.Addon.OneDrive/IOneDriveLanguage.cs
+++ b/src/Greenshot.Addon.OneDrive/Configuration/IOneDriveLanguage.cs
@@ -24,11 +24,11 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
#endregion
-namespace Greenshot.Addon.OneDrive
+namespace Greenshot.Addon.OneDrive.Configuration
{
[Language("OneDrive")]
public interface IOneDriveLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.OneDrive/Configuration/Impl/OneDriveConfigurationImpl.cs b/src/Greenshot.Addon.OneDrive/Configuration/Impl/OneDriveConfigurationImpl.cs
new file mode 100644
index 000000000..d940ceaae
--- /dev/null
+++ b/src/Greenshot.Addon.OneDrive/Configuration/Impl/OneDriveConfigurationImpl.cs
@@ -0,0 +1,71 @@
+#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 .
+
+#endregion
+
+using System;
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.OneDrive.Configuration.Impl
+{
+ public class OneDriveConfigurationImpl : IniSectionBase, IOneDriveConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IOAuth2Token
+
+ public string OAuth2AccessToken { get; set; }
+ public DateTimeOffset OAuth2AccessTokenExpires { get; set; }
+ public string OAuth2RefreshToken { get; set; }
+
+ #endregion
+
+ #region Implementation of IOneDriveConfiguration
+
+ public bool AfterUploadLinkToClipBoard { get; set; }
+ public OneDriveLinkType LinkType { get; set; }
+ public string ClientId { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.OneDrive/Configuration/Impl/OneDriveLanguageImpl.cs b/src/Greenshot.Addon.OneDrive/Configuration/Impl/OneDriveLanguageImpl.cs
new file mode 100644
index 000000000..54f4e0799
--- /dev/null
+++ b/src/Greenshot.Addon.OneDrive/Configuration/Impl/OneDriveLanguageImpl.cs
@@ -0,0 +1,42 @@
+#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 .
+
+#endregion
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.OneDrive.Configuration.Impl
+{
+ public class OneDriveLanguageImpl : LanguageBase, IOneDriveLanguage
+ {
+ #region Implementation of IOneDriveLanguage
+
+ public string CommunicationWait { get; }
+ public string LabelUploadFormat { get; }
+ public string LabelLinkType { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UsePageLink { get; }
+ public string ResetCredentialsButton { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.OneDrive/FodyWeavers.xml b/src/Greenshot.Addon.OneDrive/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.OneDrive/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj b/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj
index c88fc0405..93262161b 100644
--- a/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj
+++ b/src/Greenshot.Addon.OneDrive/Greenshot.Addon.OneDrive.csproj
@@ -1,42 +1,22 @@
-
-
-
+
+
- {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.OneDrive
Greenshot.Addon.OneDrive
- v4.6.1
- Properties
- False
- False
- 4
- false
- Always
-
-
-
- 3.5
-
-
-
-
+ netcoreapp3.0;net471
-
+
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -57,55 +37,28 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
- MSBuild:Compile
- Designer
-
+
+
+
+
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.8.46
-
-
- 0.5.112
-
-
- 1.6.5
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.OneDrive/OneDriveAddonModule.cs b/src/Greenshot.Addon.OneDrive/OneDriveAddonModule.cs
index 6f3ef98ed..734202c9b 100644
--- a/src/Greenshot.Addon.OneDrive/OneDriveAddonModule.cs
+++ b/src/Greenshot.Addon.OneDrive/OneDriveAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.OneDrive.Configuration;
+using Greenshot.Addon.OneDrive.Configuration.Impl;
using Greenshot.Addon.OneDrive.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +39,15 @@ namespace Greenshot.Addon.OneDrive
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs b/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs
index 9efe97a1d..dfa9da5e1 100644
--- a/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs
+++ b/src/Greenshot.Addon.OneDrive/OneDriveDestination.cs
@@ -39,6 +39,7 @@ using Dapplo.HttpExtensions.OAuth;
using Dapplo.Log;
using Dapplo.Utils;
using Dapplo.Windows.Clipboard;
+using Greenshot.Addon.OneDrive.Configuration;
using Greenshot.Addon.OneDrive.Entities;
using Greenshot.Addons;
using Greenshot.Addons.Components;
diff --git a/src/Greenshot.Addon.OneDrive/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.OneDrive/Properties/AssemblyInfo.cs
deleted file mode 100644
index dbfba15a1..000000000
--- a/src/Greenshot.Addon.OneDrive/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.OneDrive")]
-[assembly: AssemblyDescription("A plugin to upload images to OneDrive")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("OneDrive plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-
diff --git a/src/Greenshot.Addon.OneDrive/ViewModels/OneDriveConfigViewModel.cs b/src/Greenshot.Addon.OneDrive/ViewModels/OneDriveConfigViewModel.cs
index b4fdda484..f17d0c7e0 100644
--- a/src/Greenshot.Addon.OneDrive/ViewModels/OneDriveConfigViewModel.cs
+++ b/src/Greenshot.Addon.OneDrive/ViewModels/OneDriveConfigViewModel.cs
@@ -26,6 +26,7 @@ using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
using Dapplo.HttpExtensions.OAuth;
+using Greenshot.Addon.OneDrive.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.Extensions;
diff --git a/src/Greenshot.Addon.Photobucket/IPhotobucketConfiguration.cs b/src/Greenshot.Addon.Photobucket/Configuration/IPhotobucketConfiguration.cs
similarity index 89%
rename from src/Greenshot.Addon.Photobucket/IPhotobucketConfiguration.cs
rename to src/Greenshot.Addon.Photobucket/Configuration/IPhotobucketConfiguration.cs
index e19120598..c34adaa80 100644
--- a/src/Greenshot.Addon.Photobucket/IPhotobucketConfiguration.cs
+++ b/src/Greenshot.Addon.Photobucket/Configuration/IPhotobucketConfiguration.cs
@@ -25,22 +25,21 @@
using System.ComponentModel;
using System.Runtime.Serialization;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Ini.Converters;
using Dapplo.HttpExtensions.OAuth;
-using Dapplo.Ini;
-using Dapplo.Ini.Converters;
-using Dapplo.InterfaceImpl.Extensions;
using Greenshot.Addons.Core;
#endregion
-namespace Greenshot.Addon.Photobucket
+namespace Greenshot.Addon.Photobucket.Configuration
{
///
/// The Photobucket configuration.
///
[IniSection("Photobucket")]
[Description("Greenshot Photobucket Plugin configuration")]
- public interface IPhotobucketConfiguration : IIniSection, IDestinationFileConfiguration, INotifyPropertyChanged, ITransactionalProperties, IOAuth1Token
+ public interface IPhotobucketConfiguration : IIniSection, IDestinationFileConfiguration, IOAuth1Token
{
[Description("Use pagelink instead of direct link on the clipboard")]
[DefaultValue(false)]
diff --git a/src/Greenshot.Addon.Photobucket/IPhotobucketLanguage.cs b/src/Greenshot.Addon.Photobucket/Configuration/IPhotobucketLanguage.cs
similarity index 91%
rename from src/Greenshot.Addon.Photobucket/IPhotobucketLanguage.cs
rename to src/Greenshot.Addon.Photobucket/Configuration/IPhotobucketLanguage.cs
index a76cb2f31..3a3eb9b8b 100644
--- a/src/Greenshot.Addon.Photobucket/IPhotobucketLanguage.cs
+++ b/src/Greenshot.Addon.Photobucket/Configuration/IPhotobucketLanguage.cs
@@ -20,11 +20,11 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
#endregion
-namespace Greenshot.Addon.Photobucket
+namespace Greenshot.Addon.Photobucket.Configuration
{
[Language("Photobucket")]
public interface IPhotobucketLanguage : ILanguage, INotifyPropertyChanged
diff --git a/src/Greenshot.Addon.Photobucket/Configuration/Impl/PhotobucketConfigurationImpl.cs b/src/Greenshot.Addon.Photobucket/Configuration/Impl/PhotobucketConfigurationImpl.cs
new file mode 100644
index 000000000..66711f6f8
--- /dev/null
+++ b/src/Greenshot.Addon.Photobucket/Configuration/Impl/PhotobucketConfigurationImpl.cs
@@ -0,0 +1,74 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Photobucket.Configuration.Impl
+{
+ public class PhotobucketConfigurationImpl : IniSectionBase, IPhotobucketConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of IOAuth1Token
+
+ public string OAuthToken { get; set; }
+ public string OAuthTokenSecret { get; set; }
+ public string OAuthTokenVerifier { get; set; }
+
+ #endregion
+
+ #region Implementation of IPhotobucketConfiguration
+
+ public bool UsePageLink { get; set; }
+ public string SubDomain { get; set; }
+ public string Username { get; set; }
+ public string Album { get; set; }
+ public int Credits { get; set; }
+ public string ClientId { get; set; }
+ public string ClientSecret { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Photobucket/Configuration/Impl/PhotobucketLanguageImpl.cs b/src/Greenshot.Addon.Photobucket/Configuration/Impl/PhotobucketLanguageImpl.cs
new file mode 100644
index 000000000..06cea88c3
--- /dev/null
+++ b/src/Greenshot.Addon.Photobucket/Configuration/Impl/PhotobucketLanguageImpl.cs
@@ -0,0 +1,44 @@
+#region Greenshot GNU General Public License
+
+// Greenshot - a free and open source screenshot tool
+// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
+//
+// For more information see: http://getgreenshot.org/
+// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 1 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Photobucket.Configuration.Impl
+{
+ public class PhotobucketLanguageImpl : LanguageBase, IPhotobucketLanguage
+ {
+ #region Implementation of IPhotobucketLanguage
+
+ public string CommunicationWait { get; }
+ public string Configure { get; }
+ public string LabelClear { get; }
+ public string LabelUploadFormat { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UploadSuccess { get; }
+ public string UsePageLink { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Photobucket/FodyWeavers.xml b/src/Greenshot.Addon.Photobucket/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.Photobucket/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj b/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj
index 0c7bfc4a7..ab6b91230 100644
--- a/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj
+++ b/src/Greenshot.Addon.Photobucket/Greenshot.Addon.Photobucket.csproj
@@ -1,42 +1,22 @@
-
-
-
+
+
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Photobucket
Greenshot.Addon.Photobucket
- v4.6.1
- Properties
- False
- False
- 4
- false
- OnBuildSuccess
-
-
-
-
-
- 3.5
+ netcoreapp3.0;net471
-
- false
- latest
-
-
- false
-
-
- false
- latest
-
-
- false
-
-
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -57,91 +37,26 @@
+
-
-
-
-
-
-
-
-
-
- Never
-
-
- Never
-
-
- Never
-
-
- Never
-
-
+
+
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.5.112
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
-
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
-
\ No newline at end of file
+
diff --git a/src/Greenshot.Addon.Photobucket/PhotobucketAddonModule.cs b/src/Greenshot.Addon.Photobucket/PhotobucketAddonModule.cs
index c7c78fa33..e79619b5d 100644
--- a/src/Greenshot.Addon.Photobucket/PhotobucketAddonModule.cs
+++ b/src/Greenshot.Addon.Photobucket/PhotobucketAddonModule.cs
@@ -24,8 +24,10 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Photobucket.Configuration;
+using Greenshot.Addon.Photobucket.Configuration.Impl;
using Greenshot.Addon.Photobucket.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +39,15 @@ namespace Greenshot.Addon.Photobucket
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
diff --git a/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs b/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs
index a9aa15a51..507857e52 100644
--- a/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs
+++ b/src/Greenshot.Addon.Photobucket/PhotobucketDestination.cs
@@ -37,6 +37,7 @@ using Dapplo.HttpExtensions.Extensions;
using Dapplo.HttpExtensions.OAuth;
using Dapplo.Log;
using Dapplo.Utils;
+using Greenshot.Addon.Photobucket.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Components;
using Greenshot.Addons.Core;
diff --git a/src/Greenshot.Addon.Photobucket/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Photobucket/Properties/AssemblyInfo.cs
deleted file mode 100644
index 4fa76ff4c..000000000
--- a/src/Greenshot.Addon.Photobucket/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Photobucket")]
-[assembly: AssemblyDescription("A plugin to upload images to Photobucket")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Photobucket Plugin")]
-[assembly: AssemblyCopyright("Copyright (C) 2007-2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyInformationalVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Photobucket/ViewModels/PhotobucketConfigViewModel.cs b/src/Greenshot.Addon.Photobucket/ViewModels/PhotobucketConfigViewModel.cs
index 3c5d61214..5ffcad8f5 100644
--- a/src/Greenshot.Addon.Photobucket/ViewModels/PhotobucketConfigViewModel.cs
+++ b/src/Greenshot.Addon.Photobucket/ViewModels/PhotobucketConfigViewModel.cs
@@ -24,6 +24,7 @@
using System.Reactive.Disposables;
using Dapplo.CaliburnMicro.Configuration;
using Dapplo.CaliburnMicro.Extensions;
+using Greenshot.Addon.Photobucket.Configuration;
using Greenshot.Addons;
using Greenshot.Addons.Core.Enums;
using Greenshot.Addons.ViewModels;
diff --git a/src/Greenshot.Addon.Tfs/ITfsConfiguration.cs b/src/Greenshot.Addon.Tfs/Configuration/ITfsConfiguration.cs
similarity index 88%
rename from src/Greenshot.Addon.Tfs/ITfsConfiguration.cs
rename to src/Greenshot.Addon.Tfs/Configuration/ITfsConfiguration.cs
index c8b9fac76..5a32ff1b3 100644
--- a/src/Greenshot.Addon.Tfs/ITfsConfiguration.cs
+++ b/src/Greenshot.Addon.Tfs/Configuration/ITfsConfiguration.cs
@@ -25,9 +25,8 @@
using System;
using System.ComponentModel;
-using Dapplo.Ini;
-using Dapplo.Ini.Converters;
-using Dapplo.InterfaceImpl.Extensions;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Ini.Converters;
using Greenshot.Addons.Core;
#endregion
@@ -36,7 +35,7 @@ namespace Greenshot.Addon.Tfs
{
[IniSection("Tfs")]
[Description("Greenshot Tfs Addon configuration")]
- public interface ITfsConfiguration : IIniSection, IDestinationFileConfiguration, ITransactionalProperties, INotifyPropertyChanged
+ public interface ITfsConfiguration : IIniSection, IDestinationFileConfiguration
{
[Description("After upload copy OneDrive link to clipboard.")]
[DefaultValue("true")]
diff --git a/src/Greenshot.Addon.Tfs/ITfsLanguage.cs b/src/Greenshot.Addon.Tfs/Configuration/ITfsLanguage.cs
similarity index 97%
rename from src/Greenshot.Addon.Tfs/ITfsLanguage.cs
rename to src/Greenshot.Addon.Tfs/Configuration/ITfsLanguage.cs
index a40c99144..df724c5bf 100644
--- a/src/Greenshot.Addon.Tfs/ITfsLanguage.cs
+++ b/src/Greenshot.Addon.Tfs/Configuration/ITfsLanguage.cs
@@ -24,7 +24,7 @@
#region Usings
using System.ComponentModel;
-using Dapplo.Language;
+using Dapplo.Config.Language;
#endregion
diff --git a/src/Greenshot.Addon.Tfs/Configuration/Impl/TfsConfigurationImpl.cs b/src/Greenshot.Addon.Tfs/Configuration/Impl/TfsConfigurationImpl.cs
new file mode 100644
index 000000000..28739c9de
--- /dev/null
+++ b/src/Greenshot.Addon.Tfs/Configuration/Impl/TfsConfigurationImpl.cs
@@ -0,0 +1,63 @@
+#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 .
+
+#endregion
+
+using System;
+using Dapplo.Config.Ini;
+using Greenshot.Core.Enums;
+
+namespace Greenshot.Addon.Tfs.Configuration.Impl
+{
+ public class TfsConfigurationImpl : IniSectionBase, ITfsConfiguration
+ {
+ #region Implementation of IFileConfiguration
+
+ public string OutputFilePath { get; set; }
+ public bool OutputFileAllowOverwrite { get; set; }
+ public string OutputFileFilenamePattern { get; set; }
+ public OutputFormats OutputFileFormat { get; set; }
+ public bool OutputFileReduceColors { get; set; }
+ public bool OutputFileAutoReduceColors { get; set; }
+ public int OutputFileReduceColorsTo { get; set; }
+ public int OutputFileJpegQuality { get; set; }
+ public bool OutputFilePromptQuality { get; set; }
+ public uint OutputFileIncrementingNumber { get; set; }
+ public string OptimizePNGCommand { get; set; }
+ public string OptimizePNGCommandArguments { get; set; }
+
+ #endregion
+
+ #region Implementation of IDestinationFileConfiguration
+
+ public bool UseOwnSettings { get; set; }
+
+ #endregion
+
+ #region Implementation of ITfsConfiguration
+
+ public bool AfterUploadLinkToClipBoard { get; set; }
+ public Uri TfsUri { get; set; }
+ public string ApiKey { get; set; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Tfs/Configuration/Impl/TfsLanguageImpl.cs b/src/Greenshot.Addon.Tfs/Configuration/Impl/TfsLanguageImpl.cs
new file mode 100644
index 000000000..956671f2e
--- /dev/null
+++ b/src/Greenshot.Addon.Tfs/Configuration/Impl/TfsLanguageImpl.cs
@@ -0,0 +1,42 @@
+#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 .
+
+#endregion
+
+using Dapplo.Config.Language;
+
+namespace Greenshot.Addon.Tfs.Configuration.Impl
+{
+ public class TfsLanguageImpl : LanguageBase, ITfsLanguage
+ {
+ #region Implementation of ITfsLanguage
+
+ public string CommunicationWait { get; }
+ public string LabelUrl { get; }
+ public string LabelApiKey { get; }
+ public string SettingsTitle { get; }
+ public string UploadFailure { get; }
+ public string UploadMenuItem { get; }
+ public string UsePageLink { get; }
+
+ #endregion
+ }
+}
diff --git a/src/Greenshot.Addon.Tfs/FodyWeavers.xml b/src/Greenshot.Addon.Tfs/FodyWeavers.xml
new file mode 100644
index 000000000..c7704e778
--- /dev/null
+++ b/src/Greenshot.Addon.Tfs/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj b/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj
index 484009212..8cdf8cfa1 100644
--- a/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj
+++ b/src/Greenshot.Addon.Tfs/Greenshot.Addon.Tfs.csproj
@@ -1,42 +1,22 @@
-
-
-
+
+
- {8B3643A5-AFED-49FF-8D66-6348FB102EB2}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
Greenshot.Addon.Tfs
Greenshot.Addon.Tfs
- v4.6.1
- Properties
- False
- False
- 4
- false
- Always
-
-
-
- 3.5
-
-
-
-
+ netcoreapp3.0;net471
-
+
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
+
+ PreserveNewest
+
+
+
+
+
+
+
+
@@ -57,57 +37,28 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
- MSBuild:Compile
- Designer
-
+
+
+
+
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.8.46
-
-
- 0.5.112
-
-
- 1.6.5
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\$(ProjectName)"
-
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Tfs/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Tfs/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2b0625fa5..000000000
--- a/src/Greenshot.Addon.Tfs/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-#region Greenshot GNU General Public License
-
-// Greenshot - a free and open source screenshot tool
-// Copyright (C) 2007-2018 Thomas Braun, Jens Klingen, Robin Krom
-//
-// For more information see: http://getgreenshot.org/
-// The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 1 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#endregion
-
-#region Usings
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-#endregion
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Greenshot.Addon.Tfs")]
-[assembly: AssemblyDescription("A plugin to upload screenshots to Tfs")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Tfs plugin")]
-[assembly: AssemblyCopyright("Copyright (C) Greenshot 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-
-[assembly: ComVisible(false)]
-
-// The assembly version, replaced by build scripts
-
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-
diff --git a/src/Greenshot.Addon.Tfs/TfsAddonModule.cs b/src/Greenshot.Addon.Tfs/TfsAddonModule.cs
index 4db22afbf..52b8d3413 100644
--- a/src/Greenshot.Addon.Tfs/TfsAddonModule.cs
+++ b/src/Greenshot.Addon.Tfs/TfsAddonModule.cs
@@ -24,8 +24,9 @@
using Autofac;
using Dapplo.Addons;
using Dapplo.CaliburnMicro.Configuration;
-using Dapplo.Ini;
-using Dapplo.Language;
+using Dapplo.Config.Ini;
+using Dapplo.Config.Language;
+using Greenshot.Addon.Tfs.Configuration.Impl;
using Greenshot.Addon.Tfs.ViewModels;
using Greenshot.Addons.Components;
@@ -37,13 +38,15 @@ namespace Greenshot.Addon.Tfs
protected override void Load(ContainerBuilder builder)
{
builder
- .Register(context => IniConfig.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
builder
- .Register(context => LanguageLoader.Current.Get())
+ .RegisterType()
.As()
+ .As()
.SingleInstance();
diff --git a/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj b/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj
index ed2e60b76..eb942fdfe 100644
--- a/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj
+++ b/src/Greenshot.Addon.Win10/Greenshot.Addon.Win10.csproj
@@ -1,38 +1,31 @@
-
-
-
+
+
- Debug
- AnyCPU
- {9801F62C-540F-4BFE-9211-6405DEDE563B}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
- Properties
Greenshot.Addon.Win10
Greenshot.Addon.Win10
- v4.6.1
- 512
-
- 8.1
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
+ net471
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+ False
+ C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
+ global
+
+
+ C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd
+
@@ -53,63 +46,21 @@
+
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
- False
- C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.WindowsRuntime.dll
- global
-
-
- C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd
-
-
- {bf35190d-b2a7-4cfa-b397-51cb384cf0d7}
- Greenshot.Core
-
-
- {f041c685-eb96-4ed1-9ace-0f5bd836610f}
- Greenshot.Gfx
-
-
- {5B924697-4DCD-4F98-85F1-105CB84B7341}
- Greenshot.Addons
-
-
-
-
-
-
-
- 2.0.4
-
-
- 1.0.75
-
-
- 1.0.75
-
-
- 0.5.112
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
-
-
- mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Addons\"
-
-
\ No newline at end of file
diff --git a/src/Greenshot.Addon.Win10/Properties/AssemblyInfo.cs b/src/Greenshot.Addon.Win10/Properties/AssemblyInfo.cs
deleted file mode 100644
index ed29b9b22..000000000
--- a/src/Greenshot.Addon.Win10/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,27 +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.Addon.Win10")]
-[assembly: AssemblyDescription("A plug-in for Windows 10 only functionality")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Windown 10 Plug-in")]
-[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("9801f62c-540f-4bfe-9211-6405dede563b")]
-
-// The assembly version, replaced by build scripts
-[assembly: AssemblyVersion("1.2.0.0")]
-[assembly: AssemblyInformationalVersion("1.2.0.0")]
-[assembly: AssemblyFileVersion("1.2.0.0")]
diff --git a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj
index f8b5408a3..8e8148826 100644
--- a/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj
+++ b/src/Greenshot.PerformanceTests/Greenshot.PerformanceTests.csproj
@@ -1,18 +1,17 @@
-
-
-
-
+
+
- {5D594C8A-2137-46E1-8D01-B83662825C7B}
- Exe
Greenshot.PerformanceTests
Greenshot.PerformanceTests
- v4.6.1
- 512
-
- true
+ WinExe
+ netcoreapp3.0;net471
-
+
+
+
+
+
+
@@ -38,31 +37,18 @@
+
-
-
-
-
-
-
-
-
-
- {14894a45-aa2c-4bc3-85a3-e388d0bdc1ca}
- Greenshot.Gfx.Experimental
-
-
- {F041C685-EB96-4ED1-9ACE-0F5BD836610F}
- Greenshot.Gfx
-
-
- {9b162e60-12d8-44fd-8093-7d40392f23fa}
- Greenshot.Tests
-
+
+
+
+
+
+
- 0.11.1
+ 0.11.2
2.3.0
@@ -70,17 +56,11 @@
2.0.4
-
- 1.0.75
-
-
- 0.8.46
-
1.0.55
- 2.6.1
+ 2.6.2
runtime; build; native; contentfiles; analyzers
all
@@ -94,13 +74,13 @@
4.3.1
- 4.1.0
+ 4.3.0
- 4.0.1
+ 4.3.0
- 4.1.0
+ 4.5.1
4.3.0
@@ -118,5 +98,4 @@
4.3.1
-
\ No newline at end of file
diff --git a/src/Greenshot.PerformanceTests/Program.cs b/src/Greenshot.PerformanceTests/Program.cs
index d065bb97a..ca01398be 100644
--- a/src/Greenshot.PerformanceTests/Program.cs
+++ b/src/Greenshot.PerformanceTests/Program.cs
@@ -1,4 +1,7 @@
using System;
+using BenchmarkDotNet.Configs;
+using BenchmarkDotNet.Environments;
+using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
namespace Greenshot.PerformanceTests
@@ -11,7 +14,9 @@ namespace Greenshot.PerformanceTests
// ReSharper disable once UnusedParameter.Local
private static void Main(string[] args)
{
- BenchmarkRunner.Run();
+ var job = Job.Default.With(Platform.X64);
+ var config = DefaultConfig.Instance.With(job).KeepBenchmarkFiles(true);
+ BenchmarkRunner.Run(config);
Console.ReadLine();
}
}
diff --git a/src/Greenshot.PerformanceTests/Properties/AssemblyInfo.cs b/src/Greenshot.PerformanceTests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2cdf6affd..000000000
--- a/src/Greenshot.PerformanceTests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -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.PerformanceTests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Greenshot")]
-[assembly: AssemblyProduct("Greenshot.PerformanceTests")]
-[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("5d594c8a-2137-46e1-8d01-b83662825c7b")]
-
-// 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")]
diff --git a/src/Greenshot.Tests/Greenshot.Tests.csproj b/src/Greenshot.Tests/Greenshot.Tests.csproj
index c232aed71..6b702e045 100644
--- a/src/Greenshot.Tests/Greenshot.Tests.csproj
+++ b/src/Greenshot.Tests/Greenshot.Tests.csproj
@@ -1,7 +1,7 @@
- net471
+ netcoreapp3.0;net471
true
diff --git a/src/Greenshot.Tests/UpdateTests.cs b/src/Greenshot.Tests/UpdateTests.cs
index cb115cfa4..3e8ef09c3 100644
--- a/src/Greenshot.Tests/UpdateTests.cs
+++ b/src/Greenshot.Tests/UpdateTests.cs
@@ -21,6 +21,7 @@
#endregion
+#if !NETCOREAPP3_0
using System;
using System.ServiceModel.Syndication;
using System.Threading.Tasks;
@@ -55,3 +56,4 @@ namespace Greenshot.Tests
}
}
}
+#endif
\ No newline at end of file
diff --git a/src/Greenshot.sln b/src/Greenshot.sln
index 76f5531ce..86641d7ea 100644
--- a/src/Greenshot.sln
+++ b/src/Greenshot.sln
@@ -7,31 +7,31 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot", "Greenshot\Gree
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addons", "Greenshot.Addons\Greenshot.Addons.csproj", "{5B924697-4DCD-4F98-85F1-105CB84B7341}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.ExternalCommand", "Greenshot.Addon.ExternalCommand\Greenshot.Addon.ExternalCommand.csproj", "{47F23C86-604E-4CC3-8767-B3D4088F30BB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.ExternalCommand", "Greenshot.Addon.ExternalCommand\Greenshot.Addon.ExternalCommand.csproj", "{47F23C86-604E-4CC3-8767-B3D4088F30BB}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Confluence", "Greenshot.Addon.Confluence\Greenshot.Addon.Confluence.csproj", "{C3052651-598A-44E2-AAB3-2E41311D50F9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Confluence", "Greenshot.Addon.Confluence\Greenshot.Addon.Confluence.csproj", "{C3052651-598A-44E2-AAB3-2E41311D50F9}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Imgur", "Greenshot.Addon.Imgur\Greenshot.Addon.Imgur.csproj", "{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Imgur", "Greenshot.Addon.Imgur\Greenshot.Addon.Imgur.csproj", "{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Jira", "Greenshot.Addon.Jira\Greenshot.Addon.Jira.csproj", "{19FEEF09-313F-43C7-819D-F1BCA782B08B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Jira", "Greenshot.Addon.Jira\Greenshot.Addon.Jira.csproj", "{19FEEF09-313F-43C7-819D-F1BCA782B08B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OCR", "Greenshot.Addon.OCR\Greenshot.Addon.OCR.csproj", "{C6988EE8-2FEE-4349-9F09-F9628A0D8965}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.OCR", "Greenshot.Addon.OCR\Greenshot.Addon.OCR.csproj", "{C6988EE8-2FEE-4349-9F09-F9628A0D8965}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Box", "Greenshot.Addon.Box\Greenshot.Addon.Box.csproj", "{697CF066-9077-4F22-99D9-D989CCE7282B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Dropbox", "Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj", "{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Dropbox", "Greenshot.Addon.Dropbox\Greenshot.Addon.Dropbox.csproj", "{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Flickr", "Greenshot.Addon.Flickr\Greenshot.Addon.Flickr.csproj", "{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Flickr", "Greenshot.Addon.Flickr\Greenshot.Addon.Flickr.csproj", "{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.GooglePhotos", "Greenshot.Addon.GooglePhotos\Greenshot.Addon.GooglePhotos.csproj", "{1893A2E4-A78A-4713-A8E7-E70058DABEE0}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.GooglePhotos", "Greenshot.Addon.GooglePhotos\Greenshot.Addon.GooglePhotos.csproj", "{1893A2E4-A78A-4713-A8E7-E70058DABEE0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Office", "Greenshot.Addon.Office\Greenshot.Addon.Office.csproj", "{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Office", "Greenshot.Addon.Office\Greenshot.Addon.Office.csproj", "{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Photobucket", "Greenshot.Addon.Photobucket\Greenshot.Addon.Photobucket.csproj", "{9C0ECC4C-7807-4111-916A-4F57BB29788A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Photobucket", "Greenshot.Addon.Photobucket\Greenshot.Addon.Photobucket.csproj", "{9C0ECC4C-7807-4111-916A-4F57BB29788A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Win10", "Greenshot.Addon.Win10\Greenshot.Addon.Win10.csproj", "{9801F62C-540F-4BFE-9211-6405DEDE563B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Lutim", "Greenshot.Addon.Lutim\Greenshot.Addon.Lutim.csproj", "{D106F86C-CD3D-44FF-B151-2A5D47268B5C}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Lutim", "Greenshot.Addon.Lutim\Greenshot.Addon.Lutim.csproj", "{D106F86C-CD3D-44FF-B151-2A5D47268B5C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Gfx", "Greenshot.Gfx\Greenshot.Gfx.csproj", "{F041C685-EB96-4ED1-9ACE-0F5BD836610F}"
EndProject
@@ -43,11 +43,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.LegacyEdito
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Gfx.Experimental", "Greenshot.Gfx.Experimental\Greenshot.Gfx.Experimental.csproj", "{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OneDrive", "Greenshot.Addon.OneDrive\Greenshot.Addon.OneDrive.csproj", "{B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.OneDrive", "Greenshot.Addon.OneDrive\Greenshot.Addon.OneDrive.csproj", "{B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.Tfs", "Greenshot.Addon.Tfs\Greenshot.Addon.Tfs.csproj", "{8B3643A5-AFED-49FF-8D66-6348FB102EB2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.Tfs", "Greenshot.Addon.Tfs\Greenshot.Addon.Tfs.csproj", "{8B3643A5-AFED-49FF-8D66-6348FB102EB2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greenshot.Addon.OcrCommand", "Greenshot.Addon.OcrCommand\Greenshot.Addon.OcrCommand.csproj", "{7B8E9055-A054-4290-B537-075EBFDF8BDF}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Addon.OcrCommand", "Greenshot.Addon.OcrCommand\Greenshot.Addon.OcrCommand.csproj", "{7B8E9055-A054-4290-B537-075EBFDF8BDF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Greenshot.Core", "Greenshot.Core\Greenshot.Core.csproj", "{BF35190D-B2A7-4CFA-B397-51CB384CF0D7}"
EndProject
@@ -79,39 +79,44 @@ Global
{5B924697-4DCD-4F98-85F1-105CB84B7341}.Release|x86.Build.0 = Release|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|x86.ActiveCfg = Debug|x86
- {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|x86.Build.0 = Debug|x86
+ {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Debug|x86.Build.0 = Debug|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|Any CPU.Build.0 = Release|Any CPU
- {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|x86.ActiveCfg = Release|x86
+ {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|x86.ActiveCfg = Release|Any CPU
+ {47F23C86-604E-4CC3-8767-B3D4088F30BB}.Release|x86.Build.0 = Release|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|x86.ActiveCfg = Debug|x86
- {C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|x86.Build.0 = Debug|x86
+ {C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C3052651-598A-44E2-AAB3-2E41311D50F9}.Debug|x86.Build.0 = Debug|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|Any CPU.Build.0 = Release|Any CPU
- {C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|x86.ActiveCfg = Release|x86
+ {C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|x86.ActiveCfg = Release|Any CPU
+ {C3052651-598A-44E2-AAB3-2E41311D50F9}.Release|x86.Build.0 = Release|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|x86.ActiveCfg = Debug|x86
- {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|x86.Build.0 = Debug|x86
+ {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Debug|x86.Build.0 = Debug|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|Any CPU.Build.0 = Release|Any CPU
- {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|x86.ActiveCfg = Release|x86
+ {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|x86.ActiveCfg = Release|Any CPU
+ {80D8DEB9-94E3-4876-8CCA-2DF1ED5F2C50}.Release|x86.Build.0 = Release|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|x86.ActiveCfg = Debug|x86
- {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|x86.Build.0 = Debug|x86
+ {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Debug|x86.Build.0 = Debug|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|Any CPU.Build.0 = Release|Any CPU
- {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.ActiveCfg = Release|x86
+ {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.ActiveCfg = Release|Any CPU
+ {19FEEF09-313F-43C7-819D-F1BCA782B08B}.Release|x86.Build.0 = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.ActiveCfg = Debug|x86
- {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.Build.0 = Debug|x86
+ {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Debug|x86.Build.0 = Debug|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|Any CPU.Build.0 = Release|Any CPU
- {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.ActiveCfg = Release|x86
+ {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.ActiveCfg = Release|Any CPU
+ {C6988EE8-2FEE-4349-9F09-F9628A0D8965}.Release|x86.Build.0 = Release|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{697CF066-9077-4F22-99D9-D989CCE7282B}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -130,34 +135,36 @@ Global
{AD7CFFE2-40E7-46CF-A172-D48CF7AE9A12}.Release|x86.Build.0 = Release|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|x86.ActiveCfg = Debug|x86
- {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|x86.Build.0 = Debug|x86
+ {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Debug|x86.Build.0 = Debug|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|Any CPU.Build.0 = Release|Any CPU
- {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|x86.ActiveCfg = Release|x86
+ {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|x86.ActiveCfg = Release|Any CPU
+ {7EC72A5A-D73A-4B4B-9CA1-2216C7D92D5E}.Release|x86.Build.0 = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|x86.ActiveCfg = Debug|x86
- {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|x86.Build.0 = Debug|x86
+ {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Debug|x86.Build.0 = Debug|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|Any CPU.Build.0 = Release|Any CPU
- {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.ActiveCfg = Release|x86
+ {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.ActiveCfg = Release|Any CPU
+ {1893A2E4-A78A-4713-A8E7-E70058DABEE0}.Release|x86.Build.0 = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.ActiveCfg = Debug|x86
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.Build.0 = Debug|x86
+ {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Debug|x86.Build.0 = Debug|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|Any CPU.Build.0 = Release|Any CPU
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.ActiveCfg = Release|x86
- {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.Build.0 = Release|x86
+ {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.ActiveCfg = Release|Any CPU
+ {92599C09-FF29-4ABD-B6E6-C48ECD781BAB}.Release|x86.Build.0 = Release|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|x86.ActiveCfg = Debug|x86
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|x86.Build.0 = Debug|x86
+ {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Debug|x86.Build.0 = Debug|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|Any CPU.Build.0 = Release|Any CPU
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|x86.ActiveCfg = Release|x86
- {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|x86.Build.0 = Release|x86
+ {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|x86.ActiveCfg = Release|Any CPU
+ {9C0ECC4C-7807-4111-916A-4F57BB29788A}.Release|x86.Build.0 = Release|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|x86.ActiveCfg = Debug|Any CPU
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Debug|x86.Build.0 = Debug|Any CPU
@@ -166,12 +173,12 @@ Global
{9801F62C-540F-4BFE-9211-6405DEDE563B}.Release|x86.Build.0 = Release|Any CPU
{D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Debug|x86.ActiveCfg = Debug|x86
- {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Debug|x86.Build.0 = Debug|x86
+ {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Debug|x86.Build.0 = Debug|Any CPU
{D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Release|Any CPU.Build.0 = Release|Any CPU
- {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Release|x86.ActiveCfg = Release|x86
- {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Release|x86.Build.0 = Release|x86
+ {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Release|x86.ActiveCfg = Release|Any CPU
+ {D106F86C-CD3D-44FF-B151-2A5D47268B5C}.Release|x86.Build.0 = Release|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F041C685-EB96-4ED1-9ACE-0F5BD836610F}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -214,20 +221,20 @@ Global
{14894A45-AA2C-4BC3-85A3-E388D0BDC1CA}.Release|x86.Build.0 = Release|Any CPU
{B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Debug|x86.ActiveCfg = Debug|x86
- {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Debug|x86.Build.0 = Debug|x86
+ {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Debug|x86.Build.0 = Debug|Any CPU
{B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Release|Any CPU.Build.0 = Release|Any CPU
- {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Release|x86.ActiveCfg = Release|x86
- {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Release|x86.Build.0 = Release|x86
+ {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Release|x86.ActiveCfg = Release|Any CPU
+ {B35272D3-4631-4FA5-9A3E-85D70ECA9A8D}.Release|x86.Build.0 = Release|Any CPU
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Debug|x86.ActiveCfg = Debug|x86
- {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Debug|x86.Build.0 = Debug|x86
+ {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Debug|x86.Build.0 = Debug|Any CPU
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|Any CPU.Build.0 = Release|Any CPU
- {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.ActiveCfg = Release|x86
- {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.Build.0 = Release|x86
+ {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.ActiveCfg = Release|Any CPU
+ {8B3643A5-AFED-49FF-8D66-6348FB102EB2}.Release|x86.Build.0 = Release|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B8E9055-A054-4290-B537-075EBFDF8BDF}.Debug|x86.ActiveCfg = Debug|Any CPU