ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils,
CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload,
Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent,
- HintWindow, GikoCoolBar, GikoListView, Search, ExternalBoardManager,
+ {HintWindow,} GikoCoolBar, GikoListView, Search, ExternalBoardManager,
ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord, MoveHistoryItem,
- ShellAPI,Preview, HistoryList;
+ ShellAPI,Preview, HistoryList, ResPopupBrowser;
const
NGWORDNAME_PANEL = 3;
SelectItemNameCopyAction1: TMenuItem;
B6: TMenuItem;
T9: TMenuItem;
- C2: TMenuItem;
+ NameCopyPMenu: TMenuItem;
SelectComboBox: TComboBox;
MainCoolBarPopupMenu: TPopupMenu;
StdToolBarVisiblePMenu: TMenuItem;
HTML1: TMenuItem;
DAT4: TMenuItem;
N80: TMenuItem;
+ SameBoardThreadItem: TMenuItem;
+ N81: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure BrowserStatusTextChange(Sender: TObject;
FEnabledCloseButton: Boolean;
FClickNode: TTreeNode;
FHttpState: Boolean;
- FHint: TResPopup;
FPreviewBrowser: TPreviewBrowser;
FPreviewURL: string;
FBrowserSizeHeight: Integer;
FOrigenCaption: String; //\82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83A\83C\83e\83\80\95Ò\8fW\8e\9e\82Ì\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ
FPreviewBrowserRect: TRect; ///< \83v\83\8c\83r\83\85\81[\82Ì\95\\8e¦\88Ê\92u\82ð\8bL\89¯\82·\82é
FActionListGroupIndexes: array of Integer; ///<GikoDM\8fã\82Ì\83A\83N\83V\83\87\83\93\83\8a\83X\83g\82Ì\8ae\83A\83N\83V\83\87\83\93\82É\90Ý\92è\82³\82ê\82½GroupIndex\82ð\95Û\91¶\82·\82é\94z\97ñ
-
+ FResPopupBrowser: TResPopupBrowser;
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
procedure FavoriteClick(Sender: TObject); overload;
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
function OnDocumentContextMenu(Sender: TObject): WordBool;
- procedure ShowTextPopup;
function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
procedure MenuBarChevronMenu;
procedure LinkBarChevronMenu;
procedure UnStoredTaskTray;
//! \83\8c\83X\83G\83f\83B\83^\82Ì\95\\8e¦\94ñ\95\\8e¦
procedure ShowEditors(nCmdShow: Integer);
+ //! \82à\82Á\82Æ\82à\8cÃ\82¢Browser\82Ì\8aJ\95ú
+ procedure ReleaseOldestBrowser;
+ //! \83A\83N\83e\83B\83u\82È\83^\83u\82Æ\93¯\82¶\94Â\82Ì\8aJ\82¢\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83\81\83j\83\85\81[\83A\83C\83e\83\80\82É\92Ç\89Á
+ procedure AddMenuSameBoardThread;
+ //! \83A\83N\83e\83B\83u\82È\83^\83u\82Æ\93¯\82¶\94Â\82Ì\8aJ\82¢\82Ä\82¢\82é\83X\83\8c\83b\83h\83N\83\8a\83b\83N\83C\83x\83\93\83g
+ procedure SameBoardThreadSubItemOnClick(Sender: TObject);
+ //! \83|\83b\83v\83A\83b\83v\83u\83\89\83E\83U\8dì\90¬
+ procedure CreateResPopupBrowser;
+ //! D&D\82ð\8eó\82¯\8eæ\82é
+ procedure WMDropFiles(var Msg: TWMDropFiles); Message WM_DropFiles;
+ //! \83t\83@\83C\83\8b\83`\83F\83b\83N
+ function isValidFile(FileName: String) : boolean;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
property WorkCount: Integer read FWorkCount write FWorkCount;
procedure SetContent(inThread: TBrowserRecord);
- function GetActiveContent: TThreadItem;
+ function GetActiveContent(popup :Boolean = false): TThreadItem;
function GetActiveList: TObject;
procedure SetListViewType(AViewType: TGikoViewType); overload;
// \83^\83u\8dí\8f\9c\81i\8eÀ\91\95\95\94\81j
procedure DeleteTab(index, selectIndex: Integer); overload;
//\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83X\83N\83\8d\81[\83\8b
- procedure BrowserMovement(const AName: string);
+ procedure BrowserMovement(const AName: string); overload;
+ //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83X\83N\83\8d\81[\83\8b
+ procedure BrowserMovement(scroll: Integer); overload;
//Application\82ÌMainForm\82ð\8eæ\93¾\82·\82é
function GetMainForm(): TComponent;
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
About, Option, Round, Splash, Sort, ListSelect, Imm,
NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
- InputAssistDataModule, Types;
+ InputAssistDataModule, Types, ReplaceDataModule;
const
BLANK_HTML: string = 'about:blank';
//\82±\82ê\88È\8cãSet\81`\82Å\8dÄ\90Ý\92è\82·\82é\82Ü\82Å\81AAction\82ÌChecked\82ð\82¢\82¶\82é\82Æ\82«\82Í\92\8d\88Ó\81I
GetGroupIndex(GikoDM.GikoFormActionList);
FSearchDialog := nil;
+ FResPopupBrowser := nil;
CreateBrowsers(BROWSER_COUNT);
FIconData.uID := 0;
-
+
//\83\81\83j\83\85\81[\83t\83H\83\93\83g
SetMenuFont;
//\8dÅ\8fI\8f\84\89ñ\8e\9e\8aÔ
// FLastRoundTime := 0;
- //ResHint
- FHint := TResPopup.Create(Self);
-
ListView.OnData := TListViewUtils.ListViewData;
// \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83L\83\83\83r\83l\83b\83g\82Ì\95\9c\8c³
//\93ü\97Í\83A\83V\83X\83g\8b@\8d\\82Ì\8f\89\8aú\89»
InputAssistDM.Init(GikoSys.GetInputAssistFileName);
+ //\92u\8a·\90Ý\92è\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý
+ ReplaceDM.LoadFromFile(GikoSys.GetReplaceFileName);
+ // D&D\82ð\8eó\82¯\8eæ\82é
+ DragAcceptFiles(Self.Handle, True);
end;
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
end;
//
procedure TGikoForm.FormShow(Sender: TObject);
+var
+ item : TThreadItem;
begin
if FStartUp then begin
ShowWindow(Application.Handle, SW_HIDE);
GikoDM.TabsOpenAction.Tag := 1;
GikoDM.TabsOpenAction.Execute;
GikoDM.TabsOpenAction.Tag := 0;
+ if (GikoSys.Setting.LastCloseTabURL <> '') then begin
+ PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( FActiveContent.Browser ), 0 );
+ if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
+ while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and
+ (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
+ Application.ProcessMessages;
+ end;
+ end;
+ item := BBSsFindThreadFromURL( GikoSys.Setting.LastCloseTabURL );
+ if (item <> nil) and (item.IsLogFile) then begin
+ OpenThreadItem(item, item.URL);
+ end;
+ GikoSys.Setting.LastCloseTabURL := '';
+ end;
end;
//ActionList\82ÌGroupIndex\82ð\8c³\82É\96ß\82·
Exit;
end;
+ GikoSys.Setting.LastCloseTabURL := '';
if GikoSys.Setting.TabAutoLoadSave then begin
GikoDM.TabsSaveAction.Execute;
+ if (GetActiveContent <> nil) and
+ (GetActiveContent.IsLogFile) then begin
+ GikoSys.Setting.LastCloseTabURL := GetActiveContent.URL;
+ end;
end;
if (SearchDialog <> nil) then begin
if FEvent <> nil then
FEvent.Free;
- //Hint\94j\8aü
- if FHint <> nil then begin
- FHint.ReleaseHandle;
- FHint.Free;
- FHint := nil;
- end;
+ // TODO \83\8c\83X\83|\83b\83v\83A\83b\83v\82Ì\94j\8aü
+ try
+ if FResPopupBrowser <> nil then begin
+ TOleControl(FResPopupBrowser).Parent := nil;
+ FResPopupBrowser.Free;
+ end;
+
+ except
+ end;
//Preview\94j\8aü
- if TPreviewBrowser <> nil then begin
+ if FPreviewBrowser <> nil then begin
FPreviewBrowser.Free;
FPreviewBrowser := nil;
end;
Ext: string;
PathRec: TPathRec;
Text2: string;
+ cResPopup: TResPopupBrowser;
begin
// \83M\83R\83i\83r\82Í\83\8c\83X\83A\83\93\83J\81[\82ª about:blank.. \82Å\8en\82Ü\82é\82±\82Æ\82ð\8aú\91Ò\82µ\82Ä\82¢\82é\82ª
// IE 7 \82Å\82Í about:blank.. \82Å\82Í\82È\82 about:.. \82É\82È\82é\82Ì\82Å\81A\92u\8a·\82·\82é(\93\8a\82°\82â\82è)
FActiveContent := nil;
Exit;
end;
-
+ // \91O\89ñ\82Æ\93¯\82¶\8fê\8d\87\8fI\97¹
+ if (StatusBar.Panels[1].Text = Text2) then begin
+ if Text2 = '' then begin
+ if FResPopupBrowser <> nil then begin
+ if not(Sender is TResPopupBrowser) then
+ FResPopupBrowser.Clear
+ else begin
+ TResPopupBrowser(Sender).ChildClear;
+ end;
+ end;
+ end;
+ Exit;
+ end;
StatusBar.Panels[1].Text := Text2;
- if FHint <> nil then begin
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
- end;
+
if FPreviewBrowser <> nil then
ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
- if not GikoSys.Setting.UnActivePopup then
- if not GikoForm.Active then
- Exit;
+ if FResPopupBrowser <> nil then begin
+ if not(Sender is TResPopupBrowser) then begin
+ if (FResPopupBrowser.Visible) then begin
+ FResPopupBrowser.Clear;
+ end;
+ end else begin
+ TResPopupBrowser(Sender).ChildClear;
+ end;
+ end;
+ cResPopup := nil;
+
+ if not(Sender is TResPopupBrowser) then
+ if not GikoSys.Setting.UnActivePopup then
+ if not GikoForm.Active then
+ Exit;
+
+
//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
//file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
if (Assigned(e)) then begin
+ CreateResPopupBrowser;
+ cResPopup := FResPopupBrowser.CreateNewBrowser;
tmp2 := ZenToHan(e.Get_outerText);
if (GikoSys.IsNumeric(tmp2)) then begin
//\82\93\82Í\83\8c\83X\94Ô\8d\86\82Á\82Û\82¢\82Á\82·\81B
wkIntSt := StrToInt64(tmp2);
wkIntTo := StrToInt64(tmp2);
- //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
- FHint.PopupType := gptThread;
- HTMLCreater.SetResPopupText(FHint, GetActiveContent, wkIntSt, wkIntTo, False, False);
+ cResPopup.PopupType := gptThread;
+ HTMLCreater.SetResPopupText(cResPopup, GetActiveContent(true), wkIntSt, wkIntTo, False, False);
end else begin
- FHint.PopupType := gptRaw;
- FHint.Caption := s;
+ cResPopup.PopupType := gptRaw;
+ cResPopup.Title := s;
end;
end;
end else begin
- threadItem := GetActiveContent;
+ threadItem := GetActiveContent(true);
URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
PathRec := Gikosys.Parse2chURL2(URL);
if (PathRec.FNoParam) then begin
wkIntSt := 1;
wkIntTo := 1;
end;
- FHint.PopupType := gptThread;
- HTMLCreater.SetResPopupText(FHint, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
+ CreateResPopupBrowser;
+ cResPopup := FResPopupBrowser.CreateNewBrowser;
+ cResPopup.PopupType := gptThread;
+ HTMLCreater.SetResPopupText(cResPopup, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
end;
end;
end;
-
- if FHint.PopupType = gptRaw then begin
- if FHint.Caption <> '' then
- ShowTextPopup;
- end else begin
- if (FHint.ResCount <> 0) or (FHint.Title <> '') then
- ShowTextPopup;
- end;
+ if (cResPopup <> nil) then begin
+ if cResPopup.PopupType = gptRaw then begin
+ if cResPopup.Title <> '' then begin
+ cResPopup.TitlePopup;
+ end;
+ end else begin
+ if cResPopup.RawDocument <> '' then begin
+ cResPopup.Popup;
+ end else if cResPopup.Title <> '' then begin
+ cResPopup.TitlePopup;
+ end;
+ end;
+ end;
end;
end;
const
kMenuName: string = 'menu:';
begin
-
+{$IFDEF DEBUG}
+ Writeln(URL);
+{$ENDIF}
if Pos(kMenuName, URL) <> 0 then begin
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
Cancel := True;
GetCursorpos(p);
+ KokoPopupMenu.PopupComponent := nil;
+ if (Sender is TComponent) then
+ KokoPopupMenu.PopupComponent := TComponent(Sender);
KokoPopupMenu.Tag := StrToInt(sNo);
KokoPopupMenu.Popup(p.x, p.y);
end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
end;
end;
+//! \82à\82Á\82Æ\82à\8cÃ\82¢Browser\82Ì\8aJ\95ú
+procedure TGikoForm.ReleaseOldestBrowser;
+var
+ i: Integer;
+begin
+ for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser =
+ TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+ ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
+ break;
+ end;
+ end;
+end;
function TGikoForm.InsertBrowserTab(
ThreadItem : TThreadItem;
i, j, idx : Integer;
favItem : TFavoriteThreadItem;
newBrowser : TBrowserRecord;
+ ins : Integer;
begin
Result := nil;
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = nil then begin
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
+ //\88ê\94Ô\8cÃ\82¢\83u\83\89\83E\83U\82ð\8aJ\95ú\82·\82é
+ ReleaseOldestBrowser;
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
end;
idx := BrowserTab.TabIndex;
- if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
- newBrowser := TBrowserRecord.Create;
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
- newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- //newBrowser.Browser.Navigate(BLANK_HTML);
- newBrowser.thread := ThreadItem;
- newBrowser.Repaint := true;
-// newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
+ newBrowser := TBrowserRecord.Create;
+ // \88ê\94Ô\8cÃ\82¢\83u\83\89\83E\83U\82ð\8aJ\95ú\82·\82é
+ ReleaseOldestBrowser;
+ newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
+ newBrowser.thread := ThreadItem;
+ newBrowser.Repaint := true;
+ if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) );
if ActiveTab then begin
BrowserTab.TabIndex := 0;
end;
-
- end else begin
- newBrowser := TBrowserRecord.Create;
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
- newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
- FBrowsers.Move(BROWSER_COUNT - 1, 0);
- //newBrowser.Browser.Navigate(BLANK_HTML);
- newBrowser.thread := ThreadItem;
-// newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
- newBrowser.Repaint := true;
-
+ end else if GikoSys.Setting.BrowserTabAppend = gtaLast then begin
i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
else
BrowserTab.TabIndex := i;
end;
- end;
+ end else begin
+ // \83^\83u\88Ê\92u\82ð\8eæ\93¾
+ ins := -1;
+ for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser =
+ TWebBrowser(FBrowsers[1]) then begin
+ ins := i;
+ break;
+ end;
+ end;
+ if GikoSys.Setting.BrowserTabAppend = gtaRight then begin
+ Inc(ins);
+ end;
+ // \83^\83u\82ª\96³\82¢\82Æ\82«\82È\82Ç\91Î\8dô
+ if (ins < 0) then begin
+ ins := 0;
+ end;
+ BrowserTab.Tabs.InsertObject(ins, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
+ if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
+ if GikoSys.Setting.BrowserTabAppend = gtaRight then begin
+ DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
+ end else begin
+ DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) );
+ end;
+ end;
+ //end;
+ BrowserTab.Repaint;
+ if ActiveTab then begin
+ if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then
+ BrowserTab.TabIndex := 0
+ else
+ BrowserTab.TabIndex := ins;
+ end;
+ end;
Result := newBrowser;
if(ActiveTab) or (idx = -1) then begin
BrowserTab.OnChange(nil);
sTitle: string;
doc: Variant;
s: string;
- i: Integer;
idx: Integer;
ThreadItem: TThreadItem;
Thread: TBrowserRecord;
begin
Thread := inThread;
idx := BrowserTab.TabIndex;
- if (FActiveContent <> nil) and
+ if (not FStartUp) and
+ (FActiveContent <> nil) and
(FActiveContent.Thread <> Thread.Thread) and
(FActiveContent.Browser <> nil) and
(Assigned(FActiveContent.Browser.Document)) then begin
end else if Thread.Browser = nil then begin
if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
FBrowsers.Move(BROWSER_COUNT - 1, 0);
- for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
- break;
- end;
- end;
+ // \88ê\94Ô\8cÃ\82¢\83u\83\89\83E\83U\82ð\8aJ\95ú\82·\82é
+ ReleaseOldestBrowser;
Thread.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
FBrowsers.Move(BROWSER_COUNT - 1, 0);
end;
end;
end;
-function TGikoForm.GetActiveContent: TThreadItem;
+function TGikoForm.GetActiveContent(popup :Boolean = false): TThreadItem;
begin
try
- if FActiveContent <> nil then
- Result := FActiveContent.Thread
- else
+ if FActiveContent <> nil then begin
+ Result := FActiveContent.Thread;
+ if (popup) and
+ (FResPopupBrowser <> nil) and (FResPopupBrowser.CurrentBrowser.Visible = True) then
+ if (FResPopupBrowser.CurrentBrowser.Thread <> nil) then begin
+ Result := FResPopupBrowser.CurrentBrowser.Thread;
+ end;
+ end else
Result := nil;
except
Result := nil;
FActiveContent.Move(AName);
end;
end;
-
+//\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83X\83N\83\8d\81[\83\8b
+procedure TGikoForm.BrowserMovement(scroll: Integer);
+begin
+ if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0)
+ and (FActiveContent <> nil) then begin
+ FActiveContent.Move(scroll);
+ end;
+end;
procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
begin
if TObject(Node.Data) is TBBS then begin
end;
BrowserTab.Tabs.BeginUpdate;
try
+ GikoSys.Setting.LastCloseTabURL :=
+ TBrowserRecord(BrowserTab.Tabs.Objects[index]).Thread.URL;
TBrowserRecord(BrowserTab.Tabs.Objects[index]).Free;
if ( BrowserTab.Tabs.Count - 1 = index ) and
( BrowserTab.TabRect(index).Left
end;
if(BrowserTab.TabIndex <> -1) and
( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
- for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
- = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
- begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
- break;
- end;
- end;
+ // \88ê\94Ô\8cÃ\82¢\83u\83\89\83E\83U\82ð\8aJ\95ú\82·\82é
+ ReleaseOldestBrowser;
+
TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
:= TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
threadItem: TThreadItem;
aElement : IHTMLElement;
begin
+{$IFDEF DEBUG}
+ Writeln(IntToStr(Integer(ppDisp)));
+{$ENDIF}
Cancel := True;
aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement;
if ( aElement <> nil) then begin
end;
if wkIntSt <> 0 then begin
- FActiveContent.IDAnchorPopup('');
+ FActiveContent.IDAnchorPopup('');
MoveHisotryManager.pushItem(FActiveContent);
- BrowserMovement(IntToStr(wkIntSt));
- end;
-
-
+ if (Sender is TResPopupBrowser) then begin
+ TResPopupBrowser(Sender).ChildClear;
+ OpenThreadItem(
+ GetActiveContent(true),
+ GetActiveContent(true).URL + '&st=' +
+ IntToStr(wkIntSt) + '&to=' + IntToStr(wkIntSt));
+ end else begin
+ BrowserMovement(IntToStr(wkIntSt));
+ end;
+ end;
end;
end else begin
////'http://be.2ch.net/test/p.php?i='+id+'&u=d:'+bas+num
AddressComboBox.Items.Insert(0, URL);
end;
end;
+ if (Sender is TResPopupBrowser) then begin
+ TResPopupBrowser(Sender).ChildClear
+ end;
+
MoveHisotryManager.pushItem(FActiveContent);
MoveToURL( URL );
end;
end;
- end;
+ end;
end;
procedure TGikoForm.BrowserTabChange(Sender: TObject);
var
- i, j: Integer;
+ j: Integer;
idx: Integer;
begin
BrowserTab.Tabs.BeginUpdate;
(FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
FBrowsers.Move(BROWSER_COUNT - 1, 0);
- for i := 0 to BrowserTab.Tabs.Count - 1 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
- break;
- end;
- end;
+ // \88ê\94Ô\8cÃ\82¢\83u\83\89\83E\83U\82ð\8aJ\95ú\82·\82é
+ ReleaseOldestBrowser;
+
TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
FBrowsers.Move(BROWSER_COUNT - 1, 0);
procedure TGikoForm.BrowserEnter(Sender: TObject);
begin
- Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
+ Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
end;
procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
var
Pos : TPoint;
begin
-
if PreviewTimer.Enabled then
PreviewTimer.Enabled := False;
- if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
+
+ if (FResPopupBrowser <> nil) and (IsWindowVisible(FResPopupBrowser.Handle)) then begin
+ FResPopupBrowser.Clear;
end;
if (FPreviewBrowser <> nil)
s := CustomStringReplace(Range.text, '\81@', ' ');//\91S\8ap\8bó\94\92\82ð\94¼\8ap\8bó\94\92\82É
s := ZenToHan(Trim(s));
if GikoSys.IsNumeric(s) then begin
-
- ThreadItem := GetActiveContent;
- if ThreadItem <> nil then begin
- Num := StrToInt64(s);
- FHint.PopupType := gptThread;
- HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False);
- if FHint.ResCount <> 0 then
- ShowTextPopup;
+ Num := StrToInt64(s);
+ ThreadItem := GetActiveContent(true);
+ if (ThreadItem <> nil) and (Num <= ThreadItem.Count)
+ and (Num > 0)then begin
+ CreateResPopupBrowser;
+ FResPopupBrowser.CreateNewBrowser.PopupType := gptThread;
+ HTMLCreater.SetResPopupText(FResPopupBrowser.CreateNewBrowser, ThreadItem, Num, Num, False, False);
+ FResPopupBrowser.Popup;
Result := False;
end else
Result := True;
end;
end;
-procedure TGikoForm.ShowTextPopup;
-var
- p: TPoint;
- ARect: TRect;
-begin
-// if Trim(s) = '' then
-// Exit;
- try
- FHint.Font.Name := GikoSys.Setting.HintFontName;
- FHint.Font.Size := GikoSys.Setting.HintFontSize;
- FHint.Font.Color := GikoSys.Setting.HintFontColor;
- FHint.Color := GikoSys.Setting.HintBackColor;
- FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
- GetCursorpos(p);
- if FHint.PopupType = gptRaw then
- ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
- else
- ARect := FHint.CalcHintRect(Screen.Width, '', nil);
- case GikoSys.Setting.PopupPosition of
- gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
- gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
- gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
- gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
- gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
- gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
- gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //\83M\83R\83i\83r\83X\83\8c \83p\81[\83g\82P\82Ì453\8e\81\82É\8a´\8eÓ
- end;
- //FHint.ActivateHint(ARect, s);
- if FHint.PopupType = gptRaw then
- FHint.ActivateHint(ARect, FHint.Caption)
- else
- FHint.ActivateHint(ARect, '');
- except
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
- end;
-end;
-
procedure TGikoForm.HistoryAllClearToolButtonClick(Sender: TObject);
const
DEL_MSG = '\91S\97\9a\97ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
boardPlugIn : TBoardPlugIn;
begin
if Number = 0 then Exit;
- ThreadItem := GetActiveContent;
+ ThreadItem := GetActiveContent(True);
if ThreadItem <> nil then begin
//if ThreadItem.IsBoardPlugInAvailable then begin
procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
begin
AddRoundNameMenu(dummy1);
+ AddMenuSameBoardThread;
+end;
+//! \83A\83N\83e\83B\83u\82È\83^\83u\82Æ\93¯\82¶\94Â\82Ì\8aJ\82¢\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83\81\83j\83\85\81[\83A\83C\83e\83\80\82É\92Ç\89Á
+procedure TGikoForm.AddMenuSameBoardThread;
+var
+ i: Integer;
+ Item: TMenuItem;
+begin
+ SameBoardThreadItem.Clear;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ // \93¯\82¶\94Â\82©\82Ç\82¤\82©
+ if (FActiveContent.Thread.ParentBoard =
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ParentBoard) then begin
+ // \8e©\95ª\82Í\8aO\82·
+ if FActiveContent.Thread <>
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread then begin
+ Item := TMenuItem.Create(Self);
+ Item.Caption := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.Title;
+ Item.OnClick := SameBoardThreadSubItemOnClick;
+ SameBoardThreadItem.Add(Item);
+ end;
+ end;
+ end;
+ // \89½\82à\96³\82¢\82È\82ç\8eg\97p\82Å\82«\82È\82¢\82æ\82¤\82É\82·\82é
+ SameBoardThreadItem.Enabled := SameBoardThreadItem.Count > 0;
+end;
+//! \83A\83N\83e\83B\83u\82È\83^\83u\82Æ\93¯\82¶\94Â\82Ì\8aJ\82¢\82Ä\82¢\82é\83X\83\8c\83b\83h\83N\83\8a\83b\83N\83C\83x\83\93\83g
+procedure TGikoForm.SameBoardThreadSubItemOnClick(Sender: TObject);
+var
+ i, j: Integer;
+ MenuItem: TMenuItem;
+begin
+ if Sender is TMenuItem then begin
+ try
+ j := 0;
+ MenuItem := TMenuItem(Sender);
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ // \93¯\82¶\94Â\82©\82Ç\82¤\82©
+ if (FActiveContent.Thread.ParentBoard =
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ParentBoard) then begin
+ if FActiveContent.Thread <>
+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread then begin
+ if (SameBoardThreadItem.Items[j] = MenuItem) then begin
+ MoveToURL( TBrowserRecord(BrowserTab.Tabs.Objects[i])
+ .Thread.URL);
+ Exit;
+ end;
+ Inc(j);
+ end;
+ end;
+ end;
+ except
+ end;
+ end;
end;
-
procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
begin
FavoriteDM.URLReplace(oldURLs, newURLs);
TreeDoubleClick( TreeView.Selected );
end else if Key = VK_RETURN then begin
TreeClick( TreeView.Selected );
- TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
+ // \97\9a\97ð\82Ì\8fê\8d\87\81A\8fÁ\82³\82ê\82Ä\82¢\82é\82Ì\82Å\83`\83F\83b\83N\82·\82é
+ if (TreeView.Selected <> nil) then begin
+ TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
+ end;
end;
end;
//! \82¨\8bC\82É\93ü\82è\82ÌMouseDown\83C\83x\83\93\83g
//! \82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83}\83E\83X\83A\83b\83v\83C\83x\83\93\83g
// *************************************************************************
function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
+const
+ LIMIT = 20;
var
p : TPoint;
e: IHTMLElement;
AID: string;
stlist : TStringList;
- i, count, rc : Integer;
+ i, count: Integer;
body : String;
- limited : boolean;
+ limited : Integer;
+ FOleInPlaceActiveObject: IOleInPlaceActiveObject;
begin
result := true;
try
if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
- FActiveContent.Browser.SetFocus;
+ FOleInPlaceActiveObject := FActiveContent.Browser.ControlInterface as IOleInPlaceActiveObject;
+ FOleInPlaceActiveObject.OnFrameWindowActivate(True);
try
GetCursorPos(p);
p.x := p.x - FActiveContent.Browser.ClientOrigin.x;
end;
end;
count := GikoSys.GetSameIDResCount(AID, FActiveContent.Thread);
- limited := false;
- if count > 20 then begin
- rc := GikoUtil.MsgBox(Handle,
- '20\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
+ limited := LIMIT;
+ if count > LIMIT then begin
+ if (GikoUtil.MsgBox(Handle,
+ IntToStr(LIMIT) + '\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
'ID\83|\83b\83v\83A\83b\83v\8cx\8d\90',
- MB_YESNO or MB_ICONQUESTION);
- limited := rc <> ID_YES;
+ MB_YESNO or MB_ICONQUESTION) = ID_YES) then begin
+ limited := -1;
+ end
end;
body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited);
FActiveContent.IDAnchorPopup(body);
Action: TAction;
begin
s := MouseGesture.GetGestureStr;
- MouseGesture.ClearGesture;
+ MouseGesture.Clear;
Action := GikoSys.Setting.Gestures.GetGestureAction(s);
if Action <> nil then
Action.Execute;
ReadList : TStringList;
wordCount : TWordCount;
begin
- ThreadItem := GetActiveContent;
+ ThreadItem := GetActiveContent(True);
ReadList := TStringList.Create;
wordCount := TWordCount.Create;
try
begin
No := KokoPopupMenu.Tag;
if No = 0 then Exit;
- ThreadItem := GetActiveContent;
+ ThreadItem := GetActiveContent(True);
if ThreadItem = nil then Exit;
body := TStringList.Create;
try
if Assigned(firstElement) then
if firstElement.style.visibility <> 'hidden' then
firstElement.style.visibility := 'hidden';
-
end;
procedure TGikoForm.RepaintAllTabsBrowser();
Application.ProcessMessages;
if not Application.Terminated then begin
if PreviewTimer.Enabled then
- PreviewTimer.Enabled := False;
- //\83t\83H\81[\83J\83X\82ª\91¼\82Ì\83A\83v\83\8a\82É\95Ï\82í\82Á\82½\82Æ\82«\82É\83q\83\93\83g\82ð\8fÁ\8b\8e
- if FHint <> nil then begin
- FHint.ReleaseHandle;
- FHint.ClearAllRes;
- end;
+ PreviewTimer.Enabled := False;
+ //\83t\83H\81[\83J\83X\82ª\91¼\82Ì\83A\83v\83\8a\82É\95Ï\82í\82Á\82½\82Æ\82«\82É\83|\83b\83v\83A\83b\83v\8fÁ\8b\8e
+ if (FResPopupBrowser <> nil) then
+ FResPopupBrowser.Clear;
+
//\83v\83\8c\83r\83\85\81[\82ð\89B\82·
if FPreviewBrowser <> nil then
ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
BrowserNullTab := TBrowserRecord.Create;
BrowserNullTab.Browser := Browser;
BrowserNullTab.Browser.Navigate(BLANK_HTML);
+
FBrowsers := TList.Create;
for i := 0 to count -1 do begin
FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
end;
BrowserNullTab.Browser.BringToFront;
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
+
//\8bN\93®\8e\9e\82É\83^\83u\8e©\93®\95\9c\8c³\82ð\93ü\82ê\82Ä\82¢\82é\82Æ\81A\8bó\83y\81[\83W\97p\82ÌBrowser\82Ì
//\95`\89æ\82ª\8fI\82í\82Á\82Ä\82¢\82È\82\82Ä\81A\83N\83\8a\83b\83N\83C\83x\83\93\83g\82Ì\90Ý\92è\93\99\82É\93Ë\93ü\82·\82é\82Ì\82Å
//\82±\82±\82Å\8fI\82í\82ç\82¹\82Ä\82¨\82
end;
end;
+//! \83|\83b\83v\83A\83b\83v\83u\83\89\83E\83U\8dì\90¬
+procedure TGikoForm.CreateResPopupBrowser;
+begin
+ if (FResPopupBrowser = nil) then begin
+ FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel);
+ end;
+end;
+//! \8aO\82©\82ç\82ÌD&D\8f\88\97\9d
+procedure TGikoForm.WMDropFiles(var Msg: TWMDropFiles);
+var
+ FileName: Array[0..MAX_PATH] of Char;
+ Cnt, K: Integer;
+ Board: TBoard;
+ LogFolder: String;
+ datList: TStringList;
+begin
+ // \95\\8e¦\82µ\82Ä\82¢\82é\82Ì\94Â\82Ì\82Æ\82«\88È\8aO\82Í\8b\91\94Û
+ if GetActiveList is TBoard then begin
+ Board := TBoard(GetActiveList);
+ if MsgBox(Handle, Board.Title
+ + ' \94Â\82É\93ü\82ê\82Ä\82¢\82¢\82Å\82·\82©\81H', '\83M\83R\83i\83r', MB_YESNO or MB_ICONQUESTION) = IDYES then begin
+ // \94Â\82Ì\8e\9e\82Í\81A\83\8d\83O\83t\83H\83\8b\83_\82É\83R\83s\81[\82µ\82Ä\82Í\82®\82ê\83\8d\83O\91Î\89\9e\82Æ\93¯\82¶\8f\88\97\9d\81H
+ datList := TStringList.Create;
+ try
+ Cnt := DragQueryFile(Msg.Drop, $FFFFFFFF, FileName, SizeOf(FileName));
+ for K := 0 to Cnt - 1 do begin
+ DragQueryFile(Msg.Drop, K, FileName, SizeOf(FileName));
+ {FileName\82Édrop\82³\82ê\82½\83t\83@\83C\83\8b\96¼\82ª\93ü\82Á\82Ä\82¢\82é\82Ì\82Å\81A\82±\82±\82Å\89½\82ç\82©\82Ì\8f\88\97\9d\82ð\82·\82é\81B\82½\82Æ\82¦\82Î\8e\9f\82Ì\8ds}
+ // \83t\83@\83C\83\8b\82Ì\83`\83F\83b\83N
+ if (isValidFile(FileName)) then begin
+ LogFolder := ExtractFilePath(Board.FilePath);
+ if (FileExists( LogFolder + ExtractFileName(FileName))) then begin
+ GikoUtil.MsgBox(Handle, LogFolder + '\82É' + ExtractFileName(FileName) + '\82ª\8aù\82É\91¶\8dÝ\82µ\82Ü\82·\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end else begin
+ if (not DirectoryExists(LogFolder)) then begin
+ if (not GikoSys.ForceDirectoriesEx(LogFolder) ) then begin
+ GikoUtil.MsgBox(Handle, LogFolder + '\82Ì\90¶\90¬\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end;
+ end;
+ if (not Windows.CopyFile(FileName, PChar(LogFolder + ExtractFileName(FileName)), true)) then begin
+ GikoUtil.MsgBox(Handle, FileName + '\82Ì\83R\83s\81[\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end else begin
+ datList.Add(ExtractFileName(FileName));
+ end;
+ end;
+ end;
+ end;
+ DragFinish(Msg.Drop);
+ if (datList.Count > 0) then begin
+ GikoSys.AddOutofIndexDat(Board, datList, False);
+ ShowMessage(IntToStr(datList.Count) + '\8cÂ\82Ìdat\83t\83@\83C\83\8b\82ª\83R\83s\81[\82³\82ê\82Ü\82µ\82½\81B' );
+ if GikoForm.TreeView.Visible then
+ GikoForm.TreeView.Refresh;
+ if GikoForm.ListView.Visible then
+ GikoForm.ListView.Refresh;
+ end else begin
+ ShowMessage('\88ê\82Â\82à\83R\83s\81[\82³\82ê\82Ü\82¹\82ñ\82Å\82µ\82½\81B' );
+ end;
+ finally
+ datList.Free;
+ end;
+
+ end;
+ end else begin
+ ShowMessage('\94Â\82ð\95\\8e¦\82µ\82Ä\82\82¾\82³\82¢\81B');
+ end;
+end;
+//! \83t\83@\83C\83\8b\83`\83F\83b\83N
+function TGikoForm.isValidFile(FileName: String) : boolean;
+var
+ tmp: String;
+ unixtime: Int64;
+ dt: TDateTime;
+begin
+ Result := True;
+ // \91¶\8dÝ\82·\82é\82©\81A\8ag\92£\8eqdat\81A\83t\83@\83C\83\8b\96¼
+ if ( not FileExists(FileName) ) then begin
+ Result := False;
+ GikoUtil.MsgBox(Handle, FileName + '\82Í\91¶\8dÝ\82µ\82Ü\82¹\82ñ\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end else if (ExtractFileExt(ExtractFileName(FileName)) <> '.dat' ) then begin
+ Result := False;
+ GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + '\82Ì\8ag\92£\8eq\82ª".dat"\82Å\82 \82è\82Ü\82¹\82ñ\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end else begin
+ // \83\8d\83O\83t\83@\83C\83\8b\82Ì\8ag\92£\8eq\82ð\82Í\82¸\82µ\82½\82à\82Ì\82ª\83X\83\8c\8dì\90¬\93ú\8e\9e
+ try
+ dt := GikoSys.GetCreateDateFromName(FileName);
+ if ((UnixToDateTime(ZERO_DATE) + OffsetFromUTC) = dt) then begin
+ Result := False;
+ GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + '\82Ì\83t\83@\83C\83\8b\96¼\82ª\95s\90³\82Å\82·\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end;
+ except
+ Result := False;
+ GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + '\82Ì\83t\83@\83C\83\8b\96¼\82ª\95s\90³\82Å\82·\81B', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
+ end;
+ end;
+end;
initialization
OleInitialize(nil);