mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixed plugin loading
Moved all office interop types in their own file.
This commit is contained in:
parent
80d8f51fc5
commit
bef29df3db
125 changed files with 1628 additions and 1373 deletions
|
@ -45,11 +45,7 @@ namespace Greenshot.Destinations {
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Designation {
|
public override string Designation => DESIGNATION;
|
||||||
get {
|
|
||||||
return DESIGNATION;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Description {
|
public override string Description {
|
||||||
get {
|
get {
|
||||||
|
@ -60,23 +56,11 @@ namespace Greenshot.Destinations {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Priority {
|
public override int Priority => 1;
|
||||||
get {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool IsDynamic {
|
public override bool IsDynamic => true;
|
||||||
get {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Image DisplayIcon {
|
public override Image DisplayIcon => greenshotIcon;
|
||||||
get {
|
|
||||||
return greenshotIcon;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<IDestination> DynamicDestinations() {
|
public override IEnumerable<IDestination> DynamicDestinations() {
|
||||||
foreach (IImageEditor someEditor in ImageEditorForm.Editors) {
|
foreach (IImageEditor someEditor in ImageEditorForm.Editors) {
|
||||||
|
@ -94,13 +78,13 @@ namespace Greenshot.Destinations {
|
||||||
if (editor == null) {
|
if (editor == null) {
|
||||||
if (editorConfiguration.ReuseEditor) {
|
if (editorConfiguration.ReuseEditor) {
|
||||||
foreach(IImageEditor openedEditor in ImageEditorForm.Editors) {
|
foreach(IImageEditor openedEditor in ImageEditorForm.Editors) {
|
||||||
if (!openedEditor.Surface.Modified) {
|
if (openedEditor.Surface.Modified) continue;
|
||||||
|
|
||||||
openedEditor.Surface = surface;
|
openedEditor.Surface = surface;
|
||||||
exportInformation.ExportMade = true;
|
exportInformation.ExportMade = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!exportInformation.ExportMade) {
|
if (!exportInformation.ExportMade) {
|
||||||
try {
|
try {
|
||||||
ImageEditorForm editorForm = new ImageEditorForm(surface, !surface.Modified); // Output made??
|
ImageEditorForm editorForm = new ImageEditorForm(surface, !surface.Modified); // Output made??
|
||||||
|
|
|
@ -39,7 +39,8 @@ namespace Greenshot.Destinations {
|
||||||
|
|
||||||
static EmailDestination() {
|
static EmailDestination() {
|
||||||
// Logic to decide what email implementation we use
|
// Logic to decide what email implementation we use
|
||||||
if (EmailConfigHelper.HasMapi()) {
|
if (!EmailConfigHelper.HasMapi()) return;
|
||||||
|
|
||||||
_isActiveFlag = false;
|
_isActiveFlag = false;
|
||||||
_mapiClient = EmailConfigHelper.GetMapiClient();
|
_mapiClient = EmailConfigHelper.GetMapiClient();
|
||||||
if (!string.IsNullOrEmpty(_mapiClient)) {
|
if (!string.IsNullOrEmpty(_mapiClient)) {
|
||||||
|
@ -47,17 +48,14 @@ namespace Greenshot.Destinations {
|
||||||
_isActiveFlag = true;
|
_isActiveFlag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public override string Designation => DESIGNATION;
|
public override string Designation => DESIGNATION;
|
||||||
|
|
||||||
public override string Description {
|
public override string Description {
|
||||||
get {
|
get
|
||||||
|
{
|
||||||
// Make sure there is some kind of "mail" name
|
// Make sure there is some kind of "mail" name
|
||||||
if (_mapiClient == null) {
|
return _mapiClient ??= Language.GetString(LangKey.editor_email);
|
||||||
_mapiClient = Language.GetString(LangKey.editor_email);
|
|
||||||
}
|
|
||||||
return _mapiClient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Printing;
|
using System.Drawing.Printing;
|
||||||
|
@ -35,52 +36,32 @@ namespace Greenshot.Destinations {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PrinterDestination : AbstractDestination {
|
public class PrinterDestination : AbstractDestination {
|
||||||
public const string DESIGNATION = "Printer";
|
public const string DESIGNATION = "Printer";
|
||||||
public readonly string printerName;
|
private readonly string _printerName;
|
||||||
|
|
||||||
public PrinterDestination() {
|
public PrinterDestination() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrinterDestination(string printerName) {
|
public PrinterDestination(string printerName) {
|
||||||
this.printerName = printerName;
|
_printerName = printerName;
|
||||||
}
|
|
||||||
public override string Designation {
|
|
||||||
get {
|
|
||||||
return DESIGNATION;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
public override string Designation => DESIGNATION;
|
||||||
|
|
||||||
public override string Description {
|
public override string Description {
|
||||||
get {
|
get {
|
||||||
if (printerName != null) {
|
if (_printerName != null) {
|
||||||
return Language.GetString(LangKey.settings_destination_printer) + " - " + printerName;
|
return Language.GetString(LangKey.settings_destination_printer) + " - " + _printerName;
|
||||||
}
|
}
|
||||||
return Language.GetString(LangKey.settings_destination_printer);
|
return Language.GetString(LangKey.settings_destination_printer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Priority {
|
public override int Priority => 2;
|
||||||
get {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Keys EditorShortcutKeys {
|
public override Keys EditorShortcutKeys => Keys.Control | Keys.P;
|
||||||
get {
|
|
||||||
return Keys.Control | Keys.P;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Image DisplayIcon {
|
public override Image DisplayIcon => GreenshotResources.getImage("Printer.Image");
|
||||||
get {
|
|
||||||
return GreenshotResources.getImage("Printer.Image");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool IsDynamic {
|
public override bool IsDynamic => true;
|
||||||
get {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create destinations for all the installed printers
|
/// Create destinations for all the installed printers
|
||||||
|
@ -101,7 +82,7 @@ namespace Greenshot.Destinations {
|
||||||
if(defaultPrinter.Equals(p2)) {
|
if(defaultPrinter.Equals(p2)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return p1.CompareTo(p2);
|
return string.Compare(p1, p2, StringComparison.Ordinal);
|
||||||
});
|
});
|
||||||
foreach(string printer in printers) {
|
foreach(string printer in printers) {
|
||||||
yield return new PrinterDestination(printer);
|
yield return new PrinterDestination(printer);
|
||||||
|
@ -118,10 +99,10 @@ namespace Greenshot.Destinations {
|
||||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||||
PrinterSettings printerSettings;
|
PrinterSettings printerSettings;
|
||||||
if (!string.IsNullOrEmpty(printerName))
|
if (!string.IsNullOrEmpty(_printerName))
|
||||||
{
|
{
|
||||||
using PrintHelper printHelper = new PrintHelper(surface, captureDetails);
|
using PrintHelper printHelper = new PrintHelper(surface, captureDetails);
|
||||||
printerSettings = printHelper.PrintTo(printerName);
|
printerSettings = printHelper.PrintTo(_printerName);
|
||||||
} else if (!manuallyInitiated) {
|
} else if (!manuallyInitiated) {
|
||||||
PrinterSettings settings = new PrinterSettings();
|
PrinterSettings settings = new PrinterSettings();
|
||||||
using PrintHelper printHelper = new PrintHelper(surface, captureDetails);
|
using PrintHelper printHelper = new PrintHelper(surface, captureDetails);
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DecimalDoublePercentageConverter : AbstractBindingConverter<double, decimal>
|
public class DecimalDoublePercentageConverter : AbstractBindingConverter<double, decimal>
|
||||||
{
|
{
|
||||||
private static DecimalDoublePercentageConverter uniqueInstance;
|
private static DecimalDoublePercentageConverter _uniqueInstance;
|
||||||
|
|
||||||
private DecimalDoublePercentageConverter() {}
|
private DecimalDoublePercentageConverter() {}
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
return Convert.ToDouble(o)/100;
|
return Convert.ToDouble(o)/100;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DecimalDoublePercentageConverter GetInstance() {
|
public static DecimalDoublePercentageConverter GetInstance()
|
||||||
if(uniqueInstance == null) uniqueInstance = new DecimalDoublePercentageConverter();
|
{
|
||||||
return uniqueInstance;
|
return _uniqueInstance ??= new DecimalDoublePercentageConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DecimalFloatConverter : AbstractBindingConverter<float, decimal>
|
public class DecimalFloatConverter : AbstractBindingConverter<float, decimal>
|
||||||
{
|
{
|
||||||
private static DecimalFloatConverter uniqueInstance;
|
private static DecimalFloatConverter _uniqueInstance;
|
||||||
|
|
||||||
private DecimalFloatConverter() {}
|
private DecimalFloatConverter() {}
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
return Convert.ToInt16(o);
|
return Convert.ToInt16(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DecimalFloatConverter GetInstance() {
|
public static DecimalFloatConverter GetInstance()
|
||||||
if(uniqueInstance == null) uniqueInstance = new DecimalFloatConverter();
|
{
|
||||||
return uniqueInstance;
|
return _uniqueInstance ??= new DecimalFloatConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DecimalIntConverter : AbstractBindingConverter<int, decimal>
|
public class DecimalIntConverter : AbstractBindingConverter<int, decimal>
|
||||||
{
|
{
|
||||||
private static DecimalIntConverter uniqueInstance;
|
private static DecimalIntConverter _uniqueInstance;
|
||||||
|
|
||||||
private DecimalIntConverter() {}
|
private DecimalIntConverter() {}
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
return Convert.ToInt16(o);
|
return Convert.ToInt16(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DecimalIntConverter GetInstance() {
|
public static DecimalIntConverter GetInstance()
|
||||||
if(uniqueInstance == null) uniqueInstance = new DecimalIntConverter();
|
{
|
||||||
return uniqueInstance;
|
return _uniqueInstance ??= new DecimalIntConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
/// Validates a value not to be null.
|
/// Validates a value not to be null.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NotNullValidator : IBindingValidator {
|
public class NotNullValidator : IBindingValidator {
|
||||||
private static NotNullValidator uniqueInstance;
|
private static NotNullValidator _uniqueInstance;
|
||||||
|
|
||||||
private NotNullValidator() {
|
private NotNullValidator() {
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,9 @@ namespace Greenshot.Drawing.Fields.Binding {
|
||||||
return o != null;
|
return o != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NotNullValidator GetInstance() {
|
public static NotNullValidator GetInstance()
|
||||||
if(uniqueInstance == null) uniqueInstance = new NotNullValidator();
|
{
|
||||||
return uniqueInstance;
|
return _uniqueInstance ??= new NotNullValidator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,7 +330,7 @@ namespace Greenshot {
|
||||||
return base.ProcessCmdKey(ref msg, keyData);
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOG.Error(string.Format("Error handling key '{0}'", keyData), ex);
|
LOG.Error($"Error handling key '{keyData}'", ex);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ namespace Greenshot.Forms {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class LanguageDialog : Form {
|
public partial class LanguageDialog : Form {
|
||||||
private static readonly ILog LOG = LogManager.GetLogger(typeof(LanguageDialog));
|
private static readonly ILog LOG = LogManager.GetLogger(typeof(LanguageDialog));
|
||||||
private static LanguageDialog uniqueInstance;
|
private static LanguageDialog _uniqueInstance;
|
||||||
private bool properOkPressed;
|
private bool _properOkPressed;
|
||||||
|
|
||||||
private LanguageDialog() {
|
private LanguageDialog() {
|
||||||
//
|
//
|
||||||
|
@ -44,14 +44,12 @@ namespace Greenshot.Forms {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PreventFormClose(object sender, FormClosingEventArgs e) {
|
private void PreventFormClose(object sender, FormClosingEventArgs e) {
|
||||||
if(!properOkPressed) {
|
if(!_properOkPressed) {
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SelectedLanguage {
|
public string SelectedLanguage => comboBoxLanguage.SelectedValue.ToString();
|
||||||
get { return comboBoxLanguage.SelectedValue.ToString(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void FormLoad(object sender, EventArgs e) {
|
protected void FormLoad(object sender, EventArgs e) {
|
||||||
// Initialize the Language ComboBox
|
// Initialize the Language ComboBox
|
||||||
|
@ -74,23 +72,21 @@ namespace Greenshot.Forms {
|
||||||
if (Language.SupportedLanguages.Count == 1) {
|
if (Language.SupportedLanguages.Count == 1) {
|
||||||
comboBoxLanguage.SelectedValue = Language.SupportedLanguages[0].Ietf;
|
comboBoxLanguage.SelectedValue = Language.SupportedLanguages[0].Ietf;
|
||||||
Language.CurrentLanguage = SelectedLanguage;
|
Language.CurrentLanguage = SelectedLanguage;
|
||||||
properOkPressed = true;
|
_properOkPressed = true;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnOKClick(object sender, EventArgs e) {
|
private void BtnOKClick(object sender, EventArgs e) {
|
||||||
properOkPressed = true;
|
_properOkPressed = true;
|
||||||
// Fix for Bug #3431100
|
// Fix for Bug #3431100
|
||||||
Language.CurrentLanguage = SelectedLanguage;
|
Language.CurrentLanguage = SelectedLanguage;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LanguageDialog GetInstance() {
|
public static LanguageDialog GetInstance()
|
||||||
if(uniqueInstance == null) {
|
{
|
||||||
uniqueInstance = new LanguageDialog();
|
return _uniqueInstance ??= new LanguageDialog();
|
||||||
}
|
|
||||||
return uniqueInstance;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace Greenshot.Helpers
|
||||||
{
|
{
|
||||||
environment.Append(", ");
|
environment.Append(", ");
|
||||||
}
|
}
|
||||||
environment.Append(string.Format("OS: {0} {1} {2} (x{3}) {4}", OsInfo.Name, OsInfo.Edition, OsInfo.ServicePack, OsInfo.Bits, OsInfo.VersionString));
|
environment.Append($"OS: {OsInfo.Name} {OsInfo.Edition} {OsInfo.ServicePack} (x{OsInfo.Bits}) {OsInfo.VersionString}");
|
||||||
if (newline)
|
if (newline)
|
||||||
{
|
{
|
||||||
environment.AppendLine();
|
environment.AppendLine();
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
@ -171,8 +172,9 @@ namespace Greenshot.Helpers {
|
||||||
if (!Directory.Exists(path)) return pluginFiles;
|
if (!Directory.Exists(path)) return pluginFiles;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pluginFiles = Directory.GetFiles(path, "*Plugin.dll", SearchOption.AllDirectories);
|
pluginFiles = Directory.GetFiles(path, "*Plugin.dll", SearchOption.AllDirectories)
|
||||||
|
// Skip the GreenshotPlugin.dll itself
|
||||||
|
.Where(p => CultureInfo.CurrentCulture.CompareInfo.IndexOf(p, "GreenshotPlugin.dll", CompareOptions.IgnoreCase) < 0);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Log.Error("Error loading plugin: ", ex);
|
Log.Error("Error loading plugin: ", ex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,14 +38,15 @@ namespace Greenshot.Processors {
|
||||||
public TitleFixProcessor() {
|
public TitleFixProcessor() {
|
||||||
List<string> corruptKeys = new List<string>();
|
List<string> corruptKeys = new List<string>();
|
||||||
foreach(string key in config.ActiveTitleFixes) {
|
foreach(string key in config.ActiveTitleFixes) {
|
||||||
if (!config.TitleFixMatcher.ContainsKey(key)) {
|
if (config.TitleFixMatcher.ContainsKey(key)) continue;
|
||||||
LOG.WarnFormat("Key {0} not found, configuration is broken! Disabling this key!");
|
|
||||||
|
LOG.WarnFormat("Key {0} not found, configuration is broken! Disabling this key!", key);
|
||||||
corruptKeys.Add(key);
|
corruptKeys.Add(key);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Fix configuration if needed
|
// Fix configuration if needed
|
||||||
if(corruptKeys.Count > 0) {
|
if (corruptKeys.Count <= 0) return;
|
||||||
|
|
||||||
foreach(string corruptKey in corruptKeys) {
|
foreach(string corruptKey in corruptKeys) {
|
||||||
// Removing any reference to the key
|
// Removing any reference to the key
|
||||||
config.ActiveTitleFixes.Remove(corruptKey);
|
config.ActiveTitleFixes.Remove(corruptKey);
|
||||||
|
@ -54,19 +55,10 @@ namespace Greenshot.Processors {
|
||||||
}
|
}
|
||||||
config.IsDirty = true;
|
config.IsDirty = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public override string Designation {
|
public override string Designation => "TitleFix";
|
||||||
get {
|
|
||||||
return "TitleFix";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Description {
|
public override string Description => Designation;
|
||||||
get {
|
|
||||||
return Designation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool ProcessCapture(ISurface surface, ICaptureDetails captureDetails) {
|
public override bool ProcessCapture(ISurface surface, ICaptureDetails captureDetails) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
@ -75,17 +67,15 @@ namespace Greenshot.Processors {
|
||||||
title = title.Trim();
|
title = title.Trim();
|
||||||
foreach(string titleIdentifier in config.ActiveTitleFixes) {
|
foreach(string titleIdentifier in config.ActiveTitleFixes) {
|
||||||
string regexpString = config.TitleFixMatcher[titleIdentifier];
|
string regexpString = config.TitleFixMatcher[titleIdentifier];
|
||||||
string replaceString = config.TitleFixReplacer[titleIdentifier];
|
string replaceString = config.TitleFixReplacer[titleIdentifier] ?? "";
|
||||||
if (replaceString == null) {
|
|
||||||
replaceString = "";
|
if (string.IsNullOrEmpty(regexpString)) continue;
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(regexpString)) {
|
var regex = new Regex(regexpString);
|
||||||
Regex regex = new Regex(regexpString);
|
|
||||||
title = regex.Replace(title, replaceString);
|
title = regex.Replace(title, replaceString);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
captureDetails.Title = title;
|
captureDetails.Title = title;
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace GreenshotConfluencePlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the ConfluencePlugin base code
|
/// This is the ConfluencePlugin base code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Plugin("Confluence", true)]
|
||||||
public class ConfluencePlugin : IGreenshotPlugin {
|
public class ConfluencePlugin : IGreenshotPlugin {
|
||||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluencePlugin));
|
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluencePlugin));
|
||||||
private static ConfluenceConnector _confluenceConnector;
|
private static ConfluenceConnector _confluenceConnector;
|
||||||
|
|
|
@ -45,22 +45,12 @@ namespace GreenshotConfluencePlugin {
|
||||||
|
|
||||||
private Page _searchPage;
|
private Page _searchPage;
|
||||||
public Page SearchPage {
|
public Page SearchPage {
|
||||||
get {
|
get { return _searchPage ??= new ConfluenceSearch(this); }
|
||||||
if (_searchPage == null) {
|
|
||||||
_searchPage = new ConfluenceSearch(this);
|
|
||||||
}
|
|
||||||
return _searchPage;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page _browsePage;
|
private Page _browsePage;
|
||||||
public Page BrowsePage {
|
public Page BrowsePage {
|
||||||
get {
|
get { return _browsePage ??= new ConfluenceTreePicker(this); }
|
||||||
if (_browsePage == null) {
|
|
||||||
_browsePage = new ConfluenceTreePicker(this);
|
|
||||||
}
|
|
||||||
return _browsePage;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Confluence.Page _selectedPage;
|
private Confluence.Page _selectedPage;
|
||||||
|
@ -70,11 +60,7 @@ namespace GreenshotConfluencePlugin {
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
_selectedPage = value;
|
_selectedPage = value;
|
||||||
if (_selectedPage != null) {
|
Upload.IsEnabled = _selectedPage != null;
|
||||||
Upload.IsEnabled = true;
|
|
||||||
} else {
|
|
||||||
Upload.IsEnabled = false;
|
|
||||||
}
|
|
||||||
IsOpenPageSelected = false;
|
IsOpenPageSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace TranslationByMarkupExtension {
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
public static TranslationManager Instance => _translationManager ?? (_translationManager = new TranslationManager());
|
public static TranslationManager Instance => _translationManager ??= new TranslationManager();
|
||||||
|
|
||||||
public ITranslationProvider TranslationProvider { get; set; }
|
public ITranslationProvider TranslationProvider { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,14 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of FlickrConfiguration.
|
/// Description of FlickrConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -18,18 +18,19 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
using Greenshot.Plugin;
|
using Greenshot.Plugin;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of OCRDestination.
|
/// Description of OCRDestination.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -63,10 +64,7 @@ namespace ExternalCommand {
|
||||||
config.RunInbackground.Add(_presetCommand, true);
|
config.RunInbackground.Add(_presetCommand, true);
|
||||||
}
|
}
|
||||||
bool runInBackground = config.RunInbackground[_presetCommand];
|
bool runInBackground = config.RunInbackground[_presetCommand];
|
||||||
string fullPath = captureDetails.Filename;
|
string fullPath = captureDetails.Filename ?? ImageOutput.SaveNamedTmpFile(surface, captureDetails, outputSettings);
|
||||||
if (fullPath == null) {
|
|
||||||
fullPath = ImageOutput.SaveNamedTmpFile(surface, captureDetails, outputSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
string output;
|
string output;
|
||||||
string error;
|
string error;
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using GreenshotPlugin.Controls;
|
using GreenshotPlugin.Controls;
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class is needed for design-time resolving of the language files
|
/// This class is needed for design-time resolving of the language files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.IniFile;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.IniFile;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An Plugin to run commands after an image was written
|
/// An Plugin to run commands after an image was written
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -25,7 +25,7 @@ using System.IO;
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
public static class IconCache {
|
public static class IconCache {
|
||||||
private static readonly ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
|
private static readonly ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
|
||||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(IconCache));
|
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(IconCache));
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
partial class SettingsForm {
|
partial class SettingsForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Designer variable used to keep track of non-visual components.
|
/// Designer variable used to keep track of non-visual components.
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.IniFile;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.IniFile;
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of SettingsForm.
|
/// Description of SettingsForm.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
partial class SettingsFormDetail {
|
partial class SettingsFormDetail {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Designer variable used to keep track of non-visual components.
|
/// Designer variable used to keep track of non-visual components.
|
||||||
|
|
|
@ -19,14 +19,14 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.IniFile;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.IniFile;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace ExternalCommand {
|
namespace GreenshotExternalCommandPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of SettingsFormDetail.
|
/// Description of SettingsFormDetail.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace GreenshotFlickrPlugin
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the Flickr base code
|
/// This is the Flickr base code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Plugin("Flickr", true)]
|
||||||
public class FlickrPlugin : IGreenshotPlugin {
|
public class FlickrPlugin : IGreenshotPlugin {
|
||||||
private static readonly ILog Log = LogManager.GetLogger(typeof(FlickrPlugin));
|
private static readonly ILog Log = LogManager.GetLogger(typeof(FlickrPlugin));
|
||||||
private static FlickrConfiguration _config;
|
private static FlickrConfiguration _config;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
using Greenshot.Plugin;
|
using Greenshot.Plugin;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RootNamespace>GreenshotOCR</RootNamespace>
|
<RootNamespace>GreenshotOCRPlugin</RootNamespace>
|
||||||
<AssemblyName>GreenshotOCRPlugin</AssemblyName>
|
<AssemblyName>GreenshotOCRPlugin</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
namespace GreenshotOCR
|
namespace GreenshotOCRPlugin
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Needed for the drop down, available languages for OCR
|
/// Needed for the drop down, available languages for OCR
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
|
|
||||||
namespace GreenshotOCR {
|
namespace GreenshotOCRPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of CoreConfiguration.
|
/// Description of CoreConfiguration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -18,12 +18,13 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Greenshot.Plugin;
|
using Greenshot.Plugin;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace GreenshotOCR {
|
namespace GreenshotOCRPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of OCRDestination.
|
/// Description of OCRDestination.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using GreenshotPlugin.Controls;
|
using GreenshotPlugin.Controls;
|
||||||
|
|
||||||
namespace GreenshotOCR {
|
namespace GreenshotOCRPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class is needed for design-time resolving of the language files
|
/// This class is needed for design-time resolving of the language files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -29,7 +30,7 @@ using GreenshotPlugin.Effects;
|
||||||
|
|
||||||
//using Microsoft.Win32;
|
//using Microsoft.Win32;
|
||||||
|
|
||||||
namespace GreenshotOCR {
|
namespace GreenshotOCRPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OCR Plugin Greenshot
|
/// OCR Plugin Greenshot
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -45,14 +46,13 @@ namespace GreenshotOCR {
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Dispose(bool disposing) {
|
protected void Dispose(bool disposing)
|
||||||
if (disposing) {
|
{
|
||||||
if (_ocrMenuItem != null) {
|
if (!disposing) return;
|
||||||
|
if (_ocrMenuItem == null) return;
|
||||||
_ocrMenuItem.Dispose();
|
_ocrMenuItem.Dispose();
|
||||||
_ocrMenuItem = null;
|
_ocrMenuItem = null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implementation of the IGreenshotPlugin.Initialize
|
/// Implementation of the IGreenshotPlugin.Initialize
|
||||||
|
|
2
GreenshotOCRPlugin/SettingsForm.Designer.cs
generated
2
GreenshotOCRPlugin/SettingsForm.Designer.cs
generated
|
@ -18,7 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
namespace GreenshotOCR
|
namespace GreenshotOCRPlugin
|
||||||
{
|
{
|
||||||
partial class SettingsForm
|
partial class SettingsForm
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace GreenshotOCR {
|
namespace GreenshotOCRPlugin {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of SettingsForm.
|
/// Description of SettingsForm.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using Greenshot.Interop.Office;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotOfficePlugin.OfficeExport;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace GreenshotOfficePlugin {
|
namespace GreenshotOfficePlugin.Destinations {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of PowerpointDestination.
|
/// Description of PowerpointDestination.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,15 +19,16 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Interop.Office;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotOfficePlugin.OfficeExport;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.OneNote;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace GreenshotOfficePlugin {
|
namespace GreenshotOfficePlugin.Destinations {
|
||||||
public class OneNoteDestination : AbstractDestination {
|
public class OneNoteDestination : AbstractDestination {
|
||||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordDestination));
|
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordDestination));
|
||||||
private const int ICON_APPLICATION = 0;
|
private const int ICON_APPLICATION = 0;
|
||||||
|
|
|
@ -19,17 +19,18 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.IniFile;
|
|
||||||
using Greenshot.Interop.Office;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Greenshot.IniFile;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotOfficePlugin.OfficeExport;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Outlook;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace GreenshotOfficePlugin {
|
namespace GreenshotOfficePlugin.Destinations {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of OutlookDestination.
|
/// Description of OutlookDestination.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using Greenshot.Interop.Office;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotOfficePlugin.OfficeExport;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace GreenshotOfficePlugin {
|
namespace GreenshotOfficePlugin.Destinations {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of PowerpointDestination.
|
/// Description of PowerpointDestination.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.Interop.Office;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotOfficePlugin.OfficeExport;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace GreenshotOfficePlugin {
|
namespace GreenshotOfficePlugin.Destinations {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description of EmailDestination.
|
/// Description of EmailDestination.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
using Greenshot.Interop.Office;
|
using GreenshotOfficePlugin.OfficeInterop.Outlook;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Powerpoint;
|
||||||
|
|
||||||
namespace GreenshotOfficePlugin {
|
namespace GreenshotOfficePlugin {
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,19 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Reflection;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Excel;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Outlook;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Powerpoint;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeExport {
|
||||||
public class ExcelExporter {
|
public class ExcelExporter {
|
||||||
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(ExcelExporter));
|
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(ExcelExporter));
|
||||||
private static Version _excelVersion;
|
private static Version _excelVersion;
|
||||||
|
@ -89,22 +95,17 @@ namespace Greenshot.Interop.Office {
|
||||||
/// <param name="imageSize"></param>
|
/// <param name="imageSize"></param>
|
||||||
private static void InsertIntoExistingWorkbook(IWorkbook workbook, string tmpFile, Size imageSize) {
|
private static void InsertIntoExistingWorkbook(IWorkbook workbook, string tmpFile, Size imageSize) {
|
||||||
IWorksheet workSheet = workbook.ActiveSheet;
|
IWorksheet workSheet = workbook.ActiveSheet;
|
||||||
if (workSheet == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
using IShapes shapes = workSheet.Shapes;
|
using IShapes shapes = workSheet?.Shapes;
|
||||||
if (shapes != null)
|
|
||||||
{
|
using IShape shape = shapes?.AddPicture(tmpFile, MsoTriState.msoFalse, MsoTriState.msoTrue, 0, 0, imageSize.Width, imageSize.Height);
|
||||||
using IShape shape = shapes.AddPicture(tmpFile, MsoTriState.msoFalse, MsoTriState.msoTrue, 0, 0, imageSize.Width, imageSize.Height);
|
if (shape == null) return;
|
||||||
if (shape != null) {
|
|
||||||
shape.Top = 40;
|
shape.Top = 40;
|
||||||
shape.Left = 40;
|
shape.Left = 40;
|
||||||
shape.LockAspectRatio = MsoTriState.msoTrue;
|
shape.LockAspectRatio = MsoTriState.msoTrue;
|
||||||
shape.ScaleHeight(1, MsoTriState.msoTrue, MsoScaleFrom.msoScaleFromTopLeft);
|
shape.ScaleHeight(1, MsoTriState.msoTrue, MsoScaleFrom.msoScaleFromTopLeft);
|
||||||
shape.ScaleWidth(1, MsoTriState.msoTrue, MsoScaleFrom.msoScaleFromTopLeft);
|
shape.ScaleWidth(1, MsoTriState.msoTrue, MsoScaleFrom.msoScaleFromTopLeft);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -19,15 +19,17 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using Greenshot.Plugin;
|
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using Greenshot.Plugin;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.OneNote;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeExport {
|
||||||
|
|
||||||
public class OneNoteExporter {
|
public class OneNoteExporter {
|
||||||
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(OneNoteExporter));
|
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(OneNoteExporter));
|
||||||
|
|
|
@ -18,17 +18,20 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
using Microsoft.Win32;
|
|
||||||
using Greenshot.Interop.IE;
|
|
||||||
using GreenshotOfficePlugin;
|
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using Greenshot.Interop.IE;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Outlook;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Word;
|
||||||
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeExport {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Outlook exporter has all the functionality to export to outlook
|
/// Outlook exporter has all the functionality to export to outlook
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,13 +19,16 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Greenshot.IniFile;
|
|
||||||
using GreenshotOfficePlugin;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using Greenshot.IniFile;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Outlook;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Powerpoint;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeExport {
|
||||||
public class PowerpointExporter {
|
public class PowerpointExporter {
|
||||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(PowerpointExporter));
|
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(PowerpointExporter));
|
||||||
private static Version _powerpointVersion;
|
private static Version _powerpointVersion;
|
||||||
|
|
|
@ -18,13 +18,17 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GreenshotOfficePlugin;
|
|
||||||
using Greenshot.IniFile;
|
using Greenshot.IniFile;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Outlook;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Word;
|
||||||
using GreenshotPlugin.Core;
|
using GreenshotPlugin.Core;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeExport {
|
||||||
public class WordExporter {
|
public class WordExporter {
|
||||||
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(WordExporter));
|
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(typeof(WordExporter));
|
||||||
private static Version _wordVersion;
|
private static Version _wordVersion;
|
||||||
|
|
|
@ -19,21 +19,28 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
using Greenshot.Interop;
|
||||||
// See http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.application.aspx
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Excel {
|
||||||
|
/// <summary>
|
||||||
|
/// See http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.application.aspx
|
||||||
|
/// </summary>
|
||||||
[ComProgId("Excel.Application")]
|
[ComProgId("Excel.Application")]
|
||||||
public interface IExcelApplication : ICommon {
|
public interface IExcelApplication : ICommon {
|
||||||
IWorkbook ActiveWorkbook {
|
IWorkbook ActiveWorkbook {
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ISelection Selection {get;}
|
//ISelection Selection {get;}
|
||||||
IWorkbooks Workbooks {
|
IWorkbooks Workbooks {
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Visible {
|
bool Visible {
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Version {
|
string Version {
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
|
@ -46,54 +53,4 @@ namespace Greenshot.Interop.Office {
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.workbooks.aspx
|
|
||||||
public interface IWorkbooks : ICommon, ICollection {
|
|
||||||
IWorkbook Add(object template);
|
|
||||||
// Use index + 1!!
|
|
||||||
IWorkbook this[object index] {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.workbook.aspx
|
|
||||||
public interface IWorkbook : ICommon {
|
|
||||||
IWorksheet ActiveSheet {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
string Name {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
void Activate();
|
|
||||||
IWorksheets Worksheets {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._worksheet_members.aspx
|
|
||||||
public interface IWorksheet : ICommon {
|
|
||||||
IPictures Pictures {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IShapes Shapes {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
string Name {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.iworksheets_members.aspx
|
|
||||||
public interface IWorksheets : ICollection {
|
|
||||||
// Use index + 1!!
|
|
||||||
IWorksheet this[object index] {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IPictures : ICollection {
|
|
||||||
// Use index + 1!!
|
|
||||||
//IPicture this[object Index] { get; }
|
|
||||||
void Insert(string file);
|
|
||||||
}
|
|
||||||
}
|
}
|
8
GreenshotOfficePlugin/OfficeInterop/Excel/IPictures.cs
Normal file
8
GreenshotOfficePlugin/OfficeInterop/Excel/IPictures.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Excel
|
||||||
|
{
|
||||||
|
public interface IPictures : ICollection {
|
||||||
|
// Use index + 1!!
|
||||||
|
//IPicture this[object Index] { get; }
|
||||||
|
void Insert(string file);
|
||||||
|
}
|
||||||
|
}
|
20
GreenshotOfficePlugin/OfficeInterop/Excel/IWorkbook.cs
Normal file
20
GreenshotOfficePlugin/OfficeInterop/Excel/IWorkbook.cs
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Excel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.workbook.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IWorkbook : ICommon {
|
||||||
|
IWorksheet ActiveSheet {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
string Name {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
void Activate();
|
||||||
|
IWorksheets Worksheets {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
GreenshotOfficePlugin/OfficeInterop/Excel/IWorkbooks.cs
Normal file
15
GreenshotOfficePlugin/OfficeInterop/Excel/IWorkbooks.cs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Excel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.workbooks.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IWorkbooks : ICommon, ICollection {
|
||||||
|
IWorkbook Add(object template);
|
||||||
|
// Use index + 1!!
|
||||||
|
IWorkbook this[object index] {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
GreenshotOfficePlugin/OfficeInterop/Excel/IWorksheet.cs
Normal file
20
GreenshotOfficePlugin/OfficeInterop/Excel/IWorksheet.cs
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Powerpoint;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Excel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel._worksheet_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IWorksheet : ICommon {
|
||||||
|
IPictures Pictures {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IShapes Shapes {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
string Name {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
GreenshotOfficePlugin/OfficeInterop/Excel/IWorksheets.cs
Normal file
12
GreenshotOfficePlugin/OfficeInterop/Excel/IWorksheets.cs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Excel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.iworksheets_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IWorksheets : ICollection {
|
||||||
|
// Use index + 1!!
|
||||||
|
IWorksheet this[object index] {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,19 +18,11 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeInterop {
|
||||||
public enum OfficeVersion : int {
|
|
||||||
OFFICE_97 = 8,
|
|
||||||
OFFICE_2000 = 9,
|
|
||||||
OFFICE_2002 = 10,
|
|
||||||
OFFICE_2003 = 11,
|
|
||||||
OFFICE_2007 = 12,
|
|
||||||
OFFICE_2010 = 14,
|
|
||||||
OFFICE_2013 = 15
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the "type" this[object index] { get; } is implemented, use index + 1!!! (starts at 1)
|
/// If the "type" this[object index] { get; } is implemented, use index + 1!!! (starts at 1)
|
||||||
/// </summary>
|
/// </summary>
|
8
GreenshotOfficePlugin/OfficeInterop/MsoScaleFrom.cs
Normal file
8
GreenshotOfficePlugin/OfficeInterop/MsoScaleFrom.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop
|
||||||
|
{
|
||||||
|
public enum MsoScaleFrom {
|
||||||
|
msoScaleFromTopLeft = 0,
|
||||||
|
msoScaleFromMiddle = 1,
|
||||||
|
msoScaleFromBottomRight = 2
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/MsoTriState.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/MsoTriState.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop
|
||||||
|
{
|
||||||
|
public enum MsoTriState {
|
||||||
|
msoTrue = -1,
|
||||||
|
msoFalse = 0,
|
||||||
|
msoCTrue = 1,
|
||||||
|
msoTriStateToggle = -3,
|
||||||
|
msoTriStateMixed = -2
|
||||||
|
}
|
||||||
|
}
|
12
GreenshotOfficePlugin/OfficeInterop/OfficeVersion.cs
Normal file
12
GreenshotOfficePlugin/OfficeInterop/OfficeVersion.cs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop
|
||||||
|
{
|
||||||
|
public enum OfficeVersion : int {
|
||||||
|
OFFICE_97 = 8,
|
||||||
|
OFFICE_2000 = 9,
|
||||||
|
OFFICE_2002 = 10,
|
||||||
|
OFFICE_2003 = 11,
|
||||||
|
OFFICE_2007 = 12,
|
||||||
|
OFFICE_2010 = 14,
|
||||||
|
OFFICE_2013 = 15
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public enum HierarchyScope {
|
||||||
|
hsSelf = 0, // Gets just the start node specified and no descendants.
|
||||||
|
hsChildren = 1, //Gets the immediate child nodes of the start node, and no descendants in higher or lower subsection groups.
|
||||||
|
hsNotebooks = 2, // Gets all notebooks below the start node, or root.
|
||||||
|
hsSections = 3, //Gets all sections below the start node, including sections in section groups and subsection groups.
|
||||||
|
hsPages = 4 //Gets all pages below the start node, including all pages in section groups and subsection groups.
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
[ComProgId("OneNote.Application")]
|
||||||
|
public interface IOneNoteApplication : ICommon {
|
||||||
|
/// <summary>
|
||||||
|
/// Make sure that the out variables are filled with a string, e.g. "", otherwise a type error occurs.
|
||||||
|
/// For more info on the methods: http://msdn.microsoft.com/en-us/library/gg649853.aspx
|
||||||
|
/// </summary>
|
||||||
|
void GetHierarchy(string startNode, HierarchyScope scope, out string notebookXml, XMLSchema schema);
|
||||||
|
void GetSpecialLocation(SpecialLocation specialLocation, out string specialLocationPath);
|
||||||
|
void UpdatePageContent(string pageChangesXml, DateTime dateExpectedLastModified, XMLSchema schema, bool force);
|
||||||
|
void GetPageContent(string pageId, out string pageXml, PageInfo pageInfoToExport, XMLSchema schema);
|
||||||
|
void NavigateTo(string hierarchyObjectID, string objectId, bool newWindow);
|
||||||
|
void CreateNewPage(string sectionID, out string pageID, NewPageStyle newPageStyle);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public enum NewPageStyle {
|
||||||
|
npsDefault = 0,
|
||||||
|
npsBlankPageWithTitle = 1,
|
||||||
|
npsBlankPageNoTitle = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public class OneNoteNotebook {
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string ID { get; set; }
|
||||||
|
}
|
||||||
|
}
|
43
GreenshotOfficePlugin/OfficeInterop/OneNote/OneNotePage.cs
Normal file
43
GreenshotOfficePlugin/OfficeInterop/OneNote/OneNotePage.cs
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: http://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote {
|
||||||
|
// More details about OneNote: http://msdn.microsoft.com/en-us/magazine/ff796230.aspx
|
||||||
|
|
||||||
|
// See http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word.applicationclass_members%28v=Office.11%29.aspx
|
||||||
|
|
||||||
|
public class OneNotePage {
|
||||||
|
public OneNoteSection Parent { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string ID { get; set; }
|
||||||
|
public bool IsCurrentlyViewed { get; set; }
|
||||||
|
public string DisplayName {
|
||||||
|
get {
|
||||||
|
OneNoteNotebook notebook = Parent.Parent;
|
||||||
|
if(string.IsNullOrEmpty(notebook.Name)) {
|
||||||
|
return $"{Parent.Name} / {Name}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $"{Parent.Parent.Name} / {Parent.Name} / {Name}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public class OneNoteSection {
|
||||||
|
public OneNoteNotebook Parent { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string ID { get; set; }
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/OneNote/PageInfo.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/OneNote/PageInfo.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public enum PageInfo {
|
||||||
|
piBasic = 0, // Returns only basic page content, without selection markup and binary data objects. This is the standard value to pass.
|
||||||
|
piBinaryData = 1, // Returns page content with no selection markup, but with all binary data.
|
||||||
|
piSelection = 2, // Returns page content with selection markup, but no binary data.
|
||||||
|
piBinaryDataSelection = 3, // Returns page content with selection markup and all binary data.
|
||||||
|
piAll = 3 // Returns all page content.
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public enum SpecialLocation : int {
|
||||||
|
slBackupFolder = 0,
|
||||||
|
slUnfiledNotesSection = 1,
|
||||||
|
slDefaultNotebookFolder = 2
|
||||||
|
}
|
||||||
|
}
|
8
GreenshotOfficePlugin/OfficeInterop/OneNote/XMLSchema.cs
Normal file
8
GreenshotOfficePlugin/OfficeInterop/OneNote/XMLSchema.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.OneNote
|
||||||
|
{
|
||||||
|
public enum XMLSchema {
|
||||||
|
xs2007 = 0,
|
||||||
|
xs2010 = 1,
|
||||||
|
xsCurrent= xs2010
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,103 +0,0 @@
|
||||||
/*
|
|
||||||
* Greenshot - a free and open source screenshot tool
|
|
||||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
*
|
|
||||||
* For more information see: http://getgreenshot.org/
|
|
||||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 1 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
|
||||||
// More details about OneNote: http://msdn.microsoft.com/en-us/magazine/ff796230.aspx
|
|
||||||
|
|
||||||
// See http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word.applicationclass_members%28v=Office.11%29.aspx
|
|
||||||
[ComProgId("OneNote.Application")]
|
|
||||||
public interface IOneNoteApplication : ICommon {
|
|
||||||
/// <summary>
|
|
||||||
/// Make sure that the out variables are filled with a string, e.g. "", otherwise a type error occurs.
|
|
||||||
/// For more info on the methods: http://msdn.microsoft.com/en-us/library/gg649853.aspx
|
|
||||||
/// </summary>
|
|
||||||
void GetHierarchy(string startNode, HierarchyScope scope, out string notebookXml, XMLSchema schema);
|
|
||||||
void GetSpecialLocation(SpecialLocation specialLocation, out string specialLocationPath);
|
|
||||||
void UpdatePageContent(string pageChangesXml, DateTime dateExpectedLastModified, XMLSchema schema, bool force);
|
|
||||||
void GetPageContent(string pageId, out string pageXml, PageInfo pageInfoToExport, XMLSchema schema);
|
|
||||||
void NavigateTo(string hierarchyObjectID, string objectId, bool newWindow);
|
|
||||||
void CreateNewPage(string sectionID, out string pageID, NewPageStyle newPageStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum PageInfo {
|
|
||||||
piBasic = 0, // Returns only basic page content, without selection markup and binary data objects. This is the standard value to pass.
|
|
||||||
piBinaryData = 1, // Returns page content with no selection markup, but with all binary data.
|
|
||||||
piSelection = 2, // Returns page content with selection markup, but no binary data.
|
|
||||||
piBinaryDataSelection = 3, // Returns page content with selection markup and all binary data.
|
|
||||||
piAll = 3 // Returns all page content.
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum HierarchyScope {
|
|
||||||
hsSelf = 0, // Gets just the start node specified and no descendants.
|
|
||||||
hsChildren = 1, //Gets the immediate child nodes of the start node, and no descendants in higher or lower subsection groups.
|
|
||||||
hsNotebooks = 2, // Gets all notebooks below the start node, or root.
|
|
||||||
hsSections = 3, //Gets all sections below the start node, including sections in section groups and subsection groups.
|
|
||||||
hsPages = 4 //Gets all pages below the start node, including all pages in section groups and subsection groups.
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum XMLSchema {
|
|
||||||
xs2007 = 0,
|
|
||||||
xs2010 = 1,
|
|
||||||
xsCurrent= xs2010
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum SpecialLocation : int {
|
|
||||||
slBackupFolder = 0,
|
|
||||||
slUnfiledNotesSection = 1,
|
|
||||||
slDefaultNotebookFolder = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum NewPageStyle {
|
|
||||||
npsDefault = 0,
|
|
||||||
npsBlankPageWithTitle = 1,
|
|
||||||
npsBlankPageNoTitle = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OneNotePage {
|
|
||||||
public OneNoteSection Parent { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string ID { get; set; }
|
|
||||||
public bool IsCurrentlyViewed { get; set; }
|
|
||||||
public string DisplayName {
|
|
||||||
get {
|
|
||||||
OneNoteNotebook notebook = Parent.Parent;
|
|
||||||
if(string.IsNullOrEmpty(notebook.Name)) {
|
|
||||||
return string.Format("{0} / {1}", Parent.Name, Name);
|
|
||||||
} else {
|
|
||||||
return string.Format("{0} / {1} / {2}", Parent.Parent.Name, Parent.Name, Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OneNoteSection {
|
|
||||||
public OneNoteNotebook Parent { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string ID { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class OneNoteNotebook {
|
|
||||||
public string Name { get; set; }
|
|
||||||
public string ID { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/ff869026.aspx
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.appointmentitem.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface AppointmentItem : IItem, ICommon {
|
||||||
|
string Organizer {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
string SendUsingAccount {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
string Categories {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
DateTime Start {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
DateTime End {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
OlReoccurenceState RecurrenceState {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/Outlook/EmailFormat.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/Outlook/EmailFormat.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies which EmailFormat the email needs to use
|
||||||
|
/// </summary>
|
||||||
|
public enum EmailFormat {
|
||||||
|
Text,
|
||||||
|
HTML
|
||||||
|
}
|
||||||
|
}
|
27
GreenshotOfficePlugin/OfficeInterop/Outlook/IAttachment.cs
Normal file
27
GreenshotOfficePlugin/OfficeInterop/Outlook/IAttachment.cs
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.attachment_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IAttachment : ICommon {
|
||||||
|
string DisplayName {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
string FileName {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
OlAttachmentType Type {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IPropertyAccessor PropertyAccessor {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
object MAPIOBJECT {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
void SaveAsFile(string path);
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/Outlook/IAttachments.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/Outlook/IAttachments.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public interface IAttachments : ICollection {
|
||||||
|
IAttachment Add(object source, object type, object position, object displayName);
|
||||||
|
// Use index+1!!!!
|
||||||
|
IAttachment this[object index] {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Is a joined interface of the Explorer an Inspector
|
||||||
|
/// </summary>
|
||||||
|
public interface ICommonExplorer : ICommon {
|
||||||
|
void Activate();
|
||||||
|
string Caption {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
int Height {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
int Left {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
int Top {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
int Width {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
OlWindowState WindowState {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
GreenshotOfficePlugin/OfficeInterop/Outlook/IContactItem.cs
Normal file
24
GreenshotOfficePlugin/OfficeInterop/Outlook/IContactItem.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.contactitem.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IContactItem : IItem, ICommon {
|
||||||
|
bool HasPicture {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
void SaveBusinessCardImage(string path);
|
||||||
|
void AddPicture(string path);
|
||||||
|
void RemovePicture();
|
||||||
|
string FirstName {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
string LastName {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
GreenshotOfficePlugin/OfficeInterop/Outlook/IExplorer.cs
Normal file
18
GreenshotOfficePlugin/OfficeInterop/Outlook/IExplorer.cs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Word;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Since Outlook 2010, but since 2013 one can edit inside an explorer
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.explorer_members(v=office.15).aspx
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public interface IExplorer : ICommonExplorer {
|
||||||
|
IItem ActiveInlineResponse {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IWordDocument ActiveInlineResponseWordEditor {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
16
GreenshotOfficePlugin/OfficeInterop/Outlook/IExplorers.cs
Normal file
16
GreenshotOfficePlugin/OfficeInterop/Outlook/IExplorers.cs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
using System.Collections;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Since Outlook 2010, but since 2013 one can edit inside an explorer
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/office/ff867227(v=office.15).aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IExplorers : ICommon, ICollection, IEnumerable {
|
||||||
|
// Use index + 1!!
|
||||||
|
IExplorer this[object Index] {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
GreenshotOfficePlugin/OfficeInterop/Outlook/IFolder.cs
Normal file
13
GreenshotOfficePlugin/OfficeInterop/Outlook/IFolder.cs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/bb176362%28v=office.12%29.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IFolder : ICommon {
|
||||||
|
IItems Items {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
GreenshotOfficePlugin/OfficeInterop/Outlook/IInspector.cs
Normal file
32
GreenshotOfficePlugin/OfficeInterop/Outlook/IInspector.cs
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Word;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.inspector_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IInspector : ICommonExplorer {
|
||||||
|
IItem CurrentItem {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
OlEditorType EditorType {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
object ModifiedFormPages {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
void Close(OlInspectorClose SaveMode);
|
||||||
|
void Display(object Modal);
|
||||||
|
void HideFormPage(string PageName);
|
||||||
|
bool IsWordMail();
|
||||||
|
void SetCurrentFormPage(string PageName);
|
||||||
|
void ShowFormPage(string PageName);
|
||||||
|
object HTMLEditor {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IWordDocument WordEditor {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
void SetControlItemProperty(object Control, string PropertyName);
|
||||||
|
}
|
||||||
|
}
|
15
GreenshotOfficePlugin/OfficeInterop/Outlook/IInspectors.cs
Normal file
15
GreenshotOfficePlugin/OfficeInterop/Outlook/IInspectors.cs
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
using System.Collections;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._application.inspectors.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IInspectors : ICommon, ICollection, IEnumerable {
|
||||||
|
// Use index + 1!!
|
||||||
|
IInspector this[object Index] {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
70
GreenshotOfficePlugin/OfficeInterop/Outlook/IItem.cs
Normal file
70
GreenshotOfficePlugin/OfficeInterop/Outlook/IItem.cs
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
using System;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Common attributes of all the Items (MailItem, AppointmentItem)
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/ff861252.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IItem : ICommon {
|
||||||
|
IAttachments 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();
|
||||||
|
IPropertyAccessor PropertyAccessor {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IInspector GetInspector();
|
||||||
|
}
|
||||||
|
}
|
28
GreenshotOfficePlugin/OfficeInterop/Outlook/IItems.cs
Normal file
28
GreenshotOfficePlugin/OfficeInterop/Outlook/IItems.cs
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/bb208387%28v=office.12%29.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IItems : ICollection, IEnumerable {
|
||||||
|
IItem this[object index] {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IItem GetFirst();
|
||||||
|
IItem GetNext();
|
||||||
|
IItem GetLast();
|
||||||
|
IItem GetPrevious();
|
||||||
|
|
||||||
|
bool IncludeRecurrences {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
IItems Restrict(string filter);
|
||||||
|
void Sort(string property, object descending);
|
||||||
|
|
||||||
|
// Actual definition is "object Add( object )", just making it convenient
|
||||||
|
object Add(OlItemType type);
|
||||||
|
}
|
||||||
|
}
|
14
GreenshotOfficePlugin/OfficeInterop/Outlook/INameSpace.cs
Normal file
14
GreenshotOfficePlugin/OfficeInterop/Outlook/INameSpace.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/bb176693%28v=office.12%29.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface INameSpace : ICommon {
|
||||||
|
IRecipient CurrentUser {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IFolder GetDefaultFolder(OlDefaultFolders defaultFolder);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Wrapper for Outlook.Application, see: http://msdn.microsoft.com/en-us/library/aa210897%28v=office.11%29.aspx
|
||||||
|
/// This is the initial COM-Object which is created/retrieved
|
||||||
|
/// </summary>
|
||||||
|
[ComProgId("Outlook.Application")]
|
||||||
|
public interface IOutlookApplication : ICommon {
|
||||||
|
string Name {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
string Version {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
IItem CreateItem(OlItemType ItemType);
|
||||||
|
object CreateItemFromTemplate(string TemplatePath, object InFolder);
|
||||||
|
object CreateObject(string ObjectName);
|
||||||
|
IInspector ActiveInspector();
|
||||||
|
IInspectors Inspectors {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
INameSpace GetNameSpace(string type);
|
||||||
|
IExplorer ActiveExplorer();
|
||||||
|
IExplorers Explorers {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.propertyaccessor_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IPropertyAccessor : ICommon {
|
||||||
|
void SetProperty(string SchemaName, object Value);
|
||||||
|
object GetProperty(string SchemaName);
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/Outlook/IRecipient.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/Outlook/IRecipient.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public interface IRecipient : ICommon {
|
||||||
|
string Name {
|
||||||
|
get;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
51
GreenshotOfficePlugin/OfficeInterop/Outlook/MailItem.cs
Normal file
51
GreenshotOfficePlugin/OfficeInterop/Outlook/MailItem.cs
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
using System;
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/ff861252.aspx
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mailitem.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface MailItem : IItem, ICommon {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
string To {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
string CC {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
string BCC {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlAttachmentType {
|
||||||
|
// Fields
|
||||||
|
olByReference = 4,
|
||||||
|
olByValue = 1,
|
||||||
|
olEmbeddeditem = 5,
|
||||||
|
olOLE = 6
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/Outlook/OlBodyFormat.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/Outlook/OlBodyFormat.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlBodyFormat {
|
||||||
|
// Fields
|
||||||
|
olFormatHTML = 2,
|
||||||
|
olFormatPlain = 1,
|
||||||
|
olFormatRichText = 3,
|
||||||
|
olFormatUnspecified = 0
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
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.
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/Outlook/OlEditorType.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/Outlook/OlEditorType.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlEditorType {
|
||||||
|
// Fields
|
||||||
|
olEditorHTML = 2,
|
||||||
|
olEditorRTF = 3,
|
||||||
|
olEditorText = 1,
|
||||||
|
olEditorWord = 4
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlInspectorClose {
|
||||||
|
// Fields
|
||||||
|
olDiscard = 1,
|
||||||
|
olPromptForSave = 2,
|
||||||
|
olSave = 0
|
||||||
|
}
|
||||||
|
}
|
14
GreenshotOfficePlugin/OfficeInterop/Outlook/OlItemType.cs
Normal file
14
GreenshotOfficePlugin/OfficeInterop/Outlook/OlItemType.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlItemType {
|
||||||
|
// Fields
|
||||||
|
olAppointmentItem = 1,
|
||||||
|
olContactItem = 2,
|
||||||
|
olDistributionListItem = 7,
|
||||||
|
olJournalItem = 4,
|
||||||
|
olMailItem = 0,
|
||||||
|
olNoteItem = 5,
|
||||||
|
olPostItem = 6,
|
||||||
|
olTaskItem = 3
|
||||||
|
}
|
||||||
|
}
|
151
GreenshotOfficePlugin/OfficeInterop/Outlook/OlObjectClass.cs
Normal file
151
GreenshotOfficePlugin/OfficeInterop/Outlook/OlObjectClass.cs
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/ff863329.aspx
|
||||||
|
/// </summary>
|
||||||
|
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.
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlReoccurenceState {
|
||||||
|
olApptException,
|
||||||
|
olApptMaster,
|
||||||
|
olApptNotRecurring,
|
||||||
|
olApptOccurrence
|
||||||
|
}
|
||||||
|
}
|
10
GreenshotOfficePlugin/OfficeInterop/Outlook/OlSensitivity.cs
Normal file
10
GreenshotOfficePlugin/OfficeInterop/Outlook/OlSensitivity.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlSensitivity {
|
||||||
|
// Fields
|
||||||
|
olConfidential = 3,
|
||||||
|
olNormal = 0,
|
||||||
|
olPersonal = 1,
|
||||||
|
olPrivate = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
public enum OlWindowState {
|
||||||
|
// Fields
|
||||||
|
olMaximized = 0,
|
||||||
|
olMinimized = 1,
|
||||||
|
olNormalWindow = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,10 +18,11 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook {
|
||||||
internal enum PT : uint {
|
internal enum PT : uint {
|
||||||
PT_UNSPECIFIED = 0, /* (Reserved for interface use) type doesn't matter to caller */
|
PT_UNSPECIFIED = 0, /* (Reserved for interface use) type doesn't matter to caller */
|
||||||
PT_NULL = 1, /* NULL property value */
|
PT_NULL = 1, /* NULL property value */
|
31
GreenshotOfficePlugin/OfficeInterop/Outlook/PropTag.cs
Normal file
31
GreenshotOfficePlugin/OfficeInterop/Outlook/PropTag.cs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: http://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook {
|
||||||
|
/// <summary>
|
||||||
|
/// 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
|
||||||
|
/// </summary>
|
||||||
|
public static class PropTag {
|
||||||
|
public const string ATTACHMENT_CONTENT_ID = @"http://schemas.microsoft.com/mapi/proptag/0x3712001E";
|
||||||
|
}
|
||||||
|
}
|
24
GreenshotOfficePlugin/OfficeInterop/Outlook/WdUnits.cs
Normal file
24
GreenshotOfficePlugin/OfficeInterop/Outlook/WdUnits.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Outlook
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Units: http://msdn.microsoft.com/en-us/library/office/bb214015(v=office.12).aspx
|
||||||
|
/// </summary>
|
||||||
|
public enum WdUnits {
|
||||||
|
wdCell = 12,
|
||||||
|
wdCharacter = 1,
|
||||||
|
wdCharacterFormatting = 13,
|
||||||
|
wdColumn = 9,
|
||||||
|
wdItem = 16,
|
||||||
|
wdLine = 5,
|
||||||
|
wdParagraph = 4,
|
||||||
|
wdParagraphFormatting = 14,
|
||||||
|
wdRow = 10,
|
||||||
|
wdScreen = 7,
|
||||||
|
wdSection = 8,
|
||||||
|
wdSentence = 3,
|
||||||
|
wdStory = 6,
|
||||||
|
wdTable = 15,
|
||||||
|
wdWindow = 11,
|
||||||
|
wdWord = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,660 +0,0 @@
|
||||||
/*
|
|
||||||
* Greenshot - a free and open source screenshot tool
|
|
||||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
|
||||||
*
|
|
||||||
* For more information see: http://getgreenshot.org/
|
|
||||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 1 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
namespace Greenshot.Interop.Office {
|
|
||||||
/// <summary>
|
|
||||||
/// Wrapper for Outlook.Application, see: http://msdn.microsoft.com/en-us/library/aa210897%28v=office.11%29.aspx
|
|
||||||
/// This is the initial COM-Object which is created/retrieved
|
|
||||||
/// </summary>
|
|
||||||
[ComProgId("Outlook.Application")]
|
|
||||||
public interface IOutlookApplication : ICommon {
|
|
||||||
string Name {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
string Version {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IItem CreateItem(OlItemType ItemType);
|
|
||||||
object CreateItemFromTemplate(string TemplatePath, object InFolder);
|
|
||||||
object CreateObject(string ObjectName);
|
|
||||||
IInspector ActiveInspector();
|
|
||||||
IInspectors Inspectors {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
INameSpace GetNameSpace(string type);
|
|
||||||
IExplorer ActiveExplorer();
|
|
||||||
IExplorers Explorers {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// See: http://msdn.microsoft.com/en-us/library/bb208387%28v=office.12%29.aspx
|
|
||||||
/// </summary>
|
|
||||||
public interface IItems : ICollection, IEnumerable {
|
|
||||||
IItem this[object index] {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IItem GetFirst();
|
|
||||||
IItem GetNext();
|
|
||||||
IItem GetLast();
|
|
||||||
IItem GetPrevious();
|
|
||||||
|
|
||||||
bool IncludeRecurrences {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
|
|
||||||
IItems 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 IItem : ICommon {
|
|
||||||
IAttachments 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();
|
|
||||||
IPropertyAccessor PropertyAccessor {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IInspector 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 : IItem, ICommon {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
string To {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
string CC {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
string BCC {
|
|
||||||
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 : IItem, ICommon {
|
|
||||||
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 IContactItem : IItem, ICommon {
|
|
||||||
bool HasPicture {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
void SaveBusinessCardImage(string path);
|
|
||||||
void AddPicture(string path);
|
|
||||||
void RemovePicture();
|
|
||||||
string FirstName {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
string LastName {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IAttachments : ICollection {
|
|
||||||
IAttachment Add(object source, object type, object position, object displayName);
|
|
||||||
// Use index+1!!!!
|
|
||||||
IAttachment this[object index] {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.attachment_members.aspx
|
|
||||||
public interface IAttachment : ICommon {
|
|
||||||
string DisplayName {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
string FileName {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
OlAttachmentType Type {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IPropertyAccessor 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 IPropertyAccessor : ICommon {
|
|
||||||
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";
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// See: http://msdn.microsoft.com/en-us/library/bb176693%28v=office.12%29.aspx
|
|
||||||
/// </summary>
|
|
||||||
public interface INameSpace : ICommon {
|
|
||||||
IRecipient CurrentUser {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IFolder GetDefaultFolder(OlDefaultFolders defaultFolder);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// See: http://msdn.microsoft.com/en-us/library/bb176362%28v=office.12%29.aspx
|
|
||||||
/// </summary>
|
|
||||||
public interface IFolder : ICommon {
|
|
||||||
IItems Items {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface IRecipient : ICommon {
|
|
||||||
string Name {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.inspector_members.aspx
|
|
||||||
/// </summary>
|
|
||||||
public interface IInspector : ICommonExplorer {
|
|
||||||
IItem CurrentItem {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
OlEditorType EditorType {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
object ModifiedFormPages {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
void Close(OlInspectorClose SaveMode);
|
|
||||||
void Display(object Modal);
|
|
||||||
void HideFormPage(string PageName);
|
|
||||||
bool IsWordMail();
|
|
||||||
void SetCurrentFormPage(string PageName);
|
|
||||||
void ShowFormPage(string PageName);
|
|
||||||
object HTMLEditor {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IWordDocument WordEditor {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
void SetControlItemProperty(object Control, string PropertyName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Is a joined interface of the Explorer an Inspector
|
|
||||||
/// </summary>
|
|
||||||
public interface ICommonExplorer : ICommon {
|
|
||||||
void Activate();
|
|
||||||
string Caption {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
int Height {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
int Left {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
int Top {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
int Width {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
OlWindowState WindowState {
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Since Outlook 2010, but since 2013 one can edit inside an explorer
|
|
||||||
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.explorer_members(v=office.15).aspx
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public interface IExplorer : ICommonExplorer {
|
|
||||||
IItem ActiveInlineResponse {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
IWordDocument ActiveInlineResponseWordEditor {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._application.inspectors.aspx
|
|
||||||
public interface IInspectors : ICommon, ICollection, IEnumerable {
|
|
||||||
// Use index + 1!!
|
|
||||||
IInspector this[object Index] {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Since Outlook 2010, but since 2013 one can edit inside an explorer
|
|
||||||
/// See: http://msdn.microsoft.com/en-us/library/office/ff867227(v=office.15).aspx
|
|
||||||
/// </summary>
|
|
||||||
public interface IExplorers : ICommon, ICollection, IEnumerable {
|
|
||||||
// Use index + 1!!
|
|
||||||
IExplorer this[object Index] {
|
|
||||||
get;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Specifies which EmailFormat the email needs to use
|
|
||||||
/// </summary>
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Units: http://msdn.microsoft.com/en-us/library/office/bb214015(v=office.12).aspx
|
|
||||||
/// </summary>
|
|
||||||
public enum WdUnits {
|
|
||||||
wdCell = 12,
|
|
||||||
wdCharacter = 1,
|
|
||||||
wdCharacterFormatting = 13,
|
|
||||||
wdColumn = 9,
|
|
||||||
wdItem = 16,
|
|
||||||
wdLine = 5,
|
|
||||||
wdParagraph = 4,
|
|
||||||
wdParagraphFormatting = 14,
|
|
||||||
wdRow = 10,
|
|
||||||
wdScreen = 7,
|
|
||||||
wdSection = 8,
|
|
||||||
wdSentence = 3,
|
|
||||||
wdStory = 6,
|
|
||||||
wdTable = 15,
|
|
||||||
wdWindow = 11,
|
|
||||||
wdWord = 2
|
|
||||||
}
|
|
||||||
}
|
|
12
GreenshotOfficePlugin/OfficeInterop/Powerpoint/IPageSetup.cs
Normal file
12
GreenshotOfficePlugin/OfficeInterop/Powerpoint/IPageSetup.cs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Powerpoint
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.powerpoint.pagesetup_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IPageSetup : ICommon, ICollection {
|
||||||
|
float SlideWidth { get; set; }
|
||||||
|
float SlideHeight { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* For more information see: http://getgreenshot.org/
|
||||||
|
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 1 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using Greenshot.Interop;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Powerpoint {
|
||||||
|
/// <summary>
|
||||||
|
/// See http://msdn.microsoft.com/en-us/library/microsoft.office.interop.powerpoint.application_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
[ComProgId("Powerpoint.Application")]
|
||||||
|
public interface IPowerpointApplication : ICommon {
|
||||||
|
IPresentation ActivePresentation { get; }
|
||||||
|
IPresentations Presentations { get; }
|
||||||
|
bool Visible { get; set; }
|
||||||
|
void Activate();
|
||||||
|
IPowerpointWindow ActiveWindow { get; }
|
||||||
|
string Version { get; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
using Greenshot.Interop;
|
||||||
|
using GreenshotOfficePlugin.OfficeInterop.Word;
|
||||||
|
|
||||||
|
namespace GreenshotOfficePlugin.OfficeInterop.Powerpoint
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// See: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.powerpoint.view_members.aspx
|
||||||
|
/// </summary>
|
||||||
|
public interface IPowerpointView : ICommon {
|
||||||
|
IZoom Zoom { get; }
|
||||||
|
void GotoSlide(int index);
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue