Fixed plugin loading

Moved all office interop types in their own file.
This commit is contained in:
Krom, Robertus 2020-02-18 15:10:37 +01:00
commit bef29df3db
125 changed files with 1628 additions and 1373 deletions

View file

@ -18,13 +18,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.IO;
using Greenshot.IniFile;
using GreenshotPlugin.Core;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
/// <summary>
/// Description of FlickrConfiguration.
/// </summary>

View file

@ -18,18 +18,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Text.RegularExpressions;
using System.Threading;
using Greenshot.IniFile;
using Greenshot.Plugin;
using GreenshotPlugin.Core;
using System.ComponentModel;
using System.Text.RegularExpressions;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
/// <summary>
/// Description of OCRDestination.
/// </summary>
@ -63,12 +64,9 @@ namespace ExternalCommand {
config.RunInbackground.Add(_presetCommand, true);
}
bool runInBackground = config.RunInbackground[_presetCommand];
string fullPath = captureDetails.Filename;
if (fullPath == null) {
fullPath = ImageOutput.SaveNamedTmpFile(surface, captureDetails, outputSettings);
}
string fullPath = captureDetails.Filename ?? ImageOutput.SaveNamedTmpFile(surface, captureDetails, outputSettings);
string output;
string output;
string error;
if (runInBackground) {
Thread commandThread = new Thread(delegate()

View file

@ -18,9 +18,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using GreenshotPlugin.Controls;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
/// <summary>
/// This class is needed for design-time resolving of the language files
/// </summary>

View file

@ -19,16 +19,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Greenshot.IniFile;
using Greenshot.Plugin;
using GreenshotPlugin.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
using Greenshot.IniFile;
using Greenshot.Plugin;
using GreenshotPlugin.Core;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
/// <summary>
/// An Plugin to run commands after an image was written
/// </summary>

View file

@ -25,7 +25,7 @@ using System.IO;
using Greenshot.IniFile;
using GreenshotPlugin.Core;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
public static class IconCache {
private static readonly ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(IconCache));

View file

@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
partial class SettingsForm {
/// <summary>
/// Designer variable used to keep track of non-visual components.

View file

@ -19,12 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Greenshot.IniFile;
using System;
using System.Drawing;
using System.Windows.Forms;
using Greenshot.IniFile;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
/// <summary>
/// Description of SettingsForm.
/// </summary>

View file

@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
partial class SettingsFormDetail {
/// <summary>
/// Designer variable used to keep track of non-visual components.

View file

@ -19,14 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Greenshot.IniFile;
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Greenshot.IniFile;
using GreenshotPlugin.Core;
namespace ExternalCommand {
namespace GreenshotExternalCommandPlugin {
/// <summary>
/// Description of SettingsFormDetail.
/// </summary>