private void btnProfileCreate_Click(object sender, EventArgs e) { WorkflowWizard pw = new WorkflowWizard() { Icon = this.Icon }; if (pw.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Workflows.Add(pw.Config); WorkflowsGuiRefresh(); } }
private void ShowImageFormatUI() { var wfwgui = new WorkflowWizardGUIOptions { ShowQualityTab = true, ShowResizeTab = true }; var wfw = new WorkflowWizard(new WorkerTask(Engine.ConfigWorkflow, false), wfwgui) { Icon = Icon }; wfw.Show(); }
public WorkerTask(BackgroundWorker worker, TaskInfo info) : this(Engine.ConfigWorkflow) { Info = info; if (!string.IsNullOrEmpty(info.ExistingFilePath)) { UpdateLocalFilePath(info.ExistingFilePath); } MyWorker = worker; PrepareOutputs(info.DestConfig); // step 1 DialogResult result = StartWork(info.Job) ? DialogResult.OK : DialogResult.Cancel; // step 2 if (result == DialogResult.OK && Engine.ConfigUI.PromptForOutputs) // step 3 { var wfw = new WorkflowWizard(this) { Icon = Resources.zss_tray }; result = wfw.ShowDialog(); } if (Job1 == EDataType.Image && result == DialogResult.OK) { if (!States.Contains(TaskState.ImageProcessed)) { ProcessImage(TempImage); } } if (result == DialogResult.Cancel) { States.Add(TaskState.CancellationPending); } if (States.Contains(TaskState.CancellationPending)) { SetNotifyIconStatus(Info.TrayIcon, ready: true); } }