/// <summary> /// Called when details of a forum are refreshed from the server. This may be the title /// or description. /// </summary> private void OnFolderUpdated(object sender, FolderEventArgs e) { Platform.UIThread(this, delegate { // Handle changes to the topic name or description if (e.Folder == _currentFolder.Folder && frmCanvas.Items.Count > 0) { ForumPage forumFolderItem = (ForumPage)frmCanvas.Items[0]; forumFolderItem.InvalidateItem(); } }); }
/// <summary> /// Event invoked when a forum's details are refreshed from the server. /// </summary> private void OnDirForumUpdated(object sender, DirForum forum) { if (forum == null || forum.Name != _currentFolder.Name) { return; } Platform.UIThread(this, delegate { _thisForum = forum; if (frmCanvas.Items.Count > 0) { ForumPage forumFolderItem = (ForumPage)frmCanvas.Items[0]; forumFolderItem.Forum = _thisForum; forumFolderItem.InvalidateItem(); } }); }
/// <summary> /// Update the list of moderators /// </summary> private void OnModeratorsUpdated(object sender, DirForum forum) { Platform.UIThread(this, delegate { if (forum == _thisForum && frmCanvas.Items.Count > 1) { ForumPage forumFolderItem = (ForumPage)frmCanvas.Items[0]; forumFolderItem.Forum = _thisForum; forumFolderItem.InvalidateItem(); ProfileGroupItem moderatorsItem = (ProfileGroupItem)frmCanvas.Items[1]; moderatorsItem.Items = new StringCollection(); if (_thisForum != null) { moderatorsItem.Items.AddRange(_thisForum.Moderators()); } moderatorsItem.InvalidateItem(); } }); }