| 11 |
SHDocVw_TLB, |
SHDocVw_TLB, |
| 12 |
MSHTML_TLB, |
MSHTML_TLB, |
| 13 |
{$IFEND} |
{$IFEND} |
| 14 |
ComCtrls, BrowserRecord, Graphics, Messages, Setting; |
ComCtrls, BrowserRecord, Graphics, Messages, Setting, Dialogs; |
| 15 |
|
|
| 16 |
const |
const |
| 17 |
CAPTION_NAME: string = 'ギコナビ'; |
CAPTION_NAME: string = 'ギコナビ'; |
| 185 |
BrowserMaxAndFocusAction: TAction; |
BrowserMaxAndFocusAction: TAction; |
| 186 |
SelectItemSaveForHTML: TAction; |
SelectItemSaveForHTML: TAction; |
| 187 |
SelectItemSaveForDat: TAction; |
SelectItemSaveForDat: TAction; |
|
FileSaveAs1: TFileSaveAs; |
|
| 188 |
LogFolderOpenAction: TAction; |
LogFolderOpenAction: TAction; |
| 189 |
TabsSaveAction: TAction; |
TabsSaveAction: TAction; |
| 190 |
TabsOpenAction: TAction; |
TabsOpenAction: TAction; |
| 210 |
UnSelectedListViewAction: TAction; |
UnSelectedListViewAction: TAction; |
| 211 |
WikiFAQWebPageAction: TAction; |
WikiFAQWebPageAction: TAction; |
| 212 |
ToobarImageList: TImageList; |
ToobarImageList: TImageList; |
| 213 |
|
SaveDialog: TSaveDialog; |
| 214 |
procedure EditNGActionExecute(Sender: TObject); |
procedure EditNGActionExecute(Sender: TObject); |
| 215 |
procedure ReloadActionExecute(Sender: TObject); |
procedure ReloadActionExecute(Sender: TObject); |
| 216 |
procedure GoFowardActionExecute(Sender: TObject); |
procedure GoFowardActionExecute(Sender: TObject); |
| 402 |
procedure SetThreadAreaVerNormal; |
procedure SetThreadAreaVerNormal; |
| 403 |
procedure SetThreadAreaVertical(gls : TGikoListState); |
procedure SetThreadAreaVertical(gls : TGikoListState); |
| 404 |
procedure SetThreadReadProperty(read: Boolean); |
procedure SetThreadReadProperty(read: Boolean); |
| 405 |
|
procedure SelectThreadSaveToFile(dat: Boolean); |
| 406 |
public |
public |
| 407 |
{ Public 宣言 } |
{ Public 宣言 } |
| 408 |
published |
published |
| 422 |
implementation |
implementation |
| 423 |
|
|
| 424 |
uses |
uses |
| 425 |
Windows, Math, Dialogs, Clipbrd, |
Windows, Math, Clipbrd, |
| 426 |
Giko, GikoSystem, GikoUtil, BoardGroup, |
Giko, GikoSystem, GikoUtil, BoardGroup, |
| 427 |
FavoriteArrange, Favorite, MojuUtils, |
FavoriteArrange, Favorite, MojuUtils, |
| 428 |
Editor, ListSelect, Search, Option, Round, |
Editor, ListSelect, Search, Option, Round, |
| 2038 |
end; |
end; |
| 2039 |
end; |
end; |
| 2040 |
// ************************************************************************* |
// ************************************************************************* |
| 2041 |
//! 選択スレッドをHTML化して保存 |
//! 選択スレッドをファイルに保存する |
| 2042 |
// ************************************************************************* |
// ************************************************************************* |
| 2043 |
procedure TGikoDM.SelectItemSaveForHTMLExecute(Sender: TObject); |
procedure TGikoDM.SelectThreadSaveToFile(dat: Boolean); |
| 2044 |
var |
var |
| 2045 |
List: TList; |
List: TList; |
| 2046 |
i: Integer; |
i: Integer; |
| 2059 |
else if(List.Count = 0) then |
else if(List.Count = 0) then |
| 2060 |
ShowMessage('スレッドを選択してください') |
ShowMessage('スレッドを選択してください') |
| 2061 |
else begin |
else begin |
| 2062 |
FileSaveAs1.Dialog.Title := '選択スレッドをHTML化して保存'; |
if dat then begin |
| 2063 |
FileSaveAs1.Dialog.Filter := 'HTMLファイル(*.html)|*.html'; |
SaveDialog.Title := '選択スレッドをdatのまま保存'; |
| 2064 |
|
SaveDialog.Filter := 'DATファイル(*.dat)|*.dat'; |
| 2065 |
|
end else begin |
| 2066 |
|
SaveDialog.Title := '選択スレッドをHTML化して保存'; |
| 2067 |
|
SaveDialog.Filter := 'HTMLファイル(*.html)|*.html'; |
| 2068 |
|
end; |
| 2069 |
for i := 0 to List.Count - 1 do begin |
for i := 0 to List.Count - 1 do begin |
| 2070 |
if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin |
if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin |
| 2071 |
FileSaveAs1.Dialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html'; |
if dat then begin |
| 2072 |
if FileSaveAs1.Dialog.Execute then begin |
SaveDialog.FileName := TThreadItem(List[i]).FileName; |
| 2073 |
html := TStringList.Create; |
end else begin |
| 2074 |
title := TThreadItem(List[i]).Title; |
SaveDialog.FileName := ReplaseNoValidateChar(TThreadItem(List[i]).Title) + '.html'; |
| 2075 |
try |
end; |
| 2076 |
HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title); |
if SaveDialog.Execute then begin |
| 2077 |
html.SaveToFile(FileSaveAs1.Dialog.FileName); |
if dat then begin |
| 2078 |
THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName)); |
CopyFile(PChar(TThreadItem(List[i]).FilePath), |
| 2079 |
finally |
PChar(SaveDialog.FileName), true); |
| 2080 |
html.Free; |
end else begin |
| 2081 |
|
html := TStringList.Create; |
| 2082 |
|
title := TThreadItem(List[i]).Title; |
| 2083 |
|
try |
| 2084 |
|
HTMLCreater.CreateHTML3(html, TThreadItem(List[i]), title); |
| 2085 |
|
html.SaveToFile(SaveDialog.FileName); |
| 2086 |
|
THTMLCreate.SkinorCSSFilesCopy(ExtractFilePath(SaveDialog.FileName)); |
| 2087 |
|
finally |
| 2088 |
|
html.Free; |
| 2089 |
|
end; |
| 2090 |
end; |
end; |
| 2091 |
end; |
end; |
| 2092 |
end; |
end; |
| 2098 |
end; |
end; |
| 2099 |
end; |
end; |
| 2100 |
// ************************************************************************* |
// ************************************************************************* |
| 2101 |
|
//! 選択スレッドをHTML化して保存 |
| 2102 |
|
// ************************************************************************* |
| 2103 |
|
procedure TGikoDM.SelectItemSaveForHTMLExecute(Sender: TObject); |
| 2104 |
|
begin |
| 2105 |
|
SelectThreadSaveToFile(false); |
| 2106 |
|
end; |
| 2107 |
|
// ************************************************************************* |
| 2108 |
//! 選択スレッドをDAT形式のまま保存 |
//! 選択スレッドをDAT形式のまま保存 |
| 2109 |
// ************************************************************************* |
// ************************************************************************* |
| 2110 |
procedure TGikoDM.SelectItemSaveForDatExecute(Sender: TObject); |
procedure TGikoDM.SelectItemSaveForDatExecute(Sender: TObject); |
|
var |
|
|
List: TList; |
|
|
i: Integer; |
|
| 2111 |
begin |
begin |
| 2112 |
List := TList.Create; |
SelectThreadSaveToFile(true); |
|
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('スレッド一覧を表示してください') |
|
|
else if(List.Count = 0) then |
|
|
ShowMessage('スレッドを選択してください') |
|
|
else begin |
|
|
FileSaveAs1.Dialog.Title := '選択スレッドをdatのまま保存'; |
|
|
FileSaveAs1.Dialog.Filter := 'DATファイル(*.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; |
|
|
|
|
| 2113 |
end; |
end; |
| 2114 |
// ************************************************************************* |
// ************************************************************************* |
| 2115 |
//! タブの順番を保存 |
//! タブの順番を保存 |
| 3640 |
//! 選択されているスレッドを既読にする |
//! 選択されているスレッドを既読にする |
| 3641 |
// ************************************************************************* |
// ************************************************************************* |
| 3642 |
procedure TGikoDM.KidokuActionExecute(Sender: TObject); |
procedure TGikoDM.KidokuActionExecute(Sender: TObject); |
|
var |
|
|
List: TList; |
|
|
i: Integer; |
|
| 3643 |
begin |
begin |
| 3644 |
SetThreadReadProperty(true); |
SetThreadReadProperty(true); |
| 3645 |
end; |
end; |