Ejemplo n.º 1
0
 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();
     }
 }