private void CreateMapWindow() { if (mapWindow == null) { mapButton.IsEnabled = false; mapWindow = new MapWindow(); mapWindow.Closing += new System.ComponentModel.CancelEventHandler(mapWindow_Closing); mapWindow.Show(); // have some mapper on the mapping window, until it is replaced by real one. // we do it after "Show" to ensure that we override default mapper and that the Draw is enabled: setMapper(new MapperVicinity(), null); } }
void mapWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { mapButton.IsEnabled = true; mapWindow = null; }
void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (mapWindow != null) { mapWindow.Close(); mapWindow = null; } }
void mapWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { mapButton.IsEnabled = true; mapWindow = null; }
private void CreateMapWindow() { if (mapWindow == null) { mapButton.IsEnabled = false; mapWindow = new MapWindow(); mapWindow.Closing += new System.ComponentModel.CancelEventHandler(mapWindow_Closing); mapWindow.Show(); // have some mapper on the mapping window, until it is replaced by real one. // we do it after "Show" to ensure that we override default mapper and that the Draw is enabled: setMapper(new MapperVicinity(), null); } }