FEATURE-945: Added environment variables to the external command (also removed unused imports and made some variables readonly)

This commit is contained in:
Robin 2016-05-20 23:43:31 +02:00
commit d25021631e
90 changed files with 390 additions and 373 deletions

View file

@ -34,18 +34,18 @@ namespace GreenshotOfficePlugin {
/// Description of OutlookDestination.
/// </summary>
public class OutlookDestination : AbstractDestination {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(OutlookDestination));
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(OutlookDestination));
private const int ICON_APPLICATION = 0;
private const int ICON_MEETING = 2;
private static Image mailIcon = GreenshotPlugin.Core.GreenshotResources.getImage("Email.Image");
private static OfficeConfiguration conf = IniConfig.GetIniSection<OfficeConfiguration>();
private static string exePath = null;
private static bool isActiveFlag = false;
private static string mapiClient = "Microsoft Outlook";
private static readonly Image mailIcon = GreenshotResources.getImage("Email.Image");
private static readonly OfficeConfiguration conf = IniConfig.GetIniSection<OfficeConfiguration>();
private static readonly string exePath = null;
private static readonly bool isActiveFlag = false;
private static readonly string mapiClient = "Microsoft Outlook";
public const string DESIGNATION = "Outlook";
private string outlookInspectorCaption;
private OlObjectClass outlookInspectorType;
private readonly string outlookInspectorCaption;
private readonly OlObjectClass outlookInspectorType;
static OutlookDestination() {
if (EmailConfigHelper.HasOutlook()) {
@ -142,7 +142,7 @@ namespace GreenshotOfficePlugin {
/// <param name="captureDetails"></param>
/// <returns></returns>
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
ExportInformation exportInformation = new ExportInformation(this.Designation, this.Description);
ExportInformation exportInformation = new ExportInformation(Designation, Description);
// Outlook logic
string tmpFile = captureDetails.Filename;
if (tmpFile == null || surface.Modified || !Regex.IsMatch(tmpFile, @".*(\.png|\.gif|\.jpg|\.jpeg|\.tiff|\.bmp)$")) {