| 3 |
interface |
interface |
| 4 |
uses |
uses |
| 5 |
Windows, Messages, SysUtils, Classes, Controls, Forms, |
Windows, Messages, SysUtils, Classes, Controls, Forms, |
| 6 |
BoardGroup; |
BoardGroup,DateUtils; |
| 7 |
|
|
| 8 |
function CategorySortProc(Item1, Item2: Pointer): integer; |
function CategorySortProc(Item1, Item2: Pointer): integer; |
| 9 |
function BoardSortProc(Item1, Item2: Pointer): integer; |
function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer; |
| 10 |
function ThreadItemSortProc(Item1, Item2: Pointer): integer; |
function ThreadItemSortProc(List: TStringList; Item1, Item2: Integer): integer; |
| 11 |
function CompareBool(Item1, Item2: Boolean): integer; |
function CompareBool(Item1, Item2: Boolean): integer; |
| 12 |
function CompareInt(Item1, Item2: Integer): Integer; |
function CompareInt(Item1, Item2: Integer): Integer; |
| 13 |
function CompareDate(Item1, Item2: TDateTime): Integer; |
function CompareDate(Item1, Item2: TDateTime): Integer; |
| 36 |
Result := Result * -1; |
Result := Result * -1; |
| 37 |
end; |
end; |
| 38 |
|
|
| 39 |
function BoardSortProc(Item1, Item2: Pointer): integer; |
function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer; |
| 40 |
var |
var |
| 41 |
BoardItem1: TBoard; |
BoardItem1: TBoard; |
| 42 |
BoardItem2: TBoard; |
BoardItem2: TBoard; |
| 43 |
begin |
begin |
| 44 |
BoardItem1 := TBoard(Item1); |
BoardItem1 := TBoard(List.Objects[Item1]); |
| 45 |
BoardItem2 := TBoard(Item2); |
BoardItem2 := TBoard(List.Objects[Item2]); |
| 46 |
if SortIndex = 0 then |
if SortIndex = 0 then |
| 47 |
if SortNoFlag then |
if SortNoFlag then |
| 48 |
Result := CompareInt(BoardItem1.No, BoardItem2.No) |
Result := CompareInt(BoardItem1.No, BoardItem2.No) |
| 57 |
Result := Result * -1; |
Result := Result * -1; |
| 58 |
end; |
end; |
| 59 |
|
|
| 60 |
function ThreadItemSortProc(Item1, Item2: Pointer): integer; |
function ThreadItemSortProc(List: TStringList; Item1, Item2: Integer): integer; |
| 61 |
var |
var |
| 62 |
ThreadItem1: TThreadItem; |
ThreadItem1: TThreadItem; |
| 63 |
ThreadItem2: TThreadItem; |
ThreadItem2: TThreadItem; |
| 64 |
begin |
begin |
| 65 |
ThreadItem1 := TThreadItem(Item1); |
ThreadItem1 := TThreadItem(List.Objects[ Item1 ]); |
| 66 |
ThreadItem2 := TThreadItem(Item2); |
ThreadItem2 := TThreadItem(List.Objects[ Item2 ]); |
| 67 |
case SortIndex of |
case SortIndex of |
| 68 |
0: |
0: |
| 69 |
begin |
begin |
| 77 |
3: Result := CompareInt(ThreadItem1.NewResCount, ThreadItem2.NewResCount); |
3: Result := CompareInt(ThreadItem1.NewResCount, ThreadItem2.NewResCount); |
| 78 |
4: Result := 0; |
4: Result := 0; |
| 79 |
5: Result := AnsiCompareText(ThreadItem1.RoundName, ThreadItem2.RoundName); |
5: Result := AnsiCompareText(ThreadItem1.RoundName, ThreadItem2.RoundName); |
| 80 |
6: Result := CompareDate(ThreadItem1.LastModified, ThreadItem2.LastModified); |
6: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); |
| 81 |
|
7: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate); |
| 82 |
else |
else |
| 83 |
Result := 0; |
Result := 0; |
| 84 |
end; |
end; |