| 4 |
uses |
uses |
| 5 |
Windows, Messages, SysUtils, Classes, Controls, Forms, |
Windows, Messages, SysUtils, Classes, Controls, Forms, |
| 6 |
BoardGroup,DateUtils, |
BoardGroup,DateUtils, |
| 7 |
Setting; |
Setting, Math; |
| 8 |
|
|
| 9 |
function CategorySortProc(Item1, Item2: Pointer): integer; |
function CategorySortProc(Item1, Item2: Pointer): integer; |
| 10 |
function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer; |
function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer; |
| 73 |
var |
var |
| 74 |
ThreadItem1: TThreadItem; |
ThreadItem1: TThreadItem; |
| 75 |
ThreadItem2: TThreadItem; |
ThreadItem2: TThreadItem; |
| 76 |
|
SpanDay1, SpanDay2: Double; |
| 77 |
|
NowDateTime: TDateTime; |
| 78 |
begin |
begin |
| 79 |
ThreadItem1 := TThreadItem(List.Objects[ Item1 ]); |
ThreadItem1 := TThreadItem(List.Objects[ Item1 ]); |
| 80 |
ThreadItem2 := TThreadItem(List.Objects[ Item2 ]); |
ThreadItem2 := TThreadItem(List.Objects[ Item2 ]); |
| 107 |
gbcRoundDate: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); {gbcLastModified:} |
gbcRoundDate: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); {gbcLastModified:} |
| 108 |
gbcCreated: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate); |
gbcCreated: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate); |
| 109 |
gbcLastModified: Result := CompareDateTime(ThreadItem1.LastModified, ThreadItem2.LastModified); {gbcLastModified:} |
gbcLastModified: Result := CompareDateTime(ThreadItem1.LastModified, ThreadItem2.LastModified); {gbcLastModified:} |
| 110 |
|
gbcVigor: |
| 111 |
|
begin |
| 112 |
|
NowDateTime := Now(); |
| 113 |
|
SpanDay1 := DaySpan(NowDateTime, ThreadItem1.CreateDate); |
| 114 |
|
SpanDay2 := DaySpan(NowDateTime, ThreadItem2.CreateDate); |
| 115 |
|
if (SpanDay1 > 0) and (SpanDay2 > 0) then begin |
| 116 |
|
Result := CompareValue( |
| 117 |
|
ThreadItem1.AllResCount / SpanDay1, |
| 118 |
|
ThreadItem2.AllResCount / SpanDay2); |
| 119 |
|
end else if (SpanDay1 > 0) then begin |
| 120 |
|
Result := 1; |
| 121 |
|
end else if (SpanDay2 > 0) then begin |
| 122 |
|
Result := -1; |
| 123 |
|
end else begin |
| 124 |
|
Result := 0; |
| 125 |
|
end; |
| 126 |
|
end; |
| 127 |
else |
else |
| 128 |
Result := 0; |
Result := 0; |
| 129 |
end; |
end; |