Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/RoundData.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.19.2.1 by h677, Wed May 18 14:36:10 2005 UTC revision 1.19.2.2 by h677, Sun May 22 04:39:10 2005 UTC
# Line 38  type Line 38  type
38                  property Count[RoundType: TGikoRoundType]: Integer read GetCount;                  property Count[RoundType: TGikoRoundType]: Integer read GetCount;
39          property OldFileRead: Boolean read FOldFileRead;          property OldFileRead: Boolean read FOldFileRead;
40                  property Items[Index: integer; RoundType: TGikoRoundType]: TRoundItem read GetRoundItem;                  property Items[Index: integer; RoundType: TGikoRoundType]: TRoundItem read GetRoundItem;
41                  procedure SetRoundName(Board: TBoard; RoundName: string); overload;                  //procedure SetRoundName(Board: TBoard; RoundName: string); overload;
42                  procedure SetRoundName(ThreadItem: TThreadItem; RoundName: string); overload;                  //procedure SetRoundName(ThreadItem: TThreadItem; RoundName: string); overload;
43    
44                  procedure LoadRoundBoardFile;                  procedure LoadRoundBoardFile;
45          procedure LoadRoundThreadFile;          procedure LoadRoundThreadFile;
# Line 163  var Line 163  var
163  begin  begin
164      Result := -1;      Result := -1;
165          idx := Find(Board);          idx := Find(Board);
166          RoundNameList.Add(Board.RoundName);          //RoundNameList.Add(Board.RoundName);
167          if idx = -1 then begin          if idx = -1 then begin
168                  Item := TRoundItem.Create;                  Item := TRoundItem.Create;
169                  Item.FItem := Board;                  Item.FItem := Board;
# Line 186  var Line 186  var
186  begin  begin
187      Result := -1;      Result := -1;
188          idx := Find(ThreadItem);          idx := Find(ThreadItem);
189          RoundNameList.Add(ThreadItem.RoundName);          //RoundNameList.Add(ThreadItem.RoundName);
190          if idx = -1 then begin          if idx = -1 then begin
191                  Item := TRoundItem.Create;                  Item := TRoundItem.Create;
192                  Item.FItem := ThreadItem;                  Item.FItem := ThreadItem;
# Line 337  begin Line 337  begin
337          end;          end;
338          end;          end;
339  end;  end;
340    {
341  procedure TRoundList.SetRoundName(Board: TBoard; RoundName: string);  procedure TRoundList.SetRoundName(Board: TBoard; RoundName: string);
342  var  var
343          idx: Integer;          idx: Integer;
# Line 349  begin Line 349  begin
349                  Item.RoundName := RoundName;                  Item.RoundName := RoundName;
350          end;          end;
351  end;  end;
352    }
353    {
354  procedure TRoundList.SetRoundName(ThreadItem: TThreadItem; RoundName: string);  procedure TRoundList.SetRoundName(ThreadItem: TThreadItem; RoundName: string);
355  var  var
356          idx: Integer;          idx: Integer;
# Line 361  begin Line 362  begin
362                  Item.RoundName := RoundName;                  Item.RoundName := RoundName;
363          end;          end;
364  end;  end;
365    }
366  function TRoundList.GetCount(RoundType: TGikoRoundType): Integer;  function TRoundList.GetCount(RoundType: TGikoRoundType): Integer;
367  begin  begin
368          Result := 0;          Result := 0;
# Line 599  begin Line 600  begin
600          end;          end;
601          if( board <> nil ) then begin          if( board <> nil ) then begin
602                  if not board.Round then begin                  if not board.Round then begin
603                          board.RoundName := roundname;                          //board.RoundName := roundname;
604                            RoundNameList.Add(roundname);
605                            RoundNameList.Find(roundname, i);
606                            board.RoundName := PChar(RoundNameList[i]);
607                          board.Round := true;                          board.Round := true;
608                  end;                  end;
609                  Result := true;                  Result := true;
# Line 643  begin Line 647  begin
647          end;          end;
648          if( threadItem <> nil ) then begin          if( threadItem <> nil ) then begin
649                  if not threadItem.Round then begin                  if not threadItem.Round then begin
650                          threadItem.RoundName := roundname;                          //threadItem.RoundName := roundname;
651                            RoundNameList.Add(roundname);
652                            RoundNameList.Find(roundname, i);
653                            threadItem.RoundName := PChar(RoundNameList[i]);
654                          threadItem.Round := True;                          threadItem.Round := True;
655                  end;                  end;
656                  Result := true;                  Result := true;
# Line 685  begin Line 692  begin
692          end;          end;
693          if( board <> nil ) then begin          if( board <> nil ) then begin
694                  if not board.Round then begin                  if not board.Round then begin
695                          board.RoundName := roundname;                          //board.RoundName := roundname;
696                            RoundNameList.Add(roundname);
697                            RoundNameList.Find(roundname, i);
698                            board.RoundName := PChar(RoundNameList[i]);
699                          board.Round := true;                          board.Round := true;
700                  end;                  end;
701                  Result := true;                  Result := true;
# Line 702  function TRoundList.ParseOldRoundThreadL Line 712  function TRoundList.ParseOldRoundThreadL
712          buf: string;          buf: string;
713          board: TBoard;          board: TBoard;
714          threadItem: TThreadItem;          threadItem: TThreadItem;
715      bbsID: string;          bbsID: string;
716  begin  begin
717  //      Result := TRoundItem.Create;  //      Result := TRoundItem.Create;
718  //      Result.RoundType := grtItem;  //      Result.RoundType := grtItem;
719          threadItem := nil;          threadItem := nil;
720          for i := 0 to 4 do begin          for i := 0 to 4 do begin
721          s := GikoSys.GetTokenIndex(Line, #1, i);                  s := GikoSys.GetTokenIndex(Line, #1, i);
722          try                  try
723                  case i of                          case i of
724                  0: bbsID := s;                                  0: bbsID := s;
725                                  //1: Result.BoardTitle := s;                                  //1: Result.BoardTitle := s;
726                                  2:                                  2:
727                                  begin                                  begin
# Line 735  begin Line 745  begin
745          end;          end;
746          if( threadItem <> nil ) then begin          if( threadItem <> nil ) then begin
747                  if not threadItem.Round then begin                  if not threadItem.Round then begin
748                          threadItem.RoundName := roundname;                          //threadItem.RoundName := roundname;
749                            RoundNameList.Add(roundname);
750                            RoundNameList.Find(roundname, i);
751                            threadItem.RoundName := PChar(RoundNameList[i]);
752                          threadItem.Round := true;                          threadItem.Round := true;
753                  end;                  end;
754                  Result := true;                  Result := true;

Legend:
Removed from v.1.19.2.1  
changed lines
  Added in v.1.19.2.2

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26