private void previewPopup_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (currentActivePreview != -1) { previewPopup.IsOpen = false; AreaDetailsWindow detailsWindow = new AreaDetailsWindow(mapPainter, (VoivodeshipNames)currentActivePreview); detailsWindow.Owner = this; detailsWindow.Init(); detailsWindow.ShowDialog(); } }
private void mapCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (mapPainter == null) { return; } int areaIndex = mapPainter.GetAreaIndexBySource(e.Source); if (areaIndex != -1) { previewPopup.IsOpen = false; AreaDetailsWindow detailsWindow = new AreaDetailsWindow(mapPainter, (VoivodeshipNames)areaIndex); detailsWindow.Owner = this; detailsWindow.Init(); detailsWindow.ShowDialog(); } }