コード例 #1
0
        private void tsmiTrayMonitorItems_Click(object sender, EventArgs e)
        {
            ToolStripItem tsi       = (ToolStripItem)sender;
            Rectangle     rectangle = (Rectangle)tsi.Tag;

            if (!rectangle.IsEmpty)
            {
                DoCapture(() => Screenshot.CaptureRectangle(rectangle), CaptureType.Monitor, null, false);
            }
        }
コード例 #2
0
        private void TakeScreenshot()
        {
            if (!CaptureRectangle.IsEmpty)
            {
                Image img = Screenshot.CaptureRectangle(CaptureRectangle);

                if (img != null)
                {
                    TaskSettings taskSettings = TaskSettings.GetDefaultTaskSettings();
                    taskSettings.UseDefaultAfterCaptureJob             = false;
                    taskSettings.AfterCaptureJob                       = taskSettings.AfterCaptureJob.Remove(AfterCaptureTasks.AnnotateImage);
                    taskSettings.UseDefaultAdvancedSettings            = false;
                    taskSettings.AdvancedSettings.DisableNotifications = true;

                    UploadManager.RunImageTask(img, taskSettings);
                }
            }
        }