Beispiel #1
0
 private void TlpMain_Layout(object sender, LayoutEventArgs e)
 {
     TaskEx.RunDelayed(() =>
     {
         if (tlpMain.HorizontalScroll.Visible)
         {
             tlpMain.Padding = new Padding(0, 0, SystemInformation.VerticalScrollBarWidth, 0);
         }
         else
         {
             tlpMain.Padding = new Padding(0);
         }
     }, 1);
 }
Beispiel #2
0
        public void Capture(TaskSettings taskSettings = null, bool autoHideForm = false)
        {
            if (taskSettings == null)
            {
                taskSettings = TaskSettings.GetDefaultTaskSettings();
            }

            if (taskSettings.CaptureSettings.IsDelayScreenshot && taskSettings.CaptureSettings.DelayScreenshot > 0)
            {
                int delay = (int)(taskSettings.CaptureSettings.DelayScreenshot * 1000);

                TaskEx.RunDelayed(() =>
                {
                    CaptureInternal(taskSettings, autoHideForm);
                }, delay);
            }
            else
            {
                CaptureInternal(taskSettings, autoHideForm);
            }
        }
Beispiel #3
0
 private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
 {
     TaskEx.RunDelayed(GetWebpageBitmap, CaptureDelay);
 }