Example #1
0
        public AccountViewmodel(IView view)
        {
            _view       = view;
            BackCommand = new RelayCommand((object obj) => view.Close());

            ChangePasswordCommand = new RelayCommand(async(object obj) => await ShowAccountAsync());

            LogoffCommand = new RelayCommand((object obj) =>
            {
                Properties.Settings autoLoginSettings  = new Properties.Settings();
                autoLoginSettings.AutomaticallyLogin   = false;
                autoLoginSettings.RememberOnlineChoice = false;
                autoLoginSettings.Save();
                ServiceResolver.ResetContainer();
                RepositoryResolver.ResetContainer();
                LoginRepository.Instance.ResetLogin();

                new LoginView().Show();
                MainWindow.CurrentMainWindow.Close();
            });
        }