Ejemplo n.º 1
0
        private void mapButton_Click(object sender, RoutedEventArgs e)
        {
            if (mapWindow == null)
            {
                mapButton.IsEnabled = false;

                mapWindow          = new MapWindow();
                mapWindow.Closing += new System.ComponentModel.CancelEventHandler(mapWindow_Closing);
                mapWindow.Show();

                // we do it after "Show" to ensure that we override default mapper and that the Draw is enabled:
                mapWindow.mapperViewControl1.CurrentMapper       = mapperVicinity;
                mapWindow.mapperViewControl1.CurrentRoutePlanner = routePlanner;
            }
        }
Ejemplo n.º 2
0
 void mapWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     mapButton.IsEnabled = true;
     mapWindow           = null;
 }