private bool CreateSessionWithUAServerDelegate() { try { _Session = _UaApp.CreateSession(_ServerAddress, false, "sessionForUAClient"); _Session.ReconnectPeriod = 10000; _Session.SessionTimeout = 60000; _Session.StatusChange += new OnStatusChange(onSessionStatusChange); //session.NotifyUntrustedCertificate += new OnNotifyUntrustedCertificate(onSessionNotifyUntrustedCertificate); _Session.NamespaceIndexManagement = true; _Session.Connect(null); return(true); } catch (Exception ex) { //MessageBox.Show(ex.Message, "Create session failed."); return(false); } }