Exemple #1
0
        private void Login(object state)
        {
            string        password = (state as PasswordBox).Password;
            ApplicationVM appvm    = App.Current.MainWindow.DataContext as ApplicationVM;

            ApplicationVM.token = GetToken(password);

            if (!ApplicationVM.token.IsError)
            {
                Error = null;
                appvm.Login(Username);
            }
            else
            {
                Error = "Login incorrect.";
            }
        }
Exemple #2
0
        private void Logout()
        {
            ApplicationVM appvm = App.Current.MainWindow.DataContext as ApplicationVM;

            appvm.Logout();
        }