public void InitializeForumGroups(AwfulSettings.ForumGroup group) { if (this._jumpList == null) return; this._jumpList.GroupDescriptorsSource = null; this._jumpList.GroupPickerItemsSource = null; this._forumGroupData = null; this._forumGroupData = new ObservableCollection<DataDescriptor>(); if (group == AwfulSettings.ForumGroup.Alphanumeric) { this._forumGroupData.Add(new GenericGroupDescriptor<ForumData, char>(GroupByAlpha)); this._jumpList.GroupPickerItemTap += new EventHandler<GroupPickerItemTapEventArgs>(OnJumpListGroupPickerItemTap); this._jumpList.GroupPickerItemsSource = ALPHA_GROUP; } else { this._jumpList.GroupPickerItemTap -= new EventHandler<GroupPickerItemTapEventArgs>(OnJumpListGroupPickerItemTap); this._forumGroupData.Add(new GenericGroupDescriptor<ForumData, string>(GroupBySubforum)); } this._jumpList.GroupDescriptorsSource = this.ForumGroups; }
public void RefreshGroups(AwfulSettings.ForumGroup grouping) { this._jumpList.GroupDescriptorsSource = null; this._jumpList.GroupPickerItemsSource = null; this.m_groupData = new ObservableCollection<DataDescriptor>(); if (grouping == AwfulSettings.ForumGroup.Alphanumeric) { this._jumpList.GroupPickerItemTap += new EventHandler<GroupPickerItemTapEventArgs>(OnGroupItemTap); this._jumpList.GroupPickerItemsSource = this.Groups; this.m_groupData.Add(new GenericGroupDescriptor<ForumData, char>(GetForumAlphaGroup)); } else { this._jumpList.GroupPickerItemTap -= new EventHandler<GroupPickerItemTapEventArgs>(OnGroupItemTap); this.m_groupData.Add(new GenericGroupDescriptor<ForumData, string>(GetSubforumName)); } NotifyPropertyChanged("Forums"); this._jumpList.GroupDescriptorsSource = this.GroupData; }