SHDocVw_TLB,
MSHTML_TLB,
{$IFEND}
- ComCtrls, BrowserRecord, Graphics, Messages, Setting;
+ ComCtrls, BrowserRecord, Graphics, Messages, Setting, Dialogs;
const
CAPTION_NAME: string = '\83M\83R\83i\83r';
BrowserMaxAndFocusAction: TAction;
SelectItemSaveForHTML: TAction;
SelectItemSaveForDat: TAction;
- FileSaveAs1: TFileSaveAs;
LogFolderOpenAction: TAction;
TabsSaveAction: TAction;
TabsOpenAction: TAction;
UnSelectedListViewAction: TAction;
WikiFAQWebPageAction: TAction;
ToobarImageList: TImageList;
+ SaveDialog: TSaveDialog;
procedure EditNGActionExecute(Sender: TObject);
procedure ReloadActionExecute(Sender: TObject);
procedure GoFowardActionExecute(Sender: TObject);
procedure SetThreadAreaVerNormal;
procedure SetThreadAreaVertical(gls : TGikoListState);
procedure SetThreadReadProperty(read: Boolean);
+ procedure SelectThreadSaveToFile(dat: Boolean);
public
{ Public \90é\8c¾ }
published
implementation
uses
- Windows, Math, Dialogs, Clipbrd,
+ Windows, Math, Clipbrd,
Giko, GikoSystem, GikoUtil, BoardGroup,
FavoriteArrange, Favorite, MojuUtils,
Editor, ListSelect, Search, Option, Round,
end;
end;
// *************************************************************************
-//! \91I\91ð\83X\83\8c\83b\83h\82ðHTML\89»\82µ\82Ä\95Û\91¶
+//! \91I\91ð\83X\83\8c\83b\83h\82ð\83t\83@\83C\83\8b\82É\95Û\91¶\82·\82é
// *************************************************************************
-procedure TGikoDM.SelectItemSaveForHTMLExecute(Sender: TObject);
+procedure TGikoDM.SelectThreadSaveToFile(dat: Boolean);
var
List: TList;
i: Integer;
else if(List.Count = 0) then
ShowMessage('\83X\83\8c\83b\83h\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢')
else begin
- FileSaveAs1.Dialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðHTML\89»\82µ\82Ä\95Û\91¶';
- FileSaveAs1.Dialog.Filter := 'HTML\83t\83@\83C\83\8b(*.html)|*.html';
+ if dat then begin
+ SaveDialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðdat\82Ì\82Ü\82Ü\95Û\91¶';
+ SaveDialog.Filter := 'DAT\83t\83@\83C\83\8b(*.dat)|*.dat';
+ end else begin
+ SaveDialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðHTML\89»\82µ\82Ä\95Û\91¶';
+ SaveDialog.Filter := 'HTML\83t\83@\83C\83\8b(*.html)|*.html';
+ end;
for i := 0 to List.Count - 1 do begin
if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
- FileSaveAs1.Dialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html';
- if FileSaveAs1.Dialog.Execute then begin
- html := TStringList.Create;
- title := TThreadItem(List[i]).Title;
- try
- HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title);
- html.SaveToFile(FileSaveAs1.Dialog.FileName);
- THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
- finally
- html.Free;
+ if dat then begin
+ SaveDialog.FileName := TThreadItem(List[i]).FileName;
+ end else begin
+ SaveDialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html';
+ end;
+ if SaveDialog.Execute then begin
+ if dat then begin
+ CopyFile(PChar(TThreadItem(List[i]).FilePath),
+ PChar(SaveDialog.FileName), true);
+ end else begin
+ html := TStringList.Create;
+ title := TThreadItem(List[i]).Title;
+ try
+ HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title);
+ html.SaveToFile(SaveDialog.FileName);
+ THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(SaveDialog.FileName));
+ finally
+ html.Free;
+ end;
end;
end;
end;
end;
end;
// *************************************************************************
+//! \91I\91ð\83X\83\8c\83b\83h\82ðHTML\89»\82µ\82Ä\95Û\91¶
+// *************************************************************************
+procedure TGikoDM.SelectItemSaveForHTMLExecute(Sender: TObject);
+begin
+ SelectThreadSaveToFile(false);
+end;
+// *************************************************************************
//! \91I\91ð\83X\83\8c\83b\83h\82ðDAT\8c`\8e®\82Ì\82Ü\82Ü\95Û\91¶
// *************************************************************************
procedure TGikoDM.SelectItemSaveForDatExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
begin
- List := TList.Create;
- try
- GikoForm.ScreenCursor := crHourGlass;
- GikoForm.SelectListItem(List);
- if ((GikoSys.Setting.ListOrientation = gloVertical) and
- (GikoSys.Setting.ListHeightState = glsMax)) or
- ((GikoSys.Setting.ListOrientation = gloHorizontal) and
- (GikoSys.Setting.ListWidthState = glsMax)) then
- ShowMessage('\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82µ\82Ä\82\82¾\82³\82¢')
- else if(List.Count = 0) then
- ShowMessage('\83X\83\8c\83b\83h\82ð\91I\91ð\82µ\82Ä\82\82¾\82³\82¢')
- else begin
- FileSaveAs1.Dialog.Title := '\91I\91ð\83X\83\8c\83b\83h\82ðdat\82Ì\82Ü\82Ü\95Û\91¶';
- FileSaveAs1.Dialog.Filter := 'DAT\83t\83@\83C\83\8b(*.dat)|*.dat';
- for i := 0 to List.Count - 1 do begin
- if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
- FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
- if FileSaveAs1.Dialog.Execute then begin
- CopyFile(PChar(TThreadItem(List[i]).FilePath),
- PChar(FileSaveAs1.Dialog.FileName), true);
- end;
- end;
- end;
- end;
- finally
- GikoForm.ScreenCursor := crDefault;
- List.Free;
- end;
-
+ SelectThreadSaveToFile(true);
end;
// *************************************************************************
//! \83^\83u\82Ì\8f\87\94Ô\82ð\95Û\91¶
//! \91I\91ð\82³\82ê\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\8aù\93Ç\82É\82·\82é
// *************************************************************************
procedure TGikoDM.KidokuActionExecute(Sender: TObject);
-var
- List: TList;
- i: Integer;
begin
SetThreadReadProperty(true);
end;