private void AddImageSoftwareToList(Software temp)
 {
     if (temp != null)
     {
         Config.ActionsApps.Add(temp);
         lbSoftware.Items.Add(temp);
         lbSoftware.SelectedIndex = lbSoftware.Items.Count - 1;
     }
 }
        /// <summary>
        /// Browse for an applicatoin
        /// </summary>
        /// <returns>Software</returns>
        private Software BrowseApplication()
        {
            Software temp = null;

            using (var dlg = new OpenFileDialog())
            {
                dlg.Filter = "All Files(*.exe)|*.exe";

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    temp = new Software { Name = Path.GetFileNameWithoutExtension(dlg.FileName), Path = dlg.FileName };
                }
            }

            return temp;
        }
        private void ZScreen_ConfigGUI_Actions()
        {
            chkPerformActions.Checked = Engine.ConfigWorkflow.PerformActions;
            chkPerformActions.Enabled = !Engine.ConfigUI.PromptForOutputs;
            tsmEditinImageSoftware.Checked = Engine.ConfigWorkflow.PerformActions;

            if (Engine.ConfigUI.ConfigActions.ActionsApps.Count == 0)
            {
                Software editor = new Software(Engine.zImageAnnotator, Application.ExecutablePath, true, true);
                Engine.ConfigUI.ConfigActions.ActionsApps.Add(editor);
                Software effects = new Software(Engine.zImageEffects, Application.ExecutablePath, true, false);
                Engine.ConfigUI.ConfigActions.ActionsApps.Add(effects);
            }
            else
            {
                Engine.ConfigUI.ConfigActions.ActionsApps.RemoveAll(x => string.IsNullOrEmpty(x.Path) || !File.Exists(x.Path));
            }

            ImageEditorHelper.FindImageEditors();
        }
 public bool IsValidActionText(Software app)
 {
     return Job1 == EDataType.Text && app.TriggerForText && !string.IsNullOrEmpty(TempText);
 }
 public bool IsValidActionOCR(Software app)
 {
     return Job1 == EDataType.Image && app.TriggerForText && !string.IsNullOrEmpty(OCRText) &&
            File.Exists(OCRFilePath);
 }
 public bool IsValidActionImage(Software app)
 {
     return Job1 == EDataType.Image && app.TriggerForImages && !WasToTakeScreenshot ||
            Job1 == EDataType.Image && app.TriggerForScreenshots && WasToTakeScreenshot;
 }
 public bool IsValidActionFile(Software app)
 {
     return Job1 == EDataType.File && app.TriggerForFiles && File.Exists(Info.LocalFilePath);
 }