Example #1
0
 private void ScreenshotArea()
 {
     if (this._asForm == null && UserModel.IsLoggedIn())
     {
         this._asForm = new AreaSelector();
         this._asForm.Show();
         this._asForm.AreaSelectedEvent += AreaSelectedHandler;
     }
 }
Example #2
0
        private async void AreaSelectedHandler(Rectangle rect)
        {
            this._asForm = null;
            if (!rect.IsEmpty)
            {
                Image img    = CaptureScreen.CaptureRectangle(rect);
                var   result = await ApiRequests.Instance.ImagePost(img);

                FileUploaded(result);
            }
        }