void OnServerFound(object o, FoundServiceEventArgs args) { Global.Connections [args.FoundConnection.Settings.Name] = args.FoundConnection; viewsTreeView.AddConnection(args.FoundConnection); ldapTreeView.AddConnection(args.FoundConnection.Settings.Name); schemaTreeview.AddConnection(args.FoundConnection.Settings.Name); }
void OnServiceResolved(object o, ServiceInfoArgs args) { ConnectionData cd = new ConnectionData(); cd.Name = String.Format("{0} ({1})", args.Service.Name, args.Service.Address); cd.Host = args.Service.Address.ToString(); cd.Port = args.Service.Port; cd.UserName = ""; cd.Pass = ""; cd.DontSavePassword = false; cd.ServerType = Util.GetServerType("Generic LDAP server"); cd.Dynamic = true; Log.Debug("Found LDAP service {0} on {1} port {2}", args.Service.Name, args.Service.Address, args.Service.Port); if (args.Service.Port == 636) { cd.Encryption = EncryptionType.SSL; } Connection conn = new Connection(cd); if (Found != null) { FoundServiceEventArgs fargs = new FoundServiceEventArgs(); fargs.FoundConnection = conn; Found(this, fargs); } }
void OnServiceResolved(object o, ServiceInfoArgs args) { ConnectionData cd = new ConnectionData (); cd.Name = String.Format ("{0} ({1})", args.Service.Name, args.Service.Address); cd.Host = args.Service.Address.ToString (); cd.Port = args.Service.Port; cd.UserName = ""; cd.Pass = ""; cd.DontSavePassword = false; cd.ServerType = Util.GetServerType ("Generic LDAP server"); cd.Dynamic = true; Log.Debug ("Found LDAP service {0} on {1} port {2}", args.Service.Name, args.Service.Address, args.Service.Port); if (args.Service.Port == 636) cd.Encryption = EncryptionType.SSL; Connection conn = new Connection (cd); if (Found != null) { FoundServiceEventArgs fargs = new FoundServiceEventArgs (); fargs.FoundConnection = conn; Found (this, fargs); } }