OSDN Git Service

TBoard、TThreadItemのRoundNameプロパティをPCharに変更
authorh677 <h677>
Sun, 22 May 2005 04:39:11 +0000 (04:39 +0000)
committerh677 <h677>
Sun, 22 May 2005 04:39:11 +0000 (04:39 +0000)
BoardGroup.pas
ExternalBoardItem.pas
ExternalThreadItem.pas
Giko.pas
RoundData.pas
gikoNavi.res

index 3307288..c0128b4 100644 (file)
@@ -101,7 +101,8 @@ type
                FBBSID: string;                                                         //BBSID
                FURL: string;                                                                   //\83{\81[\83hURL
                FRound: Boolean;                                                        //\83X\83\8c\83b\83h\88ê\97\97\8f\84\89ñ\97\\96ñ
-               FRoundName: string;                                             //\8f\84\89ñ\96¼
+               //FRoundName: string;                                           //\8f\84\89ñ\96¼
+               FRoundName: PChar;                                              //\8f\84\89ñ\96¼
                FRoundDate: TDateTime;                          //\83X\83\8c\83b\83h\88ê\97\97\82ð\8eæ\93¾\82µ\82½\93ú\8e\9e\81i\8f\84\89ñ\93ú\8e\9e\81j
                FLastModified: TDateTime;                       //\83X\83\8c\83b\83h\88ê\97\97\82ª\8dX\90V\82³\82ê\82Ä\82¢\82é\93ú\8e\9e\81i\83T\81[\83o\91¤\93ú\8e\9e\81j
                FLastGetTime: TDateTime;                        //\83X\83\8c\83b\83h\82Ü\82½\82Í\83X\83\8c\83b\83h\88ê\97\97\82ð\8dÅ\8cã\82É\8dX\90V\82µ\82½\93ú\8e\9e\81i\83T\81[\83o\91¤\93ú\8e\9e\81E\8f\91\82«\8d\9e\82Ý\8e\9e\82É\8eg\97p\82·\82é\81j
@@ -138,7 +139,8 @@ type
                function GetThreadItem(index: integer): TThreadItem;
                procedure SetThreadItem(index: integer; value: TThreadItem);
                procedure SetRound(b: Boolean);
-               procedure SetRoundName(s: string);
+               //procedure SetRoundName(s: string);
+               procedure SetRoundName(s: PChar);
                procedure SetLastModified(d: TDateTime);
                procedure SetLastGetTime(d: TDateTime);
                procedure SetUnRead(i: Integer);
@@ -157,7 +159,7 @@ type
                property BBSID: string read FBBSID write FBBSID;
                property URL: string read FURL write FURL;
                property Round: Boolean read FRound write SetRound;
-               property RoundName: string read FRoundName write SetRoundName;
+               property RoundName: PChar read FRoundName write SetRoundName;
                property RoundDate: TDateTime read FRoundDate write FRoundDate;
                property LastModified: TDateTime read FLastModified write SetLastModified;
                property LastGetTime: TDateTime read FLastGetTime write SetLastGetTime;
@@ -237,7 +239,8 @@ type
                FNewResCount: Integer;          //\83X\83\8c\83b\83h\90V\92\85\90\94
                FSize: Integer;                                         //\83X\83\8c\83b\83h\83T\83C\83Y
                FRound: Boolean;                                        //\8f\84\89ñ\83t\83\89\83O
-               FRoundName: string;                             //\8f\84\89ñ\96¼
+               //FRoundName: string;                           //\8f\84\89ñ\96¼
+               FRoundName: PChar;                              //\8f\84\89ñ\96¼
                FIsLogFile: Boolean;                    //\83\8d\83O\91\8dÝ\83t\83\89\83O
                FParentBoard: TBoard;                   //\90e\83{\81[\83h
                FKokomade: Integer;                             //\83R\83R\82Ü\82Å\93Ç\82ñ\82¾\94Ô\8d\86
@@ -257,7 +260,8 @@ type
 
                procedure SetLastModified(d: TDateTime);
                procedure SetRound(b: Boolean);
-               procedure SetRoundName(const s: string);
+               //procedure SetRoundName(const s: string);
+               procedure SetRoundName(const s: PChar);
                procedure SetKokomade(i: Integer);
                procedure SetUnRead(b: Boolean);
                procedure SetScrollTop(i: Integer);
@@ -294,7 +298,8 @@ type
                property NewResCount: Integer read FNewResCount write FNewResCount;
                property Size: Integer read FSize write FSize;
                property Round: Boolean read FRound write SetRound;
-               property RoundName: string read FRoundName write SetRoundName;
+               //property RoundName: string read FRoundName write SetRoundName;
+               property RoundName: PChar read FRoundName write SetRoundName;
 
                property IsLogFile: Boolean read FIsLogFile write FIsLogFile;
                property ParentBoard: TBoard read FParentBoard write FParentBoard;
@@ -1243,7 +1248,7 @@ begin
        if FUpdate then
                FModified := True;
 end;
-
+{
 procedure TBoard.SetRoundName(s: string);
 begin
        if FRoundName = s then Exit;
@@ -1251,6 +1256,14 @@ begin
        if FUpdate then
                FModified := True;
 end;
+}
+procedure TBoard.SetRoundName(s: PChar);
+begin
+       if FRoundName = s then Exit;
+       FRoundName := s;
+       if FUpdate then
+               FModified := True;
+end;
 
 procedure TBoard.SetLastModified(d: TDateTime);
 begin
@@ -1822,7 +1835,7 @@ begin
        if FUpdate and (ParentBoard <> nil) then
                ParentBoard.FModified := True;
 end;
-
+{
 procedure TThreadItem.SetRoundName(const s: string);
 begin
        if FRoundName = s then Exit;
@@ -1830,7 +1843,14 @@ begin
        if FUpdate and (ParentBoard <> nil) then
                ParentBoard.FModified := True;
 end;
-
+}
+procedure TThreadItem.SetRoundName(const s: PChar);
+begin
+       if FRoundName = s then Exit;
+       FRoundName := s;
+       if FUpdate and (ParentBoard <> nil) then
+               ParentBoard.FModified := True;
+end;
 procedure TThreadItem.SetKokomade(i: Integer);
 begin
        if FKokomade = i then Exit;
index 28a35f5..c59ace9 100644 (file)
@@ -149,7 +149,8 @@ begin
                bipRound:                                                               // : Boolean            // \8f\84\89ñ\83t\83\89\83O
                        boardItem.Round                         := Boolean( param );
                bipRoundName:                                           // : string                     // \8f\84\89ñ\96¼
-                       boardItem.RoundName             := string( PChar( param ) );
+                       //boardItem.RoundName           := string( PChar( param ) );
+                       boardItem.RoundName             := PChar( param );
                bipIsLogFile:                                           // : Boolean            // \83\8d\83O\91\8dÝ\83t\83\89\83O
                        boardItem.IsLogFile             := Boolean( param );
                bipUnRead:                                                      // : Integer            // \83X\83\8c\83b\83h\96¢\93Ç\90\94
index c3edf89..3318608 100644 (file)
@@ -206,7 +206,8 @@ begin
                tipRound:                                                               // : Boolean            // \8f\84\89ñ\83t\83\89\83O
                        threadItem.Round                                := Boolean( param );
                tipRoundName:                                           // : string                     // \8f\84\89ñ\96¼
-                       threadItem.RoundName            := string( PChar( param ) );
+                       //threadItem.RoundName          := string( PChar( param ) );
+                       threadItem.RoundName            := PChar( param );
                tipIsLogFile:                                           // : Boolean            // \83\8d\83O\91\8dÝ\83t\83\89\83O
                        threadItem.IsLogFile            := Boolean( param );
                tipKokomade:                                            // : Integer            // \83R\83R\82Ü\82Å\93Ç\82ñ\82¾\94Ô\8d\86
index ba2b2a9..240ce70 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -6960,22 +6960,26 @@ begin
 end;
 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
 var
-    threadItem : TThreadItem;
+       threadItem : TThreadItem;
+       i: Integer;
 begin
-    if ParentName <> 'dummy1' then begin
-       SetSelectItemRound(RoundFlag, RoundName);
-    end else begin
-       threadItem := GetActiveContent;
+       if ParentName <> 'dummy1' then begin
+               SetSelectItemRound(RoundFlag, RoundName);
+       end else begin
+               threadItem := GetActiveContent;
                if threadItem <> nil then begin
-                       threadItem.RoundName := RoundName;
+//                     threadItem.RoundName := RoundName;
+                       RoundList.RoundNameList.Add(RoundName);
+                       RoundList.RoundNameList.Find(RoundName, i);
+                       threadItem.RoundName := PChar(RoundList.RoundNameList[i]);
                        threadItem.Round := RoundFlag;
-        end;
-    end;
+               end;
+       end;
 end;
 
 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
 var
-       i: Integer;
+       i, idx: Integer;
        List: TList;
 begin
        List := TList.Create;
@@ -6983,11 +6987,17 @@ begin
                SelectListItem(List);
                for i := 0 to List.Count - 1 do begin
                        if TObject(List[i]) is TBoard then begin
-                               TBoard(List[i]).RoundName := RoundName;
+                               //TBoard(List[i]).RoundName := RoundName;
+                               RoundList.RoundNameList.Add(RoundName);
+                               RoundList.RoundNameList.Find(RoundName, idx);
+                               TBoard(List[i]).RoundName := PChar(RoundList.RoundNameList[idx]);
                                TBoard(List[i]).Round := RoundFlag;
                        end else if TObject(List[i]) is TThreadItem then begin
                                if TThreadItem(List[i]).IsLogFile then begin
-                                       TThreadItem(List[i]).RoundName := RoundName;
+                                       //TThreadItem(List[i]).RoundName := RoundName;
+                                       RoundList.RoundNameList.Add(RoundName);
+                                       RoundList.RoundNameList.Find(RoundName, idx);
+                                       TThreadItem(List[i]).RoundName := PChar(RoundList.RoundNameList[idx]);
                                        TThreadItem(List[i]).Round := RoundFlag;
                                end;
                        end;
index 87ba985..0269f86 100644 (file)
@@ -38,8 +38,8 @@ type
                property Count[RoundType: TGikoRoundType]: Integer read GetCount;
         property OldFileRead: Boolean read FOldFileRead;
                property Items[Index: integer; RoundType: TGikoRoundType]: TRoundItem read GetRoundItem;
-               procedure SetRoundName(Board: TBoard; RoundName: string); overload;
-               procedure SetRoundName(ThreadItem: TThreadItem; RoundName: string); overload;
+               //procedure SetRoundName(Board: TBoard; RoundName: string); overload;
+               //procedure SetRoundName(ThreadItem: TThreadItem; RoundName: string); overload;
 
                procedure LoadRoundBoardFile;
         procedure LoadRoundThreadFile;
@@ -163,7 +163,7 @@ var
 begin
     Result := -1;
        idx := Find(Board);
-       RoundNameList.Add(Board.RoundName);
+       //RoundNameList.Add(Board.RoundName);
        if idx = -1 then begin
                Item := TRoundItem.Create;
                Item.FItem := Board;
@@ -186,7 +186,7 @@ var
 begin
     Result := -1;
        idx := Find(ThreadItem);
-       RoundNameList.Add(ThreadItem.RoundName);
+       //RoundNameList.Add(ThreadItem.RoundName);
        if idx = -1 then begin
                Item := TRoundItem.Create;
                Item.FItem := ThreadItem;
@@ -337,7 +337,7 @@ begin
         end;
        end;
 end;
-
+{
 procedure TRoundList.SetRoundName(Board: TBoard; RoundName: string);
 var
        idx: Integer;
@@ -349,7 +349,8 @@ begin
                Item.RoundName := RoundName;
        end;
 end;
-
+}
+{
 procedure TRoundList.SetRoundName(ThreadItem: TThreadItem; RoundName: string);
 var
        idx: Integer;
@@ -361,7 +362,7 @@ begin
                Item.RoundName := RoundName;
        end;
 end;
-
+}
 function TRoundList.GetCount(RoundType: TGikoRoundType): Integer;
 begin
        Result := 0;
@@ -599,7 +600,10 @@ begin
        end;
        if( board <> nil ) then begin
                if not board.Round then begin
-                       board.RoundName := roundname;
+                       //board.RoundName := roundname;
+                       RoundNameList.Add(roundname);
+                       RoundNameList.Find(roundname, i);
+                       board.RoundName := PChar(RoundNameList[i]);
                        board.Round := true;
                end;
                Result := true;
@@ -643,7 +647,10 @@ begin
        end;
        if( threadItem <> nil ) then begin
                if not threadItem.Round then begin
-                       threadItem.RoundName := roundname;
+                       //threadItem.RoundName := roundname;
+                       RoundNameList.Add(roundname);
+                       RoundNameList.Find(roundname, i);
+                       threadItem.RoundName := PChar(RoundNameList[i]);
                        threadItem.Round := True;
                end;
                Result := true;
@@ -685,7 +692,10 @@ begin
        end;
        if( board <> nil ) then begin
                if not board.Round then begin
-                       board.RoundName := roundname;
+                       //board.RoundName := roundname;
+                       RoundNameList.Add(roundname);
+                       RoundNameList.Find(roundname, i);
+                       board.RoundName := PChar(RoundNameList[i]);
                        board.Round := true;
                end;
                Result := true;
@@ -702,16 +712,16 @@ function TRoundList.ParseOldRoundThreadLine(Line: string): Boolean;
        buf: string;
        board: TBoard;
        threadItem: TThreadItem;
-    bbsID: string;
+       bbsID: string;
 begin
 //     Result := TRoundItem.Create;
 //     Result.RoundType := grtItem;
        threadItem := nil;
        for i := 0 to 4 do begin
-       s := GikoSys.GetTokenIndex(Line, #1, i);
-        try
-               case i of
-               0: bbsID := s;
+               s := GikoSys.GetTokenIndex(Line, #1, i);
+               try
+                       case i of
+                               0: bbsID := s;
                                //1: Result.BoardTitle := s;
                                2:
                                begin
@@ -735,7 +745,10 @@ begin
        end;
        if( threadItem <> nil ) then begin
                if not threadItem.Round then begin
-                       threadItem.RoundName := roundname;
+                       //threadItem.RoundName := roundname;
+                       RoundNameList.Add(roundname);
+                       RoundNameList.Find(roundname, i);
+                       threadItem.RoundName := PChar(RoundNameList[i]);
                        threadItem.Round := true;
                end;
                Result := true;
index 321c4f6..1073ce0 100644 (file)
Binary files a/gikoNavi.res and b/gikoNavi.res differ