-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFolderEntry.cs
More file actions
44 lines (38 loc) · 1.03 KB
/
FolderEntry.cs
File metadata and controls
44 lines (38 loc) · 1.03 KB
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
39
40
41
42
43
44
using System;
using System.Collections.Generic;
namespace folder_cacher_net
{
[Serializable]
public class FolderEntry
{
public FolderEntry()
{ }
public FolderEntry(string _DirectoryPath, float _Percent, UInt32 _Worker)
{
DirectoryPath = _DirectoryPath;
Percent = _Percent;
Worker = _Worker;
}
public string DirectoryPath;
public float Percent;
public UInt32 Worker;
}
[Serializable]
public class FConfig
{
public FConfig()
{
List = new List<FolderEntry>();
}
public List<FolderEntry> List;
}
public class FolderEntryComparer : IComparer<FolderEntry>
{
public int Compare(FolderEntry A, FolderEntry B)
{
if (A.DirectoryPath == null || B.DirectoryPath == null)
return ((A.DirectoryPath == null) ? 0 : 1) - ((B.DirectoryPath == null) ? 0 : 1);
return A.DirectoryPath.CompareTo(B.DirectoryPath);
}
}
}