示例#1
0
 public static List<TagContent> GetAllTagContents()
 {
     String response = NetworkUtility.SyncRequest("tags/all");
     Dictionary<String, Int64> dic = JsonConvert.DeserializeObject<Dictionary<string, long>>(response);
     List<TagContent> tagContents = new List<TagContent>();
     foreach (string key in dic.Keys)
     {
         TagContent tagContent = new TagContent();
         tagContent.content = key;
         tagContent.useAmount = dic[key];
         tagContents.Add(tagContent);
     }
     tagContents.Sort(delegate (TagContent a, TagContent b) { return b.useAmount.CompareTo(a.useAmount); });
     return tagContents;
 }
示例#2
0
 private void TagContentComboBox_SelectTagContent(object sender, TagContent selectTagContent)
 {
     exprsDisplayer.loadRemoteExprs(selectTagContent.content, null);
 }