Example #1
0
        public static void ClipboardUploadWithContentViewer(TaskSettings taskSettings = null)
        {
            if (taskSettings == null)
            {
                taskSettings = TaskSettings.GetDefaultTaskSettings();
            }

            using (ClipboardUploadForm clipboardUploadForm = new ClipboardUploadForm(taskSettings))
            {
                clipboardUploadForm.ShowDialog();
            }
        }
Example #2
0
        public static void ClipboardUploadMainWindow(TaskSettings taskSettings = null)
        {
            if (taskSettings == null)
            {
                taskSettings = TaskSettings.GetDefaultTaskSettings();
            }

            if (Program.Settings.ShowClipboardContentViewer)
            {
                using (ClipboardUploadForm clipboardUploadForm = new ClipboardUploadForm(taskSettings, true))
                {
                    clipboardUploadForm.ShowDialog();
                    Program.Settings.ShowClipboardContentViewer = !clipboardUploadForm.DontShowThisWindow;
                }
            }
            else
            {
                ClipboardUpload(taskSettings);
            }
        }
Example #3
0
        private static void ProcessClipboardUploadDialog(ClipboardUploadForm form, TaskSettings taskSettings = null)
        {
            if (taskSettings == null)
            {
                taskSettings = TaskSettings.GetDefaultTaskSettings();
            }

            if (form.ShowDialog() == DialogResult.OK && form.IsClipboardContentValid)
            {
                if (form.ClipboardContentType != EClipboardContentType.Default)
                {
                    ClipboardUploadCached(form, taskSettings);
                }
                else
                {
                    ClipboardUpload(taskSettings);
                }
            }
            else if (form.ClipboardContentType == EClipboardContentType.Image)
            {
                ((Bitmap)form.ClipboardContent).Dispose();
            }
        }