private void SamlLoginCtrlOnNavigationError(object sender, string errorMessage)
 {
     errorWasShown = true;
     MessageBox.Show(errorMessage, "Error", MessageBoxButtons.OK);
     _latestResult = new SamlLoginResult(false, errorMessage, null);
     _samlLoginEvent.Set();
 }
 public SamlLoginHelper()
 {
     _samlLoginFrm.SamlLoginCtrl.NavigationCompleted += SamlLoginCtrlOnNavigationCompleted;
     _samlLoginFrm.SamlLoginCtrl.NavigationError     += SamlLoginCtrlOnNavigationError;
     _samlLoginFrm.UserClosedForm += OnUserClosedForm;
     _latestResult = new SamlLoginResult(false, string.Empty, null);
 }
 private void SamlLoginCtrlOnNavigationCompleted(object sender, string ottValue)
 {
     _latestResult = new SamlLoginResult(true, string.Empty, ottValue);
     _samlLoginEvent.Set();
 }
 private void OnUserClosedForm(object sender, EventArgs e)
 {
     _latestResult = new SamlLoginResult(false, string.Empty, null);
     _samlLoginEvent.Set();
 }