예제 #1
0
        private async void Btn_Login_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                await WebserviceAPI.LoginAsync(UserNameInput.Text, PasswordInput.Password);

                await this.Dispatcher.Invoke(async() =>
                {
                    MainChatWindow mainChatWindow = new MainChatWindow();
                    mainChatWindow.Show();
                    this.Close();
                });
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }