private void pop_AuthenticationBegan(object sender, string userName) { if (this.statusStrip.InvokeRequired) { AuthenticateEventHandler auth = new AuthenticateEventHandler(this.pop_AuthenticationBegan); this.Invoke(auth, new object[] { sender, userName }); } else { this.ProgressLabel.Text = "Verifying user name and password"; } }
private void pop_AuthenticationFinished(object sender, string userName) { if (this.statusStrip.InvokeRequired) { AuthenticateEventHandler auth = new AuthenticateEventHandler(this.pop_AuthenticationFinished); this.Invoke(auth, new object[] { sender, userName }); } else { this.ProgressLabel.Text = "Verification is completed"; } }
// other code omitted protected virtual void OnAuthenticate(AuthenticateEventArgs e) { AuthenticateEventHandler handler = this.Authenticate; if (handler != null) { handler(this, e); } else { this.AuthenticateUsingMembershipProvider(e); } }