コード例 #1
0
        private void UpdateCategoriesSorting()
        {
            if (Model == null)
            {
                return;
            }
            KeywordCategory category = (KeywordCategory)((ImageComboBoxItem)this.cbSelectCategories.SelectedItem).Value;

            switch (category)
            {
            case KeywordCategory.Categorized:
                this.tlCategories.ParentFieldName = "ParentId";
                this.tlcText.FieldName            = "Text";
                this.tlAddCount.SortOrder         = SortOrder.None;
                this.tlcTimeStamp.SortOrder       = SortOrder.None;
                this.tlCategories.DataSource      = Model.GetTagNodeList(TagType);
                break;

            case KeywordCategory.MostAdded:
                this.tlcText.FieldName            = "Value";
                this.tlCategories.ParentFieldName = "";
                this.tlAddCount.SortOrder         = SortOrder.Descending;
                this.tlcTimeStamp.SortOrder       = SortOrder.None;
                this.tlCategories.DataSource      = Model.GetTagList(TagType);
                break;

            case KeywordCategory.RecentlyAdded:
                this.tlcText.FieldName            = "Value";
                this.tlCategories.ParentFieldName = "";
                this.tlAddCount.SortOrder         = SortOrder.None;
                this.tlcTimeStamp.SortOrder       = SortOrder.Descending;
                this.tlCategories.DataSource      = Model.GetTagList(TagType);
                break;
            }
            this.tlCategories.ExpandAll();
        }
コード例 #2
0
 private void OnModelChaged()
 {
     TreeList.DataSource = Model.GetTagNodeList(TagType);
 }