예제 #1
0
        public static bool ShowAfterCaptureForm(TaskSettings taskSettings, Image img = null)
        {
            if (taskSettings.GeneralSettings.ShowAfterCaptureTasksForm)
            {
                using (AfterCaptureForm afterCaptureForm = new AfterCaptureForm(img, taskSettings))
                {
                    afterCaptureForm.ShowDialog();

                    switch (afterCaptureForm.Result)
                    {
                    case AfterCaptureFormResult.Continue:
                        taskSettings.AfterCaptureJob = afterCaptureForm.AfterCaptureTasks;
                        break;

                    case AfterCaptureFormResult.Copy:
                        taskSettings.AfterCaptureJob = AfterCaptureTasks.CopyImageToClipboard;
                        break;

                    case AfterCaptureFormResult.Cancel:
                        if (img != null)
                        {
                            img.Dispose();
                        }
                        return(false);
                    }
                }
            }

            return(true);
        }
예제 #2
0
        public static bool ShowAfterCaptureForm(TaskSettings taskSettings, Image img = null)
        {
            if (taskSettings.GeneralSettings.ShowAfterCaptureTasksForm)
            {
                using (AfterCaptureForm afterCaptureForm = new AfterCaptureForm(img, taskSettings))
                {
                    afterCaptureForm.ShowDialog();

                    switch (afterCaptureForm.Result)
                    {
                        case AfterCaptureFormResult.Continue:
                            taskSettings.AfterCaptureJob = afterCaptureForm.AfterCaptureTasks;
                            break;
                        case AfterCaptureFormResult.Copy:
                            taskSettings.AfterCaptureJob = AfterCaptureTasks.CopyImageToClipboard;
                            break;
                        case AfterCaptureFormResult.Cancel:
                            if (img != null) img.Dispose();
                            return false;
                    }
                }
            }

            return true;
        }