-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormFolderE.cs
More file actions
38 lines (35 loc) · 978 Bytes
/
FormFolderE.cs
File metadata and controls
38 lines (35 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RapChessGui
{
public partial class FormFolderE : Form
{
public FormFolderE()
{
InitializeComponent();
}
private void FormFolderE_Shown(object sender, EventArgs e)
{
lvFolders.Items.Clear();
foreach (string folder in CData.folderEngine)
{
int count = FormChess.engineList.CountFolder(folder);
ListViewItem lvi = new ListViewItem(new[] {folder,count.ToString() });
lvFolders.Items.Add(lvi);
}
}
private void lvFolders_ColumnClick(object sender, ColumnClickEventArgs e)
{
ListView lv = sender as ListView;
lv.Tag = lv.Tag == null ? new Object() : null;
(sender as ListView).ListViewItemSorter = new ListViewComparer(e.Column, lv.Tag == null ? SortOrder.Ascending : SortOrder.Descending);
}
}
}