MainWindow
Наследование: System.Windows.Window, System.Windows.Markup.IComponentConnector
        public RechercheAvancee(MainWindow _parent_windows)
        {
            InitializeComponent();
            parent_windows = _parent_windows;
            parent_windows.IsEnabled = false;

            this.Closed += new EventHandler(Window_Closed);
        }
Пример #2
0
        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();
            }
        }