예제 #1
0
 public void CaptureScreen()
 {
     BeginWork(() =>
     {
         Uploader.ImgurUpload(
             ScreenShotter.CaptureScreen(Cursor.Position)
             ).Handle();
     });
 }
예제 #2
0
 public void CaptureScreens()
 {
     BeginWork(() =>
     {
         Uploader.ImgurUpload(
             ScreenShotter.CaptureScreens()
             ).Handle();
     });
 }
예제 #3
0
 public void CaptureWindow()
 {
     BeginWork(() =>
     {
         Uploader.ImgurUpload(
             ScreenShotter.CaptureWindow(Win32.GetForegroundWindow())
             ).Handle();
     });
 }
예제 #4
0
        public void CaptureRegion()
        {
            FrmSelect select = new FrmSelect(Screen.FromPoint(Cursor.Position));

            select.ShowDialog();

            if (select.DialogResult == DialogResult.OK)
            {
                BeginWork(() =>
                {
                    Uploader.ImgurUpload(
                        ScreenShotter.CaptureRegion(
#pragma warning disable CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception
                            select.Selected.X,
                            select.Selected.Y,
                            select.Selected.Width,
                            select.Selected.Height
#pragma warning restore CS1690 // Accessing a member on a field of a marshal-by-reference class may cause a runtime exception
                            )
                        ).Handle();
                });
            }
        }