示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }