/// <summary> /// This notification is triggered if a mugshot is updated from the server. We're /// only interested if the current user's mugshot changes. /// </summary> /// <param name="e">Event data</param> private void OnMugshotUpdated(object sender, MugshotEventArgs e) { Platform.UIThread(this, delegate { if (e.Mugshot.Username == CIX.Username) { actMugshot.Image = e.Mugshot.RealImage; } }); }
/// <summary> /// Handle mugshot change events. We pass this through to the moderator component to /// refresh any that are affected. /// </summary> private void OnMugshotUpdated(object sender, MugshotEventArgs e) { Platform.UIThread(this, delegate { if (frmCanvas.Items.Count > 1) { ProfileGroupItem moderatorsItem = (ProfileGroupItem)frmCanvas.Items[1]; moderatorsItem.Refresh(e.Mugshot.Username); } }); }
/// <summary> /// Handle a mugshot updated. If this mugshot appears in any friend profile then we update /// the friend panel shown here. /// </summary> private void OnMugshotUpdated(object sender, MugshotEventArgs e) { Platform.UIThread(this, delegate { if (Profile != null && Profile.Username == e.Mugshot.Username) { ProfileItem item = (ProfileItem)prvDetails.Items[0]; item.Image = e.Mugshot.RealImage; item.UpdateImage(); } }); }
/// <summary> /// This notification is triggered if a mugshot is updated from the server. We use this /// to refresh the images shown in the root message list. /// </summary> private void OnMugshotUpdated(object sender, MugshotEventArgs e) { Platform.UIThread(this, delegate { // Update in the thread list. foreach (InboxItem item in inboxMessagePane.Items.Cast <InboxItem>()) { InboxMessage message = item.Message; if (message.Author == e.Mugshot.Username) { item.Image = e.Mugshot.RealImage; item.Invalidate(); } } }); }
/// <summary> /// Handle mugshot change events. We pass this through to the moderator component to /// refresh any that are affected. /// </summary> private void OnMugshotUpdated(object sender, MugshotEventArgs e) { Platform.UIThread(this, () => _welcomePage.Refresh(e.Mugshot.Username)); }