public RechercheAvancee(MainWindow _parent_windows) { InitializeComponent(); parent_windows = _parent_windows; parent_windows.IsEnabled = false; this.Closed += new EventHandler(Window_Closed); }
public void Execute(object parameter) { LoginViewModel vm = (LoginViewModel)parameter; User user = vm.User; string path = vm.Path; // usually this works with a service in ViewModel. // something like vm.LoginService(user); if (user.Username != "username" && user.Password != "password") { vm.Error = "Login incorect!"; } else { MainWindow fenetre = new MainWindow(path); fenetre.Show(); //Window1.Close(); } }