private void interestsUpdated(object sender, EventArgs e) { if (AgentID != client.Self.AgentID) { return; } uint wantto = ((checkBoxBuild.Checked ? 1u << 0 : 0u) | (checkBoxExplore.Checked ? 1u << 1 : 0u) | (checkBoxMeet.Checked ? 1u << 2 : 0u) | (checkBoxGroup.Checked ? 1u << 3 : 0u) | (checkBoxBuy.Checked ? 1u << 4 : 0u) | (checkBoxSell.Checked ? 1u << 5 : 0u) | (checkBoxBeHired.Checked ? 1u << 6 : 0u) | (checkBoxHire.Checked ? 1u << 7 : 0u)); uint skills = ((checkBoxTextures.Checked ? 1u << 0 : 0u) | (checkBoxArchitecture.Checked ? 1u << 1 : 0u) | (checkBoxEventPlanning.Checked ? 1u << 2 : 0u) | (checkBoxModeling.Checked ? 1u << 3 : 0u) | (checkBoxScripting.Checked ? 1u << 4 : 0u) | (checkBoxCustomCharacters.Checked ? 1u << 5 : 0u)); var interests = new Avatar.Interests { SkillsMask = skills, WantToMask = wantto, LanguagesText = txtLanguages.Text, SkillsText = txtSkills.Text, WantToText = txtWantTo.Text }; client.Self.UpdateInterests(interests); }
public void Avatars_OnAvatarInterests(LLUUID avatarID, Avatar.Interests interests) { Hashtable item = new Hashtable(); item.Add("MessageType", "AvatarInterests"); item.Add("AvatarID", avatarID); item.Add("WantToMask", interests.WantToMask); item.Add("WantToText", interests.WantToText); item.Add("SkillsMask", interests.SkillsMask); item.Add("SkillsText", interests.SkillsText); item.Add("LanguagesText", interests.LanguagesText); enqueue(item); }
void Avatars_OnAvatarInterests(LLUUID avatarID, Avatar.Interests interests) { lock (ReceivedProfileEvent) { Interests = interests; ReceivedInterests = true; if (ReceivedInterests && ReceivedProperties && ReceivedGroups) { ReceivedProfileEvent.Set(); } } }
void Avatars_AvatarInterestsReply(object sender, AvatarInterestsReplyEventArgs e) { lock (ReceivedProfileEvent) { Interests = e.Interests; ReceivedInterests = true; if (ReceivedInterests && ReceivedProperties && ReceivedGroups) { ReceivedProfileEvent.Set(); } } }
private void Avatars_AvatarInterestsReply(object sender, AvatarInterestsReplyEventArgs e) { if (e.AvatarID != targetID) { return; } lock (ReceivedProfileEvent) { Interests = e.Interests; ReceivedInterests = true; if (ReceivedInterests && ReceivedProperties && ReceivedGroups) { ReceivedProfileEvent.Set(); } } }
void Avatars_AvatarInterestsReply(object sender, AvatarInterestsReplyEventArgs e) { if (e.AvatarID != AgentID) { return; } if (InvokeRequired) { BeginInvoke(new MethodInvoker(() => Avatars_AvatarInterestsReply(sender, e))); return; } Interests = e.Interests; // want to's checkBoxBuild.Checked = (Interests.WantToMask & (1 << 0)) != 0; checkBoxExplore.Checked = (Interests.WantToMask & (1 << 1)) != 0; checkBoxMeet.Checked = (Interests.WantToMask & (1 << 2)) != 0; checkBoxGroup.Checked = (Interests.WantToMask & (1 << 3)) != 0; checkBoxBuy.Checked = (Interests.WantToMask & (1 << 4)) != 0; checkBoxSell.Checked = (Interests.WantToMask & (1 << 5)) != 0; checkBoxBeHired.Checked = (Interests.WantToMask & (1 << 6)) != 0; checkBoxHire.Checked = (Interests.WantToMask & (1 << 7)) != 0; txtWantTo.Text = Interests.WantToText; // skills checkBoxTextures.Checked = (Interests.WantToMask & (1 << 0)) != 0; checkBoxArchitecture.Checked = (Interests.WantToMask & (1 << 1)) != 0; checkBoxEventPlanning.Checked = (Interests.WantToMask & (1 << 2)) != 0; checkBoxModeling.Checked = (Interests.WantToMask & (1 << 3)) != 0; checkBoxScripting.Checked = (Interests.WantToMask & (1 << 4)) != 0; checkBoxCustomCharacters.Checked = (Interests.WantToMask & (1 << 5)) != 0; txtSkills.Text = Interests.SkillsText; txtLanguages.Text = Interests.LanguagesText; }