示例#1
0
 private void tsmiUpload_Click(object sender, EventArgs e)
 {
     if (pbQRCode.Image != null)
     {
         Image img = (Image)pbQRCode.Image.Clone();
         UploadManager.UploadImage(img);
     }
 }
示例#2
0
 private void tsmiUpload_Click(object sender, EventArgs e)
 {
     if (pbQRCode.Image != null)
     {
         Bitmap bmp = (Bitmap)pbQRCode.Image.Clone();
         UploadManager.UploadImage(bmp);
     }
 }
示例#3
0
 public static Image AnnotateImage(Image img, string imgPath)
 {
     return(ImageHelpers.AnnotateImage(img, imgPath, !Program.IsSandbox, Program.PersonalPath,
                                       x => Program.MainForm.InvokeSafe(() => ClipboardHelpers.CopyImage(x)),
                                       x => Program.MainForm.InvokeSafe(() => UploadManager.UploadImage(x)),
                                       (x, filePath) => Program.MainForm.InvokeSafe(() => ImageHelpers.SaveImage(x, filePath)),
                                       (x, filePath) =>
     {
         string newFilePath = null;
         Program.MainForm.InvokeSafe(() => newFilePath = ImageHelpers.SaveImageFileDialog(x, filePath));
         return newFilePath;
     }));
 }
示例#4
0
        public static void AnnotateImageUsingShareX(Image img, string filePath, TaskSettings taskSettings = null)
        {
            if (img == null && File.Exists(filePath))
            {
                img = ImageHelpers.LoadImage(filePath);
            }

            if (img != null)
            {
                using (img)
                {
                    RegionCaptureTasks.AnnotateImage(img, filePath, taskSettings.CaptureSettingsReference.SurfaceOptions,
                                                     x => UploadManager.RunImageTask(x, taskSettings),
                                                     (x, newFilePath) => ImageHelpers.SaveImage(x, newFilePath),
                                                     (x, newFilePath) => ImageHelpers.SaveImageFileDialog(x, newFilePath),
                                                     x => ClipboardHelpers.CopyImage(x),
                                                     x => UploadManager.UploadImage(x),
                                                     x => PrintImage(x));
                }
            }
        }
示例#5
0
 private void tsmiTestFileUpload_Click(object sender, EventArgs e)
 {
     UploadManager.UploadImage(Resources.Test, ImageDestination.FileUploader);
 }