예제 #1
0
 public void UseCommandLineArgs(string[] args)
 {
     if (args != null && args.Length > 1)
     {
         for (int i = 1; i < args.Length; i++)
         {
             if (args[i].Equals("-clipboardupload", StringComparison.InvariantCultureIgnoreCase))
             {
                 UploadManager.ClipboardUpload();
             }
             else if (args[i][0] != '-')
             {
                 UploadManager.UploadFile(args[i]);
             }
         }
     }
 }
예제 #2
0
        private void HandleTask(TaskSettings taskSettings)
        {
            TaskSettings safeTaskSettings = TaskSettings.GetSafeTaskSettings(taskSettings);

            switch (safeTaskSettings.Job)
            {
            case HotkeyType.StopUploads:
                TaskManager.StopAllTasks();
                break;

            case HotkeyType.ClipboardUpload:
                UploadManager.ClipboardUpload(safeTaskSettings);
                break;

            case HotkeyType.ClipboardUploadWithContentViewer:
                UploadManager.ClipboardUploadWithContentViewer(safeTaskSettings);
                break;

            case HotkeyType.FileUpload:
                UploadManager.UploadFile(safeTaskSettings);
                break;

            case HotkeyType.DragDropUpload:
                TaskHelpers.OpenDropWindow();
                break;

            case HotkeyType.PrintScreen:
                CaptureScreenshot(CaptureType.Screen, safeTaskSettings, false);
                break;

            case HotkeyType.ActiveWindow:
                CaptureScreenshot(CaptureType.ActiveWindow, safeTaskSettings, false);
                break;

            case HotkeyType.ActiveMonitor:
                CaptureScreenshot(CaptureType.ActiveMonitor, safeTaskSettings, false);
                break;

            case HotkeyType.RectangleRegion:
                CaptureScreenshot(CaptureType.Rectangle, safeTaskSettings, false);
                break;

            case HotkeyType.WindowRectangle:
                CaptureScreenshot(CaptureType.RectangleWindow, safeTaskSettings, false);
                break;

            case HotkeyType.RoundedRectangleRegion:
                CaptureScreenshot(CaptureType.RoundedRectangle, safeTaskSettings, false);
                break;

            case HotkeyType.EllipseRegion:
                CaptureScreenshot(CaptureType.Ellipse, safeTaskSettings, false);
                break;

            case HotkeyType.TriangleRegion:
                CaptureScreenshot(CaptureType.Triangle, safeTaskSettings, false);
                break;

            case HotkeyType.DiamondRegion:
                CaptureScreenshot(CaptureType.Diamond, safeTaskSettings, false);
                break;

            case HotkeyType.PolygonRegion:
                CaptureScreenshot(CaptureType.Polygon, safeTaskSettings, false);
                break;

            case HotkeyType.FreeHandRegion:
                CaptureScreenshot(CaptureType.Freehand, safeTaskSettings, false);
                break;

            case HotkeyType.LastRegion:
                CaptureScreenshot(CaptureType.LastRegion, safeTaskSettings, false);
                break;

            case HotkeyType.ScreenRecorder:
                TaskHelpers.DoScreenRecorder(safeTaskSettings);
                break;

            case HotkeyType.AutoCapture:
                TaskHelpers.OpenAutoCapture();
                break;

            case HotkeyType.ScreenColorPicker:
                TaskHelpers.OpenScreenColorPicker(safeTaskSettings);
                break;

            case HotkeyType.Ruler:
                TaskHelpers.OpenRuler();
                break;

            case HotkeyType.FTPClient:
                TaskHelpers.OpenFTPClient();
                break;

            case HotkeyType.HashCheck:
                TaskHelpers.OpenHashCheck();
                break;

            case HotkeyType.IndexFolder:
                TaskHelpers.OpenIndexFolder();
                break;

            case HotkeyType.ImageEffects:
                TaskHelpers.OpenImageEffects();
                break;

            case HotkeyType.QRCode:
                TaskHelpers.OpenQRCode();
                break;
            }
        }
예제 #3
0
        private void HandleHotkeys(HotkeySettings hotkeySetting)
        {
            DebugHelper.WriteLine("Hotkey triggered: " + hotkeySetting);

            if (hotkeySetting.TaskSettings.Job == HotkeyType.None)
            {
                return;
            }

            TaskSettings taskSettings = TaskSettings.GetSafeTaskSettings(hotkeySetting.TaskSettings);

            switch (hotkeySetting.TaskSettings.Job)
            {
            case HotkeyType.StopUploads:
                TaskManager.StopAllTasks();
                break;

            case HotkeyType.ClipboardUpload:
                UploadManager.ClipboardUpload(taskSettings);
                break;

            case HotkeyType.ClipboardUploadWithContentViewer:
                UploadManager.ClipboardUploadWithContentViewer(taskSettings);
                break;

            case HotkeyType.FileUpload:
                UploadManager.UploadFile(taskSettings);
                break;

            case HotkeyType.DragDropUpload:
                OpenDropWindow();
                break;

            case HotkeyType.PrintScreen:
                CaptureScreenshot(CaptureType.Screen, taskSettings, false);
                break;

            case HotkeyType.ActiveWindow:
                CaptureScreenshot(CaptureType.ActiveWindow, taskSettings, false);
                break;

            case HotkeyType.ActiveMonitor:
                CaptureScreenshot(CaptureType.ActiveMonitor, taskSettings, false);
                break;

            case HotkeyType.RectangleRegion:
                CaptureScreenshot(CaptureType.Rectangle, taskSettings, false);
                break;

            case HotkeyType.WindowRectangle:
                CaptureScreenshot(CaptureType.RectangleWindow, taskSettings, false);
                break;

            case HotkeyType.RoundedRectangleRegion:
                CaptureScreenshot(CaptureType.RoundedRectangle, taskSettings, false);
                break;

            case HotkeyType.EllipseRegion:
                CaptureScreenshot(CaptureType.Ellipse, taskSettings, false);
                break;

            case HotkeyType.TriangleRegion:
                CaptureScreenshot(CaptureType.Triangle, taskSettings, false);
                break;

            case HotkeyType.DiamondRegion:
                CaptureScreenshot(CaptureType.Diamond, taskSettings, false);
                break;

            case HotkeyType.PolygonRegion:
                CaptureScreenshot(CaptureType.Polygon, taskSettings, false);
                break;

            case HotkeyType.FreeHandRegion:
                CaptureScreenshot(CaptureType.Freehand, taskSettings, false);
                break;

            case HotkeyType.LastRegion:
                CaptureScreenshot(CaptureType.LastRegion, taskSettings, false);
                break;

            case HotkeyType.ScreenRecorder:
                DoScreenRecorder(taskSettings);
                break;

            case HotkeyType.AutoCapture:
                OpenAutoCapture();
                break;

            case HotkeyType.ScreenColorPicker:
                OpenScreenColorPicker(taskSettings);
                break;

            case HotkeyType.HashCheck:
                OpenHashCheck();
                break;

            case HotkeyType.IndexFolder:
                OpenIndexFolder();
                break;

            case HotkeyType.ImageEffects:
                OpenImageEffects();
                break;

            case HotkeyType.Ruler:
                OpenRuler();
                break;
            }
        }