private CardArea GetSingleCardArea() { var pointToWindow = Mouse.GetPosition(this); var pointToScreen = PointToScreen(pointToWindow); var xStart = pointToScreen.X - 50; var xEnd = pointToScreen.X + 50; var yStart = pointToScreen.Y - 75; var yEnd = pointToScreen.Y + 75; _currentCardArea = new CardArea( xStart, yStart, xEnd, yEnd); return(_currentCardArea); }
private void ScreenAnalyzePage_MouseUp(object sender, MouseButtonEventArgs e) { var pointToWindow = Mouse.GetPosition(this); _endPoint = PointToScreen(pointToWindow); var area = new CardArea(_startPoint.X, _startPoint.Y, _endPoint.X, _endPoint.Y); if (AT == AnalyzeType.SingleCard) { _mainWindowViewModel.SingleCardArea = area; } if (AT == AnalyzeType.Desk) { _mainWindowViewModel.DeskArea = area; } if (AT == AnalyzeType.Hand) { _mainWindowViewModel.HandArea = area; } this.Close(); }