Пример #1
0
        void Pastebin_BeginLogin(object sender, AccountAuthWindow.LoginRoutedEventArgs e)
        {
            try {
                PastebinClient li = new PastebinClient(e.Username, e.Password);

                if (li.UserKey != null)
                {
                    Complete(true, "Pastebin");
                }
            }
            catch (System.Net.WebException ex) {
                if (MessageBox.Show("Pastebin rejected the login with the following message: \n\n" + ex.Message + "\n \nWould you like to retry after entering new information?", "Login Failed", MessageBoxButton.YesNo, MessageBoxImage.Error, MessageBoxResult.Yes) == MessageBoxResult.Yes)
                {
                }
                else
                {
                    Complete(false, "Pastebin");
                }
            }
        }
		void Pastebin_BeginLogin(object sender, AccountAuthWindow.LoginRoutedEventArgs e) {
			try {
				PastebinClient li = new PastebinClient(e.Username, e.Password);

				if (li.UserKey != null) {
					Complete(true, "Pastebin");
				}
			}
			catch (System.Net.WebException ex) {
				if (MessageBox.Show("Pastebin rejected the login with the following message: \n\n" + ex.Message + "\n \nWould you like to retry after entering new information?", "Login Failed", MessageBoxButton.YesNo, MessageBoxImage.Error, MessageBoxResult.Yes) == MessageBoxResult.Yes) {

				}
				else {
					Complete(false, "Pastebin");
				}
			}
		}