Beispiel #1
0
 public void Login()
 {
     if (IMService.GetUsernameFromDb() == null)
     {
         var signInWindow = new SignInWindow();
         signInWindow.RaiseSignInEvent += SignInButton_RaiseSignInEvent;
         signInWindow.Show();
     }
 }
Beispiel #2
0
        private async void LogoutButton_Click(object sender, RoutedEventArgs e)
        {
            if (MessageBox.Show("Are you sure you want to logout?", "Logout", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
            {
                await IMService.EraseUsernameFromDb();

                var signInWindow = new SignInWindow();
                signInWindow.RaiseSignInEvent += SignInButton_RaiseSignInEvent;
                signInWindow.Show();
                Hide();
            }
        }