Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: Key2Name [loginfirstname] [loginlastname] [password] [key]");
                return;
            }

            SecondLife client = new SecondLife();
            Console.WriteLine("Attempting to connect and login to Second Life.");

            // Login to Second Life
            if (!client.Network.Login(args[0], args[1], args[2], "key2name", "*****@*****.**"))
            {
                // Login failed
                Console.WriteLine("Error logging in: " + client.Network.LoginMessage);
                return;
            }

            AvatarTracker avatarTracker = new AvatarTracker(client);

            LLUUID lookup = new LLUUID();
            LLUUID.TryParse(args[3], out lookup);

            Console.WriteLine("Looking up name for " + lookup.ToStringHyphenated());

            string name = avatarTracker.GetAvatarName(lookup);

            Console.WriteLine("Name: " + name + Environment.NewLine + "Press enter to logout.");
            Console.ReadLine();

            client.Network.Logout();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            SecondLife client = new SecondLife();
            if (args.Length < 4)
            {
                Console.WriteLine("Usage: Key2Name [loginfirstname] [loginlastname] [password] [key]");
                return;
            }
            Console.WriteLine("Attempting to connect and login to Second Life.");

            // Setup Login to Second Life
            Dictionary<string, object> loginParams = client.Network.DefaultLoginValues(args[0],
                args[1], args[2], "00:00:00:00:00:00", "last", "Win", "0", "key2name",
                "*****@*****.**");
            Dictionary<string, object> loginReply = new Dictionary<string, object>();
            if (!client.Network.Login(loginParams))
            {
                // Login failed
                Console.WriteLine("Error logging in: " + client.Network.LoginError);
                return;
            }
            AvatarTracker avatarTracker = new AvatarTracker(client);
            LLUUID lookup = new LLUUID(args[3]);
            Console.WriteLine("Looking up name for " + lookup.ToStringHyphenated());
            string name = avatarTracker.GetAvatarName(lookup);
            Console.WriteLine("Name: " + name + ". Press enter to logout.");
            Console.ReadLine();
            client.Network.Logout();
        }
        public void NameLookup()
        {
            AvatarTracker tracker = new AvatarTracker(Client);

            string name = tracker.GetAvatarName(LookupKey1);

            Assert.IsTrue(name == LookupName1, "AvatarTracker.GetAvatarName() returned " + name +
                " instead of " + LookupName1);
        }