Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/Giko.pas

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

revision 1.170 by h677, Wed Dec 3 14:00:21 2003 UTC revision 1.171 by h677, Thu Dec 4 11:51:04 2003 UTC
# Line 6585  var Line 6585  var
6585          Res: TResRec;          Res: TResRec;
6586          Header: string;          Header: string;
6587          Body: string;          Body: string;
6588        boardPlugIn : TBoardPlugIn;
6589  begin  begin
6590          try          try
6591                  if StNum > ToNum then begin                  if StNum > ToNum then begin
# Line 6602  begin Line 6603  begin
6603                                  if ThreadItem <> nil then                                  if ThreadItem <> nil then
6604                                          FHint.Title := ThreadItem.Title;                                          FHint.Title := ThreadItem.Title;
6605    
6606                  for i := StNum to ToNum do begin          if ThreadItem <> nil then begin
6607                          Line := i;              if ThreadItem.IsBoardPlugInAvailable then begin
6608                          FileName := ThreadItem.FilePath;                  //===== プラグインによる表示
6609                          tmp := GikoSys.ReadThreadFile(FileName, Line);                  boardPlugIn             := ThreadItem.BoardPlugIn;
6610    
6611                          if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin                  // フォントやサイズの設定
6612                                  Res := GikoSys.DivideStrLine(tmp);                  // 文字コードはプラグインに任せる
6613                    for i := StNum to ToNum do begin
6614                                  Header := IntToStr(Line) + ' 名前: ' + Res.FName + ' 投稿日: ' + Res.FDateTime;                      Line := i;
6615                                  Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);                      //ここで2ちゃんねるのdatの形式で1行読み込めれば・・・。
6616                                  Body := CustomStringReplace(Body, '<br>', #10,true);                      tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
6617                                  Body := CustomStringReplace(Body, '</a>', '',true);                      if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
6618                                  Body := GikoSys.DeleteLink(Body);                          Res := GikoSys.DivideStrLine(tmp);
6619                                  Body := CustomStringReplace(Body, '&lt;', '<');  
6620                                  Body := CustomStringReplace(Body, '&gt;', '>');                          Header := IntToStr(Line) + ' 名前: ' + Res.FName + ' 投稿日: ' + Res.FDateTime;
6621                                  Body := CustomStringReplace(Body, '&quot;', '"');  
6622                                  Body := CustomStringReplace(Body, '&amp;', '&');                          Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
6623                  Body := CustomStringReplace(Body, '&nbsp;', ' ');                          Body := CustomStringReplace(Body, '<br>', #10,true);
6624                                  FHint.Add(Header, Body);                          Body := CustomStringReplace(Body, '</a>', '',true);
6625  //                                                      s := StringReplace(s, '&amp', '&', [rfReplaceAll]);                          Body := GikoSys.DeleteLink(Body);
6626  //                                                      s := StringReplace(s, '@`', ',', [rfReplaceAll]);                          Body := CustomStringReplace(Body, '&lt;', '<');
6627                          end;                          Body := CustomStringReplace(Body, '&gt;', '>');
6628                  end;                          Body := CustomStringReplace(Body, '&quot;', '"');
6629          finally                          Body := CustomStringReplace(Body, '&amp;', '&');
6630          end;                          Body := CustomStringReplace(Body, '&nbsp;', ' ');
6631                        
6632                            FHint.Add(Header, Body);
6633                        end;
6634                    end;
6635                end else begin
6636                    for i := StNum to ToNum do begin
6637                        Line := i;
6638                        FileName := ThreadItem.FilePath;
6639                        tmp := GikoSys.ReadThreadFile(FileName, Line);
6640                        if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
6641                            Res := GikoSys.DivideStrLine(tmp);
6642    
6643                            Header := IntToStr(Line) + ' 名前: ' + Res.FName + ' 投稿日: ' + Res.FDateTime;
6644                            Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
6645                            Body := CustomStringReplace(Body, '<br>', #10,true);
6646                            Body := CustomStringReplace(Body, '</a>', '',true);
6647                            Body := GikoSys.DeleteLink(Body);
6648                            Body := CustomStringReplace(Body, '&lt;', '<');
6649                            Body := CustomStringReplace(Body, '&gt;', '>');
6650                            Body := CustomStringReplace(Body, '&quot;', '"');
6651                            Body := CustomStringReplace(Body, '&amp;', '&');
6652                             Body := CustomStringReplace(Body, '&nbsp;', ' ');
6653                            FHint.Add(Header, Body);
6654                        end;
6655                    end;
6656                end;
6657            end;
6658        finally
6659        end;
6660  end;  end;
6661    
 {function TGikoForm.GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;  
 var  
         i: Integer;  
         s: string;  
         tmp: string;  
         FileName: string;  
         Line: Integer;  
         SList: TStrings;  
   
         wkInt: Integer;  
   
         Res: TResRec;  
         ActiveFileName: string;  
         Board: TBoard;  
         ThreadItem: TThreadItem;  
         Header: string;  
         Body: string;  
 begin  
         s := '';  
         HintData := THintData.Create;  
         SList := TStringList.Create;  
         try  
   
                 if StNum > ToNum then begin  
                         wkInt := StNum;  
                         StNum := ToNum;  
                         ToNum := wkInt;  
                 end;  
   
                 if (sBoard <> '') and (sThread <> '') then begin  
   
                         //最大10レスまで表示  
                         if StNum + 10 < ToNum then  
                                 ToNum := StNum + 10;  
   
                         //タイトル表示  
                         if Title then begin  
                                 Board := BBS2ch.FindBBSID(sBoard);  
                                 if Board <> nil then begin  
                                         if not Board.IsThreadDatRead then  
                                                 GikoSys.ReadSubjectFile(Board);  
                                         ThreadItem := Board.Find(sThread + '.dat');  
                                         //ThreadItem := BBS2ch.FindThreadItem(sBoard, sThread + '.dat');  
                                         if ThreadItem <> nil then  
                                                 HintData.Title := ThreadItem.Title;  
                                                 //s := s + ThreadItem.Title;  
                                 end;  
                         end;  
   
                         for i := StNum to ToNum do begin  
                                 Line := i;  
                                 FileName := IncludeTrailingPathDelimiter(BBS2ch.GetLogFolder + sBoard) + sThread + '.dat';  
                                 tmp := GikoSys.ReadThreadFile(FileName, Line);  
                                 if tmp <> '' then begin  
                                         Res := GikoSys.DivideStrLine(tmp);  
   
                                         //if s <> '' then  
                                         //      s := s + #10#10;  
                                         //s := s + IntToStr(Line) + ' 名前: ' + Res.FName + ' 投稿日: ' + Res.FDateTime + #10 + #10;  
                                         //s := s + ' ' + StringReplace(Res.FBody, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);  
                                         Header := IntToStr(Line) + ' 名前: ' + Res.FName + ' 投稿日: ' + Res.FDateTime;  
   
                                         s := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);  
                                         s := StringReplace(s, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);  
                                         s := StringReplace(s, '</a>', '', [rfIgnoreCase, rfReplaceAll]);  
                                         s := GikoSys.DeleteLink(s);  
                                         s := StringReplace(s, '&lt;', '<', [rfReplaceAll]);  
                                         s := StringReplace(s, '&gt;', '>', [rfReplaceAll]);  
                                         s := StringReplace(s, '&quot;', '"', [rfReplaceAll]);  
                                         s := StringReplace(s, '&amp;', '&', [rfReplaceAll]);  
                                         Body := s;  
                                         HintData.Add(Header, Body);  
 //                                                      s := StringReplace(s, '&amp', '&', [rfReplaceAll]);  
 //                                                      s := StringReplace(s, '@`', ',', [rfReplaceAll]);  
                                 end;  
                         end;  
                 end;  
   
         finally  
                 SList.Free;  
         end;  
         Result := HintData;  
 end;}  
   
6662  procedure TGikoForm.ShowTextPopup;  procedure TGikoForm.ShowTextPopup;
6663  var  var
6664          p: TPoint;          p: TPoint;
# Line 7547  end; Line 7493  end;
7493  procedure TGikoForm.FormKeyDown(Sender: TObject; var Key: Word;  procedure TGikoForm.FormKeyDown(Sender: TObject; var Key: Word;
7494          Shift: TShiftState);          Shift: TShiftState);
7495    
7496  var  //var
   
         Doc: IHtmlDocument2;  
 //      Range: IHTMLTxtRange;  
         s: string;  
         Num: Integer;  
         ThreadItem: TThreadItem;  
   
7497  begin  begin
7498    {
7499          ThreadItem := GetActiveContent;          ThreadItem := GetActiveContent;
7500          if ThreadItem <> nil then begin          if ThreadItem <> nil then begin
7501                  if ssCtrl in Shift then begin                  if ssCtrl in Shift then begin
# Line 7594  begin Line 7533  begin
7533                          end;                          end;
7534                  end;                  end;
7535          end;          end;
7536    }
7537  end;  end;
7538    
7539    
7540  procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;  procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
7541          Shift: TShiftState);          Shift: TShiftState);
7542  begin  begin
7543    {
7544          if Key = $11 then begin          if Key = $11 then begin
7545                  Fkeynum := 0;                  Fkeynum := 0;
7546                  if FHint <> nil then begin                  if FHint <> nil then begin
# Line 7610  begin Line 7549  begin
7549                  end;                  end;
7550    
7551          end;          end;
7552    }
7553  end;  end;
7554    
7555  // 全てのレスを表示  // 全てのレスを表示

Legend:
Removed from v.1.170  
changed lines
  Added in v.1.171

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