当前位置: 首页>>代码示例>>C#>>正文


C# LLUUID.ToStringHyphenated方法代码示例

本文整理汇总了C#中libsecondlife.LLUUID.ToStringHyphenated方法的典型用法代码示例。如果您正苦于以下问题:C# LLUUID.ToStringHyphenated方法的具体用法?C# LLUUID.ToStringHyphenated怎么用?C# LLUUID.ToStringHyphenated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libsecondlife.LLUUID的用法示例。


在下文中一共展示了LLUUID.ToStringHyphenated方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public override string Execute(string[] args, LLUUID fromAgentID)
        {
            if (args.Length != 1)
                return Description;

            LLUUID targetID;
            ReceivedProperties = false;
            ReceivedInterests = false;

            try
            {
                targetID = new LLUUID(args[0]);
            }
            catch (Exception)
            {
                return Description;
            }

            Client.Avatars.RequestAvatarProperties(targetID);

            ReceivedProfileEvent.Reset();
            ReceivedProfileEvent.WaitOne(5000, false);

            if (!ReceivedInterests || !ReceivedProperties)
                return "Failed to retrieve a complete profile for that UUID";

            Client.Self.ProfileInterests = Interests;
            Client.Self.ProfileProperties = Properties;
            Client.Self.SetAvatarInformation();

            return "Synchronized our profile to the profile of " + targetID.ToStringHyphenated();
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:32,代码来源:CloneProfileCommand.cs

示例2: Main

        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", "[email protected]"))
            {
                // 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();
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:33,代码来源:key2name.cs

示例3: Main

        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",
                "[email protected]");
            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();
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:29,代码来源:Program.cs

示例4: Avatars_OnEffect

 private void Avatars_OnEffect(MainAvatar.EffectType type, LLUUID sourceID, LLUUID targetID, 
     LLVector3d targetPos, float duration, LLUUID id)
 {
     if (ShowEffects)
         Console.WriteLine(
         "ViewerEffect [{0}]: SourceID: {1} TargetID: {2} TargetPos: {3} Duration: {4} ID: {5}",
         type, sourceID.ToStringHyphenated(), targetID.ToStringHyphenated(), targetPos, duration,
         id.ToStringHyphenated());
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:9,代码来源:ShowEffectsCommand.cs

示例5: Avatars_OnLookAt

 private void Avatars_OnLookAt(LLUUID sourceID, LLUUID targetID, LLVector3d targetPos, 
     MainAvatar.LookAtType lookType, float duration, LLUUID id)
 {
     if (ShowEffects)
         Console.WriteLine(
         "ViewerEffect [LookAt]: SourceID: {0} TargetID: {1} TargetPos: {2} Type: {3} Duration: {4} ID: {5}",
         sourceID.ToStringHyphenated(), targetID.ToStringHyphenated(), targetPos, lookType, duration,
         id.ToStringHyphenated());
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:9,代码来源:ShowEffectsCommand.cs

示例6: KickUser

        /// <summary>
        /// 
        /// </summary>
        /// <param name="prey"></param>
        public void KickUser(LLUUID prey)
        {
            EstateOwnerMessagePacket estate = new EstateOwnerMessagePacket();
            estate.AgentData.AgentID = Client.Network.AgentID;
            estate.AgentData.SessionID = Client.Network.SessionID;
            estate.MethodData.Invoice = LLUUID.GenerateUUID();
            estate.MethodData.Method = Helpers.StringToField("kick");
            estate.ParamList = new EstateOwnerMessagePacket.ParamListBlock[2];
            estate.ParamList[0].Parameter = Helpers.StringToField(Client.Network.AgentID.ToStringHyphenated());
            estate.ParamList[1].Parameter = Helpers.StringToField(prey.ToStringHyphenated());

            Client.Network.SendPacket((Packet)estate);
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:17,代码来源:EstateTools.cs

示例7: Execute

        public override string Execute(string[] args, LLUUID fromAgentID)
        {
            if (args.Length != 1)
                return Description;

            LLUUID targetID;
            ReceivedProperties = false;
            ReceivedInterests = false;
            ReceivedGroups = false;

            try
            {
                targetID = new LLUUID(args[0]);
            }
            catch (Exception)
            {
                return Description;
            }

            // Request all of the packets that make up an avatar profile
            Client.Avatars.RequestAvatarProperties(targetID);

            // Wait for all the packets to arrive
            ReceivedProfileEvent.Reset();
            ReceivedProfileEvent.WaitOne(5000, false);

            // Check if everything showed up
            if (!ReceivedInterests || !ReceivedProperties || !ReceivedGroups)
                return "Failed to retrieve a complete profile for that UUID";

            // Synchronize our profile
            Client.Self.UpdateInterests(Interests);
            Client.Self.UpdateProfile(Properties);

            // TODO: Leave all the groups we're currently a member of? This could
            // break TestClient connectivity that might be relying on group authentication

            // Attempt to join all the groups
            foreach (LLUUID groupID in Groups)
            {
                Client.Groups.RequestJoinGroup(groupID);
            }

            return "Synchronized our profile to the profile of " + targetID.ToStringHyphenated();
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:45,代码来源:CloneProfileCommand.cs

示例8: LLUUIDs

        public void LLUUIDs()
        {
            // Creation
            LLUUID a = new LLUUID();
            byte[] bytes = a.GetBytes();
            for (int i = 0; i < 16; i++)
                Assert.IsTrue(bytes[i] == 0x00);

            // Comparison
            a = new LLUUID(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
                0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0xFF, 0xFF }, 0);
            LLUUID b = new LLUUID(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
                0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, 0);

            Assert.IsTrue(a == b, "LLUUID comparison operator failed, " + a.ToString() + " should equal " + 
                b.ToString());

            // From string
            a = new LLUUID(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
                0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, 0);
            string zeroonetwo = "00010203-0405-0607-0809-0a0b0c0d0e0f";
            b = new LLUUID(zeroonetwo);

            Assert.IsTrue(a == b, "LLUUID hyphenated string constructor failed, should have " + a.ToString() + 
                " but we got " + b.ToString());

            // ToString()
            string one = a.ToString();
            string two = b.ToString();
            Assert.IsTrue(a == b);
            one = a.ToStringHyphenated();
            two = b.ToStringHyphenated();
            Assert.IsTrue(a == b);
            Assert.IsTrue(a == zeroonetwo);

            // TODO: CRC test
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:37,代码来源:TypeTests.cs

示例9: NewImageRetrievedCallBack

        private void NewImageRetrievedCallBack( LLUUID ImageID, byte[] data, bool wasCached, string statusMsg )
        {
            if (wasCached)
            {
                Console.WriteLine("Cache ( " + data.Length + "): " + ImageID);
            }
            else
            {
                if (data == null)
                {
                    Console.WriteLine("Image Data is null (" + statusMsg + "): " + ImageID);
                }
                else
                {
                    Console.WriteLine("Finished ( " + data.Length + "): " + ImageID);

                    String filename = Path.Combine(OutputDirectory, ImageID.ToStringHyphenated()) + ".tif";

                    TiffJob tj = new TiffJob(filename, data);
                    Thread t = new Thread(tj.RunMe);
                    t.Start();
                }
            }
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:24,代码来源:IA_TestAsyncImage.cs

示例10: CachedImage

        private byte[] CachedImage(LLUUID ImageID)
        {
            switch (CacheType)
            {
                case CacheTypes.Memory:
                    if (CacheTable.ContainsKey(ImageID))
                    {
                        return CacheTable[ImageID];
                    }
                    else
                    {
                        return null;
                    }
                case CacheTypes.Disk:
                    String filepath = Path.Combine(CacheDirectory, ImageID.ToStringHyphenated());
                    if (File.Exists(filepath))
                    {
                        return File.ReadAllBytes(filepath);
                    }
                    else
                    {
                        return null;
                    }

                default:
                    return null;
            }
        }
开发者ID:BackupTheBerlios,项目名称:libsecondlife-svn,代码行数:28,代码来源:ImageManager.cs

示例11: UpdateNodeFor

        /// <summary>
        /// By using the bracket operator on this class, the program can get the 
        /// InventoryObject designated by the specified uuid. If the value for the corresponding
        /// UUID is null, the call is equivelant to a call to <code>RemoveNodeFor(this[uuid])</code>.
        /// If the value is non-null, it is equivelant to a call to <code>UpdateNodeFor(value)</code>,
        /// the uuid parameter is ignored.
        /// </summary>
        /// <param name="uuid">The UUID of the InventoryObject to get or set, ignored if set to non-null value.</param>
        /// <returns>The InventoryObject corresponding to <code>uuid</code>.</returns>
        public InventoryBase this[LLUUID uuid]
        {
            get
            {
                InventoryNode node = Items[uuid];
                return node.Data;
            }
            set
            {
                if (value != null)
                {
                    // Log a warning if there is a UUID mismatch, this will cause problems
                    if (value.UUID != uuid)
                        Client.Log("Inventory[uuid]: uuid " + uuid.ToStringHyphenated() + " is not equal to value.UUID " +
                            value.UUID.ToStringHyphenated(), Helpers.LogLevel.Warning);

                    UpdateNodeFor(value);
                }
                else
                {
                    InventoryNode node;
                    if (Items.TryGetValue(uuid, out node))
                    {
                        RemoveNodeFor(node.Data);
                    }
                }
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:37,代码来源:Inventory.cs

示例12: TeleportHomeUser

 /// <summary>
 /// Send an avatar back to their home location
 /// </summary>
 /// <param name="pest">Key of avatar to send home</param>
 public void TeleportHomeUser(LLUUID pest)
 {
     List<string> listParams = new List<string>();
     listParams.Add(Client.Network.AgentID.ToStringHyphenated());
     listParams.Add(pest.ToStringHyphenated());
     EstateOwnerMessage("teleporthomeuser", listParams);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:11,代码来源:EstateTools.cs

示例13: UnbanUser

 /// <summary>Unban an avatar from an estate</summary>
 public void UnbanUser(LLUUID userID)
 {
     List<string> listParams = new List<string>();
     listParams.Add(Client.Network.AgentID.ToStringHyphenated());
     listParams.Add(EstateAccessDelta.UnbanUser.ToString());
     listParams.Add(userID.ToStringHyphenated());
     EstateOwnerMessage("estateaccessdelta", listParams);
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:9,代码来源:EstateTools.cs

示例14: KickUser

        /// <summary>
        /// Kick an avatar from an estate
        /// </summary>
        /// <param name="prey">Key of Avatar to kick</param>
		public void KickUser(LLUUID userID) 
		{
            EstateOwnerMessage("kickestate", userID.ToStringHyphenated());
		}
开发者ID:RavenB,项目名称:gridsearch,代码行数:8,代码来源:EstateTools.cs

示例15: Groups_OnGroupJoined

        void Groups_OnGroupJoined(LLUUID groupID, bool success)
        {
            Console.WriteLine(Client.ToString() + (success ? " joined " : " failed to join ") +
                groupID.ToStringHyphenated());

            if (success)
            {
                Console.WriteLine(Client.ToString() + " setting " + groupID.ToStringHyphenated() +
                    " as the active group");
                Client.Groups.ActivateGroup(groupID);
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:12,代码来源:CloneProfileCommand.cs


注:本文中的libsecondlife.LLUUID.ToStringHyphenated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。