#region public methods
/// <summary>
+ /// Gets legacy First Last name
+ /// </summary>
+ /// <param name="agentID">UUID of the agent</param>
+ /// <returns></returns>
+ public string GetLegacyName(UUID agentID)
+ {
+ if (agentID == UUID.Zero) return "(???) (???)";
+
+ lock (names)
+ {
+ if (names.ContainsKey(agentID))
+ {
+ return names[agentID].LegacyFullName;
+ }
+ }
+
+ QueueNameRequest(agentID);
+ return RadegastInstance.INCOMPLETE_NAME;
+ }
+
+ /// <summary>
/// Get avatar display name, or queue fetching of the name
/// </summary>
/// <param name="agentID">UUID of avatar to lookup</param>
void CleanupHandlers(object sender, EventArgs e)
{
- instance.Names.NameUpdated -= new EventHandler<UUIDNameReplyEventArgs>(Names_NameUpdated);
+ if (instance != null && instance.Names != null)
+ {
+ instance.Names.NameUpdated -= new EventHandler<UUIDNameReplyEventArgs>(Names_NameUpdated);
+ }
}
void Names_NameUpdated(object sender, UUIDNameReplyEventArgs e)
this.ctxEject = new System.Windows.Forms.ToolStripMenuItem();
this.ctxBan = new System.Windows.Forms.ToolStripMenuItem();
this.ctxEstateEject = new System.Windows.Forms.ToolStripMenuItem();
+ this.muteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tbtnStartIM = new System.Windows.Forms.ToolStripButton();
this.tbtnProfile = new System.Windows.Forms.ToolStripButton();
this.ctxTeleportTo,
this.ctxEject,
this.ctxBan,
- this.ctxEstateEject});
+ this.ctxEstateEject,
+ this.muteToolStripMenuItem});
this.avatarContext.Name = "avatarContext";
- this.avatarContext.Size = new System.Drawing.Size(163, 334);
+ this.avatarContext.Size = new System.Drawing.Size(163, 378);
this.avatarContext.Opening += new System.ComponentModel.CancelEventHandler(this.avatarContext_Opening);
//
// ctxProfile
this.ctxEstateEject.ToolTipText = " Eject from estate ";
this.ctxEstateEject.Click += new System.EventHandler(this.ctxEstateEject_Click);
//
+ // muteToolStripMenuItem
+ //
+ this.muteToolStripMenuItem.Name = "muteToolStripMenuItem";
+ this.muteToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
+ this.muteToolStripMenuItem.Text = "Mute";
+ this.muteToolStripMenuItem.ToolTipText = " Mute ";
+ this.muteToolStripMenuItem.Click += new System.EventHandler(this.muteToolStripMenuItem_Click);
+ //
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Right;
private ToolStripMenuItem ctxEject;
private ToolStripMenuItem ctxBan;
private ToolStripMenuItem ctxEstateEject;
+ private ToolStripMenuItem muteToolStripMenuItem;
}
}
ctxPoint.Enabled = true;
ctxPoint.Text = "Unpoint";
}
+
+ bool isMuted = null != client.Self.MuteList.Find(me => me.Type == MuteType.Resident && me.ID == (UUID)lvwObjects.SelectedItems[0].Tag);
+ if (isMuted)
+ {
+ muteToolStripMenuItem.Text = "Unmute";
+ }
+ else
+ {
+ muteToolStripMenuItem.Text = "Mute";
+ }
+
instance.ContextActionManager.AddContributions(
avatarContext, typeof(Avatar), lvwObjects.SelectedItems[0]);
}
UUID av = (UUID)lvwObjects.SelectedItems[0].Tag;
client.Estate.KickUser(av);
}
+
+ private void muteToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (lvwObjects.SelectedItems.Count != 1) return;
+
+ var agentID = (UUID)lvwObjects.SelectedItems[0].Tag;
+ if (agentID == client.Self.AgentID) return;
+
+ if (muteToolStripMenuItem.Text == "Mute")
+ {
+ client.Self.UpdateMuteListEntry(MuteType.Resident, agentID, instance.Names.GetLegacyName(agentID));
+ }
+ else
+ {
+ client.Self.RemoveMuteListEntry(agentID, instance.Names.GetLegacyName(agentID));
+ }
+ }
}
public class SorterClass : System.Collections.IComparer
<data name="tbtnTextures.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
- YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
+ YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9\r
HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN\r
rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K\r
<data name="tbtnAttach.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
- YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
+ YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9\r
HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN\r
rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K\r
<data name="tbtnMaster.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
- YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
+ YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9\r
HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN\r
rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K\r
<data name="tbtnAnim.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
- YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
+ YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9\r
HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN\r
rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ObjectsConsole));
this.gbxInworld = new System.Windows.Forms.GroupBox();
this.btnContents = new System.Windows.Forms.Button();
+ this.btnMute = new System.Windows.Forms.Button();
this.btnTake = new System.Windows.Forms.Button();
this.btnWalkTo = new System.Windows.Forms.Button();
this.btnTurnTo = new System.Windows.Forms.Button();
this.cbOwnerCopy = new System.Windows.Forms.CheckBox();
this.cbOwnerModify = new System.Windows.Forms.CheckBox();
this.txtPrims = new System.Windows.Forms.TextBox();
- this.txtCreator = new Radegast.AgentNameTextBox();
this.txtOwner = new Radegast.AgentNameTextBox();
this.txtHover = new System.Windows.Forms.TextBox();
this.txtDescription = new System.Windows.Forms.TextBox();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.ctxMenuObjects = new Radegast.RadegastContextMenuStrip(this.components);
this.ctxopen = new Radegast.RadegastContextMenuStrip(this.components);
+ this.txtCreator = new Radegast.AgentNameTextBox();
this.gbxInworld.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudRadius)).BeginInit();
this.groupBox1.SuspendLayout();
this.gbxInworld.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.gbxInworld.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.gbxInworld.Controls.Add(this.btnContents);
+ this.gbxInworld.Controls.Add(this.btnMute);
this.gbxInworld.Controls.Add(this.btnTake);
this.gbxInworld.Controls.Add(this.btnWalkTo);
this.gbxInworld.Controls.Add(this.btnTurnTo);
this.btnContents.Location = new System.Drawing.Point(172, 107);
this.btnContents.Name = "btnContents";
this.btnContents.Size = new System.Drawing.Size(75, 23);
- this.btnContents.TabIndex = 15;
+ this.btnContents.TabIndex = 16;
this.btnContents.Text = "Contents";
this.btnContents.UseVisualStyleBackColor = true;
this.btnContents.Click += new System.EventHandler(this.btnContents_Click);
//
+ // btnMute
+ //
+ this.btnMute.Location = new System.Drawing.Point(87, 107);
+ this.btnMute.Name = "btnMute";
+ this.btnMute.Size = new System.Drawing.Size(77, 23);
+ this.btnMute.TabIndex = 15;
+ this.btnMute.Text = "Mute";
+ this.btnMute.UseVisualStyleBackColor = true;
+ this.btnMute.Click += new System.EventHandler(this.btnMute_Click);
+ //
// btnTake
//
this.btnTake.Location = new System.Drawing.Point(6, 107);
this.txtPrims.Size = new System.Drawing.Size(54, 21);
this.txtPrims.TabIndex = 55;
//
- // txtCreator
- //
- this.txtCreator.BackColor = System.Drawing.SystemColors.Window;
- this.txtCreator.Location = new System.Drawing.Point(61, 116);
- this.txtCreator.Name = "txtCreator";
- this.txtCreator.ReadOnly = true;
- this.txtCreator.Size = new System.Drawing.Size(130, 21);
- this.txtCreator.TabIndex = 54;
- //
// txtOwner
//
+ this.txtOwner.AgentID = ((OpenMetaverse.UUID)(resources.GetObject("txtOwner.AgentID")));
this.txtOwner.BackColor = System.Drawing.SystemColors.Window;
this.txtOwner.Location = new System.Drawing.Point(61, 91);
this.txtOwner.Name = "txtOwner";
this.ctxopen.Name = "ctxMenuObjects";
this.ctxopen.Size = new System.Drawing.Size(61, 4);
//
+ // txtCreator
+ //
+ this.txtCreator.AgentID = ((OpenMetaverse.UUID)(resources.GetObject("txtCreator.AgentID")));
+ this.txtCreator.BackColor = System.Drawing.SystemColors.Window;
+ this.txtCreator.Location = new System.Drawing.Point(61, 116);
+ this.txtCreator.Name = "txtCreator";
+ this.txtCreator.ReadOnly = true;
+ this.txtCreator.Size = new System.Drawing.Size(130, 21);
+ this.txtCreator.TabIndex = 54;
+ //
// ObjectsConsole
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
public System.Windows.Forms.TextBox txtObjectName;
public System.Windows.Forms.TextBox txtHover;
public System.Windows.Forms.Label label2;
- public AgentNameTextBox txtCreator;
public AgentNameTextBox txtOwner;
public System.Windows.Forms.Label label5;
public System.Windows.Forms.Label label4;
public System.Windows.Forms.ColumnHeader invName;
private RadegastContextMenuStrip ctxContents;
private System.Windows.Forms.Button btnOpen;
+ public System.Windows.Forms.Button btnMute;
+ public AgentNameTextBox txtCreator;
}
}
\ No newline at end of file
client.Objects.KillObject += new EventHandler<KillObjectEventArgs>(Objects_KillObject);
client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties);
client.Network.SimChanged += new EventHandler<SimChangedEventArgs>(Network_SimChanged);
+ client.Self.MuteListUpdated += new EventHandler<EventArgs>(Self_MuteListUpdated);
instance.Names.NameUpdated += new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);
instance.State.OnWalkStateCanged += new StateManager.WalkStateCanged(State_OnWalkStateCanged);
}
client.Objects.KillObject -= new EventHandler<KillObjectEventArgs>(Objects_KillObject);
client.Objects.ObjectProperties -= new EventHandler<ObjectPropertiesEventArgs>(Objects_ObjectProperties);
client.Network.SimChanged -= new EventHandler<SimChangedEventArgs>(Network_SimChanged);
+ client.Self.MuteListUpdated -= new EventHandler<EventArgs>(Self_MuteListUpdated);
instance.Names.NameUpdated -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_UUIDNameReply);
instance.State.OnWalkStateCanged -= new StateManager.WalkStateCanged(State_OnWalkStateCanged);
}
{
UpdateObjectContents();
}
+
+ UpdateMuteButton();
}
void Netcom_ClientDisconnected(object sender, DisconnectedEventArgs e)
ctxMenuObjects.Items.Add("Delete", null, btnDelete_Click);
ctxMenuObjects.Items.Add("Return", null, btnReturn_Click);
+ if (currentPrim.Properties != null)
+ {
+ bool isMuted = null != client.Self.MuteList.Find(me => me.Type == MuteType.Object && me.ID == currentPrim.ID);
+
+ if (isMuted)
+ {
+ ctxMenuObjects.Items.Add("Unmute", null, (a, b) =>
+ {
+ client.Self.RemoveMuteListEntry(currentPrim.ID, currentPrim.Properties.Name);
+ });
+ }
+ else
+ {
+ ctxMenuObjects.Items.Add("Mute", null, (a, b) =>
+ {
+ client.Self.UpdateMuteListEntry(MuteType.Object, currentPrim.ID, currentPrim.Properties.Name);
+ });
+ }
+ }
+
//if (currentPrim.MediaURL != null && currentPrim.MediaURL.StartsWith("x-mv:"))
//{
// ctxMenuObjects.Items.Add("Test", null, (object menuSender, EventArgs menuE) =>
// return;
//}
}
+
+ void Self_MuteListUpdated(object sender, EventArgs e)
+ {
+ if (lstPrims.SelectedItems.Count != 1) return;
+
+ if (InvokeRequired)
+ {
+ if (!instance.MonoRuntime || IsHandleCreated)
+ {
+ BeginInvoke(new MethodInvoker(() => Self_MuteListUpdated(sender, e)));
+ }
+ return;
+ }
+
+ UpdateMuteButton();
+ }
+
+ void UpdateMuteButton()
+ {
+ bool isMuted = null != client.Self.MuteList.Find(me => me.Type == MuteType.Object && me.ID == currentPrim.ID);
+
+ if (isMuted)
+ {
+ btnMute.Text = "Unmute";
+ }
+ else
+ {
+ btnMute.Text = "Mute";
+ }
+ }
+
+ private void btnMute_Click(object sender, EventArgs e)
+ {
+ if (lstPrims.SelectedItems.Count != 1) return;
+
+ if (currentPrim.Properties == null) return;
+
+ if (btnMute.Text == "Mute")
+ {
+ client.Self.UpdateMuteListEntry(MuteType.Object, currentPrim.ID, currentPrim.Properties.Name);
+ }
+ else
+ {
+ client.Self.RemoveMuteListEntry(currentPrim.ID, currentPrim.Properties.Name);
+ }
+ }
}
public class ObjectSorter : IComparer
<resheader name="writer">\r
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
</resheader>\r
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
- <data name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing">\r
+ <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>157, 17</value>\r
+ </metadata>\r
+ <data name="txtCreator.AgentID" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>\r
+ AAEAAAD/////AQAAAAAAAAAMAgAAAElPcGVuTWV0YXZlcnNlVHlwZXMsIFZlcnNpb249MC4wLjAuMCwg\r
+ Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAST3Blbk1ldGF2ZXJzZS5VVUlE\r
+ AQAAAARHdWlkAwtTeXN0ZW0uR3VpZAIAAAAE/f///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2ICX2MCX2QC\r
+ X2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICAAAAAAAAAAAAAAAAAAAAAAs=\r
+</value>\r
</data>\r
- <data name="ctxContents.TrayLocation" type="System.Drawing.Point, System.Drawing">\r
- <value>362, 17</value>\r
+ <data name="txtOwner.AgentID" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>\r
+ AAEAAAD/////AQAAAAAAAAAMAgAAAElPcGVuTWV0YXZlcnNlVHlwZXMsIFZlcnNpb249MC4wLjAuMCwg\r
+ Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAST3Blbk1ldGF2ZXJzZS5VVUlE\r
+ AQAAAARHdWlkAwtTeXN0ZW0uR3VpZAIAAAAE/f///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2ICX2MCX2QC\r
+ X2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICAAAAAAAAAAAAAAAAAAAAAAs=\r
+</value>\r
</data>\r
- <data name="ctxMenuObjects.TrayLocation" type="System.Drawing.Point, System.Drawing">\r
+ <metadata name="ctxContents.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>362, 17</value>\r
+ </metadata>\r
+ <metadata name="ctxMenuObjects.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>17, 17</value>\r
- </data>\r
- <data name="ctxopen.TrayLocation" type="System.Drawing.Point, System.Drawing">\r
+ </metadata>\r
+ <metadata name="ctxopen.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>267, 17</value>\r
- </data>\r
+ </metadata>\r
</root>
\ No newline at end of file
break;
case InstantMessageDialog.InventoryOffered:
+ instance.MainForm.AddNotification(new ntfInventoryOffer(instance, e.IM));
+ break;
+
case InstantMessageDialog.TaskInventoryOffered:
+ // Is the object muted by name?
+ if (null != client.Self.MuteList.Find(me => me.Type == MuteType.ByName && me.Name == e.IM.FromAgentName)) break;
+
instance.MainForm.AddNotification(new ntfInventoryOffer(instance, e.IM));
break;
}
this.label7 = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
+ this.btnMute = new System.Windows.Forms.Button();
+ this.btnUnmute = new System.Windows.Forms.Button();
this.tabProfile.SuspendLayout();
this.tpgProfile.SuspendLayout();
this.tpgWeb.SuspendLayout();
this.tabProfile.Location = new System.Drawing.Point(12, 12);
this.tabProfile.Name = "tabProfile";
this.tabProfile.SelectedIndex = 0;
- this.tabProfile.Size = new System.Drawing.Size(468, 483);
+ this.tabProfile.Size = new System.Drawing.Size(468, 502);
this.tabProfile.TabIndex = 0;
this.tabProfile.SelectedIndexChanged += new System.EventHandler(this.tabProfile_SelectedIndexChanged);
//
this.tpgProfile.Controls.Add(this.btnFriend);
this.tpgProfile.Controls.Add(this.slPicPanel);
this.tpgProfile.Controls.Add(this.btnOfferTeleport);
+ this.tpgProfile.Controls.Add(this.btnUnmute);
+ this.tpgProfile.Controls.Add(this.btnMute);
this.tpgProfile.Controls.Add(this.btnPay);
this.tpgProfile.Controls.Add(this.rtbAccountInfo);
this.tpgProfile.Controls.Add(this.rtbAbout);
this.tpgProfile.Location = new System.Drawing.Point(4, 22);
this.tpgProfile.Name = "tpgProfile";
this.tpgProfile.Padding = new System.Windows.Forms.Padding(3);
- this.tpgProfile.Size = new System.Drawing.Size(460, 457);
+ this.tpgProfile.Size = new System.Drawing.Size(460, 476);
this.tpgProfile.TabIndex = 0;
this.tpgProfile.Text = "Profile";
this.tpgProfile.UseVisualStyleBackColor = true;
//
this.btnGive.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnGive.Enabled = false;
- this.btnGive.Location = new System.Drawing.Point(347, 428);
+ this.btnGive.Location = new System.Drawing.Point(312, 418);
this.btnGive.Name = "btnGive";
- this.btnGive.Size = new System.Drawing.Size(107, 23);
+ this.btnGive.Size = new System.Drawing.Size(96, 23);
this.btnGive.TabIndex = 24;
this.btnGive.Text = "&Give Inventory";
this.btnGive.UseVisualStyleBackColor = true;
this.lvwGroups.MultiSelect = false;
this.lvwGroups.Name = "lvwGroups";
this.lvwGroups.ShowGroups = false;
- this.lvwGroups.Size = new System.Drawing.Size(445, 82);
+ this.lvwGroups.Size = new System.Drawing.Size(445, 78);
this.lvwGroups.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.lvwGroups.TabIndex = 5;
this.lvwGroups.UseCompatibleStateImageBehavior = false;
// txtFullName
//
this.txtFullName.AccessibleName = "Name";
+ this.txtFullName.AgentID = ((OpenMetaverse.UUID)(resources.GetObject("txtFullName.AgentID")));
this.txtFullName.Location = new System.Drawing.Point(50, 6);
this.txtFullName.Name = "txtFullName";
this.txtFullName.ReadOnly = true;
// anPartner
//
this.anPartner.AccessibleName = "Partner";
+ this.anPartner.AgentID = ((OpenMetaverse.UUID)(resources.GetObject("anPartner.AgentID")));
this.anPartner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.anPartner.Location = new System.Drawing.Point(306, 34);
this.anPartner.Name = "anPartner";
// btnIM
//
this.btnIM.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnIM.Location = new System.Drawing.Point(269, 427);
+ this.btnIM.Location = new System.Drawing.Point(108, 418);
this.btnIM.Name = "btnIM";
- this.btnIM.Size = new System.Drawing.Size(72, 23);
- this.btnIM.TabIndex = 23;
+ this.btnIM.Size = new System.Drawing.Size(96, 23);
+ this.btnIM.TabIndex = 22;
this.btnIM.Text = "Start IM";
this.btnIM.UseVisualStyleBackColor = true;
this.btnIM.Click += new System.EventHandler(this.btnIM_Click);
// btnFriend
//
this.btnFriend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnFriend.Location = new System.Drawing.Point(179, 427);
+ this.btnFriend.Location = new System.Drawing.Point(210, 418);
this.btnFriend.Name = "btnFriend";
- this.btnFriend.Size = new System.Drawing.Size(84, 23);
- this.btnFriend.TabIndex = 22;
+ this.btnFriend.Size = new System.Drawing.Size(96, 23);
+ this.btnFriend.TabIndex = 23;
this.btnFriend.Text = "Add Friend";
this.btnFriend.UseVisualStyleBackColor = true;
this.btnFriend.Click += new System.EventHandler(this.btnFriend_Click);
// btnOfferTeleport
//
this.btnOfferTeleport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnOfferTeleport.Location = new System.Drawing.Point(6, 427);
+ this.btnOfferTeleport.Location = new System.Drawing.Point(6, 418);
this.btnOfferTeleport.Name = "btnOfferTeleport";
this.btnOfferTeleport.Size = new System.Drawing.Size(96, 23);
this.btnOfferTeleport.TabIndex = 20;
// btnPay
//
this.btnPay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnPay.Location = new System.Drawing.Point(108, 427);
+ this.btnPay.Location = new System.Drawing.Point(6, 447);
this.btnPay.Name = "btnPay";
- this.btnPay.Size = new System.Drawing.Size(65, 23);
- this.btnPay.TabIndex = 21;
+ this.btnPay.Size = new System.Drawing.Size(96, 23);
+ this.btnPay.TabIndex = 25;
this.btnPay.Text = "Pay...";
this.btnPay.UseVisualStyleBackColor = true;
this.btnPay.Click += new System.EventHandler(this.btnPay_Click);
this.rtbAbout.AccessibleName = "Profile details";
this.rtbAbout.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.rtbAbout.Location = new System.Drawing.Point(6, 300);
+ this.rtbAbout.Location = new System.Drawing.Point(6, 296);
this.rtbAbout.Name = "rtbAbout";
this.rtbAbout.ReadOnly = true;
- this.rtbAbout.Size = new System.Drawing.Size(448, 121);
+ this.rtbAbout.Size = new System.Drawing.Size(448, 116);
this.rtbAbout.TabIndex = 0;
this.rtbAbout.Text = "";
this.rtbAbout.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtbAbout_LinkClicked);
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(6, 284);
+ this.label4.Location = new System.Drawing.Point(6, 280);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(40, 13);
this.label4.TabIndex = 8;
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnClose.Location = new System.Drawing.Point(405, 501);
+ this.btnClose.Location = new System.Drawing.Point(405, 520);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 25;
this.textBox1.AllowDrop = true;
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox1.BackColor = System.Drawing.SystemColors.Info;
- this.textBox1.Location = new System.Drawing.Point(18, 503);
+ this.textBox1.Location = new System.Drawing.Point(18, 522);
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(360, 21);
this.textBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.textBox1_DragDrop);
this.textBox1.DragEnter += new System.Windows.Forms.DragEventHandler(this.textBox1_DragEnter);
//
+ // btnMute
+ //
+ this.btnMute.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.btnMute.Location = new System.Drawing.Point(108, 447);
+ this.btnMute.Name = "btnMute";
+ this.btnMute.Size = new System.Drawing.Size(96, 23);
+ this.btnMute.TabIndex = 26;
+ this.btnMute.Text = "Mute";
+ this.btnMute.UseVisualStyleBackColor = true;
+ this.btnMute.Click += new System.EventHandler(this.btnMute_Click);
+ //
+ // btnUnmute
+ //
+ this.btnUnmute.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.btnUnmute.Location = new System.Drawing.Point(210, 447);
+ this.btnUnmute.Name = "btnUnmute";
+ this.btnUnmute.Size = new System.Drawing.Size(96, 23);
+ this.btnUnmute.TabIndex = 27;
+ this.btnUnmute.Text = "Unmute";
+ this.btnUnmute.UseVisualStyleBackColor = true;
+ this.btnUnmute.Click += new System.EventHandler(this.btnUnmute_Click);
+ //
// frmProfile
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(492, 536);
+ this.ClientSize = new System.Drawing.Size(492, 555);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.tabProfile);
public System.Windows.Forms.Button btnGive;
private System.Windows.Forms.Button btnDeletePick;
private System.Windows.Forms.Button btnNewPick;
+ public System.Windows.Forms.Button btnUnmute;
+ public System.Windows.Forms.Button btnMute;
}
}
\ No newline at end of file
client.Avatars.PickInfoReply += new EventHandler<PickInfoReplyEventArgs>(Avatars_PickInfoReply);
client.Parcels.ParcelInfoReply += new EventHandler<ParcelInfoReplyEventArgs>(Parcels_ParcelInfoReply);
client.Avatars.AvatarGroupsReply += new EventHandler<AvatarGroupsReplyEventArgs>(Avatars_AvatarGroupsReply);
+ client.Self.MuteListUpdated += new EventHandler<EventArgs>(Self_MuteListUpdated);
netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(netcom_ClientDisconnected);
instance.InventoryClipboardUpdated += new EventHandler<EventArgs>(instance_InventoryClipboardUpdated);
InitializeProfile();
client.Avatars.PickInfoReply -= new EventHandler<PickInfoReplyEventArgs>(Avatars_PickInfoReply);
client.Parcels.ParcelInfoReply -= new EventHandler<ParcelInfoReplyEventArgs>(Parcels_ParcelInfoReply);
client.Avatars.AvatarGroupsReply -= new EventHandler<AvatarGroupsReplyEventArgs>(Avatars_AvatarGroupsReply);
+ client.Self.MuteListUpdated -= new EventHandler<EventArgs>(Self_MuteListUpdated);
netcom.ClientDisconnected -= new EventHandler<DisconnectedEventArgs>(netcom_ClientDisconnected);
instance.InventoryClipboardUpdated -= new EventHandler<EventArgs>(instance_InventoryClipboardUpdated);
}
+ void Self_MuteListUpdated(object sender, EventArgs e)
+ {
+ if (InvokeRequired)
+ {
+ if (!instance.MonoRuntime || IsHandleCreated)
+ {
+ BeginInvoke(new MethodInvoker(() => Self_MuteListUpdated(sender, e)));
+ }
+ return;
+ }
+
+ UpdateMuteButton();
+ }
+
+ void UpdateMuteButton()
+ {
+ bool isMuted = client.Self.MuteList.Find(me => (me.Type == MuteType.Resident && me.ID == agentID)) != null;
+
+ if (isMuted)
+ {
+ btnMute.Enabled = false;
+ btnUnmute.Enabled = true;
+ }
+ else
+ {
+ btnMute.Enabled = true;
+ btnUnmute.Enabled = false;
+ }
+ }
+
void instance_InventoryClipboardUpdated(object sender, EventArgs e)
{
btnGive.Enabled = instance.InventoryClipboard != null;
btnOfferTeleport.Enabled = btnPay.Enabled = (agentID != client.Self.AgentID);
client.Avatars.RequestAvatarProperties(agentID);
+ UpdateMuteButton();
+
+ if (agentID == client.Self.AgentID)
+ {
+ btnGive.Visible =
+ btnIM.Visible =
+ btnMute.Visible =
+ btnUnmute.Visible =
+ btnOfferTeleport.Visible =
+ btnPay.Visible =
+ btnFriend.Visible =
+ false;
+ }
}
private void btnClose_Click(object sender, EventArgs e)
client.Avatars.RequestAvatarPicks(agentID);
});
}
+
+ private void btnMute_Click(object sender, EventArgs e)
+ {
+ client.Self.UpdateMuteListEntry(MuteType.Resident, agentID, instance.Names.GetLegacyName(agentID));
+ }
+
+ private void btnUnmute_Click(object sender, EventArgs e)
+ {
+ MuteEntry me = client.Self.MuteList.Find(mle => mle.Type == MuteType.Resident && mle.ID == agentID);
+
+ if (me != null)
+ {
+ client.Self.RemoveMuteListEntry(me.ID, me.Name);
+ }
+ else
+ {
+ client.Self.RemoveMuteListEntry(agentID, instance.Names.GetLegacyName(agentID));
+ }
+ }
}
}
\ No newline at end of file
<resheader name="writer">\r
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
</resheader>\r
+ <data name="txtFullName.AgentID" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>\r
+ AAEAAAD/////AQAAAAAAAAAMAgAAAElPcGVuTWV0YXZlcnNlVHlwZXMsIFZlcnNpb249MC4wLjAuMCwg\r
+ Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAST3Blbk1ldGF2ZXJzZS5VVUlE\r
+ AQAAAARHdWlkAwtTeXN0ZW0uR3VpZAIAAAAE/f///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2ICX2MCX2QC\r
+ X2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICAAAAAAAAAAAAAAAAAAAAAAs=\r
+</value>\r
+ </data>\r
+ <data name="anPartner.AgentID" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>\r
+ AAEAAAD/////AQAAAAAAAAAMAgAAAElPcGVuTWV0YXZlcnNlVHlwZXMsIFZlcnNpb249MC4wLjAuMCwg\r
+ Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAST3Blbk1ldGF2ZXJzZS5VVUlE\r
+ AQAAAARHdWlkAwtTeXN0ZW0uR3VpZAIAAAAE/f///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2ICX2MCX2QC\r
+ X2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICAAAAAAAAAAAAAAAAAAAAAAs=\r
+</value>\r
+ </data>\r
<metadata name="tbpPicks.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">\r
<value>True</value>\r
</metadata>\r