private void buttonLogin_Click(object sender, RoutedEventArgs e) { Credentials c = getCredentials(); try { Ref.Login(c); parentWindow.credentials = c; //MessageBox.Show("User logged in."); this.DialogResult = true; this.Close(); } catch (ActionException ex) { new SystemMessage(ex).ShowDialog(); } }
private void buttonLogin_Click(object sender, RoutedEventArgs e) { Credentials c = getCredentials(); try { if (connection.Login(c)) { parentWindow.credentials = c; //MessageBox.Show("User logged in."); this.DialogResult = true; this.Close(); } else { new SystemMessage("FileSync", "Sorry..", "Login attempt failed.", MemeType.AreYouFuckingKiddingMe).ShowDialog(); } } catch (ActionException ex) { new SystemMessage(ex).ShowDialog(); } }