/// <summary> /// function put username and password /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void m_vpn_needLoginAndPassword(object sender, NeedLoginAndPasswordEventArgs e) { e.UserName = username.Text; e.Password = password.Password; }
if (Application.Current.Dispatcher.CheckAccess()) { e.UserName = username.Text; e.Password = password.Password; } else { //Other wise re-invoke the method with UI thread access e.UserName = username.Text; e.Password = password.Password; }</pre>
else
Dispatcher.Invoke
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)