예제 #1
0
파일: MainX.cs 프로젝트: KBrizzle/DankWire
 private void lv_vdata_ColumnClick(object sender, ColumnClickEventArgs e)
 {
     Sort sort = new Sort(lv_vdata, IDsVideo, OrderVideo);
     if (e.Column == 0) sort.sortBy(Sort.Column.Relevance, Sort.OrderDir.Desc);
     if (e.Column == 1) sort.sortBy(Sort.Column.Views, Sort.OrderDir.Asc);
     if (e.Column == 2) sort.sortBy(Sort.Column.Length, Sort.OrderDir.Asc);
     OrderVideo.Clear();
     OrderVideo.AddRange(sort.NewOrder);
     IDsVideo.Clear();
     IDsVideo.AddRange(sort.NewIDs);
 }
예제 #2
0
파일: MainX.cs 프로젝트: KBrizzle/DankWire
 private void lv_sdata_ColumnClick(object sender, ColumnClickEventArgs e)
 {
     if (lv_sdata.Items.Count > 0 && lv_sdata.Items[0].Text != "Calculating...")
     {
         Sort sort = new Sort(lv_sdata, IDsRecommended, OrderRecommended);
         if (e.Column == 0) sort.sortBy(Sort.Column.Relevance, Sort.OrderDir.Desc);
         if (e.Column == 1) sort.sortBy(Sort.Column.Views, Sort.OrderDir.Asc);
         if (e.Column == 2) sort.sortBy(Sort.Column.Length, Sort.OrderDir.Asc);
         OrderRecommended.Clear();
         OrderRecommended.AddRange(sort.NewOrder);
         IDsRecommended.Clear();
         IDsRecommended.AddRange(sort.NewIDs);
     }
 }
예제 #3
0
파일: MainX.cs 프로젝트: KBrizzle/DankWire
 private void lv_pvdata_ColumnClick(object sender, ColumnClickEventArgs e)
 {
     lv_pvdata.Items.RemoveAt(0);
     IDsPlaylistVideo.RemoveAt(0);
     Sort sort = new Sort(lv_pvdata, IDsPlaylistVideo, OrderPlaylistVideo);
     if (e.Column == 0) sort.sortBy(Sort.Column.Relevance, Sort.OrderDir.Desc);
     if (e.Column == 1) sort.sortBy(Sort.Column.Views, Sort.OrderDir.Asc);
     if (e.Column == 2) sort.sortBy(Sort.Column.Length, Sort.OrderDir.Asc);
     OrderPlaylistVideo.Clear();
     OrderPlaylistVideo.AddRange(sort.NewOrder);
     IDsPlaylistVideo.Clear();
     IDsPlaylistVideo.AddRange(sort.NewIDs);
     IDsPlaylistVideo.Insert(0, "");
     ListViewItem item = new ListViewItem("All Videos");
     item.SubItems.Add("");
     item.SubItems.Add("");
     lv_pvdata.Items.Insert(0, item);
 }
예제 #4
0
파일: MainX.cs 프로젝트: KBrizzle/DankWire
 private void lv_rdata_ColumnClick(object sender, ColumnClickEventArgs e)
 {
     if (lv_rdata.Items.Count > 0)
     {
         Sort sort = new Sort(lv_rdata, IDsRecent, OrderRecent);
         if (e.Column == 0) sort.sortBy(Sort.Column.Relevance, Sort.OrderDir.Desc);
         if (e.Column == 1) sort.sortBy(Sort.Column.Views, Sort.OrderDir.Asc);
         if (e.Column == 2) sort.sortBy(Sort.Column.Length, Sort.OrderDir.Asc);
         OrderRecent.Clear();
         OrderRecent.AddRange(sort.NewOrder);
         IDsRecent.Clear();
         IDsRecent.AddRange(sort.NewIDs);
     }
 }