diff --git a/Greenshot-OCR-Plugin/Greenshot-OCR-Plugin.csproj b/Greenshot-OCR-Plugin/Greenshot-OCR-Plugin.csproj index 76d1060f3..429a2a110 100644 --- a/Greenshot-OCR-Plugin/Greenshot-OCR-Plugin.csproj +++ b/Greenshot-OCR-Plugin/Greenshot-OCR-Plugin.csproj @@ -78,6 +78,10 @@ + + {ADD4E400-56E1-4E31-A5C2-070BEB238A0F} + GreenshotInterop + {5B924697-4DCD-4F98-85F1-105CB84B7341} GreenshotPlugin diff --git a/Greenshot-OCR-Plugin/OCRConfiguration.cs b/Greenshot-OCR-Plugin/OCRConfiguration.cs index a1f85fe25..4e1fe2191 100644 --- a/Greenshot-OCR-Plugin/OCRConfiguration.cs +++ b/Greenshot-OCR-Plugin/OCRConfiguration.cs @@ -19,7 +19,7 @@ * along with this program. If not, see . */ using System; -using IniFile; +using Greenshot.IniFile; namespace GreenshotOCR { /// diff --git a/Greenshot-OCR-Plugin/OCRDestination.cs b/Greenshot-OCR-Plugin/OCRDestination.cs index 02ba29b0d..1387cecfa 100644 --- a/Greenshot-OCR-Plugin/OCRDestination.cs +++ b/Greenshot-OCR-Plugin/OCRDestination.cs @@ -23,11 +23,10 @@ using System.Drawing; using System.IO; using System.Windows.Forms; -using Greenshot.Interop; using Greenshot.Plugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotOCR { /// diff --git a/Greenshot-OCR-Plugin/OCRPlugin.cs b/Greenshot-OCR-Plugin/OCRPlugin.cs index 13f479aa7..f5c9fb07f 100644 --- a/Greenshot-OCR-Plugin/OCRPlugin.cs +++ b/Greenshot-OCR-Plugin/OCRPlugin.cs @@ -24,11 +24,11 @@ using System.Drawing; using System.IO; using System.Windows.Forms; -using Greenshot.Interop; using Greenshot.Plugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; +using Greenshot.Interop; //using Microsoft.Win32; @@ -174,13 +174,15 @@ namespace GreenshotOCR { string text = ""; try { - using (ModiDocu modiDocument = (ModiDocu)COMWrapper.GetOrCreateInstance(typeof(ModiDocu))) { - modiDocument.Create(filePath); - modiDocument.OCR((ModiLanguage)Enum.Parse(typeof(ModiLanguage), config.Language), config.Orientimage, config.StraightenImage); - IImage modiImage = modiDocument.Images[0]; - ILayout layout = modiImage.Layout; - text = layout.Text; - modiDocument.Close(false); + using (ModiDocu modiDocument = COMWrapper.GetOrCreateInstance()) { + if (modiDocument != null) { + modiDocument.Create(filePath); + modiDocument.OCR((ModiLanguage)Enum.Parse(typeof(ModiLanguage), config.Language), config.Orientimage, config.StraightenImage); + IImage modiImage = modiDocument.Images[0]; + ILayout layout = modiImage.Layout; + text = layout.Text; + modiDocument.Close(false); + } } } catch (Exception e) { LOG.Error("Error while calling Microsoft Office Document Imaging (MODI) to OCR: ", e); @@ -207,10 +209,12 @@ namespace GreenshotOCR { private bool HasMODI() { try { - using (ModiDocu modiDocument = (ModiDocu)COMWrapper.GetOrCreateInstance(typeof(ModiDocu))) { - modiDocument.Close(false); + using (ModiDocu modiDocument = COMWrapper.GetOrCreateInstance()) { + if (modiDocument != null) { + modiDocument.Close(false); + return true; + } } - return true; } catch(Exception e) { LOG.DebugFormat("Error trying to initiate MODI: {0}", e.Message); } diff --git a/Greenshot/Configuration/AppConfig.cs b/Greenshot/Configuration/AppConfig.cs index cc92324d6..6a6bfb129 100644 --- a/Greenshot/Configuration/AppConfig.cs +++ b/Greenshot/Configuration/AppConfig.cs @@ -29,7 +29,7 @@ using System.Windows.Forms; using GreenshotPlugin.UnmanagedHelpers; using GreenshotPlugin.Core; using Greenshot.Plugin; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Configuration { public enum ScreenshotDestinations {Editor=1, FileDefault=2, FileWithDialog=4, Clipboard=8, Printer=16, EMail=32} diff --git a/Greenshot/Configuration/EditorConfiguration.cs b/Greenshot/Configuration/EditorConfiguration.cs index 22b4a5744..956927be9 100644 --- a/Greenshot/Configuration/EditorConfiguration.cs +++ b/Greenshot/Configuration/EditorConfiguration.cs @@ -24,7 +24,7 @@ using System.Drawing; using Greenshot.Drawing.Fields; using GreenshotPlugin.UnmanagedHelpers; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Configuration { /// diff --git a/Greenshot/Configuration/Language.cs b/Greenshot/Configuration/Language.cs index 43eec2d95..529a6efc2 100644 --- a/Greenshot/Configuration/Language.cs +++ b/Greenshot/Configuration/Language.cs @@ -20,7 +20,7 @@ */ using System; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Configuration { /// diff --git a/Greenshot/Destinations/ClipboardDestination.cs b/Greenshot/Destinations/ClipboardDestination.cs index a7ae305fd..52c0b298c 100644 --- a/Greenshot/Destinations/ClipboardDestination.cs +++ b/Greenshot/Destinations/ClipboardDestination.cs @@ -28,7 +28,7 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/EditorDestination.cs b/Greenshot/Destinations/EditorDestination.cs index 003a76d42..ebff7ee5d 100644 --- a/Greenshot/Destinations/EditorDestination.cs +++ b/Greenshot/Destinations/EditorDestination.cs @@ -30,7 +30,7 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs index bb93d0784..43dcfb406 100644 --- a/Greenshot/Destinations/EmailDestination.cs +++ b/Greenshot/Destinations/EmailDestination.cs @@ -27,10 +27,10 @@ using System.Windows.Forms; using Greenshot.Configuration; using Greenshot.Helpers; -using Greenshot.Helpers.OfficeInterop; +using Greenshot.Interop.Office; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// @@ -168,7 +168,7 @@ namespace Greenshot.Destinations { if (!isOutlookUsed) { yield break; } - Dictionary inspectorCaptions = OutlookExporter.RetrievePossibleTargets(); + Dictionary inspectorCaptions = OutlookEmailExporter.RetrievePossibleTargets(conf.OutlookAllowExportInMeetings); if (inspectorCaptions != null) { foreach (string inspectorCaption in inspectorCaptions.Keys) { yield return new EmailDestination(inspectorCaption, inspectorCaptions[inspectorCaption]); @@ -206,9 +206,9 @@ namespace Greenshot.Destinations { attachmentName = Regex.Replace(attachmentName, @"[^\x20\d\w]", ""); if (outlookInspectorCaption != null) { - OutlookExporter.ExportToInspector(outlookInspectorCaption, tmpFile, attachmentName); + OutlookEmailExporter.ExportToInspector(outlookInspectorCaption, tmpFile, attachmentName); } else { - OutlookExporter.ExportToOutlook(tmpFile, captureDetails.Title, attachmentName); + OutlookEmailExporter.ExportToOutlook(conf.OutlookEmailFormat, tmpFile, captureDetails.Title, attachmentName); } surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.Modified = false; diff --git a/Greenshot/Destinations/ExcelDestination.cs b/Greenshot/Destinations/ExcelDestination.cs index 6c0e715b5..5fdb7235e 100644 --- a/Greenshot/Destinations/ExcelDestination.cs +++ b/Greenshot/Destinations/ExcelDestination.cs @@ -28,8 +28,8 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using Greenshot.Helpers.OfficeInterop; -using IniFile; +using Greenshot.Interop.Office; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/FileDestination.cs b/Greenshot/Destinations/FileDestination.cs index d15bd3c5c..faffa900c 100644 --- a/Greenshot/Destinations/FileDestination.cs +++ b/Greenshot/Destinations/FileDestination.cs @@ -28,7 +28,7 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/FileWithDialogDestination.cs b/Greenshot/Destinations/FileWithDialogDestination.cs index bd3d6a244..b1295851d 100644 --- a/Greenshot/Destinations/FileWithDialogDestination.cs +++ b/Greenshot/Destinations/FileWithDialogDestination.cs @@ -28,7 +28,7 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/PickerDestination.cs b/Greenshot/Destinations/PickerDestination.cs index 785c118f6..5e143bda4 100644 --- a/Greenshot/Destinations/PickerDestination.cs +++ b/Greenshot/Destinations/PickerDestination.cs @@ -29,7 +29,7 @@ using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; using Greenshot.Forms; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/PowerpointDestination.cs b/Greenshot/Destinations/PowerpointDestination.cs index 089bb133f..963beab72 100644 --- a/Greenshot/Destinations/PowerpointDestination.cs +++ b/Greenshot/Destinations/PowerpointDestination.cs @@ -28,8 +28,8 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using Greenshot.Helpers.OfficeInterop; -using IniFile; +using Greenshot.Interop.Office; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// @@ -121,9 +121,9 @@ namespace Greenshot.Destinations { } } if (presentationName != null) { - PowerpointExporter.ExportToPresentation(presentationName, tmpFile, imageSize, captureDetails); + PowerpointExporter.ExportToPresentation(presentationName, tmpFile, imageSize, captureDetails.Title); } else { - PowerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails); + PowerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title); } surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.Modified = false; diff --git a/Greenshot/Destinations/PrinterDestination.cs b/Greenshot/Destinations/PrinterDestination.cs index 5fa780928..ebf23f7e7 100644 --- a/Greenshot/Destinations/PrinterDestination.cs +++ b/Greenshot/Destinations/PrinterDestination.cs @@ -29,7 +29,7 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Destinations/WordDestination.cs b/Greenshot/Destinations/WordDestination.cs index 4bd02e684..8d0b11927 100644 --- a/Greenshot/Destinations/WordDestination.cs +++ b/Greenshot/Destinations/WordDestination.cs @@ -29,8 +29,8 @@ using Greenshot.Configuration; using GreenshotPlugin.Core; using Greenshot.Plugin; using Greenshot.Helpers; -using Greenshot.Helpers.OfficeInterop; -using IniFile; +using Greenshot.Interop.Office; +using Greenshot.IniFile; namespace Greenshot.Destinations { /// diff --git a/Greenshot/Drawing/DrawableContainer.cs b/Greenshot/Drawing/DrawableContainer.cs index 02cb111b2..f89df29c9 100644 --- a/Greenshot/Drawing/DrawableContainer.cs +++ b/Greenshot/Drawing/DrawableContainer.cs @@ -32,6 +32,7 @@ using Greenshot.Plugin; using GreenshotPlugin.Core; using Greenshot.Plugin.Drawing; using Greenshot.Memento; +using System.Drawing.Drawing2D; namespace Greenshot.Drawing { /// @@ -597,6 +598,17 @@ namespace Greenshot.Drawing { if (RotateFlipType.Rotate90FlipNone == rotateFlipType) { angle = 270; } + + Rectangle beforeBounds = new Rectangle(Left, Top, Width, Height); + LOG.DebugFormat("Bounds before: {0}", beforeBounds); + GraphicsPath translatePath = new GraphicsPath(); + translatePath.AddRectangle(beforeBounds); + Matrix rotateMatrix = new Matrix(); + rotateMatrix.RotateAt(angle, new PointF(parent.Width >> 1, parent.Height >> 1)); + translatePath.Transform(rotateMatrix); + RectangleF newBounds = translatePath.GetBounds(); + LOG.DebugFormat("New bounds by using graphics path: {0}", newBounds); + int ox = 0; int oy = 0; int centerX = parent.Width >> 1; @@ -632,6 +644,7 @@ namespace Greenshot.Drawing { (float)newHeight ); ApplyBounds(newRectangle); + LOG.DebugFormat("New bounds by using old method: {0}", newRectangle); } protected virtual ScaleHelper.IDoubleProcessor GetAngleRoundProcessor() { diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs index 3f6ff2b27..084d1d422 100644 --- a/Greenshot/Drawing/DrawableContainerList.cs +++ b/Greenshot/Drawing/DrawableContainerList.cs @@ -27,7 +27,7 @@ using Greenshot.Plugin; using Greenshot.Plugin.Drawing; using System.Windows.Forms; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using Greenshot.Configuration; using Greenshot.Helpers; diff --git a/Greenshot/Drawing/Fields/AbstractFieldHolder.cs b/Greenshot/Drawing/Fields/AbstractFieldHolder.cs index da263c6e7..ad0ee584b 100644 --- a/Greenshot/Drawing/Fields/AbstractFieldHolder.cs +++ b/Greenshot/Drawing/Fields/AbstractFieldHolder.cs @@ -24,7 +24,7 @@ using System.Drawing; using System.Runtime.Serialization; using Greenshot.Configuration; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Drawing.Fields { /// diff --git a/Greenshot/Drawing/Fields/FieldAggregator.cs b/Greenshot/Drawing/Fields/FieldAggregator.cs index 6c8c76ae6..c5b954b2b 100644 --- a/Greenshot/Drawing/Fields/FieldAggregator.cs +++ b/Greenshot/Drawing/Fields/FieldAggregator.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.ComponentModel; using Greenshot.Configuration; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Drawing.Fields { /// diff --git a/Greenshot/Drawing/FreehandContainer.cs b/Greenshot/Drawing/FreehandContainer.cs index 687a5111c..2d1a47124 100644 --- a/Greenshot/Drawing/FreehandContainer.cs +++ b/Greenshot/Drawing/FreehandContainer.cs @@ -34,6 +34,7 @@ namespace Greenshot.Drawing { /// [Serializable()] public class FreehandContainer : DrawableContainer { + private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(FreehandContainer)); private static readonly float [] POINT_OFFSET = new float[]{0.5f, 0.25f, 0.75f}; [NonSerialized] @@ -168,6 +169,27 @@ namespace Greenshot.Drawing { myBounds = Rectangle.Round(freehandPath.GetBounds()); } + public override void Rotate(RotateFlipType rotateFlipType) { + int angle = 270; + if (rotateFlipType == RotateFlipType.Rotate90FlipNone) { + angle = 90; + } + + LOG.DebugFormat("Bounds before: {0} - {1}", Bounds, freehandPath.GetBounds()); + Matrix rotateMatrix = new Matrix(); + rotateMatrix.Translate(-(parent.Width >> 1), -(parent.Height >> 1)); + freehandPath.Transform(rotateMatrix); + rotateMatrix = new Matrix(); + rotateMatrix.Rotate(360 - angle); + freehandPath.Transform(rotateMatrix); + rotateMatrix = new Matrix(); + rotateMatrix.Translate(parent.Height >> 1, parent.Width >> 1); + freehandPath.Transform(rotateMatrix); + + LOG.DebugFormat("Bounds after: {0} - {1}", Bounds, freehandPath.GetBounds()); + //base.Rotate(rotateFlipType); + } + /// /// Do the drawing of the freehand "stroke" /// diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs index 43e80d4f8..09ee20856 100644 --- a/Greenshot/Drawing/Surface.cs +++ b/Greenshot/Drawing/Surface.cs @@ -33,7 +33,7 @@ using Greenshot.Plugin; using Greenshot.Plugin.Drawing; using GreenshotPlugin.Core; using Greenshot.Memento; -using IniFile; +using Greenshot.IniFile; using Greenshot.Drawing.Filters; using System.Drawing.Drawing2D; using GreenshotPlugin.Controls; diff --git a/Greenshot/Forms/AboutForm.cs b/Greenshot/Forms/AboutForm.cs index a4a50c0be..64cce45aa 100644 --- a/Greenshot/Forms/AboutForm.cs +++ b/Greenshot/Forms/AboutForm.cs @@ -26,7 +26,7 @@ using System.IO; using Greenshot.Helpers; using Greenshot.Configuration; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot { /// @@ -43,7 +43,7 @@ namespace Greenshot { Version v = Assembly.GetExecutingAssembly().GetName().Version; // Format is like this: AssemblyVersion("Major.Minor.Build.Revision")] - lblTitle.Text = "Greenshot " + v.Major + "." + v.Minor + "." + v.Build + " Build " + v.Revision + (IniConfig.IsPortable?" Portable":"") + (" (" + OSInfo.Bits +" bit)"); + lblTitle.Text = "Greenshot DiBa " + v.Major + "." + v.Minor + "." + v.Build + " Build " + v.Revision + (IniConfig.IsPortable?" Portable":"") + (" (" + OSInfo.Bits +" bit)"); lang = Language.GetInstance(); updateUI(); } diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs index 06a5cb451..6650d91a9 100644 --- a/Greenshot/Forms/CaptureForm.cs +++ b/Greenshot/Forms/CaptureForm.cs @@ -33,7 +33,7 @@ using Greenshot.Helpers; using Greenshot.Plugin; using GreenshotPlugin.UnmanagedHelpers; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Forms { /// diff --git a/Greenshot/Forms/ColorDialog.cs b/Greenshot/Forms/ColorDialog.cs index b9ca0ebf9..2c261c0c2 100644 --- a/Greenshot/Forms/ColorDialog.cs +++ b/Greenshot/Forms/ColorDialog.cs @@ -26,7 +26,7 @@ using System.Windows.Forms; using Greenshot.Configuration; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot { /// diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs index b3d3e2d32..b599169b5 100644 --- a/Greenshot/Forms/ImageEditorForm.cs +++ b/Greenshot/Forms/ImageEditorForm.cs @@ -36,7 +36,7 @@ using Greenshot.Help; using Greenshot.Helpers; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using System.Threading; using System.Drawing.Imaging; @@ -412,6 +412,19 @@ namespace Greenshot { updateUndoRedoSurfaceDependencies(); }; effectItem.DropDownItems.Add(effectSubItem); + + effectSubItem = new ToolStripMenuItem("Rotate 90"); + effectSubItem.Click += delegate { + surface.ApplyBitmapEffect(Effects.Rotate90); + updateUndoRedoSurfaceDependencies(); + }; + effectItem.DropDownItems.Add(effectSubItem); + effectSubItem = new ToolStripMenuItem("Rotate 270"); + effectSubItem.Click += delegate { + surface.ApplyBitmapEffect(Effects.Rotate270); + updateUndoRedoSurfaceDependencies(); + }; + effectItem.DropDownItems.Add(effectSubItem); } this.editToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator()); this.editToolStripMenuItem.DropDownItems.Add(insert_window_toolstripmenuitem); diff --git a/Greenshot/Forms/JpegQualityDialog.cs b/Greenshot/Forms/JpegQualityDialog.cs index 31050a7e2..a2af3b3f7 100644 --- a/Greenshot/Forms/JpegQualityDialog.cs +++ b/Greenshot/Forms/JpegQualityDialog.cs @@ -22,7 +22,7 @@ using System; using System.Windows.Forms; using Greenshot.Configuration; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot { /// diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs index c27437bea..bb0a14d47 100644 --- a/Greenshot/Forms/MainForm.cs +++ b/Greenshot/Forms/MainForm.cs @@ -39,7 +39,7 @@ using Greenshot.Plugin; using GreenshotPlugin.UnmanagedHelpers; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot { /// diff --git a/Greenshot/Forms/PrintOptionsDialog.cs b/Greenshot/Forms/PrintOptionsDialog.cs index 41b07be30..d05fa7721 100644 --- a/Greenshot/Forms/PrintOptionsDialog.cs +++ b/Greenshot/Forms/PrintOptionsDialog.cs @@ -22,7 +22,7 @@ using System; using System.Windows.Forms; using Greenshot.Configuration; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Forms { /// diff --git a/Greenshot/Forms/SaveImageFileDialog.cs b/Greenshot/Forms/SaveImageFileDialog.cs index 733fd6692..8621f93d3 100644 --- a/Greenshot/Forms/SaveImageFileDialog.cs +++ b/Greenshot/Forms/SaveImageFileDialog.cs @@ -25,7 +25,7 @@ using System.Windows.Forms; using Greenshot.Helpers; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Forms { /// diff --git a/Greenshot/Forms/SettingsForm.cs b/Greenshot/Forms/SettingsForm.cs index 51e4b8d40..c71357bcc 100644 --- a/Greenshot/Forms/SettingsForm.cs +++ b/Greenshot/Forms/SettingsForm.cs @@ -30,7 +30,7 @@ using GreenshotPlugin.Controls; using GreenshotPlugin.Core; using GreenshotPlugin.UnmanagedHelpers; using Greenshot.Plugin; -using IniFile; +using Greenshot.IniFile; namespace Greenshot { /// diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj index c2d34f6f1..4e4badb9f 100644 --- a/Greenshot/Greenshot.csproj +++ b/Greenshot/Greenshot.csproj @@ -74,6 +74,7 @@ + @@ -167,37 +168,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - Always - @@ -206,10 +181,6 @@ - - - - @@ -382,6 +353,10 @@ + + {ADD4E400-56E1-4E31-A5C2-070BEB238A0F} + GreenshotInterop + {5B924697-4DCD-4F98-85F1-105CB84B7341} GreenshotPlugin diff --git a/Greenshot/Processors/TitleFixProcessor.cs b/Greenshot/Processors/TitleFixProcessor.cs index 73fc3ecf3..beea5f90d 100644 --- a/Greenshot/Processors/TitleFixProcessor.cs +++ b/Greenshot/Processors/TitleFixProcessor.cs @@ -24,7 +24,7 @@ using System.Text.RegularExpressions; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Greenshot.Processors { /// diff --git a/GreenshotConfluencePlugin/Confluence.cs b/GreenshotConfluencePlugin/Confluence.cs index 40e46a756..94c9bee19 100644 --- a/GreenshotConfluencePlugin/Confluence.cs +++ b/GreenshotConfluencePlugin/Confluence.cs @@ -25,7 +25,7 @@ using System.Windows.Forms; using GreenshotConfluencePlugin; using GreenshotConfluencePlugin.confluence; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; /// /// For details see the Confluence API site diff --git a/GreenshotConfluencePlugin/ConfluenceConfiguration.cs b/GreenshotConfluencePlugin/ConfluenceConfiguration.cs index 9bfb6e6f5..0f2415dee 100644 --- a/GreenshotConfluencePlugin/ConfluenceConfiguration.cs +++ b/GreenshotConfluencePlugin/ConfluenceConfiguration.cs @@ -20,7 +20,7 @@ */ using System; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotConfluencePlugin { /// diff --git a/GreenshotConfluencePlugin/ConfluenceDestination.cs b/GreenshotConfluencePlugin/ConfluenceDestination.cs index 86a4494a9..4388c4972 100644 --- a/GreenshotConfluencePlugin/ConfluenceDestination.cs +++ b/GreenshotConfluencePlugin/ConfluenceDestination.cs @@ -29,7 +29,7 @@ using System.Windows; using Confluence; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotConfluencePlugin { /// diff --git a/GreenshotConfluencePlugin/ConfluencePlugin.cs b/GreenshotConfluencePlugin/ConfluencePlugin.cs index ba5ea082d..ed26e08bb 100644 --- a/GreenshotConfluencePlugin/ConfluencePlugin.cs +++ b/GreenshotConfluencePlugin/ConfluencePlugin.cs @@ -28,7 +28,7 @@ using System.Windows; using Confluence; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using TranslationByMarkupExtension; namespace GreenshotConfluencePlugin { diff --git a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs index 906bbf70a..eeae5b0fc 100644 --- a/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs +++ b/GreenshotConfluencePlugin/Forms/ConfluenceSearch.xaml.cs @@ -25,7 +25,7 @@ using System.Windows; using Confluence; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotConfluencePlugin { public partial class ConfluenceSearch : System.Windows.Controls.Page { diff --git a/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs b/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs index 61edc2153..48c3224e6 100644 --- a/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs +++ b/GreenshotExternalCommandPlugin/ExternalCommandConfiguration.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.IO; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace ExternalCommand { /// diff --git a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs index aa1e1b171..2749fa8cb 100644 --- a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs +++ b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs @@ -27,7 +27,7 @@ using System.Threading; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace ExternalCommand { /// diff --git a/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs b/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs index 71ea2f119..66ad6441a 100644 --- a/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs +++ b/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using Greenshot.Plugin; -using IniFile; +using Greenshot.IniFile; namespace ExternalCommand { /// diff --git a/GreenshotExternalCommandPlugin/SettingsForm.cs b/GreenshotExternalCommandPlugin/SettingsForm.cs index 8389c829c..34db793d8 100644 --- a/GreenshotExternalCommandPlugin/SettingsForm.cs +++ b/GreenshotExternalCommandPlugin/SettingsForm.cs @@ -24,7 +24,7 @@ using System.IO; using System.Windows.Forms; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace ExternalCommand { /// diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.cs index e2e6f4415..3037cb995 100644 --- a/GreenshotImgurPlugin/Forms/ImgurHistory.cs +++ b/GreenshotImgurPlugin/Forms/ImgurHistory.cs @@ -25,7 +25,7 @@ using System.Windows.Forms; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotImgurPlugin.Forms { /// diff --git a/GreenshotImgurPlugin/ImgurConfiguration.cs b/GreenshotImgurPlugin/ImgurConfiguration.cs index d8630f256..0fcf9696a 100644 --- a/GreenshotImgurPlugin/ImgurConfiguration.cs +++ b/GreenshotImgurPlugin/ImgurConfiguration.cs @@ -24,7 +24,7 @@ using System.Windows.Forms; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotImgurPlugin { /// diff --git a/GreenshotImgurPlugin/ImgurDestination.cs b/GreenshotImgurPlugin/ImgurDestination.cs index ff7a7e13d..aa783d42a 100644 --- a/GreenshotImgurPlugin/ImgurDestination.cs +++ b/GreenshotImgurPlugin/ImgurDestination.cs @@ -28,7 +28,7 @@ using System.Windows; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotImgurPlugin { /// diff --git a/GreenshotImgurPlugin/ImgurPlugin.cs b/GreenshotImgurPlugin/ImgurPlugin.cs index 70d467fba..1617c2bac 100644 --- a/GreenshotImgurPlugin/ImgurPlugin.cs +++ b/GreenshotImgurPlugin/ImgurPlugin.cs @@ -30,7 +30,7 @@ using Greenshot.Plugin; using GreenshotImgurPlugin.Forms; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotImgurPlugin { /// diff --git a/GreenshotImgurPlugin/ImgurUtils.cs b/GreenshotImgurPlugin/ImgurUtils.cs index 2123d5148..1dbfb1788 100644 --- a/GreenshotImgurPlugin/ImgurUtils.cs +++ b/GreenshotImgurPlugin/ImgurUtils.cs @@ -28,7 +28,7 @@ using System.Text; using System.Web; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotImgurPlugin { /// diff --git a/GreenshotInterop/Interop/COMWrapper.cs b/GreenshotInterop/Interop/COMWrapper.cs index 9f03448f3..0eb435c3c 100644 --- a/GreenshotInterop/Interop/COMWrapper.cs +++ b/GreenshotInterop/Interop/COMWrapper.cs @@ -32,6 +32,8 @@ namespace Greenshot.Interop { public sealed class COMWrapper : RealProxy, IDisposable, IRemotingTypeInfo { private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(COMWrapper)); private const int MK_E_UNAVAILABLE = -2147221021; + private const int CO_E_CLASSSTRING = -2147221005; + #region Private Data /// @@ -50,6 +52,8 @@ namespace Greenshot.Interop { private Type _InterceptType; #endregion + [DllImport("ole32.dll")] + static extern int ProgIDFromCLSID([In] ref Guid clsid, [MarshalAs(UnmanagedType.LPWStr)] out string lplpszProgID); #region Construction @@ -68,23 +72,36 @@ namespace Greenshot.Interop { throw new ArgumentException("The specified type must be an interface.", "type"); } - ComProgIdAttribute progID = ComProgIdAttribute.GetAttribute(type); - if (null == progID || null == progID.Value || 0 == progID.Value.Length) { + ComProgIdAttribute progIDAttribute = ComProgIdAttribute.GetAttribute(type); + if (null == progIDAttribute || null == progIDAttribute.Value || 0 == progIDAttribute.Value.Length) { throw new ArgumentException("The specified type must define a ComProgId attribute.", "type"); } + string progId = progIDAttribute.Value; + + // Convert from clsid to Prog ID, if needed + if (progId.StartsWith("clsid:")) { + Guid guid = new Guid(progId.Substring(6)); + int result = ProgIDFromCLSID(ref guid, out progId); + if (result != 0) { + LOG.WarnFormat("Error {0} getting progId {1}", result, progIDAttribute.Value); + } else { + LOG.InfoFormat("Mapped {0} to progId {1}", progIDAttribute.Value, progId); + } + } object comObject = null; - Type comType = Type.GetTypeFromProgID(progID.Value, true); try { - comObject = Marshal.GetActiveObject(progID.Value); + comObject = Marshal.GetActiveObject(progId); } catch (COMException comE) { if (comE.ErrorCode == MK_E_UNAVAILABLE) { - LOG.DebugFormat("No current instance of {0} object available.", progID.Value); + LOG.DebugFormat("No current instance of {0} object available.", progId); + } else if (comE.ErrorCode == CO_E_CLASSSTRING) { + LOG.WarnFormat("Unknown progId {0}", progId); } else { - LOG.Warn("Error getting active object for " + progID.Value, comE); + LOG.Warn("Error getting active object for " + progId, comE); } } catch (Exception e) { - LOG.Warn("Error getting active object for " + progID.Value, e); + LOG.Warn("Error getting active object for " + progId, e); } if (comObject != null) { @@ -110,46 +127,63 @@ namespace Greenshot.Interop { throw new ArgumentException("The specified type must be an interface.", "type"); } - ComProgIdAttribute progID = ComProgIdAttribute.GetAttribute(type); - if (null == progID || null == progID.Value || 0 == progID.Value.Length) { + ComProgIdAttribute progIDAttribute = ComProgIdAttribute.GetAttribute(type); + if (null == progIDAttribute || null == progIDAttribute.Value || 0 == progIDAttribute.Value.Length) { throw new ArgumentException("The specified type must define a ComProgId attribute.", "type"); } object comObject = null; Type comType = null; - if (progID.Value.StartsWith("clsid:")) { - Guid guid = new Guid(progID.Value.Substring(6)); - comType = Type.GetTypeFromCLSID(guid, true); - } else { - comType = Type.GetTypeFromProgID(progID.Value, true); + string progId = progIDAttribute.Value; + + // Convert from clsid to Prog ID, if needed + if (progId.StartsWith("clsid:")) { + Guid guid = new Guid(progId.Substring(6)); + int result = ProgIDFromCLSID(ref guid, out progId); + if (result != 0) { + LOG.WarnFormat("Error {0} getting progId {1}", result, progIDAttribute.Value); + } else { + LOG.InfoFormat("Mapped {0} to progId {1}", progIDAttribute.Value, progId); + } } + try { - comObject = Marshal.GetActiveObject(progID.Value); + comObject = Marshal.GetActiveObject(progId); } catch (COMException comE) { if (comE.ErrorCode == MK_E_UNAVAILABLE) { - LOG.DebugFormat("No current instance of {0} object available.", progID.Value); + LOG.DebugFormat("No current instance of {0} object available.", progId); + } else if (comE.ErrorCode == CO_E_CLASSSTRING) { + LOG.WarnFormat("Unknown progId {0} (application not installed)", progId); + return default(T); } else { - LOG.Warn("Error getting active object for " + progID.Value, comE); + LOG.Warn("Error getting active object for " + progId, comE); } } catch (Exception e) { - LOG.Warn("Error getting active object for " + progID.Value, e); + LOG.Warn("Error getting active object for " + progId, e); } // Did we get the current instance? If not, try to create a new if (comObject == null) { try { - comObject = Activator.CreateInstance(comType); - if (comObject != null) { - LOG.DebugFormat("Created new instance of {0} object.", progID.Value); + comType = Type.GetTypeFromProgID(progId, true); + } catch (Exception ex) { + LOG.Warn("Error type for " + progId, ex); + } + if (comType != null) { + try { + comObject = Activator.CreateInstance(comType); + if (comObject != null) { + LOG.DebugFormat("Created new instance of {0} object.", progId); + } + } catch (Exception e) { + LOG.Warn("Error creating object for " + progId, e); } - } catch (Exception e) { - LOG.Warn("Error creating object for " + progID.Value, e); } } if (comObject != null) { COMWrapper wrapper = new COMWrapper(comObject, type); return (T)wrapper.GetTransparentProxy(); } - throw new TypeLoadException(string.Format("Unable to get or create an instance of the specified COM server \"{0}\".", progID.Value)); + return default(T); } /// diff --git a/GreenshotInterop/OfficeInterop/OfficeInterop.cs b/GreenshotInterop/OfficeInterop/OfficeInterop.cs index 545832238..a6246b405 100644 --- a/GreenshotInterop/OfficeInterop/OfficeInterop.cs +++ b/GreenshotInterop/OfficeInterop/OfficeInterop.cs @@ -29,370 +29,4 @@ namespace Greenshot.Interop.Office { int Count { get; } void Remove(int index); } - - /// - /// See: http://msdn.microsoft.com/en-us/library/bb208387%28v=office.12%29.aspx - /// - public interface Items : Collection, IEnumerable { - Item this[object index] { get; } - Item GetFirst(); - Item GetNext(); - Item GetLast(); - Item GetPrevious(); - - bool IncludeRecurrences { - get; - set; - } - - Items Restrict(string filter); - void Sort(string property, object descending); - - // Actual definition is "object Add( object )", just making it convenient - object Add(OlItemType type); - } - - // Common attributes of all the Items (MailItem, AppointmentItem) - // See: http://msdn.microsoft.com/en-us/library/ff861252.aspx - public interface Item : Common { - Attachments Attachments { get; } - string Body { get; set; } - OlObjectClass Class { get; } - DateTime CreationTime { get; } - string EntryID { get; } - DateTime LastModificationTime { get; } - string MessageClass { get; set; } - bool NoAging { get; set; } - int OutlookInternalVersion { get; } - string OutlookVersion { get; } - bool Saved { get; } - OlSensitivity Sensitivity { get; set; } - int Size { get; } - string Subject { get; set; } - bool UnRead { get; set; } - object Copy(); - void Display(bool Modal); - void Save(); - PropertyAccessor PropertyAccessor { get; } - Inspector GetInspector(); - } - - // See: http://msdn.microsoft.com/en-us/library/ff861252.aspx - // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mailitem.aspx - public interface MailItem : Item, Common { - bool Sent { get; } - object MAPIOBJECT { get; } - string HTMLBody { get; set; } - DateTime ExpiryTime { get; set; } - DateTime ReceivedTime { get; } - string SenderName { get; } - DateTime SentOn { get; } - OlBodyFormat BodyFormat { get; set; } - } - - // See: http://msdn.microsoft.com/en-us/library/ff869026.aspx - // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.appointmentitem.aspx - public interface AppointmentItem : Item, Common { - string Organizer { get; set; } - string SendUsingAccount { get; } - string Categories { get; } - DateTime Start { get; } - DateTime End { get; } - OlReoccurenceState RecurrenceState { get; } - } - - // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.contactitem.aspx - public interface ContactItem : Item, Common { - bool HasPicture { - get; - } - void SaveBusinessCardImage(string path); - void AddPicture(string path); - void RemovePicture(); - string FirstName { - get; - set; - } - string LastName { - get; - set; - } - } - - public interface Attachments : Collection { - Attachment Add(object source, object type, object position, object displayName); - // Use index+1!!!! - Attachment this[object index] { get; } - } - - // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.attachment_members.aspx - public interface Attachment : Common { - string DisplayName { get; set; } - string FileName { get; } - OlAttachmentType Type { get; } - PropertyAccessor PropertyAccessor { get; } - object MAPIOBJECT { get; } - void SaveAsFile(string path); - } - - // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.propertyaccessor_members.aspx - public interface PropertyAccessor : Common { - void SetProperty(string SchemaName, Object Value); - Object GetProperty(string SchemaName); - } - - public enum OlBodyFormat { - // Fields - olFormatHTML = 2, - olFormatPlain = 1, - olFormatRichText = 3, - olFormatUnspecified = 0 - } - - public enum OlAttachmentType { - // Fields - olByReference = 4, - olByValue = 1, - olEmbeddeditem = 5, - olOLE = 6 - } - - public enum OlSensitivity { - // Fields - olConfidential = 3, - olNormal = 0, - olPersonal = 1, - olPrivate = 2 - } - - // See: http://msdn.microsoft.com/en-us/library/ff863329.aspx - public enum OlObjectClass { - olAccount = 105, // Represents an Account object. - olAccountRuleCondition = 135, // Represents an AccountRuleCondition object. - olAccounts = 106, // Represents an Accounts object. - olAction = 32, // Represents an Action object. - olActions = 33, // Represents an Actions object. - olAddressEntries = 21, // Represents an AddressEntries object. - olAddressEntry = 8, // Represents an AddressEntry object. - olAddressList = 7, // Represents an AddressList object. - olAddressLists = 20, // Represents an AddressLists object. - olAddressRuleCondition = 170, // Represents an AddressRuleCondition object. - olApplication = 0, // Represents an Application object. - olAppointment = 26, // Represents an AppointmentItem object. - olAssignToCategoryRuleAction = 122, // Represents an AssignToCategoryRuleAction object. - olAttachment = 5, // Represents an Attachment object. - olAttachments = 18, // Represents an Attachments object. - olAttachmentSelection = 169, // Represents an AttachmentSelection object. - olAutoFormatRule = 147, // Represents an AutoFormatRule object. - olAutoFormatRules = 148, // Represents an AutoFormatRules object. - olCalendarModule = 159, // Represents a CalendarModule object. - olCalendarSharing = 151, // Represents a CalendarSharing object. - olCategories = 153, // Represents a Categories object. - olCategory = 152, // Represents a Category object. - olCategoryRuleCondition = 130, // Represents a CategoryRuleCondition object. - olClassBusinessCardView = 168, // Represents a BusinessCardView object. - olClassCalendarView = 139, // Represents a CalendarView object. - olClassCardView = 138, // Represents a CardView object. - olClassIconView = 137, // Represents a IconView object. - olClassNavigationPane = 155, // Represents a NavigationPane object. - olClassTableView = 136, // Represents a TableView object. - olClassTimeLineView = 140, // Represents a TimelineView object. - olClassTimeZone = 174, // Represents a TimeZone object. - olClassTimeZones = 175, // Represents a TimeZones object. - olColumn = 154, // Represents a Column object. - olColumnFormat = 149, // Represents a ColumnFormat object. - olColumns = 150, // Represents a Columns object. - olConflict = 102, // Represents a Conflict object. - olConflicts = 103, // Represents a Conflicts object. - olContact = 40, // Represents a ContactItem object. - olContactsModule = 160, // Represents a ContactsModule object. - olDistributionList = 69, // Represents a ExchangeDistributionList object. - olDocument = 41, // Represents a DocumentItem object. - olException = 30, // Represents an Exception object. - olExceptions = 29, // Represents an Exceptions object. - olExchangeDistributionList = 111, // Represents an ExchangeDistributionList object. - olExchangeUser = 110, // Represents an ExchangeUser object. - olExplorer = 34, // Represents an Explorer object. - olExplorers = 60, // Represents an Explorers object. - olFolder = 2, // Represents a Folder object. - olFolders = 15, // Represents a Folders object. - olFolderUserProperties = 172, // Represents a UserDefinedProperties object. - olFolderUserProperty = 171, // Represents a UserDefinedProperty object. - olFormDescription = 37, // Represents a FormDescription object. - olFormNameRuleCondition = 131, // Represents a FormNameRuleCondition object. - olFormRegion = 129, // Represents a FormRegion object. - olFromRssFeedRuleCondition = 173, // Represents a FromRssFeedRuleCondition object. - olFromRuleCondition = 132, // Represents a ToOrFromRuleCondition object. - olImportanceRuleCondition = 128, // Represents an ImportanceRuleCondition object. - olInspector = 35, // Represents an Inspector object. - olInspectors = 61, // Represents an Inspectors object. - olItemProperties = 98, // Represents an ItemProperties object. - olItemProperty = 99, // Represents an ItemProperty object. - olItems = 16, // Represents an Items object. - olJournal = 42, // Represents a JournalItem object. - olJournalModule = 162, // Represents a JournalModule object. - olLink = 75, // Represents a Link object. - olLinks = 76, // Represents a Links object. - olMail = 43, // Represents a MailItem object. - olMailModule = 158, // Represents a MailModule object. - olMarkAsTaskRuleAction = 124, // Represents a MarkAsTaskRuleAction object. - olMeetingCancellation = 54, // Represents a MeetingItem object that is a meeting cancellation notice. - olMeetingRequest = 53, // Represents a MeetingItem object that is a meeting request. - olMeetingResponseNegative = 55, // Represents a MeetingItem object that is a refusal of a meeting request. - olMeetingResponsePositive = 56, // Represents a MeetingItem object that is an acceptance of a meeting request. - olMeetingResponseTentative = 57, // Represents a MeetingItem object that is a tentative acceptance of a meeting request. - olMoveOrCopyRuleAction = 118, // Represents a MoveOrCopyRuleAction object. - olNamespace = 1, // Represents a NameSpace object. - olNavigationFolder = 167, // Represents a NavigationFolder object. - olNavigationFolders = 166, // Represents a NavigationFolders object. - olNavigationGroup = 165, // Represents a NavigationGroup object. - olNavigationGroups = 164, // Represents a NavigationGroups object. - olNavigationModule = 157, // Represents a NavigationModule object. - olNavigationModules = 156, // Represents a NavigationModules object. - olNewItemAlertRuleAction = 125, // Represents a NewItemAlertRuleAction object. - olNote = 44, // Represents a NoteItem object. - olNotesModule = 163, // Represents a NotesModule object. - olOrderField = 144, // Represents an OrderField object. - olOrderFields = 145, // Represents an OrderFields object. - olOutlookBarGroup = 66, // Represents an OutlookBarGroup object. - olOutlookBarGroups = 65, // Represents an OutlookBarGroups object. - olOutlookBarPane = 63, // Represents an OutlookBarPane object. - olOutlookBarShortcut = 68, // Represents an OutlookBarShortcut object. - olOutlookBarShortcuts = 67, // Represents an OutlookBarShortcuts object. - olOutlookBarStorage = 64, // Represents an OutlookBarStorage object. - olPages = 36, // Represents a Pages object. - olPanes = 62, // Represents a Panes object. - olPlaySoundRuleAction = 123, // Represents a PlaySoundRuleAction object. - olPost = 45, // Represents a PostItem object. - olPropertyAccessor = 112, // Represents a PropertyAccessor object. - olPropertyPages = 71, // Represents a PropertyPages object. - olPropertyPageSite = 70, // Represents a PropertyPageSite object. - olRecipient = 4, // Represents a Recipient object. - olRecipients = 17, // Represents a Recipients object. - olRecurrencePattern = 28, // Represents a RecurrencePattern object. - olReminder = 101, // Represents a Reminder object. - olReminders = 100, // Represents a Reminders object. - olRemote = 47, // Represents a RemoteItem object. - olReport = 46, // Represents a ReportItem object. - olResults = 78, // Represents a Results object. - olRow = 121, // Represents a Row object. - olRule = 115, // Represents a Rule object. - olRuleAction = 117, // Represents a RuleAction object. - olRuleActions = 116, // Represents a RuleAction object. - olRuleCondition = 127, // Represents a RuleCondition object. - olRuleConditions = 126, // Represents a RuleConditions object. - olRules = 114, // Represents a Rules object. - olSearch = 77, // Represents a Search object. - olSelection = 74, // Represents a Selection object. - olSelectNamesDialog = 109, // Represents a SelectNamesDialog object. - olSenderInAddressListRuleCondition = 133, // Represents a SenderInAddressListRuleCondition object. - olSendRuleAction = 119, // Represents a SendRuleAction object. - olSharing = 104, // Represents a SharingItem object. - olStorageItem = 113, // Represents a StorageItem object. - olStore = 107, // Represents a Store object. - olStores = 108, // Represents a Stores object. - olSyncObject = 72, // Represents a SyncObject object. - olSyncObjects = 73, // Represents a SyncObject object. - olTable = 120, // Represents a Table object. - olTask = 48, // Represents a TaskItem object. - olTaskRequest = 49, // Represents a TaskRequestItem object. - olTaskRequestAccept = 51, // Represents a TaskRequestAcceptItem object. - olTaskRequestDecline = 52, // Represents a TaskRequestDeclineItem object. - olTaskRequestUpdate = 50, // Represents a TaskRequestUpdateItem object. - olTasksModule = 161, // Represents a TasksModule object. - olTextRuleCondition = 134, // Represents a TextRuleCondition object. - olUserDefinedProperties = 172, // Represents a UserDefinedProperties object. - olUserDefinedProperty = 171, // Represents a UserDefinedProperty object. - olUserProperties = 38, // Represents a UserProperties object. - olUserProperty = 39, // Represents a UserProperty object. - olView = 80, // Represents a View object. - olViewField = 142, // Represents a ViewField object. - olViewFields = 141, // Represents a ViewFields object. - olViewFont = 146, // Represents a ViewFont object. - olViews = 79 // Represents a Views object. - } - - public enum OlDefaultFolders { - olFolderCalendar = 9, // The Calendar folder. - olFolderConflicts = 19, // The Conflicts folder (subfolder of Sync Issues folder). Only available for an Exchange account. - olFolderContacts = 10, // The Contacts folder. - olFolderDeletedItems = 3, // The Deleted Items folder. - olFolderDrafts = 16, // The Drafts folder. - olFolderInbox = 6, // The Inbox folder. - olFolderJournal = 11, // The Journal folder. - olFolderJunk = 23, // The Junk E-Mail folder. - olFolderLocalFailures = 21, // The Local Failures folder (subfolder of Sync Issues folder). Only available for an Exchange account. - olFolderManagedEmail = 29, // The top-level folder in the Managed Folders group. For more information on Managed Folders, see Help in Microsoft Outlook. Only available for an Exchange account. - olFolderNotes = 12, // The Notes folder. - olFolderOutbox = 4, // The Outbox folder. - olFolderSentMail = 5, // The Sent Mail folder. - olFolderServerFailures = 22, // The Server Failures folder (subfolder of Sync Issues folder). Only available for an Exchange account. - olFolderSyncIssues = 20, // The Sync Issues folder. Only available for an Exchange account. - olFolderTasks = 13, // The Tasks folder. - olFolderToDo = 28, // The To Do folder. - olPublicFoldersAllPublicFolders = 18, // The All Public Folders folder in the Exchange Public Folders store. Only available for an Exchange account. - olFolderRssFeeds = 25 // The RSS Feeds folder. - } - - public enum OlItemType { - // Fields - olAppointmentItem = 1, - olContactItem = 2, - olDistributionListItem = 7, - olJournalItem = 4, - olMailItem = 0, - olNoteItem = 5, - olPostItem = 6, - olTaskItem = 3 - } - - public enum OlEditorType { - // Fields - olEditorHTML = 2, - olEditorRTF = 3, - olEditorText = 1, - olEditorWord = 4 - } - - public enum OlWindowState { - // Fields - olMaximized = 0, - olMinimized = 1, - olNormalWindow = 2 - } - - public enum OlInspectorClose { - // Fields - olDiscard = 1, - olPromptForSave = 2, - olSave = 0 - } - - public enum MsoTriState { - msoTrue = -1, - msoFalse = 0, - msoCTrue = 1, - msoTriStateToggle = -3, - msoTriStateMixed = -2 - } - - public enum OlReoccurenceState { - olApptException, - olApptMaster, - olApptNotRecurring, - olApptOccurrence - } - - public enum MsoScaleFrom { - msoScaleFromTopLeft = 0, - msoScaleFromMiddle = 1, - msoScaleFromBottomRight = 2 - } - - // Schema definitions for the MAPI properties - // See: http://msdn.microsoft.com/en-us/library/aa454438.aspx - // and see: http://msdn.microsoft.com/en-us/library/bb446117.aspx - public static class PropTag { - public const string ATTACHMENT_CONTENT_ID = @"http://schemas.microsoft.com/mapi/proptag/0x3712001E"; - } } diff --git a/GreenshotInterop/OfficeInterop/OutlookInterop.cs b/GreenshotInterop/OfficeInterop/OutlookInterop.cs index d7ba6bc47..65c395cc2 100644 --- a/GreenshotInterop/OfficeInterop/OutlookInterop.cs +++ b/GreenshotInterop/OfficeInterop/OutlookInterop.cs @@ -27,6 +27,123 @@ using System.Collections.Generic; /// But this somehow doesn't work yet /// namespace Greenshot.Interop.Office { + /// + /// See: http://msdn.microsoft.com/en-us/library/bb208387%28v=office.12%29.aspx + /// + public interface Items : Collection, IEnumerable { + Item this[object index] { get; } + Item GetFirst(); + Item GetNext(); + Item GetLast(); + Item GetPrevious(); + + bool IncludeRecurrences { + get; + set; + } + + Items Restrict(string filter); + void Sort(string property, object descending); + + // Actual definition is "object Add( object )", just making it convenient + object Add(OlItemType type); + } + + // Common attributes of all the Items (MailItem, AppointmentItem) + // See: http://msdn.microsoft.com/en-us/library/ff861252.aspx + public interface Item : Common { + Attachments Attachments { get; } + string Body { get; set; } + OlObjectClass Class { get; } + DateTime CreationTime { get; } + string EntryID { get; } + DateTime LastModificationTime { get; } + string MessageClass { get; set; } + bool NoAging { get; set; } + int OutlookInternalVersion { get; } + string OutlookVersion { get; } + bool Saved { get; } + OlSensitivity Sensitivity { get; set; } + int Size { get; } + string Subject { get; set; } + bool UnRead { get; set; } + object Copy(); + void Display(bool Modal); + void Save(); + PropertyAccessor PropertyAccessor { get; } + Inspector GetInspector(); + } + + // See: http://msdn.microsoft.com/en-us/library/ff861252.aspx + // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mailitem.aspx + public interface MailItem : Item, Common { + bool Sent { get; } + object MAPIOBJECT { get; } + string HTMLBody { get; set; } + DateTime ExpiryTime { get; set; } + DateTime ReceivedTime { get; } + string SenderName { get; } + DateTime SentOn { get; } + OlBodyFormat BodyFormat { get; set; } + } + + // See: http://msdn.microsoft.com/en-us/library/ff869026.aspx + // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.appointmentitem.aspx + public interface AppointmentItem : Item, Common { + string Organizer { get; set; } + string SendUsingAccount { get; } + string Categories { get; } + DateTime Start { get; } + DateTime End { get; } + OlReoccurenceState RecurrenceState { get; } + } + + // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.contactitem.aspx + public interface ContactItem : Item, Common { + bool HasPicture { + get; + } + void SaveBusinessCardImage(string path); + void AddPicture(string path); + void RemovePicture(); + string FirstName { + get; + set; + } + string LastName { + get; + set; + } + } + + public interface Attachments : Collection { + Attachment Add(object source, object type, object position, object displayName); + // Use index+1!!!! + Attachment this[object index] { get; } + } + + // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.attachment_members.aspx + public interface Attachment : Common { + string DisplayName { get; set; } + string FileName { get; } + OlAttachmentType Type { get; } + PropertyAccessor PropertyAccessor { get; } + object MAPIOBJECT { get; } + void SaveAsFile(string path); + } + + // See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.propertyaccessor_members.aspx + public interface PropertyAccessor : Common { + void SetProperty(string SchemaName, Object Value); + Object GetProperty(string SchemaName); + } + + // Schema definitions for the MAPI properties + // See: http://msdn.microsoft.com/en-us/library/aa454438.aspx + // and see: http://msdn.microsoft.com/en-us/library/bb446117.aspx + public static class PropTag { + public const string ATTACHMENT_CONTENT_ID = @"http://schemas.microsoft.com/mapi/proptag/0x3712001E"; + } /// /// Wrapper for Outlook.Application, see: http://msdn.microsoft.com/en-us/library/aa210897%28v=office.11%29.aspx /// @@ -96,4 +213,251 @@ namespace Greenshot.Interop.Office { public enum EmailFormat { Text, HTML } + public enum OlBodyFormat { + // Fields + olFormatHTML = 2, + olFormatPlain = 1, + olFormatRichText = 3, + olFormatUnspecified = 0 + } + + public enum OlAttachmentType { + // Fields + olByReference = 4, + olByValue = 1, + olEmbeddeditem = 5, + olOLE = 6 + } + + public enum OlSensitivity { + // Fields + olConfidential = 3, + olNormal = 0, + olPersonal = 1, + olPrivate = 2 + } + + // See: http://msdn.microsoft.com/en-us/library/ff863329.aspx + public enum OlObjectClass { + olAccount = 105, // Represents an Account object. + olAccountRuleCondition = 135, // Represents an AccountRuleCondition object. + olAccounts = 106, // Represents an Accounts object. + olAction = 32, // Represents an Action object. + olActions = 33, // Represents an Actions object. + olAddressEntries = 21, // Represents an AddressEntries object. + olAddressEntry = 8, // Represents an AddressEntry object. + olAddressList = 7, // Represents an AddressList object. + olAddressLists = 20, // Represents an AddressLists object. + olAddressRuleCondition = 170, // Represents an AddressRuleCondition object. + olApplication = 0, // Represents an Application object. + olAppointment = 26, // Represents an AppointmentItem object. + olAssignToCategoryRuleAction = 122, // Represents an AssignToCategoryRuleAction object. + olAttachment = 5, // Represents an Attachment object. + olAttachments = 18, // Represents an Attachments object. + olAttachmentSelection = 169, // Represents an AttachmentSelection object. + olAutoFormatRule = 147, // Represents an AutoFormatRule object. + olAutoFormatRules = 148, // Represents an AutoFormatRules object. + olCalendarModule = 159, // Represents a CalendarModule object. + olCalendarSharing = 151, // Represents a CalendarSharing object. + olCategories = 153, // Represents a Categories object. + olCategory = 152, // Represents a Category object. + olCategoryRuleCondition = 130, // Represents a CategoryRuleCondition object. + olClassBusinessCardView = 168, // Represents a BusinessCardView object. + olClassCalendarView = 139, // Represents a CalendarView object. + olClassCardView = 138, // Represents a CardView object. + olClassIconView = 137, // Represents a IconView object. + olClassNavigationPane = 155, // Represents a NavigationPane object. + olClassTableView = 136, // Represents a TableView object. + olClassTimeLineView = 140, // Represents a TimelineView object. + olClassTimeZone = 174, // Represents a TimeZone object. + olClassTimeZones = 175, // Represents a TimeZones object. + olColumn = 154, // Represents a Column object. + olColumnFormat = 149, // Represents a ColumnFormat object. + olColumns = 150, // Represents a Columns object. + olConflict = 102, // Represents a Conflict object. + olConflicts = 103, // Represents a Conflicts object. + olContact = 40, // Represents a ContactItem object. + olContactsModule = 160, // Represents a ContactsModule object. + olDistributionList = 69, // Represents a ExchangeDistributionList object. + olDocument = 41, // Represents a DocumentItem object. + olException = 30, // Represents an Exception object. + olExceptions = 29, // Represents an Exceptions object. + olExchangeDistributionList = 111, // Represents an ExchangeDistributionList object. + olExchangeUser = 110, // Represents an ExchangeUser object. + olExplorer = 34, // Represents an Explorer object. + olExplorers = 60, // Represents an Explorers object. + olFolder = 2, // Represents a Folder object. + olFolders = 15, // Represents a Folders object. + olFolderUserProperties = 172, // Represents a UserDefinedProperties object. + olFolderUserProperty = 171, // Represents a UserDefinedProperty object. + olFormDescription = 37, // Represents a FormDescription object. + olFormNameRuleCondition = 131, // Represents a FormNameRuleCondition object. + olFormRegion = 129, // Represents a FormRegion object. + olFromRssFeedRuleCondition = 173, // Represents a FromRssFeedRuleCondition object. + olFromRuleCondition = 132, // Represents a ToOrFromRuleCondition object. + olImportanceRuleCondition = 128, // Represents an ImportanceRuleCondition object. + olInspector = 35, // Represents an Inspector object. + olInspectors = 61, // Represents an Inspectors object. + olItemProperties = 98, // Represents an ItemProperties object. + olItemProperty = 99, // Represents an ItemProperty object. + olItems = 16, // Represents an Items object. + olJournal = 42, // Represents a JournalItem object. + olJournalModule = 162, // Represents a JournalModule object. + olLink = 75, // Represents a Link object. + olLinks = 76, // Represents a Links object. + olMail = 43, // Represents a MailItem object. + olMailModule = 158, // Represents a MailModule object. + olMarkAsTaskRuleAction = 124, // Represents a MarkAsTaskRuleAction object. + olMeetingCancellation = 54, // Represents a MeetingItem object that is a meeting cancellation notice. + olMeetingRequest = 53, // Represents a MeetingItem object that is a meeting request. + olMeetingResponseNegative = 55, // Represents a MeetingItem object that is a refusal of a meeting request. + olMeetingResponsePositive = 56, // Represents a MeetingItem object that is an acceptance of a meeting request. + olMeetingResponseTentative = 57, // Represents a MeetingItem object that is a tentative acceptance of a meeting request. + olMoveOrCopyRuleAction = 118, // Represents a MoveOrCopyRuleAction object. + olNamespace = 1, // Represents a NameSpace object. + olNavigationFolder = 167, // Represents a NavigationFolder object. + olNavigationFolders = 166, // Represents a NavigationFolders object. + olNavigationGroup = 165, // Represents a NavigationGroup object. + olNavigationGroups = 164, // Represents a NavigationGroups object. + olNavigationModule = 157, // Represents a NavigationModule object. + olNavigationModules = 156, // Represents a NavigationModules object. + olNewItemAlertRuleAction = 125, // Represents a NewItemAlertRuleAction object. + olNote = 44, // Represents a NoteItem object. + olNotesModule = 163, // Represents a NotesModule object. + olOrderField = 144, // Represents an OrderField object. + olOrderFields = 145, // Represents an OrderFields object. + olOutlookBarGroup = 66, // Represents an OutlookBarGroup object. + olOutlookBarGroups = 65, // Represents an OutlookBarGroups object. + olOutlookBarPane = 63, // Represents an OutlookBarPane object. + olOutlookBarShortcut = 68, // Represents an OutlookBarShortcut object. + olOutlookBarShortcuts = 67, // Represents an OutlookBarShortcuts object. + olOutlookBarStorage = 64, // Represents an OutlookBarStorage object. + olPages = 36, // Represents a Pages object. + olPanes = 62, // Represents a Panes object. + olPlaySoundRuleAction = 123, // Represents a PlaySoundRuleAction object. + olPost = 45, // Represents a PostItem object. + olPropertyAccessor = 112, // Represents a PropertyAccessor object. + olPropertyPages = 71, // Represents a PropertyPages object. + olPropertyPageSite = 70, // Represents a PropertyPageSite object. + olRecipient = 4, // Represents a Recipient object. + olRecipients = 17, // Represents a Recipients object. + olRecurrencePattern = 28, // Represents a RecurrencePattern object. + olReminder = 101, // Represents a Reminder object. + olReminders = 100, // Represents a Reminders object. + olRemote = 47, // Represents a RemoteItem object. + olReport = 46, // Represents a ReportItem object. + olResults = 78, // Represents a Results object. + olRow = 121, // Represents a Row object. + olRule = 115, // Represents a Rule object. + olRuleAction = 117, // Represents a RuleAction object. + olRuleActions = 116, // Represents a RuleAction object. + olRuleCondition = 127, // Represents a RuleCondition object. + olRuleConditions = 126, // Represents a RuleConditions object. + olRules = 114, // Represents a Rules object. + olSearch = 77, // Represents a Search object. + olSelection = 74, // Represents a Selection object. + olSelectNamesDialog = 109, // Represents a SelectNamesDialog object. + olSenderInAddressListRuleCondition = 133, // Represents a SenderInAddressListRuleCondition object. + olSendRuleAction = 119, // Represents a SendRuleAction object. + olSharing = 104, // Represents a SharingItem object. + olStorageItem = 113, // Represents a StorageItem object. + olStore = 107, // Represents a Store object. + olStores = 108, // Represents a Stores object. + olSyncObject = 72, // Represents a SyncObject object. + olSyncObjects = 73, // Represents a SyncObject object. + olTable = 120, // Represents a Table object. + olTask = 48, // Represents a TaskItem object. + olTaskRequest = 49, // Represents a TaskRequestItem object. + olTaskRequestAccept = 51, // Represents a TaskRequestAcceptItem object. + olTaskRequestDecline = 52, // Represents a TaskRequestDeclineItem object. + olTaskRequestUpdate = 50, // Represents a TaskRequestUpdateItem object. + olTasksModule = 161, // Represents a TasksModule object. + olTextRuleCondition = 134, // Represents a TextRuleCondition object. + olUserDefinedProperties = 172, // Represents a UserDefinedProperties object. + olUserDefinedProperty = 171, // Represents a UserDefinedProperty object. + olUserProperties = 38, // Represents a UserProperties object. + olUserProperty = 39, // Represents a UserProperty object. + olView = 80, // Represents a View object. + olViewField = 142, // Represents a ViewField object. + olViewFields = 141, // Represents a ViewFields object. + olViewFont = 146, // Represents a ViewFont object. + olViews = 79 // Represents a Views object. + } + + public enum OlDefaultFolders { + olFolderCalendar = 9, // The Calendar folder. + olFolderConflicts = 19, // The Conflicts folder (subfolder of Sync Issues folder). Only available for an Exchange account. + olFolderContacts = 10, // The Contacts folder. + olFolderDeletedItems = 3, // The Deleted Items folder. + olFolderDrafts = 16, // The Drafts folder. + olFolderInbox = 6, // The Inbox folder. + olFolderJournal = 11, // The Journal folder. + olFolderJunk = 23, // The Junk E-Mail folder. + olFolderLocalFailures = 21, // The Local Failures folder (subfolder of Sync Issues folder). Only available for an Exchange account. + olFolderManagedEmail = 29, // The top-level folder in the Managed Folders group. For more information on Managed Folders, see Help in Microsoft Outlook. Only available for an Exchange account. + olFolderNotes = 12, // The Notes folder. + olFolderOutbox = 4, // The Outbox folder. + olFolderSentMail = 5, // The Sent Mail folder. + olFolderServerFailures = 22, // The Server Failures folder (subfolder of Sync Issues folder). Only available for an Exchange account. + olFolderSyncIssues = 20, // The Sync Issues folder. Only available for an Exchange account. + olFolderTasks = 13, // The Tasks folder. + olFolderToDo = 28, // The To Do folder. + olPublicFoldersAllPublicFolders = 18, // The All Public Folders folder in the Exchange Public Folders store. Only available for an Exchange account. + olFolderRssFeeds = 25 // The RSS Feeds folder. + } + + public enum OlItemType { + // Fields + olAppointmentItem = 1, + olContactItem = 2, + olDistributionListItem = 7, + olJournalItem = 4, + olMailItem = 0, + olNoteItem = 5, + olPostItem = 6, + olTaskItem = 3 + } + + public enum OlEditorType { + // Fields + olEditorHTML = 2, + olEditorRTF = 3, + olEditorText = 1, + olEditorWord = 4 + } + + public enum OlWindowState { + // Fields + olMaximized = 0, + olMinimized = 1, + olNormalWindow = 2 + } + + public enum OlInspectorClose { + // Fields + olDiscard = 1, + olPromptForSave = 2, + olSave = 0 + } + + public enum MsoTriState { + msoTrue = -1, + msoFalse = 0, + msoCTrue = 1, + msoTriStateToggle = -3, + msoTriStateMixed = -2 + } + + public enum OlReoccurenceState { + olApptException, + olApptMaster, + olApptNotRecurring, + olApptOccurrence + } + + public enum MsoScaleFrom { + msoScaleFromTopLeft = 0, + msoScaleFromMiddle = 1, + msoScaleFromBottomRight = 2 + } } diff --git a/GreenshotJiraPlugin/Forms/JiraForm.cs b/GreenshotJiraPlugin/Forms/JiraForm.cs index 71295284b..088f43a5b 100644 --- a/GreenshotJiraPlugin/Forms/JiraForm.cs +++ b/GreenshotJiraPlugin/Forms/JiraForm.cs @@ -24,7 +24,7 @@ using System.Windows.Forms; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using Jira; namespace GreenshotJiraPlugin { diff --git a/GreenshotJiraPlugin/Jira.cs b/GreenshotJiraPlugin/Jira.cs index f34f8339c..f33095f94 100644 --- a/GreenshotJiraPlugin/Jira.cs +++ b/GreenshotJiraPlugin/Jira.cs @@ -27,7 +27,7 @@ using System.Windows.Forms; using GreenshotJiraPlugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace Jira { #region transport classes diff --git a/GreenshotJiraPlugin/JiraConfiguration.cs b/GreenshotJiraPlugin/JiraConfiguration.cs index 78a424a2c..d9428e095 100644 --- a/GreenshotJiraPlugin/JiraConfiguration.cs +++ b/GreenshotJiraPlugin/JiraConfiguration.cs @@ -21,7 +21,7 @@ using System; using System.Windows.Forms; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotJiraPlugin { /// diff --git a/GreenshotJiraPlugin/JiraDestination.cs b/GreenshotJiraPlugin/JiraDestination.cs index de0aa5e9d..497fc00d5 100644 --- a/GreenshotJiraPlugin/JiraDestination.cs +++ b/GreenshotJiraPlugin/JiraDestination.cs @@ -29,7 +29,7 @@ using System.Text.RegularExpressions; using Greenshot.Plugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using Jira; namespace GreenshotJiraPlugin { diff --git a/GreenshotJiraPlugin/JiraPlugin.cs b/GreenshotJiraPlugin/JiraPlugin.cs index 2378c2f7f..019e1ae2a 100644 --- a/GreenshotJiraPlugin/JiraPlugin.cs +++ b/GreenshotJiraPlugin/JiraPlugin.cs @@ -28,7 +28,7 @@ using System.Windows.Forms; using Greenshot.Plugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using Jira; namespace GreenshotJiraPlugin { diff --git a/GreenshotJiraPlugin/JiraUtils.cs b/GreenshotJiraPlugin/JiraUtils.cs index f4cb66317..db52c2bb8 100644 --- a/GreenshotJiraPlugin/JiraUtils.cs +++ b/GreenshotJiraPlugin/JiraUtils.cs @@ -29,7 +29,7 @@ using System.Text.RegularExpressions; using Greenshot.Plugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using Jira; namespace GreenshotJiraPlugin { diff --git a/GreenshotNetworkImportPlugin/NetworkImportPlugin.cs b/GreenshotNetworkImportPlugin/NetworkImportPlugin.cs index f02101db2..f9b10fc38 100644 --- a/GreenshotNetworkImportPlugin/NetworkImportPlugin.cs +++ b/GreenshotNetworkImportPlugin/NetworkImportPlugin.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.IO; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotNetworkImportPlugin { /// diff --git a/GreenshotNetworkImportPlugin/NetworkImportPluginConfiguration.cs b/GreenshotNetworkImportPlugin/NetworkImportPluginConfiguration.cs index a65b4f5ea..9fb639507 100644 --- a/GreenshotNetworkImportPlugin/NetworkImportPluginConfiguration.cs +++ b/GreenshotNetworkImportPlugin/NetworkImportPluginConfiguration.cs @@ -21,7 +21,7 @@ using System; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace GreenshotNetworkImportPlugin { /// diff --git a/GreenshotTest/Test/Helpers/ScaleHelperTest.cs b/GreenshotTest/Test/Helpers/ScaleHelperTest.cs index a47d85712..2dc65abf9 100644 --- a/GreenshotTest/Test/Helpers/ScaleHelperTest.cs +++ b/GreenshotTest/Test/Helpers/ScaleHelperTest.cs @@ -26,7 +26,7 @@ using Greenshot.Drawing; using Greenshot.Forms; using Greenshot.Helpers; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using NUnit.Framework; namespace Greenshot.Test diff --git a/GreenshotTest/Test/SaveImageFileDialogTest.cs b/GreenshotTest/Test/SaveImageFileDialogTest.cs index 33877d72a..80e4bf066 100644 --- a/GreenshotTest/Test/SaveImageFileDialogTest.cs +++ b/GreenshotTest/Test/SaveImageFileDialogTest.cs @@ -23,7 +23,7 @@ using System.Windows.Forms; using Greenshot.Configuration; using Greenshot.Forms; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; using NUnit.Framework; namespace Greenshot.Test diff --git a/PluginExample/AnnotateProcessor.cs b/PluginExample/AnnotateProcessor.cs index 5c6463c44..94c9c4fdc 100644 --- a/PluginExample/AnnotateProcessor.cs +++ b/PluginExample/AnnotateProcessor.cs @@ -24,7 +24,7 @@ using System.Windows.Forms; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace PluginExample { /// diff --git a/PluginExample/GreyscaleProcessor.cs b/PluginExample/GreyscaleProcessor.cs index 0821984fc..8d60e9446 100644 --- a/PluginExample/GreyscaleProcessor.cs +++ b/PluginExample/GreyscaleProcessor.cs @@ -24,7 +24,7 @@ using System.Windows.Forms; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace PluginExample { /// diff --git a/PluginExample/PluginExample.cs b/PluginExample/PluginExample.cs index a8539a652..efc854393 100644 --- a/PluginExample/PluginExample.cs +++ b/PluginExample/PluginExample.cs @@ -28,7 +28,7 @@ using System.Windows.Forms; using Greenshot.Plugin; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace PluginExample { /// diff --git a/PluginExample/PluginExampleConfiguration.cs b/PluginExample/PluginExampleConfiguration.cs index 0c696858a..fcf7608f9 100644 --- a/PluginExample/PluginExampleConfiguration.cs +++ b/PluginExample/PluginExampleConfiguration.cs @@ -23,7 +23,7 @@ using System.Collections.Generic; using System.IO; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace PluginExample { /// diff --git a/PluginExample/SettingsForm.cs b/PluginExample/SettingsForm.cs index 556ab13d2..34a5bb64b 100644 --- a/PluginExample/SettingsForm.cs +++ b/PluginExample/SettingsForm.cs @@ -22,7 +22,7 @@ using System; using System.Drawing; using System.Windows.Forms; -using IniFile; +using Greenshot.IniFile; namespace PluginExample { /// diff --git a/PluginExample/SimpleOutputDestination.cs b/PluginExample/SimpleOutputDestination.cs index 02bd3ec21..da5d6fadf 100644 --- a/PluginExample/SimpleOutputDestination.cs +++ b/PluginExample/SimpleOutputDestination.cs @@ -29,7 +29,7 @@ using System.Text.RegularExpressions; using Greenshot.Plugin; using GreenshotPlugin.Controls; using GreenshotPlugin.Core; -using IniFile; +using Greenshot.IniFile; namespace PluginExample { ///