コード例 #1
0
 private void AddImageSoftwareToList(Software temp)
 {
     if (temp != null)
     {
         Config.ActionsApps.Add(temp);
         lbSoftware.Items.Add(temp);
         lbSoftware.SelectedIndex = lbSoftware.Items.Count - 1;
     }
 }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        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();
        }
コード例 #4
0
 public bool IsValidActionText(Software app)
 {
     return Job1 == EDataType.Text && app.TriggerForText && !string.IsNullOrEmpty(TempText);
 }
コード例 #5
0
 public bool IsValidActionOCR(Software app)
 {
     return Job1 == EDataType.Image && app.TriggerForText && !string.IsNullOrEmpty(OCRText) &&
            File.Exists(OCRFilePath);
 }
コード例 #6
0
 public bool IsValidActionImage(Software app)
 {
     return Job1 == EDataType.Image && app.TriggerForImages && !WasToTakeScreenshot ||
            Job1 == EDataType.Image && app.TriggerForScreenshots && WasToTakeScreenshot;
 }
コード例 #7
0
 public bool IsValidActionFile(Software app)
 {
     return Job1 == EDataType.File && app.TriggerForFiles && File.Exists(Info.LocalFilePath);
 }