public MainWindow() { //Initialization of main window. InitializeComponent(); HomeScreenWindow homeScreen = new HomeScreenWindow(); homeScreen.Show(); homeScreen.setMain(this); // Redesign handling of visibility of editor, avoid hand-offs through multiple classes. Potential for interface with autoEngine? //EditorGrid.Visibility = homeScreen.returnVis(); }
private void cancelProcess_Click(object sender, RoutedEventArgs e) { clickedName = null; // Create HomeScreenWindow again because maybe the user accidentally clicked Cancel, // or wanted to load an existing script. HomeScreenWindow homeScreen = new HomeScreenWindow(); // Sets the MainWindow to be the main of HomeScreenWindow, important because if we don't do this // we'll lose track of our updating value hand-off and won't be able to call our autoEngine. homeScreen.setMain(main); homeScreen.Show(); this.Close(); }