private void AddCharacter_Click(object sender, RoutedEventArgs e) { var window = new SubMainWindow(); window.Top = App.Current.MainWindow.Top; window.Left = App.Current.MainWindow.Left; App.Current.MainWindow = window; this.Close(); window.Show(); }
private void cancelButton_Click(object sender, RoutedEventArgs e) { if (SubMainWindow.isActive) { var window = new SubMainWindow(); window.Top = App.Current.MainWindow.Top; window.Left = App.Current.MainWindow.Left; App.Current.MainWindow = window; this.Close(); window.Show(); } else { var window = new MainWindow(); window.Top = App.Current.MainWindow.Top; window.Left = App.Current.MainWindow.Left; App.Current.MainWindow = window; this.Close(); window.Show(); } }