private void ScreenshotArea() { if (this._asForm == null && UserModel.IsLoggedIn()) { this._asForm = new AreaSelector(); this._asForm.Show(); this._asForm.AreaSelectedEvent += AreaSelectedHandler; } }
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); } }