예제 #1
0
파일: Window.cs 프로젝트: MrJoe/lat
 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);
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
파일: ServiceFinder.cs 프로젝트: MrJoe/lat
        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);
            }
        }