OSDN Git Service

スレ立て日のカラムの追加
authorh677 <h677>
Tue, 2 Mar 2004 14:54:29 +0000 (14:54 +0000)
committerh677 <h677>
Tue, 2 Mar 2004 14:54:29 +0000 (14:54 +0000)
BoardGroup.pas
Giko.pas
Setting.pas
Sort.pas

index 1b098ca..d9bed19 100644 (file)
@@ -4,7 +4,7 @@ interface
 
 uses
        Windows, SysUtils, Classes, ComCtrls, IniFiles, {HTTPApp,} YofUtils, IdGlobal,
-       ExternalBoardManager, ExternalBoardPlugInMain;
+       ExternalBoardManager, ExternalBoardPlugInMain, StrUtils, DateUtils;
 
 type
        //\83\8a\83X\83g\82Ì\95\\8e¦\83A\83C\83e\83\80\91I\91ð
@@ -286,6 +286,7 @@ type
                procedure SetUnRead(b: Boolean);
                procedure SetScrollTop(i: Integer);
                procedure Init;
+        function GetCreateDate: TDateTime;
        public
                constructor Create( inPlugIn : TBoardPlugIn; inURL : string );
                destructor Destroy; override;
@@ -326,7 +327,7 @@ type
                property DownloadHost: string read FDownloadHost write FDownloadHost;
                property AgeSage: TGikoAgeSage read FAgeSage write FAgeSage;
 //             property SPID: string read FSPID write FSPID;
-
+        property CreateDate: TDateTime read GetCreateDate;
                property        URL                                     : string                                read FURL write FURL;
                property        BoardPlugIn     : TBoardPlugIn  read FBoardPlugIn;
                property        FilePath                : string                                read FFilePath write FFilePath;
@@ -1706,5 +1707,21 @@ end;
 finalization
        if BBS2ch <> nil then
                BBS2ch.Free;}
+function TThreadItem.GetCreateDate: TDateTime; 
+var
+       unixtime: Int64;
+begin
+       // \83t\83@\83C\83\8b\96¼\82©\82ç\83X\83\8c\8dì\90¬\93ú\8e\9e\82ð\8b\81\82ß\82é
+    try
+               // \83\8d\83O\83t\83@\83C\83\8b\82Ì\8ag\92£\8eq\82ð\82Í\82¸\82µ\82½\82à\82Ì\82ª\83X\83\8c\8dì\90¬\93ú\8e\9e
+               unixtime := StrToInt(ChangeFileExt(FFileName, ''));
+               if ( unixtime < 900000000 ) then
+               unixtime := unixtime + 1000000000; // 2001\94N\96â\91è\89ñ\94ð
+               Result := UnixToDateTime(unixtime) + OffsetFromUTC;
+       except
+               on E: Exception do
+                       Result := ZERO_DATE;
+       end;
+end;
 end.
 
index 0b9826c..1d8cbc2 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -2027,12 +2027,12 @@ end;
 
 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
 const
-       COLUMN: array[0..6] of string = ('\83X\83\8c\83b\83h\96¼', '\83J\83E\83\93\83g', '\8eæ\93¾', '\90V\92\85',
-                                                                                                                                        '\96¢\93Ç', '\8f\84\89ñ\97\\96ñ', '\8eæ\93¾\93ú\8e\9e');
-       COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
+       COLUMN: array[0..7] of string = ('\83X\83\8c\83b\83h\96¼', '\83J\83E\83\93\83g', '\8eæ\93¾', '\90V\92\85',
+                                                                                                                                        '\96¢\93Ç', '\8f\84\89ñ\97\\96ñ', '\8eæ\93¾\93ú\8e\9e', '\83X\83\8c\8dì\90¬\93ú\8e\9e');
+       COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
                                                                                                                                                                                                 taRightJustify, taRightJustify,
                                                                                                                                                                                                 taRightJustify, taLeftJustify,
-                                                                                                                                                                                                taLeftJustify);
+                                                                                                                                                                                                taLeftJustify, taLeftJustify);
        //No, \83X\83\8c\83b\83h\96¼, \83J\83E\83\93\83g, \8f\84\89ñ\97\\96ñ, \8eæ\93¾\93ú\8e\9e
 var
        ListColumn: TListColumn;
@@ -2247,7 +2247,7 @@ begin
                RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
                //RepStr := StringReplace(RepStr, '\81\97\81M', ',', [rfReplaceAll]);
 
-               if Item.SubItems.Count <> 6 then begin
+               if Item.SubItems.Count <> 7 then begin
                        Item.SubItems.Clear;
                        Item.SubItems.Add('');
                        Item.SubItems.Add('');
@@ -2255,6 +2255,7 @@ begin
                        Item.SubItems.Add('');
                        Item.SubItems.Add('');
                        Item.SubItems.Add('');
+            Item.SubItems.Add('');
                end;
 
                if ListNumberVisibleAction.Checked then
@@ -2288,6 +2289,11 @@ begin
                                Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
                        if ThreadItem.NewArrival then
                                Item.ImageIndex := ITEM_ICON_THREADNEW1;
+            if ThreadItem.CreateDate = ZERO_DATE then begin
+                               Item.SubItems[6] := '';
+                       end else
+                               Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+
                end else begin
                        Item.ImageIndex := ITEM_ICON_THREAD1;
                        Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
index 41200e6..a32f2f0 100644 (file)
@@ -201,7 +201,7 @@ type
                //\83\8a\83X\83g\83J\83\89\83\80\83w\83b\83_\81[\83T\83C\83Y
                FBBSColumnWidth: array[0..0] of Integer;
                FCategoryColumnWidth: array[0..3] of Integer;
-               FBoardColumnWidth: array[0..6] of Integer;
+               FBoardColumnWidth: array[0..7] of Integer;
 
                //\8di\8d\9e\82Ý\95\8e\9a\97ñ
                FSelectTextList: TStringList;
index 1bad2ef..944e0c3 100644 (file)
--- a/Sort.pas
+++ b/Sort.pas
@@ -78,6 +78,7 @@ begin
                4: Result := 0;
                5: Result := AnsiCompareText(ThreadItem1.RoundName, ThreadItem2.RoundName);
                6: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate);
+        7: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate);
     else
        Result := 0;
        end;