Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/BoardGroup.pas

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

revision 1.24 by yoffy, Sun Nov 23 15:45:11 2003 UTC revision 1.25 by yoffy, Thu Nov 27 13:04:17 2003 UTC
# Line 181  type Line 181  type
181                  procedure SetUnRead(i: Integer);                  procedure SetUnRead(i: Integer);
182                  procedure SetKotehanName(s: string);                  procedure SetKotehanName(s: string);
183                  procedure SetKotehanMail(s: string);                  procedure SetKotehanMail(s: string);
184                  procedure Create; overload;                  procedure Init;
185          public          public
186                  constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;                  constructor Create( inPlugIn : TBoardPlugIn; inURL : string );
187                  destructor Destroy; override;                  destructor Destroy; override;
188    
189                  property Context: DWORD read FContext write FContext;                  property Context: DWORD read FContext write FContext;
# Line 284  type Line 284  type
284                  procedure SetKokomade(i: Integer);                  procedure SetKokomade(i: Integer);
285                  procedure SetUnRead(b: Boolean);                  procedure SetUnRead(b: Boolean);
286                  procedure SetScrollTop(i: Integer);                  procedure SetScrollTop(i: Integer);
287                  procedure Create; overload;                  procedure Init;
288          public          public
289                  constructor Create( inPlugIn : TBoardPlugIn; inURL : string ); overload;                  constructor Create( inPlugIn : TBoardPlugIn; inURL : string );
290                  destructor Destroy; override;                  destructor Destroy; override;
291    
292                  function GetDatURL: string;                  function GetDatURL: string;
# Line 453  end; Line 453  end;
453   *************************************************************************)   *************************************************************************)
454  constructor TBBS.Create(LogFolder: string);  constructor TBBS.Create(LogFolder: string);
455  begin  begin
456            inherited Create;
457          Title := BBS2CH_NAME;          Title := BBS2CH_NAME;
458          FLogFolder := LogFolder;          FLogFolder := LogFolder;
459  end;  end;
# Line 610  end;} Line 611  end;}
611  //===================  //===================
612  constructor TCategory.Create;  constructor TCategory.Create;
613  begin  begin
614            inherited;
615  end;  end;
616    
617  destructor TCategory.Destroy;  destructor TCategory.Destroy;
# Line 752  end;} Line 754  end;}
754  //===================  //===================
755  //TBoard  //TBoard
756  //===================  //===================
757  procedure TBoard.Create;  procedure TBoard.Init;
758  begin  begin
759          FNo := 0;          FNo := 0;
760          FTitle := '';          FTitle := '';
# Line 768  begin Line 770  begin
770  //      FItemNoVisible := True;  //      FItemNoVisible := True;
771    
772          FUpdate := True;          FUpdate := True;
   
         FBoardPlugIn := nil;  
773  end;  end;
774    
775  // *************************************************************************  // *************************************************************************
# Line 784  var Line 784  var
784          BBSID                   : string;          BBSID                   : string;
785  begin  begin
786    
787          Create;          inherited Create;
788            Init;
789    
790          FBoardPlugIn    := inPlugIn;          FBoardPlugIn    := inPlugIn;
791          URL                                             := inURL;          URL                                             := inURL;
# Line 1135  var Line 1136  var
1136          i: Integer;          i: Integer;
1137  begin  begin
1138          Result := 0;          Result := 0;
1139                                  if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then    if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
1140                                  begin    begin
1141                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1142                                                  if Items[i].NewArrival then        if Items[i].NewArrival then
1143                                                          inc(Result);                inc(Result);
1144                                          end;      end;
1145                                  end else begin    end else begin
1146                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1147                                                                                                  if Items[i].NewArrival then        if Items[i].NewArrival then
1148                                                                                                  begin        begin
1149                                                                                                                                  if Items[i].ShortTitle = '' then          if Items[i].ShortTitle = '' then
1150                                                                                          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);                  Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
1151                                                                                                                                  if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then          if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
1152                                                                                                                                                                  inc(Result);                inc(Result);
1153                                                                                                  end;        end;
1154                                          end;      end;
1155                                  end;    end;
1156  end;  end;
1157    
1158  function TBoard.GetLogThreadCount: Integer;  function TBoard.GetLogThreadCount: Integer;
# Line 1159  var Line 1160  var
1160          i: Integer;          i: Integer;
1161  begin  begin
1162          Result := 0;          Result := 0;
1163                                  if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then    if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
1164                                  begin    begin
1165                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1166                                                  if Items[i].IsLogFile then              if Items[i].IsLogFile then
1167                                                          inc(Result);                      inc(Result);
1168                                          end;      end;
1169                                  end else begin    end else begin
1170                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1171                                                  if Items[i].IsLogFile then        if Items[i].IsLogFile then
1172                                                                                                  begin        begin
1173                                                                                                                                  if Items[i].ShortTitle = '' then          if Items[i].ShortTitle = '' then
1174                                                                                          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);                  Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
1175                                                                                                                                  if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then          if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
1176                                                                                                                                                                  inc(Result);                  inc(Result);
1177                                                                                                  end;        end;
1178                                          end;      end;
1179                                  end;    end;
1180  end;  end;
1181    
1182  function TBoard.GetUserThreadCount: Integer;  function TBoard.GetUserThreadCount: Integer;
# Line 1183  var Line 1184  var
1184          i: Integer;          i: Integer;
1185  begin  begin
1186          Result := 0;          Result := 0;
1187                                  if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then    if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
1188                                                                  Result := Count            Result := Count
1189                                  else    else
1190          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1191                  if Items[i].ShortTitle = '' then        if Items[i].ShortTitle = '' then
1192                          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
1193                  if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then        if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then
1194                          inc(Result);          inc(Result);
1195          end;      end;
1196  end;  end;
1197    
1198  function TBoard.GetNewThread(Index: Integer): TThreadItem;  function TBoard.GetNewThread(Index: Integer): TThreadItem;
# Line 1201  var Line 1202  var
1202  begin  begin
1203          Result := nil;          Result := nil;
1204          Cnt := 0;          Cnt := 0;
1205                                  if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then    if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
1206                                  begin    begin
1207                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1208                                                  if Items[i].NewArrival then        if Items[i].NewArrival then
1209                                                                                                  begin                    begin
1210                                                          if Index = Cnt then begin          if Index = Cnt then begin
1211                                                                  Result := Items[i];            Result := Items[i];
1212                                                                  Exit;            Exit;
1213                                                          end;          end;
1214                                                          inc(Cnt);          inc(Cnt);
1215                                                  end;        end;
1216                                          end;      end;
1217                                  end else begin    end else begin
1218                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1219                                                  if Items[i].NewArrival then        if Items[i].NewArrival then
1220                                                                                                  begin        begin
1221                                                                                  if Items[i].ShortTitle = '' then          if Items[i].ShortTitle = '' then
1222                                                                                          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);            Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
1223                                                                                  if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin          if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
1224                                                                                          if Index = Cnt then begin            if Index = Cnt then begin
1225                                                                                                  Result := Items[i];              Result := Items[i];
1226                                                                                                  Exit;              Exit;
1227                                                                                          end;            end;
1228                                                                                          inc(Cnt);            inc(Cnt);
1229                                                                                                                                  end;          end;
1230                                                                                                  end;        end;
1231                                          end;      end;
1232                                  end;    end;
1233  end;  end;
1234    
1235  function TBoard.GetLogThread(Index: Integer): TThreadItem;  function TBoard.GetLogThread(Index: Integer): TThreadItem;
# Line 1236  var Line 1237  var
1237          i: Integer;          i: Integer;
1238          Cnt: Integer;          Cnt: Integer;
1239  begin  begin
1240                                  Cnt := 0;    Cnt := 0;
1241                                  if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then    if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
1242                                  begin    begin
1243                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1244                                                  if Items[i].IsLogFile then        if Items[i].IsLogFile then
1245                                                                                                  begin                    begin
1246                                                          if Index = Cnt then begin          if Index = Cnt then begin
1247                                                                  Result := Items[i];            Result := Items[i];
1248                                                                  Exit;            Exit;
1249                                                          end;          end;
1250                                                          inc(Cnt);          inc(Cnt);
1251                                                  end;        end;
1252                                          end;      end;
1253                                  end else begin    end else begin
1254                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1255                                                  if Items[i].IsLogFile then        if Items[i].IsLogFile then
1256                                                                                                  begin          begin
1257                                                                                  if Items[i].ShortTitle = '' then            if Items[i].ShortTitle = '' then
1258                                                                                          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);              Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
1259                                                                                  if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin            if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
1260                                                                                          if Index = Cnt then begin              if Index = Cnt then begin
1261                                                                                                  Result := Items[i];                Result := Items[i];
1262                                                                                                  Exit;                Exit;
1263                                                                                          end;            end;
1264                                                                                          inc(Cnt);            inc(Cnt);
1265                                                                                                                                  end;          end;
1266                                                                                                  end;        end;
1267                                          end;            end;
1268                                  end;    end;
1269                                  Result := nil;    Result := nil;
1270  end;  end;
1271    
1272  function TBoard.GetUserThread(Index: Integer): TThreadItem;  function TBoard.GetUserThread(Index: Integer): TThreadItem;
# Line 1275  var Line 1276  var
1276  begin  begin
1277          Result := nil;          Result := nil;
1278          Cnt := 0;          Cnt := 0;
1279                                  if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then    if Length( ParentCategory.ParenTBBS.ShortSelectText ) = 0 then
1280                                  begin    begin
1281                                                                  for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1282                                                                                                  if Index = Cnt then        if Index = Cnt then
1283                                                                                                  begin        begin
1284                                                                                                                                  Result := Items[ i ];          Result := Items[ i ];
1285                                                                                                                                  Exit;          Exit;
1286                                                                                                  end;        end;
1287                                                                                                  inc( Cnt );        inc( Cnt );
1288                                                                  end;      end;
1289                                  end else begin    end else begin
1290                                          for i := 0 to Count - 1 do begin      for i := 0 to Count - 1 do begin
1291                                                  if Items[i].ShortTitle = '' then        if Items[i].ShortTitle = '' then
1292                                                          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);          Items[i].ShortTitle := GikoSys.ZenToHan(Items[i].Title);
1293                                                  if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin        if AnsiPos(ParentCategory.ParenTBBS.ShortSelectText, Items[i].ShortTitle) <> 0 then begin
1294                                                          if Index = Cnt then begin          if Index = Cnt then begin
1295                                                                  Result := Items[i];            Result := Items[i];
1296                                                                  Exit;            Exit;
1297                                                          end;          end;
1298                                                          inc(Cnt);          inc(Cnt);
1299                                                  end;        end;
1300                                          end;      end;
1301                                  end;          end;
1302  end;  end;
1303    
1304  procedure TBoard.BeginUpdate;  procedure TBoard.BeginUpdate;
# Line 1321  begin Line 1322  begin
1322  end;}  end;}
1323    
1324  //constructor TThreadItem.Create(AOwner: TComponent);  //constructor TThreadItem.Create(AOwner: TComponent);
1325  procedure TThreadItem.Create;  procedure TThreadItem.Init;
1326  begin  begin
1327          FNo := 0;          FNo := 0;
1328          FFileName := '';          FFileName := '';
# Line 1359  const Line 1360  const
1360          READ_PATH                                                       = '/test/read.cgi';          READ_PATH                                                       = '/test/read.cgi';
1361  begin  begin
1362    
1363          Create;          inherited Create;
1364            Init;
1365    
1366          FBoardPlugIn    := inPlugIn;          FBoardPlugIn    := inPlugIn;
1367          URL                                             := inURL;          URL                                             := inURL;

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

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