private void menuNew_Click(object sender, RoutedEventArgs e)
        {
            //TODO: check if current map needs to be saved
            MapDimensions askdims = new MapDimensions();

            askdims.ShowDialog();
            currentMap = new MapModel(askdims.Breedte, askdims.Hoogte);
            LoadMapOnView();
        }
예제 #2
0
 private void menuNew_Click(object sender, RoutedEventArgs e)
 {
     if (map.MapExists)
     {
         Warning warning = new Warning("Er is een actieve map wilt u deze eerste opslaan?", "Opslaan huidige map", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning);
         warning.CurrentMap = map;
         warning.SaveNewMapWarning();
     }
     else
     {
         MapDimensions askdims = new MapDimensions();
         askdims.ShowDialog();
         map.CurrentMap = new MapModel(askdims.Breedte, askdims.Hoogte);
         map.MapCanvas.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, (ThreadStart) delegate
         {
             map.RenderMap();
         });
     }
 }
예제 #3
0
        public void SaveNewMapWarning()
        {
            if (result == MessageBoxResult.Yes)
            {
                currentMap.SaveMap();
                MapDimensions askdims = new MapDimensions();
                askdims.ShowDialog();
                currentMap.CurrentMap = new MapModel(askdims.Breedte, askdims.Hoogte);

                currentMap.RenderMap();
            }
            if (result == MessageBoxResult.No)
            {
                MapDimensions askdims = new MapDimensions();
                askdims.ShowDialog();
                currentMap.CurrentMap = new MapModel(askdims.Breedte, askdims.Hoogte);

                currentMap.RenderMap();
            }
            if (result == MessageBoxResult.Cancel)
            {
            }
        }
예제 #4
0
        public void SaveNewMapWarning()
        {
            if (result == MessageBoxResult.Yes)
            {
                currentMap.SaveMap();
                MapDimensions askdims = new MapDimensions();
                askdims.ShowDialog();
                currentMap.CurrentMap = new MapModel(askdims.Breedte, askdims.Hoogte);

                currentMap.RenderMap();
            }
            if (result == MessageBoxResult.No)
            {

                MapDimensions askdims = new MapDimensions();
                askdims.ShowDialog();
                currentMap.CurrentMap = new MapModel(askdims.Breedte, askdims.Hoogte);

                currentMap.RenderMap();

            }
            if (result == MessageBoxResult.Cancel)
            {

            }
        }
 private void menuNew_Click(object sender, RoutedEventArgs e)
 {
     //TODO: check if current map needs to be saved
     MapDimensions askdims = new MapDimensions();
     askdims.ShowDialog();
     currentMap = new MapModel(askdims.Breedte, askdims.Hoogte);
     LoadMapOnView();
 }