///<summary>Raises the DisplayNameUpdate Event</summary> /// <param name="e">A DisplayNameUpdateEventArgs object containing /// the data sent from the simulator</param> protected virtual void OnDisplayNameUpdate(DisplayNameUpdateEventArgs e) { EventHandler<DisplayNameUpdateEventArgs> handler = m_DisplayNameUpdate; if (handler != null) handler(this, e); }
void Avatars_DisplayNameUpdate(object sender, DisplayNameUpdateEventArgs e) { lock (names) { e.DisplayName.Updated = DateTime.Now; names[e.DisplayName.ID] = e.DisplayName; } Dictionary<UUID, string> ret = new Dictionary<UUID, string>(); ret.Add(e.DisplayName.ID, FormatName(e.DisplayName)); TriggerEvent(ret); }
void Avatars_DisplayNameUpdate(object sender, DisplayNameUpdateEventArgs e) { DisplayNotificationInChat(string.Format("({0}) is now known as {1}", e.DisplayName.UserName, e.DisplayName.DisplayName)); }
private void Avatar_DisplayNameUpdated(object sender, DisplayNameUpdateEventArgs e) { this.BeginInvoke(new MethodInvoker(delegate() { //string old = e.OldDisplayName; string newname = e.DisplayName.DisplayName; if (!newname.ToLower(CultureInfo.CurrentCulture).Contains("resident") && !newname.ToLower(CultureInfo.CurrentCulture).Contains(" ")) { txtDisplayName.Text = newname; button7.Enabled = false; } else { txtDisplayName.Text = string.Empty; button7.Enabled = true; } })); }