Beispiel #1
0
        public ObjectHandler(Canvas canvas, CityDesignerWindow window)
        {
            Canvas = canvas;
            Window = window;

            //subscribe CityLoadedEvent
            CityLoader.SubscribeLoadedCity(LoadedCityToCanvas);
        }
Beispiel #2
0
 /// <summary>
 /// Load a City
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void LoadButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         CityLoader.LoadCity();
     }
     catch (Exception b)
     {
         MessageBox.Show(windowDesigner, b.Message, "Save error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Beispiel #3
0
 public CityLoader()
 {
     Instance = this;
 }