+//! \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;
+//! ListView\82ÌD&D\8eó\82¯\8eæ\82è
+procedure TGikoForm.AcceptDropFiles(var Msg: TMsg);
+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.WParam, $FFFFFFFF, FileName, SizeOf(FileName));
+ for K := 0 to Cnt - 1 do begin
+ DragQueryFile(Msg.WParam, 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.WParam);
+ 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 begin
+ GikoForm.TreeView.Refresh;
+ end;
+ if GikoForm.ListView.Visible then begin
+ UpdateListView();
+ end;
+ 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;
+procedure TGikoForm.UpdateListView();
+begin
+ //ListView\82Å\82±\82Ì\83X\83\8c\82ª\8aÜ\82Ü\82ê\82é\94Â\82ð\95\\8e¦\82µ\82Ä\82¢\82é\82Æ\82«\82Ì\8dX\90V\8f\88\97\9d
+ if (ActiveList <> nil) and (ActiveList is TBoard) then begin
+ TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount;
+ TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount;
+ TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount;
+ //ListView\82Ì\83A\83C\83e\83\80\82Ì\8cÂ\90\94\82à\8dX\90V
+ case GikoForm.ViewType of
+ gvtAll: ListView.Items.Count := TBoard(ActiveList).Count;
+ gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount;
+ gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount;
+ gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount;
+ gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount;
+ gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount;
+ end;
+ end;
+ ListView.Refresh;
+end;
+//! \83t\83@\83C\83\8b\83`\83F\83b\83N
+function TGikoForm.isValidFile(FileName: String) : boolean;
+var
+ 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(ExtractFileName(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;
+
+procedure TGikoForm.ResPopupClearTimerTimer(Sender: TObject);
+begin
+ ResPopupClearTimer.Enabled := False;
+ if ResPopupClearTimer.Tag = 0 then begin
+ FResPopupBrowser.Clear;
+ end else begin
+ FResPopupBrowser.CurrentBrowser.ChildClear;
+ end;
+end;
+//! \83A\83C\83R\83\93\93Ç\82Ý\8d\9e\82Ý
+procedure TGikoForm.LoadIcon();
+const
+ ICONI6 = 'icon16.bmp';
+ ICON32 = 'icon32.bmp';
+ ICONSTAT = 'state_icon.bmp';
+ ICONMES = 'message_icon.bmp';
+ ICONADD = 'address_icon.bmp';
+ ICONITEM = 'item_icon.bmp';
+ ICONTOOL = 'hottoolbar_icon.bmp';
+begin
+ if FileExists(GikoSys.Setting.GetAppDir + ICONI6) then begin
+ ItemIcon16.Clear;
+ ItemIcon16.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICONI6, clPurple);
+ end;
+ if FileExists(GikoSys.Setting.GetAppDir + ICON32) then begin
+ ItemIcon32.Clear;
+ ItemIcon32.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICON32, clPurple);
+ end;
+ if FileExists(GikoSys.Setting.GetAppDir + ICONSTAT) then begin
+ StateIconImageList.Clear;
+ StateIconImageList.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICONSTAT, clPurple);
+ end;
+ if FileExists(GikoSys.Setting.GetAppDir + ICONMES) then begin
+ MessageImageList.Clear;
+ MessageImageList.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICONMES, clPurple);
+ end;
+ if FileExists(GikoSys.Setting.GetAppDir + ICONADD) then begin
+ AddressImageList.Clear;
+ AddressImageList.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICONADD, clPurple);
+ end;
+ if FileExists(GikoSys.Setting.GetAppDir + ICONITEM) then begin
+ ItemImageList.Clear;
+ ItemImageList.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICONITEM, clPurple);
+ end;
+ if FileExists(GikoSys.Setting.GetAppDir + ICONTOOL) then begin
+ HotToobarImageList.Clear;
+ HotToobarImageList.FileLoad(rtBitmap,
+ GikoSys.Setting.GetAppDir + ICONTOOL, clPurple);
+ end;
+end;
+//! \83|\83b\83v\83A\83b\83v\83\81\83j\83\85\81[\93Ç\82Ý\8d\9e\82Ý
+procedure TGikoForm.LoadPopupMenu();
+begin
+
+
+end;