private void B_SelectOCR_Click(object sender, RoutedEventArgs e) { prevWs = WindowState; this.WindowState = WindowState.Minimized; double scale = getDPIScale(); SelectionWindow winLocationOCR = new SelectionWindow();; if (OCR_Start.X >= 0 || OCR_Start.Y >= 0) { System.Windows.Point start = new System.Windows.Point((OCR_Start.X + diff) / scale, (OCR_Start.Y + diff) / scale); System.Windows.Point end = new System.Windows.Point((OCR_Ende.X + diff) / scale, (OCR_Ende.Y + diff) / scale); winLocationOCR = new SelectionWindow(start, end); } winLocationOCR.RaiseCustomEvent += pointsOCR; winLocationOCR.Closed += selectionWindow_Closed; winLocationOCR.ShowDialog(); }
private void b_SelectRegion_Click(object sender, RoutedEventArgs e) { prevWs = WindowState; this.WindowState = WindowState.Minimized; double scale = getDPIScale(); SelectionWindow winLocationImage = new SelectionWindow(); if (scsh_Start.X >= 0 || scsh_Start.Y >= 0) { System.Windows.Point start = new System.Windows.Point((scsh_Start.X + diff) / scale, (scsh_Start.Y + diff) / scale); System.Windows.Point end = new System.Windows.Point((scsh_Ende.X + diff) / scale, (scsh_Ende.Y + diff) / scale); winLocationImage = new SelectionWindow(start, end); } winLocationImage.RaiseCustomEvent += pointsScreenshot; winLocationImage.Closed += selectionWindow_Closed; winLocationImage.ShowDialog(); }