void NewCmdExecuted(object target, ExecutedRoutedEventArgs e) { if (mUnsavedWork) if (!ConfirmAction("You have currently unsaved work. Creating a new level will cause all your unsaved progress to be lost. Do you wish to continue?")) return; Level lvl = new Level(); lvl.CustomLevelIdentifier = Guid.NewGuid(); Canvas c = new Canvas(); c.Width = 2000; c.Height = 1500; DetailsWindow dw = new DetailsWindow(c, lvl); if (dw.ShowDialog() != true) return; mFileLocation = null; mFirstSave = true; MyDesignerCanvas.Children.Clear(); MyDesignerCanvas.Background = Brushes.Transparent; MyDesignerCanvas.Width = c.Width; MyDesignerCanvas.Height = c.Height; MyDesignerCanvas.IsEnabled = true; MainGrid.Visibility = Visibility.Visible; Level = lvl; }
private void EditDetails_Click(object sender, RoutedEventArgs e) { DetailsWindow rw = new DetailsWindow(MyDesignerCanvas, Level); rw.ShowDialog(); }