Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Giko.pas

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


Revision 1.90 - (show annotations) (download) (as text)
Sun Oct 5 12:25:10 2003 UTC (20 years, 6 months ago) by h677
Branch: MAIN
Changes since 1.89: +25 -7 lines
File MIME type: text/x-pascal
BrowserTab、ホD&D、ホトエター

1 unit Giko;
2
3 interface
4
5 uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
8 {$IF Defined(DELPRO) }
9 SHDocVw,
10 MSHTML,
11 {$ELSE}
12 SHDocVw_TLB,
13 MSHTML_TLB,
14 {$IFEND}
15 IdHTTP, ActiveX, Clipbrd, Buttons, ToolWin, {HTTPApp,} YofUtils, IdComponent,
16 ShellAPI, ImgList, ActnList, UrlMon, Tabs, IdGlobal, StrUtils,
17 CommCtrl, IniFiles,
18 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
19 Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
20 FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
21 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
22 IndividualAbon, Dialogs, Search;
23
24 type
25 TGikoTreeType = (gttNone, gtt2ch, gttHistory);
26
27 TGikoForm = class(TForm)
28 StatusBar: TStatusBar;
29 MainPanel: TPanel;
30 ClientPanel: TPanel;
31 TreeSplitter: TSplitter;
32 CabinetPanel: TPanel;
33 TreeView: TTreeView;
34 ThreadMainPanel: TPanel;
35 ListSplitter: TSplitter;
36 ViewPanel: TPanel;
37 ListView: TGikoListView;
38 ThreadPanel: TPanel;
39 Browser: TWebBrowser;
40 MessagePanel: TPanel;
41 MessageBar: TPanel;
42 MessageHideButton: TSpeedButton;
43 MessageListView: TListView;
44 MessageSplitter: TSplitter;
45 Panel3: TPanel;
46 SpeedButton1: TSpeedButton;
47 ToolBar1: TToolBar;
48 CabinetSelectToolButton: TToolButton;
49 HistoryToolBar: TToolBar;
50 ToolButton15: TToolButton;
51 ToolButton18: TToolButton;
52 ItemIcon16: TImageList;
53 ItemIcon32: TImageList;
54 HotToobarImageList: TImageList;
55 ToobarImageList: TImageList;
56 ItemImageList: TImageList;
57 ActionList: TActionList;
58 LogDeleteAction: TAction;
59 KidokuAction: TAction;
60 StdToolBarVisibleAction: TAction;
61 SearchAction: TAction;
62 GikoNaviWebPageAction: TAction;
63 AboutAction: TAction;
64 ExitAction: TAction;
65 MsgBarVisibleAction: TAction;
66 StatusBarVisibleAction: TAction;
67 LargeIconAction: TAction;
68 SmallIconAction: TAction;
69 ListIconAction: TAction;
70 DetailIconAction: TAction;
71 Cabinet2chAction: TAction;
72 CabinetHistoryAction: TAction;
73 CabinetVisibleAction: TAction;
74 MidokuAction: TAction;
75 AllSelectAction: TAction;
76 UpFolderAction: TAction;
77 ListNumberVisibleAction: TAction;
78 AllItemAction: TAction;
79 LogItemAction: TAction;
80 NewItemAction: TAction;
81 SelectItemAction: TAction;
82 ShowThreadAction: TAction;
83 StopAction: TAction;
84 MainMenu: TMainMenu;
85 FileMenu: TMenuItem;
86 DeleteMenu: TMenuItem;
87 ExitMenu: TMenuItem;
88 KidokuMenu: TMenuItem;
89 MidokuMenu: TMenuItem;
90 AllSelectMenu: TMenuItem;
91 ViewMenu: TMenuItem;
92 StdToolBarMenu: TMenuItem;
93 CabinetMenu: TMenuItem;
94 N6: TMenuItem;
95 H1: TMenuItem;
96 N4: TMenuItem;
97 CabinetVisibleMenu: TMenuItem;
98 MessageMenu: TMenuItem;
99 StatusBarMenu: TMenuItem;
100 MMSep03: TMenuItem;
101 LargeIconMenu: TMenuItem;
102 SmallIconMenu: TMenuItem;
103 ListMenu: TMenuItem;
104 DetailMenu: TMenuItem;
105 ToolMenu: TMenuItem;
106 Find1: TMenuItem;
107 RoundMenu: TMenuItem;
108 MMSep04: TMenuItem;
109 OptionMenu: TMenuItem;
110 HelpMenu: TMenuItem;
111 G1: TMenuItem;
112 N1: TMenuItem;
113 AboutMenu: TMenuItem;
114 IconStyle: TAction;
115 BrowserPopupMenu: TPopupMenu;
116 ShowThreadMenu: TMenuItem;
117 ShowBoardMenu: TMenuItem;
118 ShowBoardAction: TAction;
119 ListIconPopupMenu: TPopupMenu;
120 LargeIconPMenu: TMenuItem;
121 SmallIconPMenu: TMenuItem;
122 ListPMenu: TMenuItem;
123 DetailPMenu: TMenuItem;
124 CabinetCloseAction: TAction;
125 ClosePopupMenu: TPopupMenu;
126 CloseMenu: TMenuItem;
127 OptionAction: TAction;
128 U1: TMenuItem;
129 N3: TMenuItem;
130 B1: TMenuItem;
131 S1: TMenuItem;
132 N2: TMenuItem;
133 A1: TMenuItem;
134 L1: TMenuItem;
135 N5: TMenuItem;
136 S2: TMenuItem;
137 RoundAction: TAction;
138 ListPopupMenu: TPopupMenu;
139 ListRoundPMenu: TMenuItem;
140 ListReservPMenu: TMenuItem;
141 LPMSep01: TMenuItem;
142 ItemRoundPMenu: TMenuItem;
143 LPMSep02: TMenuItem;
144 KidokuPMenu: TMenuItem;
145 MidokuPMenu: TMenuItem;
146 AllSelectPMenu: TMenuItem;
147 UrlCopyPMenu: TMenuItem;
148 LPMSep05: TMenuItem;
149 DeletePMenu: TMenuItem;
150 LPMSep06: TMenuItem;
151 ViewPMenu: TMenuItem;
152 LargeIconLPMenu: TMenuItem;
153 SmallIconLPMenu: TMenuItem;
154 ListLPMenu: TMenuItem;
155 DetailLPMenu: TMenuItem;
156 T1: TMenuItem;
157 B2: TMenuItem;
158 N8: TMenuItem;
159 URLCopyAction: TAction;
160 URLC1: TMenuItem;
161 N9: TMenuItem;
162 N10: TMenuItem;
163 MsgBarCloseAction: TAction;
164 ScrollTopAction: TAction;
165 ScrollLastAction: TAction;
166 ScrollNewAction: TAction;
167 ScrollKokoAction: TAction;
168 EditorAction: TAction;
169 IEAction: TAction;
170 ItemReloadAction: TAction;
171 BrowserMaxAction: TAction;
172 G2: TMenuItem;
173 N11: TMenuItem;
174 T3: TMenuItem;
175 L2: TMenuItem;
176 N12: TMenuItem;
177 K1: TMenuItem;
178 N13: TMenuItem;
179 N14: TMenuItem;
180 R1: TMenuItem;
181 A2: TMenuItem;
182 N15: TMenuItem;
183 SelectListReloadAction: TAction;
184 SelectThreadReloadAction: TAction;
185 SelectTimer: TTimer;
186 KokoPopupMenu: TPopupMenu;
187 KokomadePMenu: TMenuItem;
188 AllPMenu: TMenuItem;
189 MenuItem1: TMenuItem;
190 MenuItem2: TMenuItem;
191 BrowserTabCloseAction: TAction;
192 BrowserTabPopupMenu: TPopupMenu;
193 Close1: TMenuItem;
194 KokomadeAction: TAction;
195 ZenbuAction: TAction;
196 KokoResAction: TAction;
197 SelectItemURLCopyAction: TAction;
198 SelectReservAction: TAction;
199 NotSelectTabCloseAction: TAction;
200 A3: TMenuItem;
201 N16: TMenuItem;
202 A4: TMenuItem;
203 TreePopupMenu: TPopupMenu;
204 TreeSelectThreadPupupMenu: TMenuItem;
205 TreeSelectBoardPupupMenu: TMenuItem;
206 TPMSep01: TMenuItem;
207 TreeSelectURLPupupMenu: TMenuItem;
208 TreeSelectBoradReload: TAction;
209 TreeSelectThreadReload: TAction;
210 TreeSelectURLCopy: TAction;
211 ListToolBarVisibleAction: TAction;
212 BrowserToolBarVisibleAction: TAction;
213 T2: TMenuItem;
214 L3: TMenuItem;
215 B3: TMenuItem;
216 BrowserBottomPanel: TGikoPanel;
217 CabinetSelectPopupMenu: TPopupMenu;
218 N17: TMenuItem;
219 H2: TMenuItem;
220 ItemReservPMenu: TMenuItem;
221 RoundNamePopupMenu: TPopupMenu;
222 SelectNewRoundName: TAction;
223 SelectDeleteRound: TAction;
224 NewBoardAction: TAction;
225 N7: TMenuItem;
226 B4: TMenuItem;
227 LoginAction: TAction;
228 L4: TMenuItem;
229 KeySettingAction: TAction;
230 K2: TMenuItem;
231 AllTabCloseAction: TAction;
232 A5: TMenuItem;
233 N18: TMenuItem;
234 A6: TMenuItem;
235 C1: TMenuItem;
236 V1: TMenuItem;
237 N19: TMenuItem;
238 D1: TMenuItem;
239 D2: TMenuItem;
240 N20: TMenuItem;
241 MessageImageList: TImageList;
242 ProgressBar: TProgressBar;
243 ArrangeAction: TAction;
244 URL1: TMenuItem;
245 NameURLCopyAction: TAction;
246 SelectItemNameURLCopyAction: TAction;
247 NameUrlCopyPMenu: TMenuItem;
248 URLC2: TMenuItem;
249 URLN1: TMenuItem;
250 N21: TMenuItem;
251 URLC3: TMenuItem;
252 URLN2: TMenuItem;
253 N22: TMenuItem;
254 N23: TMenuItem;
255 ListCoolBar: TGikoCoolBar;
256 ListToolBar: TToolBar;
257 ViewNoButton: TToolButton;
258 IconToolButton: TToolButton;
259 UpFolderButton: TToolButton;
260 Sepa01ToolButton: TToolButton;
261 AllItemToolButton: TToolButton;
262 LogItemToolButton: TToolButton;
263 NewItemToolButton: TToolButton;
264 ListDownloadToolButton: TToolButton;
265 ListThreadDownloadToolButton: TToolButton;
266 ToolButton2: TToolButton;
267 ToolButton1: TToolButton;
268 BrowserCoolBar: TGikoCoolBar;
269 BrowserToolBar: TToolBar;
270 BrowserSizeButton: TToolButton;
271 ToolButton3: TToolButton;
272 TopButton: TToolButton;
273 LastBotton: TToolButton;
274 NewButton: TToolButton;
275 KokoButton: TToolButton;
276 ToolButton9: TToolButton;
277 EditorButton: TToolButton;
278 ToolButton11: TToolButton;
279 IEButton: TToolButton;
280 ToolButton5: TToolButton;
281 ItemReloadButton: TToolButton;
282 ListNameToolBar: TToolBar;
283 ListNameLabel: TLabel;
284 FolderImage: TImage;
285 BrowserNameToolBar: TToolBar;
286 ItemBoardImage: TImage;
287 BrowserBoardNameLabel: TLabel;
288 ItemImage: TImage;
289 BrowserNameLabel: TLabel;
290 ActiveLogDeleteAction: TAction;
291 N24: TMenuItem;
292 D3: TMenuItem;
293 N25: TMenuItem;
294 N26: TMenuItem;
295 ListNameBarVisibleAction: TAction;
296 D4: TMenuItem;
297 BrowserNameBarVisibleAction: TAction;
298 S3: TMenuItem;
299 R2: TMenuItem;
300 TreeSelectNameURLCopy: TAction;
301 TreeSelectNameURLPupupMenu: TMenuItem;
302 N27: TMenuItem;
303 H3: TMenuItem;
304 PaneInitAction: TAction;
305 I1: TMenuItem;
306 BrowserTabToolBar: TToolBar;
307 BrowserTab: TTabControl;
308 ToolButton7: TToolButton;
309 BrowserMinAction: TAction;
310 About1: TMenuItem;
311 N28: TMenuItem;
312 SelectTextClearAction: TAction;
313 MailTextClearAction: TAction;
314 NameTextClearAction: TAction;
315 S4: TMenuItem;
316 N29: TMenuItem;
317 N30: TMenuItem;
318 LeftmostTabSelectAction: TAction;
319 LeftTabSelectAction: TAction;
320 RightTabSelectAction: TAction;
321 RightmostTabSelectAction: TAction;
322 N31: TMenuItem;
323 L5: TMenuItem;
324 L6: TMenuItem;
325 A7: TMenuItem;
326 R3: TMenuItem;
327 FavoriteMenu: TMenuItem;
328 FavoriteAddAction: TAction;
329 N32: TMenuItem;
330 BoardFavoriteAddMenu: TMenuItem;
331 BoardFavoriteAddAction: TAction;
332 ThreadFavoriteAddAction: TAction;
333 ThreadFavoriteAddMenu: TMenuItem;
334 TreeSelectFavoriteAddAction: TAction;
335 N33: TMenuItem;
336 TreeSelectFavoriteAddPupupMenu: TMenuItem;
337 FavoriteArrangeAction: TAction;
338 FavoriteTreeView: TTreeView;
339 StateIconImageList: TImageList;
340 TopPanel: TPanel;
341 TopRightPanel: TPanel;
342 AnimePanel: TPanel;
343 Animate: TAnimate;
344 TopCoolPanel: TPanel;
345 MainCoolBar: TGikoCoolBar;
346 MenuToolBar: TToolBar;
347 StdToolBar: TToolBar;
348 RoundToolButton: TToolButton;
349 ToolButton6: TToolButton;
350 CabinetToolButton: TToolButton;
351 ToolButton4: TToolButton;
352 ToolButton13: TToolButton;
353 AbortToolButton: TToolButton;
354 LoginToolButton: TToolButton;
355 AddressToolBar: TToolBar;
356 AddressComboBox: TComboBox;
357 MoveToToolButton: TToolButton;
358 MoveToAction: TAction;
359 AddressImageList: TImageList;
360 AddressBarVisibleAction: TAction;
361 AddressToolBarMenu: TMenuItem;
362 T4: TMenuItem;
363 BrowserTabVisibleAction: TAction;
364 Show1: TMenuItem;
365 N34: TMenuItem;
366 BrowserTabTopAction: TAction;
367 BrowserTabBottomAction: TAction;
368 T5: TMenuItem;
369 B5: TMenuItem;
370 N35: TMenuItem;
371 BrowserTabTabStyleAction: TAction;
372 BrowserTabButtonStyleAction: TAction;
373 BrowserTabFlatStyleAction: TAction;
374 A8: TMenuItem;
375 U2: TMenuItem;
376 F1: TMenuItem;
377 PreviewTimer: TTimer;
378 MonazillaWebPageAction: TAction;
379 MonazillaWebPageAction1: TMenuItem;
380 GikoHelpAction: TAction;
381 N36: TMenuItem;
382 H4: TMenuItem;
383 KotehanAction: TAction;
384 K3: TMenuItem;
385 LinkBarVisibleAction: TAction;
386 L7: TMenuItem;
387 N37: TMenuItem;
388 A9: TMenuItem;
389 ChevronPopupMenu: TPopupMenu;
390 BBS2chWebPageAction: TAction;
391 N2N1: TMenuItem;
392 N38: TMenuItem;
393 GikoFolderOpenAction: TAction;
394 F2: TMenuItem;
395 LinkToolBar: TToolBar;
396 a10: TMenuItem;
397 ToolButton8: TToolButton;
398 ToolButton10: TToolButton;
399 ThreadEditorAction: TAction;
400 N39: TMenuItem;
401 T6: TMenuItem;
402 N40: TMenuItem;
403 LinkBarPopupMenu: TPopupMenu;
404 ToolBarSettingAction: TAction;
405 T7: TMenuItem;
406 ToolButton12: TToolButton;
407 ToolButton14: TToolButton;
408 ThreadPopupMenu: TPopupMenu;
409 MenuItem4: TMenuItem;
410 MenuItem5: TMenuItem;
411 MenuItem6: TMenuItem;
412 T8: TMenuItem;
413 NameCopyAction: TAction;
414 BoardIEAction: TAction;
415 URLN3: TMenuItem;
416 SelectItemNameCopyAction: TAction;
417 SelectItemNameCopyAction1: TMenuItem;
418 B6: TMenuItem;
419 T9: TMenuItem;
420 C2: TMenuItem;
421 SelectComboBox: TComboBox;
422 MainCoolBarPopupMenu: TPopupMenu;
423 StdToolBarVisiblePMenu: TMenuItem;
424 AddressToolBarVisiblePMenu: TMenuItem;
425 LinkToolBarVisiblePMenu: TMenuItem;
426 NG1: TMenuItem;
427 NG2: TMenuItem;
428 N43: TMenuItem;
429 N44: TMenuItem;
430 L9: TMenuItem;
431 I3: TMenuItem;
432 N45: TMenuItem;
433 B9: TMenuItem;
434 R5: TMenuItem;
435 T12: TMenuItem;
436 Show3: TMenuItem;
437 N46: TMenuItem;
438 T13: TMenuItem;
439 B10: TMenuItem;
440 N47: TMenuItem;
441 A12: TMenuItem;
442 U4: TMenuItem;
443 F4: TMenuItem;
444 N48: TMenuItem;
445 T14: TMenuItem;
446 SelectItemToolButton: TToolButton;
447 SelectResToolButton: TToolButton;
448 SelectResAction: TAction;
449 ToolButton16: TToolButton;
450 AllResAction: TAction;
451 AllResToolButton: TToolButton;
452 N50: TMenuItem;
453 A11: TMenuItem;
454 S5: TMenuItem;
455 Reload: TMenuItem;
456 GoBack: TMenuItem;
457 GoFoward: TMenuItem;
458 EditAction: TAction;
459 ReloadAction: TAction;
460 GoFowardAction: TAction;
461 GoBackAction: TAction;
462 SelectComboBoxSplitter: TImage;
463 IndividualAbon1: TMenuItem;
464 N41: TMenuItem;
465 IndividualAbon2: TMenuItem;
466 N42: TMenuItem;
467 CancellIndividualAbon: TAction;
468 AntiIndividualAbon: TMenuItem;
469 N49: TMenuItem;
470 N51: TMenuItem;
471 N52: TMenuItem;
472 N53: TMenuItem;
473 SearchBoardName: TMenuItem;
474 N55: TMenuItem;
475 TreeSelectSearchBoardName: TAction;
476 CabinetFavoriteAction: TAction;
477 N54: TMenuItem;
478 A13: TMenuItem;
479 FavoriteTreePopupMenu: TPopupMenu;
480 FavoriteTreeViewRenameAction: TAction;
481 FavoriteTreeRenamePopupMenu: TMenuItem;
482 FavoriteTreeViewNewFolderAction: TAction;
483 FavoriteTreeNewFolderPopupMenu: TMenuItem;
484 N56: TMenuItem;
485 FavoriteTreeViewDeleteAction: TAction;
486 FavoriteTreeDeletePopupMenu: TMenuItem;
487 FavoriteToolBar: TToolBar;
488 ToolButton17: TToolButton;
489 ToolButton19: TToolButton;
490 FavoriteTreeViewBrowseFolderAction: TAction;
491 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
492 N57: TMenuItem;
493 FavoriteTreeReloadPopupMenu: TMenuItem;
494 N58: TMenuItem;
495 FavoriteTreeURLCopyPopupMenu: TMenuItem;
496 FavoriteTreeNameCopyPopupMenu: TMenuItem;
497 FavoriteTreeLogDeletePopupMenu: TMenuItem;
498 N59: TMenuItem;
499 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
500 FavoriteTreeViewReloadAction: TAction;
501 FavoriteTreeViewURLCopyAction: TAction;
502 FavoriteTreeViewNameCopyAction: TAction;
503 FavoriteTreeViewNameURLCopyAction: TAction;
504 FavoriteTreeViewLogDeleteAction: TAction;
505 OnlyAHundredRes: TAction;
506 ToolButton20: TToolButton;
507 AHundredResButton: TToolButton;
508 N60: TMenuItem;
509 procedure FormCreate(Sender: TObject);
510 procedure FormDestroy(Sender: TObject);
511 procedure CabinetPanelHide(Sender: TObject);
512 procedure FormClose(Sender: TObject; var Action: TCloseAction);
513 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
514 procedure ListViewData(Sender: TObject; Item: TListItem);
515 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
516 const FindString: String; const FindPosition: TPoint;
517 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
518 Wrap: Boolean; var Index: Integer);
519 procedure ListViewDataHint(Sender: TObject; StartIndex,
520 EndIndex: Integer);
521 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
522 EndIndex: Integer; OldState, NewState: TItemStates);
523 procedure BrowserStatusTextChange(Sender: TObject;
524 const Text: WideString);
525 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
526 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
527 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
528 var AllowChange: Boolean);
529 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
530 Shift: TShiftState);
531 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
532 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
533 Button: TToolButton; State: TCustomDrawState;
534 var DefaultDraw: Boolean);
535 procedure BrowserBeforeNavigate2(Sender: TObject;
536 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
537 Headers: OleVariant; var Cancel: WordBool);
538 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
539 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
540 var DefaultDraw: Boolean);
541 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
542 const ARect: TRect; var DefaultDraw: Boolean);
543 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
544 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
545 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
546 procedure TreeViewDblClick(Sender: TObject);
547 procedure FavoriteTreeViewClick(Sender: TObject);
548 procedure ListViewCustomDraw(Sender: TCustomListView;
549 const ARect: TRect; var DefaultDraw: Boolean);
550 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
551 Shift: TShiftState; X, Y: Integer);
552 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
553 procedure MessageListViewResize(Sender: TObject);
554 procedure ExitActionExecute(Sender: TObject);
555 procedure AllSelectActionExecute(Sender: TObject);
556 procedure StdToolBarVisibleActionExecute(Sender: TObject);
557 procedure MsgBarVisibleActionExecute(Sender: TObject);
558 procedure StatusBarVisibleActionExecute(Sender: TObject);
559 procedure LargeIconActionExecute(Sender: TObject);
560 procedure SmallIconActionExecute(Sender: TObject);
561 procedure ListIconActionExecute(Sender: TObject);
562 procedure DetailIconActionExecute(Sender: TObject);
563 procedure SearchActionExecute(Sender: TObject);
564 procedure OptionActionExecute(Sender: TObject);
565 procedure GikoNaviWebPageActionExecute(Sender: TObject);
566 procedure AboutActionExecute(Sender: TObject);
567 procedure Cabinet2chActionExecute(Sender: TObject);
568 procedure CabinetHistoryActionExecute(Sender: TObject);
569 procedure CabinetVisibleActionExecute(Sender: TObject);
570 procedure AllItemActionExecute(Sender: TObject);
571 procedure LogItemActionExecute(Sender: TObject);
572 procedure NewItemActionExecute(Sender: TObject);
573 procedure SelectItemActionExecute(Sender: TObject);
574 procedure ListNumberVisibleActionExecute(Sender: TObject);
575 procedure UpFolderActionExecute(Sender: TObject);
576 procedure IconStyleExecute(Sender: TObject);
577 procedure RoundActionExecute(Sender: TObject);
578 procedure StopActionExecute(Sender: TObject);
579 procedure MsgBarCloseActionExecute(Sender: TObject);
580 procedure BrowserMaxActionExecute(Sender: TObject);
581 procedure ScrollTopActionExecute(Sender: TObject);
582 procedure ScrollLastActionExecute(Sender: TObject);
583 procedure ScrollNewActionExecute(Sender: TObject);
584 procedure ScrollKokoActionExecute(Sender: TObject);
585 procedure EditorActionExecute(Sender: TObject);
586 procedure IEActionExecute(Sender: TObject);
587 procedure ShowThreadActionExecute(Sender: TObject);
588 procedure ShowBoardActionExecute(Sender: TObject);
589 procedure URLCopyActionExecute(Sender: TObject);
590 procedure ItemReloadActionExecute(Sender: TObject);
591 procedure SelectListReloadActionExecute(Sender: TObject);
592 procedure SelectThreadReloadActionExecute(Sender: TObject);
593 procedure SelectListReloadActionUpdate(Sender: TObject);
594 procedure AllItemActionUpdate(Sender: TObject);
595 procedure LogItemActionUpdate(Sender: TObject);
596 procedure NewItemActionUpdate(Sender: TObject);
597 procedure SelectItemActionUpdate(Sender: TObject);
598 procedure UpFolderActionUpdate(Sender: TObject);
599 procedure FormResize(Sender: TObject);
600 procedure ScrollTopActionUpdate(Sender: TObject);
601 procedure ScrollLastActionUpdate(Sender: TObject);
602 procedure ScrollNewActionUpdate(Sender: TObject);
603 procedure ScrollKokoActionUpdate(Sender: TObject);
604 procedure EditorActionUpdate(Sender: TObject);
605 procedure IEActionUpdate(Sender: TObject);
606 procedure ShowThreadActionUpdate(Sender: TObject);
607 procedure ShowBoardActionUpdate(Sender: TObject);
608 procedure SelectThreadReloadActionUpdate(Sender: TObject);
609 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
610 Selected: Boolean);
611 procedure SelectTimerTimer(Sender: TObject);
612 procedure ItemReloadActionUpdate(Sender: TObject);
613 procedure ListViewDblClick(Sender: TObject);
614 procedure LogDeleteActionExecute(Sender: TObject);
615 procedure KokomadeActionExecute(Sender: TObject);
616 procedure ZenbuActionExecute(Sender: TObject);
617 procedure KokoResActionExecute(Sender: TObject);
618 procedure ListPopupMenuPopup(Sender: TObject);
619 procedure SelectItemURLCopyActionExecute(Sender: TObject);
620 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
621 procedure AllSelectActionUpdate(Sender: TObject);
622 procedure LogDeleteActionUpdate(Sender: TObject);
623 procedure BrowserTabCloseActionExecute(Sender: TObject);
624 procedure NotSelectTabCloseActionExecute(Sender: TObject);
625 procedure TreeSelectBoradReloadExecute(Sender: TObject);
626 procedure TreeSelectThreadReloadExecute(Sender: TObject);
627 procedure TreeSelectURLCopyExecute(Sender: TObject);
628 procedure TreePopupMenuPopup(Sender: TObject);
629 procedure ListToolBarVisibleActionExecute(Sender: TObject);
630 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
631 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
632 var Cancel: WordBool);
633 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
634 var Accept: Boolean);
635 procedure ListSplitterMoved(Sender: TObject);
636 procedure BrowserTabChange(Sender: TObject);
637 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
638 Shift: TShiftState; X, Y: Integer);
639 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
640 State: TDragState; var Accept: Boolean);
641 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
642 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
643 Y: Integer);
644 procedure BrowserDocumentComplete(Sender: TObject;
645 const pDisp: IDispatch; var URL: OleVariant);
646 procedure SelectReservActionUpdate(Sender: TObject);
647 procedure RoundNamePopupMenuPopup(Sender: TObject);
648 procedure SelectNewRoundNameExecute(Sender: TObject);
649 procedure SelectDeleteRoundExecute(Sender: TObject);
650 procedure SelectReservActionExecute(Sender: TObject);
651 procedure NewBoardActionExecute(Sender: TObject);
652 procedure LoginActionExecute(Sender: TObject);
653 procedure KeySettingActionExecute(Sender: TObject);
654 procedure AllTabCloseActionExecute(Sender: TObject);
655 procedure ArrangeActionExecute(Sender: TObject);
656 procedure NameURLCopyActionExecute(Sender: TObject);
657 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
658 procedure URLCopyActionUpdate(Sender: TObject);
659 procedure NameURLCopyActionUpdate(Sender: TObject);
660 procedure BrowserTabCloseActionUpdate(Sender: TObject);
661 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
662 procedure AllTabCloseActionUpdate(Sender: TObject);
663 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
664 procedure ActiveLogDeleteActionExecute(Sender: TObject);
665 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
666 procedure ListNameBarVisibleActionExecute(Sender: TObject);
667 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
668 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
669 procedure PaneInitActionExecute(Sender: TObject);
670 procedure FormShow(Sender: TObject);
671 procedure BrowserTabToolBarResize(Sender: TObject);
672 procedure BrowserMinActionExecute(Sender: TObject);
673 procedure SelectTextClearActionExecute(Sender: TObject);
674 procedure NameTextClearActionExecute(Sender: TObject);
675 procedure MailTextClearActionExecute(Sender: TObject);
676 procedure LeftmostTabSelectActionExecute(Sender: TObject);
677 procedure LeftTabSelectActionExecute(Sender: TObject);
678 procedure RightTabSelectActionExecute(Sender: TObject);
679 procedure RightmostTabSelectActionExecute(Sender: TObject);
680 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
681 procedure LeftTabSelectActionUpdate(Sender: TObject);
682 procedure RightTabSelectActionUpdate(Sender: TObject);
683 procedure RightmostTabSelectActionUpdate(Sender: TObject);
684 procedure FavoriteMenuClick(Sender: TObject);
685 procedure FavoriteAddActionExecute(Sender: TObject);
686 procedure FavoriteAddActionUpdate(Sender: TObject);
687 procedure BoardFavoriteAddActionExecute(Sender: TObject);
688 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
689 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
690 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
691 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
692 procedure FavoriteArrangeActionExecute(Sender: TObject);
693 procedure MainCoolBarResize(Sender: TObject);
694 procedure MoveToActionExecute(Sender: TObject);
695 procedure AddressToolBarResize(Sender: TObject);
696 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
697 Shift: TShiftState);
698 procedure AddressBarVisibleActionExecute(Sender: TObject);
699 procedure BrowserEnter(Sender: TObject);
700 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
701 procedure BrowserTabVisibleActionExecute(Sender: TObject);
702 procedure BrowserTabTopActionExecute(Sender: TObject);
703 procedure BrowserTabBottomActionExecute(Sender: TObject);
704 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
705 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
706 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
707 procedure PreviewTimerTimer(Sender: TObject);
708 procedure MessageHideButtonClick(Sender: TObject);
709 procedure MonazillaWebPageActionExecute(Sender: TObject);
710 procedure GikoHelpActionExecute(Sender: TObject);
711 procedure ToolButton18Click(Sender: TObject);
712 procedure KotehanActionExecute(Sender: TObject);
713 procedure LinkBarVisibleActionExecute(Sender: TObject);
714 procedure BBS2chWebPageActionExecute(Sender: TObject);
715 procedure GikoFolderOpenActionExecute(Sender: TObject);
716 procedure MainCoolBarBandInfo(Sender: TObject;
717 var BandInfo: PReBarBandInfoA);
718 procedure MainCoolBarChevronClick(Sender: TObject;
719 RebarChevron: PNMRebarChevron);
720 procedure ListCoolBarBandInfo(Sender: TObject;
721 var BandInfo: PReBarBandInfoA);
722 procedure ListCoolBarChevronClick(Sender: TObject;
723 RebarChevron: PNMRebarChevron);
724 procedure BrowserCoolBarBandInfo(Sender: TObject;
725 var BandInfo: PReBarBandInfoA);
726 procedure BrowserCoolBarChevronClick(Sender: TObject;
727 RebarChevron: PNMRebarChevron);
728 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
729 procedure ThreadEditorActionExecute(Sender: TObject);
730 procedure ThreadEditorActionUpdate(Sender: TObject);
731 procedure ToolBarSettingActionExecute(Sender: TObject);
732 procedure NameCopyActionExecute(Sender: TObject);
733 procedure BoardIEActionExecute(Sender: TObject);
734 procedure SelectItemNameCopyActionExecute(Sender: TObject);
735 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
736 procedure BoardIEActionUpdate(Sender: TObject);
737 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
738 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
739 procedure NameCopyActionUpdate(Sender: TObject);
740 procedure SelectComboBoxChange(Sender: TObject);
741 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
742 Shift: TShiftState);
743 procedure SelectComboBoxExit(Sender: TObject);
744 procedure NG1Click(Sender: TObject);
745 procedure SelectResActionExecute(Sender: TObject);
746 procedure SelectResActionUpdate(Sender: TObject);
747 procedure FormKeyDown(Sender: TObject; var Key: Word;
748 Shift: TShiftState);
749 procedure FormKeyUp(Sender: TObject; var Key: Word;
750 Shift: TShiftState);
751 procedure AllResActionExecute(Sender: TObject);
752 procedure AllResActionUpdate(Sender: TObject);
753 procedure ReloadClick(Sender: TObject);
754 procedure GoBackClick(Sender: TObject);
755 procedure GoFowardClick(Sender: TObject);
756 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
757 Shift: TShiftState; X, Y: Integer);
758 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
759 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
760 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
761 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
762 procedure StatusBarResize(Sender: TObject);
763 procedure IndividualAbon1Click(Sender: TObject);
764 procedure IndividualAbon2Click(Sender: TObject);
765 procedure N42Click(Sender: TObject);
766 procedure SelectComboBoxEnter(Sender: TObject);
767 procedure AntiIndividualAbonClick(Sender: TObject);
768 procedure N51Click(Sender: TObject);
769 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
770 procedure CabinetFavoriteActionExecute(Sender: TObject);
771 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
772 Y: Integer);
773 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
774 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
775 var S: String);
776 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
777 Shift: TShiftState);
778 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
779 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
780 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
781 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
782 procedure ToolButton19Click(Sender: TObject);
783 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
784 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
785 procedure FavoriteTreeViewDblClick(Sender: TObject);
786 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
787 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
788 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
789 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
790 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
791 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
792 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
793 Shift: TShiftState; X, Y: Integer);
794 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
795 State: TDragState; var Accept: Boolean);
796 procedure OnlyAHundredResExecute(Sender: TObject);
797 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
798 Y: Integer);
799 private
800 { Private ?ス?ス?ス?ス }
801
802 FSortIndex: Integer;
803 FSortOrder: Boolean;
804
805 FEnabledCloseButton: Boolean;
806 // ThreadCreate: TThreadCreate;
807
808 FClickNode: TTreeNode;
809 FHttpState: Boolean;
810 FHint: TResPopup;
811 FPreviewBrowser: TPreviewBrowser;
812 FPreviewURL: string;
813
814 FBrowserSizeHeight: Integer;
815 FBrowserSizeWidth: Integer;
816
817 // FFavorite: TFavorite;
818 FBrowserComplete: Boolean;
819 FTabHintIndex: Integer;
820 FListStyle: TViewStyle; //?ス?ス?スX?スg?スA?スC?スR?ス?ス?スX?ス^?スC?ス?ス
821 FItemNoVisible: Boolean; //?ス?ス?スX?スg?ス?ス?ス?ス?ス\?ス?ス?スt?ス?ス?スO
822 FViewType: TGikoViewType; //?ス?ス?スX?スg?スA?スC?スe?ス?ス?ス\?ス?ス?ス^?スC?スv
823 FActiveList: TObject;
824 FActiveContent: TThreadItem; //
825 FHistoryList: TList; //?スq?スX?スg?ス?ス?ス?ス?スX?スg
826 FTreeType: TGikoTreeType;
827 FWorkCount: Integer;
828 FNameCookie: string;
829 FMailCookie: string;
830 // FLastRoundTime: TDateTime;
831 BrowserNullTab: TThreadItem;
832 // DoubleClickOccurred: array [TMouseButton] of Boolean;
833 FDownloadTitle: string; //?ス_?スE?ス?ス?ス?ス?ス[?スh?ス?ス?ス?ス?ス^?スC?スg?ス?ス?ス?ス
834 FDownloadMax: Integer; //?ス_?スE?ス?ス?ス?ス?ス[?スh?ス?ス?ス?ス?ス?ス?ス?ス?スT?スC?スY
835 FEvent: THTMLDocumentEventSink;//?スu?ス?ス?スE?スU?スh?スL?ス?ス?ス?ス?ス?ス?スg?スC?スx?ス?ス?スg
836
837 Fkeynum : Integer; //?スL?ス[?ス{?ス[?スh?ス?ス?スX?ス|?スb?スv?スA?スb?スv?スp
838
839 IsDraggingSelectComboBox : Boolean;
840 DraggingSelectComboBoxPosition : TPoint;
841
842 FSearchDialog: TSearchDialog;
843
844 FDropSpaceNode: TTreeNode;
845
846
847 FDragTime : Cardinal; //?ス?ス?ス?ス?スN?ス?スD&D?スp
848 FDragButton : TToolButton; //?ス?ス?ス?ス?スN?ス?スD&D?スp?ス?スDrag?ス?ス?ス?ス?ス?スButton?ス?ス?ス?ス
849 FDragWFirst : Boolean; //WebTab?ス?スD&D?スp
850 FDragWTabidx : Integer; //WebTab?ス?スD&D?スp
851 FDragPoint : TPoint;
852
853 procedure SetBoardTreeNode;
854 function SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
855 function SetBoardListItem(Category: TCategory): Integer;
856 function SetThreadListItem(Board: TBoard): Integer;
857 // function GetRoundName(index: integer): string;
858
859 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
860 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
861 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
862 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
863 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
864
865 procedure SetActiveList(Obj: TObject);
866 procedure ListClick;
867 procedure ListDoubleClick;
868 procedure BrowserMovement(AName: string);
869 procedure SelectListItem(List: TList);
870 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
871 procedure DeleteTab(ThreadItem: TThreadItem);
872 function Hook(var Message: TMessage): Boolean;
873 procedure AddRoundNameMenu(MenuItem: TMenuItem);
874 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
875 procedure SetSelectRoundName(Sender: TObject);
876 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
877
878 procedure SetMenuFont;
879 // procedure CreateFavMenu(Folder: TFavoriteFolder);
880 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
881 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
882 procedure FavoriteClick(Sender: TObject); overload;
883 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
884 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
885 function OnDocumentContextMenu(Sender: TObject): WordBool;
886 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
887 procedure SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean);
888 procedure ShowTextPopup;
889 //procedure ShowTextPopup(HintData: THintData);
890 // procedure SetStdToolBar;
891 // function GetAction(ActionName: string): TContainedAction;
892 procedure SetLinkBar;
893 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
894 procedure MenuBarChevronMenu;
895 procedure LinkBarChevronMenu;
896 procedure ToolBarChevronMenu(ToolBar: TToolBar);
897 procedure ModifySelectList;
898 procedure FavoriteBrowseFolder( node: TTreeNode );
899 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
900 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
901 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
902 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
903 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
904 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
905 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
906 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
907 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
908 //
909 procedure BrowserTabClick(Sender: TObject);
910 protected
911 procedure CreateParams(var Params: TCreateParams); override;
912 procedure WndProc(var Message: TMessage); override;
913 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
914 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
915 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
916 public
917 { Public ?ス?ス?ス?ス }
918 // FDownload: TDownload;
919 FControlThread: TThreadControl;
920 procedure MoveToURL(URL: string);
921 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
922 procedure ReloadBBS;
923 function GetHttpState: Boolean;
924 procedure SetEnabledCloseButton(Enabled: Boolean);
925 function GetTreeNode(Data: TObject): TTreeNode;
926 procedure AppFormDeactivate(Sender: TObject);
927 // procedure CabinetPanelVisible(PanelVisible: Boolean);
928 procedure ListViewAllSelect;
929
930 property ListStyle: TViewStyle read FListStyle write FListStyle;
931 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
932 property ViewType: TGikoViewType read FViewType write FViewType;
933
934 property NameCookie: string read FNameCookie write FNameCookie;
935 property MailCookie: string read FMailCookie write FMailCookie;
936
937 procedure SetContent(ThreadItem: TThreadItem);
938 function GetActiveContent: TThreadItem;
939 function GetActiveList: TObject;
940
941 property ActiveList: TObject read GetActiveList write SetActiveList;
942 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
943
944 procedure SetListViewType(AViewType: TGikoViewType); overload;
945 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
946 procedure DownloadContent(ThreadItem: TThreadItem);
947 procedure DownloadList(Board: TBoard);
948 procedure PlaySound(SoundEventName: string);
949
950 function AddHistory(ThreadItem: TThreadItem): Boolean;
951 procedure DeleteHistory(ThreadItem: TThreadItem);
952 procedure ClearHistory;
953 procedure Show2chTree;
954 procedure ShowHistoryTree;
955 procedure SetHistoryTreeNode;
956 // procedure SelectTreeNode(Item: TObject);
957 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
958 procedure SetBrowserTabState;
959 // property Favorite: TFavorite read FFavorite write FFavorite;
960 procedure SetToolBarPopup;
961 published
962 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
963 end;
964
965 TFavoriteMenuItem = class(TMenuItem)
966 private
967 FData : Pointer;
968 public
969 property Data: Pointer read FData write FData;
970 end;
971
972 TLinkToolButton = class(TToolButton)
973 private
974 FData : Pointer;
975 public
976 property Data: Pointer read FData write FData;
977 end;
978
979 var
980 GikoForm: TGikoForm;
981
982 implementation
983
984 uses
985 About, Option, Round, Splash, Sort, ListSelect,
986 NewBoard;
987
988 const
989 CAPTION_NAME: string = '?スM?スR?スi?スr';
990 BLANK_HTML: string = 'about:blank';
991 SELECTCOMBOBOX_NAME: string = ''; // '?スX?ス?ス?スb?スh?スi?ス?ス?ス?ス?ス?ス';
992 SELECTCOMBOBOX_COLOR: TColor = clWindow;
993 //D&D?ス?ス?スl
994 DandD_THRESHOLD = 5; //D&D?ス?ス?ス?ス?スl?スipixcel)
995 //?スc?ス?ス?ス[?スE?ス?ス?スX?スg?スA?スC?スR?ス?ス
996 ITEM_ICON_2CH1 = 0; //2ch?スA?スC?スR?ス?ス
997 ITEM_ICON_2CH2 = 1; //2ch?スA?スC?スR?ス?ス
998 ITEM_ICON_CATEGORY1 = 2; //?スJ?スe?スS?ス?ス?スA?スC?スR?ス?ス
999 ITEM_ICON_CATEGORY2 = 3; //?スJ?スe?スS?ス?ス?スA?スC?スR?ス?ス
1000 ITEM_ICON_BOARD1 = 4; //?ス?ス?スA?スC?スR?ス?ス
1001 ITEM_ICON_BOARD2 = 5; //?ス?ス?スA?スC?スR?ス?ス
1002 ITEM_ICON_THREADLOG1 = 6; //?スX?ス?ス?スA?スC?スR?ス?ス?スi?ス?ス?スO?ス?ス?ス?ス?スj
1003 ITEM_ICON_THREADLOG2 = 7; //?スX?ス?ス?スA?スC?スR?ス?ス?スi?ス?ス?スO?ス?ス?ス?ス?スj
1004 ITEM_ICON_THREAD1 = 8; //?スX?ス?ス?スA?スC?スR?ス?ス?スi?ス?ス?スO?ス?ス?ス?ス?スj
1005 ITEM_ICON_THREAD2 = 9; //?スX?ス?ス?スA?スC?スR?ス?ス?スi?ス?ス?スO?ス?ス?ス?ス?スj
1006 ITEM_ICON_THREADNEW1 = 10; //?スX?ス?ス?スA?スC?スR?ス?ス?スi?スV?ス?ス?スj
1007 ITEM_ICON_THREADNEW2 = 11; //?スX?ス?ス?スA?スC?スR?ス?ス?スi?スV?ス?ス?スj
1008 ITEM_ICON_SORT1 = 12; //?ス\?ス[?スg?スA?スC?スR?ス?ス
1009 ITEM_ICON_SORT2 = 13; //?ス\?ス[?スg?スA?スC?スR?ス?ス
1010
1011 //?スc?ス[?ス?ス?スo?ス[?スA?スC?スR?ス?ス
1012 TOOL_ICON_HEIGHT_MAX = 16; //?ス?ス?ス?ス?ス?ス?ス?ス?スA?スC?スR?ス?ス
1013 TOOL_ICON_HEIGHT_MIN = 17; //?ス?ス?ス?ス?ス?ス?ス?ス?スA?スC?スR?ス?ス
1014 TOOL_ICON_HEIGHT_NORMAL = 18; //?ス?ス?ス?ス?スW?ス?ス?スA?スC?スR?ス?ス
1015 TOOL_ICON_WIDTH_MAX = 19; //?ス?ス?ス?ス?ス?ス?スA?スC?スR?ス?ス
1016 TOOL_ICON_WIDTH_MIN = 20; //?ス?ス?ス?ス?ス?ス?スA?スC?スR?ス?ス
1017 TOOL_ICON_WIDTH_NORMAL = 21; //?ス?ス?スW?ス?ス?スA?スC?スR?ス?ス
1018
1019 TOOL_ICON_FAV_FOLDER = 30; //?ス?ス?スC?ス?ス?ス?ス?ス?ス?スt?スH?ス?ス?ス_?スA?スC?スR?ス?ス
1020 TOOL_ICON_FAV_BOARD = 31; //?ス?ス?スC?ス?ス?ス?ス?ス?ス?ス?ス?スA?スC?スR?ス?ス
1021 TOOL_ICON_FAV_THREAD = 32; //?ス?ス?スC?ス?ス?ス?ス?ス?ス?スX?ス?ス?スA?スC?スR?ス?ス
1022
1023 HTML_FILE_NAME = 'temp_preview.html';
1024
1025 {$R *.DFM}
1026
1027 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1028 begin
1029 inherited;
1030 if FormStyle in [fsNormal, fsStayOnTop] then begin
1031 if BorderStyle in [bsSingle, bsSizeable] then begin
1032 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1033 Params.WndParent := 0;
1034 end;
1035 end;
1036 end;
1037
1038 procedure TGikoForm.FormCreate(Sender: TObject);
1039 const
1040 TVS_NOTOOLTIPS = $0080;
1041 var
1042 FileName: string;
1043 Style: DWORD;
1044 msg: string;
1045 i: Integer;
1046 wp: TWindowPlacement;
1047 s: string;
1048 begin
1049 {$IFDEF DEBUG}
1050 AllocConsole;
1051 Writeln('============================================================');
1052 Writeln(' ?スM?スR?スi?スr?スf?スo?スb?スO ?スR?ス?ス?ス\?ス[?ス?ス');
1053 Writeln('');
1054 Writeln(' ?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スB');
1055 Writeln(' ?スI?ス?ス?ス?ス?ス?ス?スA?スM?スR?スi?スr?スE?スB?ス?ス?スh?スE?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス');
1056 Writeln('============================================================');
1057 {$ENDIF}
1058 Application.OnDeactivate := AppFormDeactivate;
1059 Self.OnDeactivate := AppFormDeactivate;
1060 Application.HookMainWindow(Hook);
1061
1062 FTreeType := gttNone;
1063
1064 FSearchDialog := nil;
1065
1066 //?ス?ス?ス?ス?スJ?ス[?ス\?ス?ス
1067 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1068
1069 //?ス?ス?ス?ス?スf?ス[?ス^?ス?ス?ス?ス?ス?ス?ス?ス
1070 RoundList := TRoundList.Create;
1071 RoundList.LoadRoundFile;
1072
1073 //BBS?ス?ス?ス?ス
1074 BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1075
1076 //?ス?ス?スC?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1077 // FFavorite := TFavorite.Create(FavoriteTreeView);
1078 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1079 FavoriteDM.ReadFavorite;
1080
1081 //?スA?スh?ス?ス?スX?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1082 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1083
1084 EnabledCloseButton := True;
1085 BoardGroup.BBS2ch.ReadBoardFile; //?ス{?ス[?スh?スt?ス@?スC?ス?ス?ス?ス?ス?ス
1086 // SetBoardTreeNode; //?スc?ス?ス?ス[?ス?ス?ス{?ス[?スh?ス?ス?ス?ス
1087
1088 //?ス?ス?スX?スg?スX?ス^?スC?ス?ス
1089 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1090
1091 //?ス?ス?スC?ス?ス?スN?ス[?ス?ス?スo?ス[?ス?ス?スu
1092 // MainCoolBar.Top := 0;
1093 // MainCoolBar.Left := 0;
1094
1095 //?スA?スj?ス?ス?スp?スl?ス?ス?ス?ス?スu
1096 AnimePanel.Top := 0;
1097 AnimePanel.Left := 0;
1098
1099 //?スe?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1100
1101 //?スL?ス?ス?スr?スl?スb?スg
1102 CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1103 CabinetVisibleAction.Execute;
1104 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1105
1106 //?ス?ス?スb?スZ?ス[?スW?スo?ス[
1107 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1108 MsgBarVisibleActionExecute(nil);
1109 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1110
1111 //?スX?スe?ス[?ス^?スX?スo?ス[
1112 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1113 StatusBarVisibleActionExecute(nil);
1114
1115 //?スt?スH?ス?ス?スg?スE?スF?ス?ス?ス?ス
1116 TreeView.Items.BeginUpdate;
1117 FavoriteTreeView.Items.BeginUpdate;
1118 ListView.Items.BeginUpdate;
1119 try
1120 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1121 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1122 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1123 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1124
1125 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1126 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1127 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1128 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1129
1130 ListView.Font.Name := GikoSys.Setting.ListFontName;
1131 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1132 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1133 ListView.Color := GikoSys.Setting.ListBackColor;
1134 finally
1135 TreeView.Items.EndUpdate;
1136 FavoriteTreeView.Items.EndUpdate;
1137 ListView.Items.EndUpdate;
1138 end;
1139 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1140 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1141
1142 //?スu?ス?ス?スE?スU?ス^?スu?スt?スH?ス?ス?スg
1143 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1144 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1145 FDragWFirst := false;
1146
1147 // TreeView.TopItem.Expanded := True; //?スc?ス?ス?ス[?スg?スb?スv?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スJ?ス?ス
1148 // TreeView.Selected := TreeView.Items[0]; //?スc?ス?ス?ス[?ス?ス?スg?スb?スv?ス?ス?ス?ス?ス?ス?スI?ス?ス?ス?ス?ス?ス
1149 SetContent(nil); //?スu?ス?ス?スE?スU?ス?ス?ス?ス?ス?ス?ス\?ス?ス
1150
1151 //?ス?ス?ス?ス?ス?ス?スE?スE?スB?ス?ス?スh?スE?ス?ス?スu?ス?ス?ス?ス
1152 wp.length := sizeof(wp);
1153 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1154 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1155 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1156 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1157 wp.showCmd := SW_HIDE;
1158 SetWindowPlacement(Handle, @wp);
1159
1160 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1161 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1162 if GikoSys.Setting.WindowMax then
1163 WindowState := wsMaximized;
1164
1165 //?スM?スR?スA?スj?ス?ス
1166 try
1167 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1168 if FileExists(FileName) then
1169 Animate.FileName := FileName;
1170 except
1171 end;
1172 // AnimePanel.Height := 26;
1173 // AnimePanel.Width := 39;
1174 // AnimePanel.Top := 2;
1175 // AnimePanel.Left := Width - 48;
1176
1177 //?スN?スb?スL?ス[
1178 FNameCookie := '';
1179 FMailCookie := '';
1180
1181 //?スX?ス?ス?スS?ス?ス?ス\?ス?ス?ス{?ス^?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1182 AllItemAction.Checked := True;
1183 AllResAction.Checked := True;
1184
1185 //TreeView?ス?ス?ス?ス?ス?ス?スL?ス?スToolTip?ス?ス?ス?ス?ス\?ス?ス
1186 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1187 Style := Style or TVS_NOTOOLTIPS;
1188 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1189
1190 // ?スc?ス?ス?ス[?ス?ス?ス?ス?スC?ス?ス?ス?ス?ス?ス?ス\?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1191 TreeView.Align := alClient;
1192 FavoriteTreeView.Align := alClient;
1193 FavoriteTreeView.Visible := False;
1194
1195 //?スu?ス?ス?スE?スU?スT?スC?スY?ス?ス?スX?ス?ス?ス?ス?ス?ス?ス?ス
1196 // FBrowserSizeFlag := False;
1197 // FBrowserSizeHeight := ViewPanel.Height;
1198
1199 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1200 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1201
1202 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1203 ArrangeAction.Execute;
1204
1205 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1206 case GikoSys.Setting.ListWidthState of
1207 glsMax: begin
1208 ViewPanel.Width := 1;
1209 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1210 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1211 end;
1212 glsMin: begin
1213 ViewPanel.Width := GikoSys.Setting.ListWidth;
1214 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1215 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1216 end;
1217 else begin
1218 ViewPanel.Width := GikoSys.Setting.ListWidth;
1219 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1220 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1221 end;
1222 end;
1223 // if GikoSys.Setting.ListWidthMax then begin
1224 // ViewPanel.Width := 1;
1225 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1226 // end else begin
1227 // ViewPanel.Width := GikoSys.Setting.ListWidth;
1228 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1229 // end;
1230 end else begin
1231 case GikoSys.Setting.ListHeightState of
1232 glsMax: begin
1233 ViewPanel.Height := 1;
1234 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1235 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1236 end;
1237 glsMin: begin
1238 ViewPanel.Height := GikoSys.Setting.ListHeight;
1239 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1240 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1241 end;
1242 else begin
1243 ViewPanel.Height := GikoSys.Setting.ListHeight;
1244 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1245 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1246 end;
1247 end;
1248 // if GikoSys.Setting.ListHeightState = glsMax then begin
1249 // end else begin
1250 // ViewPanel.Height := GikoSys.Setting.ListHeight;
1251 // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1252 // end;
1253 end;
1254
1255 //?スv?ス?ス?スO?ス?ス?スX?スo?ス[?ス?ス?ス?ス?ス?ス?ス?ス
1256 // ProgressBar.Visible := False;
1257 ProgressBar.Parent := StatusBar;
1258 ProgressBar.Top := 2;
1259 ProgressBar.Left := 0;
1260 ProgressBar.Width := StatusBar.Panels[0].Width;
1261 ProgressBar.Height := StatusBar.Height - 2;
1262 ProgressBar.Position := 0;
1263
1264 //?スc?ス[?ス?ス?スo?ス[?ス\?ス?ス
1265 //formshow()?ス?ス?ス?ス?ス?ス
1266
1267 //?ス_?スE?ス?ス?ス?ス?ス[?スh?スI?スu?スW?スF?スN?スg
1268 // FDownload := TDownload.Create;
1269 // FDownload.OnDownloadEnd := OnDonloadEnd;
1270 // FDownload.OnWork := Work;
1271 // FDownload.OnWorkBegin := WorkBegin;
1272 // FDownload.OnWorkEnd := WorkEnd;
1273
1274 //?ス_?スE?ス?ス?ス?ス?ス[?スh?スI?スu?スW?スF?スN?スg
1275 FControlThread := TThreadControl.Create(True);
1276 FControlThread.MaxThreadCount := 1;
1277 FControlThread.Resume;
1278 FControlThread.OnDownloadEnd := DownloadEnd;
1279 FControlThread.OnDownloadMsg := DownloadMsg;
1280 FControlThread.OnWork := Work;
1281 FControlThread.OnWorkBegin := WorkBegin;
1282 FControlThread.OnWorkEnd := WorkEnd;
1283 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1284
1285 //?スq?スX?スg?ス?ス?ス?ス?スX?スg
1286 FHistoryList := TList.Create;
1287
1288 // ?スi?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1289 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1290
1291 //?スu?ス?ス?スE?スU?ス^?スu?ス?ス?ス?ス
1292 SetBrowserTabState;
1293
1294 BrowserBoardNameLabel.Caption := '';
1295 BrowserNameLabel.Caption := '';
1296 FWorkCount := 0;
1297
1298 // DetailIconAction.Execute;
1299
1300 // FBrowserSizeHeight := ViewPanel.Height;
1301 FTabHintIndex := -1;
1302
1303 //?ス?ス?スO?スt?スH?ス?ス?ス_?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1304 // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1305 // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1306 // end;
1307 // FormResize(Sender);
1308 // MainCoolBarResize(Sender);
1309 // Application.ProcessMessages;
1310
1311 //?ス?ス?ス?ス?スN?スo?ス[
1312 SetLinkBar;
1313
1314 //?ス?ス?スj?ス?ス?ス[?スt?スH?ス?ス?スg
1315 SetMenuFont;
1316
1317 //?スc?ス[?ス?ス?スo?ス[Wrapable
1318 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1319 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1320
1321 //?スc?ス[?ス?ス?ス{?ス^?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1322 ReadToolBarSetting(ActionList, StdToolBar);
1323 ReadToolBarSetting(ActionList, ListToolBar);
1324 try
1325 for i := ListToolBar.ControlCount - 1 downto 0 do
1326 begin
1327 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1328 begin
1329 // ?スX?ス?ス?スb?スh?スi?ス?ス?ス?ス?ス?ス?ス?ス?スZ?スp?ス?ス?ス[?ス^?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スB?ス?ス
1330 if (i + 1) < ListToolBar.ControlCount then
1331 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1332 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1333 ListToolBar.Controls[ i + 1 ].Visible := False;
1334
1335 // ?スX?ス?ス?スb?スh?スi?ス?ス?ス{?ス^?ス?ス?ス?ス?スB?ス?ス
1336 ListToolBar.Controls[ i ].Visible := False;
1337 // ?スX?ス?ス?スb?スh?スi?ス?ス?スt?スB?ス[?ス?ス?スh?ス?ス?ス}?ス?ス
1338 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1339 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1340 SelectComboBox.Parent := ListToolBar;
1341 // ?スX?ス?ス?スb?スh?スi?ス?ス?スp?ス?ス?ス?ス?スZ?スp?ス?ス?ス[?ス^?ス?ス?ス}?ス?ス
1342 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1343 SelectComboBoxSplitter.Parent := ListToolBar;
1344
1345 break;
1346 end;
1347 end;
1348 except
1349 end;
1350 ReadToolBarSetting(ActionList, BrowserToolBar);
1351 SetToolBarPopup;
1352 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1353 //?スA?スh?ス?ス?スX?スo?ス[
1354 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1355
1356 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス?ス?スFormShow?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1357
1358 //?ス{?ス[?スh?スt?ス@?スC?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スb?スZ?ス[?スW?ス\?ス?ス
1359 if not FileExists(GikoSys.GetBoardFileName) then begin
1360 msg := '?ス?ス?ス?ス?ス?ス?スb?スZ?ス[?スW?ス?ス?スM?スR?スi?スr?ス?ス?ス?ス?ス?ス?ス?ス?スg?スp?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スP?ス?ス?ス?ス?ス?ス?ス\?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス' + #13#10#13#10
1361 + '?ス?ス?ス?ス?ス?ス?ス?ス?スA?スu?スQ?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スv?ス?ス?スA?スh?ス?ス?スX?ス?ス?ス?ス?ス?ス?ス_?スE?ス?ス?ス?ス?ス[?スh?ス?ス?ス?ス?ス?ス' + #13#10
1362 + '?ス?ス?ス?ス?スo?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スA?スu?スX?スV?スv?ス{?ス^?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スB';
1363 MsgBox(SplashWindow.Handle, msg, '?スM?スR?スi?スr', MB_OK or MB_ICONINFORMATION);
1364 NewBoardAction.Execute;
1365 end;
1366
1367 //?スL?ス[?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1368 GikoSys.LoadKeySetting(ActionList);
1369
1370 //?ス?ス?スI?ス?ス?ス?ス?ス?ス?ス?ス
1371 // FLastRoundTime := 0;
1372
1373 //ResHint
1374 FHint := TResPopup.Create(Self);
1375
1376 // ?スQ?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スL?ス?ス?スr?スl?スb?スg?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス(?ス?ス?ス?ス?ス?ス)
1377 // ?ス?ス?ス?ス?ス?ス?スX?ス?ス?ス?ス?ス?ス?スy?スC?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス(?ス?ス?ス?ス?ス?ス?スA?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス\?ス?ス?スp)
1378 i := GikoSys.Setting.CabinetIndex;
1379 Cabinet2chAction.Execute;
1380 GikoSys.Setting.CabinetIndex := i;
1381
1382 // ?ス?ス?ス?ス?ス?ス?スI?ス?ス?ス?ス?ス?ス?ス?ス?スL?ス?ス?スr?スl?スb?スg?ス?ス?ス?ス?ス?ス
1383 Case GikoSys.Setting.CabinetIndex of
1384 0: Cabinet2chAction.Execute;
1385 1: CabinetHistoryAction.Execute;
1386 2: CabinetFavoriteAction.Execute;
1387 end;
1388
1389 //?スI?ス[?スg?ス?ス?スO?スC?ス?ス
1390 if GikoSys.Setting.AutoLogin then
1391 LoginAction.Execute;
1392
1393 //?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スX?ス?ス?ス?ス?スJ?ス?ス?スi?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス_?スE?ス?ス?ス?ス?ス[?スh?スj
1394 for i := 1 to ParamCount do begin
1395 MoveToURL(ParamStr(i));
1396 end;
1397 // SetStdToolBar;
1398 // SetLinkBar;
1399
1400 s := GikoSys.FAbon.NGwordname;
1401 StatusBar.Panels[2].Text := s;
1402 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1403 StatusBarResize(Sender);
1404 end;
1405
1406 //
1407 //
1408 //
1409 procedure TGikoForm.FormShow(Sender: TObject);
1410 var
1411 i: Integer;
1412 CoolSet: TCoolSet;
1413 begin
1414 ShowWindow(Application.Handle, SW_HIDE);
1415
1416 //FormCreate?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スf?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スFormShow?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1417 //?スc?ス[?ス?ス?スo?ス[?ス\?ス?ス
1418 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1419 StdToolBarVisibleActionExecute( nil );
1420 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1421 AddressBarVisibleActionExecute( nil );
1422 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1423 LinkBarVisibleActionExecute( nil );
1424 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1425 ListToolBarVisibleActionExecute( nil );
1426 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1427 ListNameBarVisibleActionExecute( nil );
1428 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1429 BrowserToolBarVisibleActionExecute( nil );
1430 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1431 BrowserNameBarVisibleActionExecute( nil );
1432
1433 //?スu?ス?ス?スE?スU?ス^?スu
1434 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1435 BrowserTabVisibleActionExecute(nil);
1436
1437 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1438 BrowserTabTopAction.Checked := True;
1439 BrowserTabTopActionExecute(nil);
1440 end else begin
1441 BrowserTabBottomAction.Checked := True;
1442 BrowserTabBottomActionExecute(nil);
1443 end;
1444
1445 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1446 BrowserTabTabStyleAction.Checked := True;
1447 BrowserTabTabStyleActionExecute(nil);
1448 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1449 BrowserTabButtonStyleAction.Checked := True;
1450 BrowserTabButtonStyleActionExecute(nil);
1451 end else begin
1452 BrowserTabFlatStyleAction.Checked := True;
1453 BrowserTabFlatStyleActionExecute(nil);
1454 end;
1455
1456
1457 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス(Main)
1458 MainCoolBar.Bands.BeginUpdate;
1459 try
1460 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1461 CoolSet := GikoSys.Setting.MainCoolSet[i];
1462 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1463 Continue;
1464 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1465 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1466 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1467 end;
1468 finally
1469 MainCoolBar.Bands.EndUpdate;
1470 end;
1471
1472 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス(Board)
1473 ListCoolBar.Bands.BeginUpdate;
1474 try
1475 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1476 CoolSet := GikoSys.Setting.ListCoolSet[i];
1477 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1478 Continue;
1479 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1480 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1481 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1482 end;
1483 finally
1484 ListCoolBar.Bands.EndUpdate;
1485 end;
1486
1487 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス(Browser)
1488 BrowserCoolBar.Bands.BeginUpdate;
1489 try
1490 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1491 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1492 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1493 Continue;
1494 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1495 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1496 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1497 end;
1498 finally
1499 BrowserCoolBar.Bands.EndUpdate;
1500 end;
1501
1502 end;
1503 {
1504 procedure TGikoForm.SetStdToolBar;
1505 var
1506 i: Integer;
1507 FileName: string;
1508 ini: TMemIniFile;
1509 s: string;
1510 Action: TContainedAction;
1511 ToolButton: TToolButton;
1512 begin
1513 exit;
1514 for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1515 StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1516 //StdToolBar.Buttons[i].Free;
1517 end;
1518 FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1519 ini := TMemIniFile.Create(FileName);
1520 i := 0;
1521 while true do begin
1522 s := ini.ReadString('StdToolBar', IntToStr(i), '');
1523 if s = '' then
1524 Break;
1525 if s = '-' then begin
1526 ToolButton := TToolButton.Create(StdToolBar);
1527 ToolButton.Style := tbsSeparator;
1528 ToolButton.Width := 8;
1529 ToolButton.Left := 10000;
1530 StdToolBar.InsertControl(ToolButton);
1531 end else begin
1532 Action := GetAction(s);
1533 if Action <> nil then begin
1534 ToolButton := TToolButton.Create(StdToolBar);
1535 ToolButton.Action := Action;
1536 ToolButton.Left := 10000;
1537 StdToolBar.InsertControl(ToolButton);
1538 end;
1539 end;
1540 Inc(i);
1541 end;
1542 end;
1543 }
1544 {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1545 var
1546 i: Integer;
1547 begin
1548 for i := 0 to ActionList.ActionCount - 1 do begin
1549 if ActionList.Actions[i].Name = ActionName then begin
1550 Result := ActionList.Actions[i];
1551 Exit;
1552 end;
1553 end;
1554 Result := nil;
1555 end;}
1556
1557 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1558 var
1559 i: Integer;
1560 CoolSet: TCoolSet;
1561 wp: TWindowPlacement;
1562 begin
1563 // if not EnabledCloseButton then begin
1564 // CanClose := False;
1565 // Exit;
1566 // end;
1567
1568 CanClose := True;
1569 Application.OnDeactivate := nil;
1570 Self.OnDeactivate := nil;
1571
1572 //column?ス?ス
1573 if GetActiveList is TBBS2ch then begin
1574 for i := 0 to ListView.Columns.Count - 1 do
1575 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1576 end else if GetActiveList is TCategory then begin
1577 for i := 0 to ListView.Columns.Count - 1 do
1578 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1579 end else if GetActiveList is TBoard then begin
1580 for i := 0 to ListView.Columns.Count - 1 do
1581 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1582 end;
1583
1584 //?ス?ス?ス?ス?ス?ス?スE?スE?スB?ス?ス?スh?スE?ス?ス?スu?ス?ス?ス?ス
1585 wp.length := sizeof(wp);
1586 GetWindowPlacement(Handle, @wp);
1587 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1588 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1589 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1590 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1591 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1592
1593 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1594 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1595 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1596 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1597 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1598 if ArrangeAction.Checked then
1599 GikoSys.Setting.ListOrientation := gloVertical
1600 else
1601 GikoSys.Setting.ListOrientation := gloHorizontal;
1602 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1603
1604 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス(Main)
1605 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1606 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1607 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1608 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1609 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1610 end;
1611 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス(Board)
1612 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1613 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1614 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1615 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1616 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1617 end;
1618 //?スN?ス[?ス?ス?スo?ス[?ス?ス?ス?ス(Browser)
1619 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1620 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1621 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1622 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1623 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1624 end;
1625
1626 GikoSys.Setting.WriteWindowSettingFile;
1627 GikoSys.Setting.WriteNameMailSettingFile;
1628
1629 //?ス?ス?スC?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1630 try
1631 FavoriteDM.WriteFavorite;
1632 except
1633 end;
1634 // Favorite.Free;
1635
1636 try
1637 //?ス^?スu?スN?ス?ス?ス[?スY
1638 NotSelectTabCloseAction.Execute;
1639 if BrowserTab.Tabs.Count >= 1 then begin
1640 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1641 end;
1642 except
1643 end;
1644
1645 //?ス?ス?ス?ス?ス?ス?スX?スg?ス?ス?ス?ス&?スj?ス?ス
1646 try
1647 RoundList.SaveRoundFile;
1648 except
1649 end;
1650 try
1651 RoundList.Clear;
1652 except
1653 end;
1654 try
1655 RoundList.Free;
1656 except
1657 end;
1658
1659 //?スq?スX?スg?ス?ス?ス?ス?スX?スg
1660 try
1661 FHistoryList.Free;
1662 except
1663 end;
1664
1665 //?スA?スh?ス?ス?スX?ス?ス?ス?ス?ス?ス?ス?ス
1666 try
1667 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1668 except
1669 end;
1670
1671 try
1672 FControlThread.Terminate;
1673 except
1674 end;
1675
1676 // FDownload.Free;
1677 try
1678 SetActiveList(nil);
1679 except
1680 end;
1681 //TreeView?スN?ス?ス?スA?スiBBS2ch.Free?ス?ス?ス?ス?ス?ス?スN?ス?ス?スA?ス?ス?ス?ス?ス?スXP?スX?ス^?スC?ス?ス?ス?ス?ス?ス?スG?ス?ス?ス[?スo?ス?ス?スj
1682 Sleep(10);
1683 try
1684 TreeView.Items.Clear;
1685 except
1686 end;
1687
1688 try
1689 if FavoriteDM <> nil then
1690 FavoriteDM.Free;
1691 FavoriteDM := nil;
1692 if AddressHistoryDM <> nil then
1693 AddressHistoryDM.Free;
1694 AddressHistoryDM := nil;
1695 except
1696 end;
1697 try
1698 if BBS2ch <> nil then
1699 BBS2ch.Free;
1700 BBS2ch := nil;
1701 except
1702 end;
1703
1704 try
1705 //Hint?スj?ス?ス
1706 if FHint <> nil then begin
1707 FHint.ReleaseHandle;
1708 FHint.Free;
1709 FHint := nil;
1710 end;
1711 //Preview?スj?ス?ス
1712 if TPreviewBrowser <> nil then begin
1713 FPreviewBrowser.Free;
1714 FPreviewBrowser := nil;
1715 end;
1716 except
1717 end;
1718 end;
1719
1720 procedure TGikoForm.FormDestroy(Sender: TObject);
1721 //var
1722 // wp: TWindowPlacement;
1723 begin
1724 { //?スq?スX?スg?ス?ス?ス?ス?スX?スg
1725 FHistoryList.Free;
1726
1727 //?ス?ス?ス?ス?ス?ス?スE?スE?スB?ス?ス?スh?スE?ス?ス?スu?ス?ス?ス?ス
1728 wp.length := sizeof(wp);
1729 GetWindowPlacement(Handle, @wp);
1730
1731 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1732 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1733 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1734 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1735 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1736
1737 GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1738 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1739
1740 GikoSys.Setting.WriteWindowSettingFile;
1741 GikoSys.Setting.WriteNameMailSettingFile;
1742 FDownload.Free;
1743 BBS2ch.Free;}
1744 end;
1745
1746 //?スt?スH?ス[?ス?ス?スN?ス?ス?ス[?スY
1747 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1748 begin
1749 Application.Terminate;
1750 Action := caFree;
1751 end;
1752
1753 //?スL?ス?ス?スr?スl?スb?スg?ス~?ス{?ス^?ス?ス?スN?ス?ス?スb?スN
1754 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1755 begin
1756 CabinetVisibleAction.Execute;
1757 // CabinetPanelVisible(false);
1758 end;
1759
1760 procedure TGikoForm.ReloadBBS;
1761 begin
1762 //?ス^?スu?スN?ス?ス?ス[?スY
1763 NotSelectTabCloseAction.Execute;
1764 if BrowserTab.Tabs.Count >= 1 then
1765 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1766 //?スq?スX?スg?ス?ス?ス?ス?スX?スg
1767 FHistoryList.Clear;
1768 //TreeView?スN?ス?ス?スA?スiBBS2ch.Free?ス?ス?ス?ス?ス?ス?スN?ス?ス?スA?ス?ス?ス?ス?ス?スXP?スX?ス^?スC?ス?ス?ス?ス?ス?ス?スG?ス?ス?ス[?スo?ス?ス?スj
1769 TreeView.Items.Clear;
1770
1771 //BBS?スj?ス?ス
1772 BBS2ch.Free;
1773
1774 SetActiveList(nil);
1775
1776 FTreeType := gttNone;
1777
1778 //BBS?ス?ス?ス?ス
1779 BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1780
1781 BBS2ch.ReadBoardFile; //?ス{?ス[?スh?スt?ス@?スC?ス?ス?ス?ス?ス?ス
1782 Show2chTree;
1783 end;
1784
1785 //?ス{?ス[?スh?スc?ス?ス?ス[?ス?ス?ス?ス
1786 procedure TGikoForm.SetBoardTreeNode;
1787 var
1788 i, j: integer;
1789 Root: TTreeNode;
1790 CategoryNode: TTreeNode;
1791 BoardNode: TTreeNode;
1792 Category: TCategory;
1793 Board: TBoard;
1794 begin
1795 TreeView.Items.BeginUpdate;
1796 TreeView.Items.Clear;
1797 try
1798 Root := TreeView.Items.Add(nil, BBS2ch.Title);
1799 Root.ImageIndex := ITEM_ICON_2CH1;
1800 Root.SelectedIndex := ITEM_ICON_2CH2;
1801 Root.Data := BBS2ch;
1802 if SplashWindow <> nil then
1803 SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count;
1804
1805 for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin
1806 Category := TCategory(BoardGroup.BBS2ch.Items[i]);
1807 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1808 CategoryNode.Data := Category;
1809 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1810 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1811
1812 for j := 0 to Category.Count - 1 do begin
1813 Board := TBoard(Category.Items[j]);
1814 Board.BeginUpdate;
1815 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1816 BoardNode.Data := Board;
1817 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1818 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1819 Board.LoadSettings;
1820 Board.EndUpdate;
1821 end;
1822
1823 CategoryNode.Expanded := Category.NodeExpand;
1824
1825 if SplashWindow <> nil then begin
1826 SplashWindow.ProgressBar.StepIt;
1827 Application.ProcessMessages;
1828 end;
1829
1830 end;
1831 finally
1832 TreeView.Items.EndUpdate;
1833 end;
1834 end;
1835
1836 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
1837 const
1838 COLUMN: array[0..0] of string = ('?スJ?スe?スS?ス?ス?ス?ス');
1839 var
1840 ListColumn: TListColumn;
1841 i: Integer;
1842 begin
1843 ListView.Items.BeginUpdate;
1844 try
1845 Screen.Cursor := crHourGlass;
1846
1847 ListView.Columns.Clear;
1848 for i := 0 to Length(COLUMN) - 1 do begin
1849 ListColumn := ListView.Columns.Add;
1850 ListColumn.Caption := COLUMN[i];
1851 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1852 end;
1853
1854 ListView.Items.Count := 0;
1855 ListView.Items.Clear;
1856 ListView.Items.Count := ABBS2ch.Count;
1857
1858 // UpFolderAction.Enabled := False;
1859 // AllItemAction.Enabled := False;
1860 // LogItemAction.Enabled := False;
1861 // NewItemAction.Enabled := False;
1862 // SelectItemAction.Enabled := False;
1863 // ListDownloadToolButton.Enabled := False;
1864 // BoardReservToolButton.Enabled := False;
1865 // ListThreadDownloadToolButton.Enabled := False;
1866
1867 ListNameLabel.Caption := ABBS2ch.Title;
1868 FolderImage.Picture := nil;
1869 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1870
1871 FSortIndex := 0;
1872 FSortOrder := False;
1873 ListViewColumnClick(nil, ListView.Column[0]);
1874
1875 Result := ABBS2ch.Count;
1876 finally
1877 Screen.Cursor := crDefault;
1878 ListView.Items.EndUpdate;
1879 end;
1880 end;
1881
1882 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1883 const
1884 COLUMN: array[0..2] of string = ('?ス?ス?ス?ス', '?ス?ス?ス?ス?ス\?ス?ス', '?ス?ス?ス?ス?ス?ス?ス?ス');
1885 var
1886 ListColumn: TListColumn;
1887 i: Integer;
1888 begin
1889 ListView.Items.BeginUpdate;
1890 try
1891 Screen.Cursor := crHourGlass;
1892
1893 ListView.Columns.Clear;
1894 for i := 0 to Length(COLUMN) - 1 do begin
1895 ListColumn := ListView.Columns.Add;
1896 ListColumn.Caption := COLUMN[i];
1897 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1898 end;
1899
1900 ListView.Items.Count := 0;
1901 ListView.Items.Clear;
1902 ListView.Items.Count := Category.Count;
1903
1904 // UpFolderAction.Enabled := True;
1905 // AllItemAction.Enabled := False;
1906 // LogItemAction.Enabled := False;
1907 // NewItemAction.Enabled := False;
1908 // SelectItemAction.Enabled := False;
1909 // ListDownloadToolButton.Enabled := False;
1910 // BoardReservToolButton.Enabled := False;
1911 // ListThreadDownloadToolButton.Enabled := False;
1912
1913 ListNameLabel.Caption := Category.Title;
1914 FolderImage.Picture := nil;
1915 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1916
1917 FSortIndex := 0;
1918 FSortOrder := False;
1919 ListViewColumnClick(nil, ListView.Column[0]);
1920
1921 Result := Category.Count;
1922 finally
1923 Screen.Cursor := crDefault;
1924 ListView.Items.EndUpdate;
1925 end;
1926 end;
1927
1928 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1929 const
1930 COLUMN: array[0..6] of string = ('?スX?ス?ス?スb?スh?ス?ス', '?スJ?スE?ス?ス?スg', '?ス?ス?ス?ス', '?スV?ス?ス',
1931 '?ス?ス?ス?ス', '?ス?ス?ス?ス?ス\?ス?ス', '?ス?ス?ス?ス?ス?ス?ス?ス');
1932 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1933 taRightJustify, taRightJustify,
1934 taRightJustify, taLeftJustify,
1935 taLeftJustify);
1936 //No, ?スX?ス?ス?スb?スh?ス?ス, ?スJ?スE?ス?ス?スg, ?ス?ス?ス?ス?ス\?ス?ス, ?ス?ス?ス?ス?ス?ス?ス?ス
1937 var
1938 ListColumn: TListColumn;
1939 i: Integer;
1940 begin
1941 ListView.Items.BeginUpdate;
1942 try
1943 Screen.Cursor := crHourGlass;
1944
1945 // ?ス`?ス?ス?ス?ス?ス?ス?スh?ス~?ス?ス?ス?ス?ス?ス?スA?ス?ス?スX?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1946 // ?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スJ?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スA?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
1947 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
1948 begin
1949 ListView.Columns.Clear;
1950 for i := 0 to Length(COLUMN) - 1 do begin
1951 ListColumn := ListView.Columns.Add;
1952 ListColumn.Caption := COLUMN[i];
1953 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
1954 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
1955 end;
1956 end;
1957
1958 ListView.Items.Count := 0;
1959 ListView.Items.Clear;
1960
1961 case GikoForm.ViewType of
1962 gvtAll: ListView.Items.Count := Board.Count;
1963 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
1964 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
1965 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
1966 end;
1967
1968 ListNameLabel.Caption := Board.Title;
1969 FolderImage.Picture := nil;
1970 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
1971
1972 FSortIndex := 0;
1973 FSortOrder := False;
1974 ListViewColumnClick(nil, ListView.Column[0]);
1975
1976 Result := Board.Count;
1977 finally
1978 Screen.Cursor := crDefault;
1979 ListView.Items.EndUpdate;
1980 end;
1981 end;
1982
1983 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
1984 var
1985 i: Integer;
1986 begin
1987 if FTreeType = gttHistory then begin
1988 // SetContent(TThreadItem(Node.Data));
1989 InsertBrowserTab(TThreadItem(Node.Data));
1990 Exit;
1991 end;
1992
1993 ListView.Selected := nil;
1994 ListView.Items.Count := 0;
1995 ListView.Items.Clear;
1996 // ListView.Columns.Clear;
1997
1998 Caption := CAPTION_NAME;
1999 //Application.Title := CAPTION_NAME;
2000
2001
2002 if GetActiveList is TBBS2ch then begin
2003 for i := 0 to ListView.Columns.Count - 1 do
2004 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2005 end else if GetActiveList is TCategory then begin
2006 for i := 0 to ListView.Columns.Count - 1 do
2007 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2008 end else if GetActiveList is TBoard then begin
2009 for i := 0 to ListView.Columns.Count - 1 do
2010 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2011 end;
2012
2013 if TObject(Node.Data) is TBBS2ch then begin
2014 SetActiveList(Node.data);
2015 end else if TObject(Node.Data) is TCategory then begin
2016 SetActiveList(Node.data);
2017 end else if TObject(Node.Data) is TBoard then begin
2018 if not TBoard(Node.Data).IsThreadDatRead then begin
2019 Screen.Cursor := crHourGlass;
2020 try
2021 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2022 finally
2023 Screen.Cursor := crDefault;
2024 end;
2025 end;
2026 SetActiveList(Node.data);
2027 end;
2028 end;
2029
2030 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2031 var
2032 // FileName: string;
2033 // DateTime: TDateTime;
2034 BoardCnt: Integer;
2035 BBS: TBBS2ch;
2036 Category: TCategory;
2037 Board: TBoard;
2038 ThreadItem: TThreadItem;
2039 RepStr: string;
2040 begin
2041 if ActiveList is TBBS2ch then begin
2042 BBS := TBBS2ch(ActiveList);
2043
2044 ListView.StateImages := nil;
2045
2046 if BBS = nil then Exit;
2047 if BBS.Count <= 0 then Exit;
2048 if Item = nil then Exit;
2049 if Item.Index > BBS.Count then Exit;
2050 if ListView.Items.Count = 0 then Exit;
2051
2052 if not (BBS.Items[Item.Index] is TCategory) then Exit;
2053 Category := TCategory(BBS.Items[Item.Index]);
2054
2055 if Category = nil then Exit;
2056
2057 if ListNumberVisibleAction.Checked then
2058 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2059 else
2060 Item.Caption := Category.Title;
2061
2062 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2063 Item.Data := Category;
2064 end else if ActiveList is TCategory then begin
2065 Category := TCategory(ActiveList);
2066
2067 ListView.StateImages := nil;
2068
2069 if Category = nil then Exit;
2070 if Category.Count <= 0 then Exit;
2071 if Item = nil then Exit;
2072 if Item.Index >= Category.Count then Exit;
2073 if ListView.Items.Count = 0 then Exit;
2074
2075 if not (Category.Items[Item.Index] is TBoard) then Exit;
2076 Board := TBoard(Category.Items[Item.Index]);
2077
2078 if Board = nil then Exit;
2079
2080 if ListNumberVisibleAction.Checked then
2081 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2082 else
2083 Item.Caption := Board.Title;
2084
2085 if Item.SubItems.Count <> 2 then begin
2086 Item.SubItems.Clear;
2087 Item.SubItems.Add('');
2088 Item.SubItems.Add('');
2089 end;
2090
2091 Item.ImageIndex := ITEM_ICON_BOARD1;
2092
2093 if Board.Round then
2094 Item.SubItems[0] := Board.RoundName // '?ス\?ス?ス'
2095 else
2096 Item.SubItems[0] := '';
2097
2098 if Board.RoundDate = ZERO_DATE then begin
2099 Item.SubItems[1] := '';
2100 end else
2101 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2102 Item.Data := Board;
2103 end else if ActiveList is TBoard then begin
2104 Board := TBoard(ActiveList);
2105
2106 if GikoSys.Setting.ListIconVisible then
2107 ListView.StateImages := StateIconImageList
2108 else
2109 ListView.StateImages := nil;
2110
2111 case GikoForm.ViewType of
2112 gvtAll: BoardCnt := Board.Count;
2113 gvtLog: BoardCnt := Board.GetLogThreadCount;
2114 gvtNew: BoardCnt := Board.GetNewThreadCount;
2115 gvtUser: BoardCnt := Board.GetUserThreadCount;
2116 else
2117 BoardCnt := 0;
2118 end;
2119
2120 // if Board = nil then Exit;
2121 if BoardCnt <= 0 then Exit;
2122 if Item = nil then Exit;
2123 if Item.Index > BoardCnt then Exit;
2124 if ListView.Items.Count = 0 then Exit;
2125
2126 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2127
2128 ThreadItem := nil;
2129 case GikoForm.ViewType of
2130 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2131 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2132 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2133 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2134 end;
2135
2136 if ThreadItem = nil then Exit;
2137
2138 // if ListNumberVisibleAction.Checked then
2139 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2140 // else
2141 RepStr := ThreadItem.Title;
2142 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2143 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2144 RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2145 RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2146 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2147 //RepStr := StringReplace(RepStr, '?ス?ス?スM', ',', [rfReplaceAll]);
2148
2149 if Item.SubItems.Count <> 6 then begin
2150 Item.SubItems.Clear;
2151 Item.SubItems.Add('');
2152 Item.SubItems.Add('');
2153 Item.SubItems.Add('');
2154 Item.SubItems.Add('');
2155 Item.SubItems.Add('');
2156 Item.SubItems.Add('');
2157 end;
2158
2159 if ListNumberVisibleAction.Checked then
2160 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2161 else
2162 Item.Caption := RepStr;
2163
2164 case ThreadItem.AgeSage of
2165 gasNone: Item.StateIndex := -1;
2166 gasNew: Item.StateIndex := 0;
2167 gasAge: Item.StateIndex := 1;
2168 gasSage: Item.StateIndex := 2;
2169 end;
2170
2171 if ThreadItem.IsLogFile then begin
2172 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2173 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2174 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2175 if ThreadItem.NewResCount = 0 then
2176 Item.SubItems[2] := ''
2177 else
2178 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2179 Item.SubItems[3] := '';
2180 if ThreadItem.Round then
2181 Item.SubItems[4] := ThreadItem.RoundName
2182 else
2183 Item.SubItems[4] := '';
2184 if ThreadItem.RoundDate = ZERO_DATE then begin
2185 Item.SubItems[5] := '';
2186 end else
2187 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2188 if ThreadItem.NewArrival then
2189 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2190 end else begin
2191 Item.ImageIndex := ITEM_ICON_THREAD1;
2192 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2193 Item.SubItems[1] := '';
2194 Item.SubItems[2] := '';
2195 Item.SubItems[3] := '';
2196 Item.SubItems[4] := '';
2197 Item.SubItems[5] := '';
2198 end;
2199 Item.Data := ThreadItem;
2200 end;
2201 end;
2202
2203 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2204 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2205 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2206 var Index: Integer);
2207 begin
2208 //
2209 end;
2210
2211 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2212 EndIndex: Integer);
2213 begin
2214 //
2215 end;
2216
2217 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2218 EndIndex: Integer; OldState, NewState: TItemStates);
2219 begin
2220 //
2221 end;
2222
2223 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2224 var
2225 p: TPoint;
2226 s: string;
2227 tmp2: string;
2228 URL: string;
2229 ATitle: Boolean;
2230
2231 wkBBS: string;
2232 wkKey: string;
2233
2234 //wkInt: Integer;
2235 wkIntSt: Integer;
2236 wkIntTo: Integer;
2237
2238 ActiveFileName: string;
2239 e: IHTMLElement;
2240 Ext: string;
2241 PathRec: TPathRec;
2242 begin
2243 try
2244 try
2245 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2246 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2247 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2248 end;
2249 except
2250 end;
2251 finally
2252 end;
2253 if PreviewTimer.Enabled then
2254 PreviewTimer.Enabled := False;
2255 Application.CancelHint;
2256 if GetActiveContent <> nil then
2257 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2258 else
2259 ActiveFileName := '';
2260
2261 StatusBar.Panels[1].Text := Text;
2262
2263 if FHint <> nil then begin
2264 FHint.ReleaseHandle;
2265 FHint.ClearAllRes;
2266 end;
2267 if FPreviewBrowser <> nil then
2268 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2269
2270 if not GikoSys.Setting.UnActivePopup then
2271 if not GikoForm.Active then
2272 Exit;
2273
2274 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2275 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2276
2277 s := '';
2278 Ext := AnsiLowerCase(ExtractFileExt(Text));
2279 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2280 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2281 if FPreviewBrowser = nil then begin
2282 FPreviewBrowser := TPreviewBrowser.Create(Self);
2283 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2284 TOleControl(FPreviewBrowser).Parent := nil;
2285 end;
2286 FPreviewBrowser.Navigate('about:blank');//?スO?ス?ス?ス?ス?スv?ス?ス?スr?ス?ス?ス[?ス?ス?ス?ス?ス?ス?ス?ス?スp
2287 FPreviewURL := Text;
2288 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2289 PreviewTimer.Enabled := True;
2290 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2291 if Pos('mailto:', Text) = 1 then begin
2292 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2293 //?スM?スR?スi?スr?スX?ス?ス ?スp?ス[?スg3?ス?ス466?ス?ス?ス?ス?ス?ス?ス?ス
2294 GetCursorPos(p);
2295 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2296 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2297 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2298 if (Assigned(e)) then begin
2299 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2300 if (GikoSys.IsNumeric(tmp2)) then begin
2301 //?ス?ス?ス?ス?ス?ス?スX?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スB
2302 wkBBS := GetActiveContent.ParentBoard.BBSID;
2303 wkKey := ChangeFileExt(GetActiveContent.FileName, '');
2304 wkIntSt := StrToInt(tmp2);
2305 wkIntTo := StrToInt(tmp2);
2306 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2307 FHint.PopupType := gptThread;
2308 SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2309 end else begin
2310 FHint.PopupType := gptRaw;
2311 FHint.Caption := s;
2312 end;
2313 end;
2314 end else begin
2315 URL := Text;
2316
2317 if Pos('about:blank..', URL) = 1 then
2318 URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []);
2319
2320 PathRec := Gikosys.Parse2chURL2(URL);
2321
2322 if PathRec.FDone then begin
2323
2324 wkIntSt := PathRec.FSt;
2325 wkIntTo := PathRec.FTo;
2326
2327 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2328 wkIntSt := 1;
2329 wkIntTo := 1;
2330 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2331 wkIntSt := wkIntTo;
2332 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2333 wkIntTo := wkIntSt;
2334 end else if wkIntSt > wkIntTo then begin
2335 //wkInt := wkIntTo;
2336 wkIntTo := wkIntSt;
2337 wkIntSt := wkIntTo;
2338 end;
2339 //if wkIntSt = 0 then
2340 // wkIntSt := 1;
2341 //if wkINtTo = 0 then
2342 // wkIntTo := 1;
2343 //if PathRec.FFirst then
2344 // wkIntSt := 1;
2345 if PathRec.FStBegin then
2346 wkIntSt := 1;
2347 if PathRec.FToEnd then
2348 wkIntTo := 9999;
2349
2350 ATitle := ActiveFileName <> PathRec.FKey;
2351
2352 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2353 FHint.PopupType := gptThread;
2354 SetResPopupText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2355 end;
2356 end;
2357
2358 //if s <> '' then
2359 // ShowTextPopup(s);
2360 if FHint.PopupType = gptRaw then begin
2361 if FHint.Caption <> '' then
2362 ShowTextPopup;
2363 end else begin
2364 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2365 ShowTextPopup;
2366 end;
2367 end;
2368 end;
2369
2370 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2371 const Text: WideString);
2372 var
2373 Title: string;
2374 begin
2375 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2376 Title := CAPTION_NAME
2377 else
2378 Title := CAPTION_NAME + ' - [' + Text + ']';
2379 Caption := Title;
2380 //Application.Title := Title;
2381 end;
2382
2383 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2384 var
2385 SysMenu: HMenu;
2386 //SysMenuApp: HMenu;
2387 begin
2388 FEnabledCloseButton := Enabled;
2389 SysMenu := GetSystemMenu(Handle, False);
2390 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2391
2392 if Enabled then begin
2393 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2394 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2395 end else begin
2396 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2397 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2398 end;
2399
2400 DrawMenuBar(Handle);
2401 //DrawMenuBar(Application.Handle);
2402 end;
2403
2404 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2405 var AllowChange: Boolean);
2406 begin
2407 if FTreeType = gtt2ch then
2408 FSortIndex := -1;
2409 end;
2410
2411 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2412 Shift: TShiftState);
2413 begin
2414 if Key = VK_BACK then begin
2415 // UpFolderButtonClick(Sender);
2416 end else if Key = VK_SPACE then begin
2417 // ListClick;
2418 end else if Key = VK_RETURN then begin
2419 ListDoubleClick;
2420 end;
2421 end;
2422
2423 function TGikoForm.GetHttpState: Boolean;
2424 begin
2425 Result := FHttpState;
2426 end;
2427
2428 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2429 Column: TListColumn);
2430 var
2431 i: Integer;
2432 wkBBS: TBBS2ch;
2433 wkCategory: TCategory;
2434 wkBoard: TBoard;
2435 begin
2436 if FSortIndex = Column.Index then
2437 FSortOrder := not FSortOrder
2438 else
2439 FSortOrder := False;
2440
2441 for i := 0 to ListView.Columns.Count - 1 do
2442 ListView.Column[i].ImageIndex := -1;
2443 if FSortOrder then
2444 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2445 else
2446 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2447
2448 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2449
2450 if TObject(TreeView.Selected.Data) is TBBS2ch then begin
2451 wkBBS := TBBS2ch(TreeView.Selected.Data);
2452 Sort.SortOrder := FSortOrder;
2453 Sort.SortIndex := Column.Index;
2454 wkBBS.Sort(CategorySortProc);
2455 ListView.Refresh;
2456 end else if TObject(TreeView.Selected.Data) is TCategory then begin
2457 wkCategory := TCategory(TreeView.Selected.Data);
2458 Sort.SortOrder := FSortOrder;
2459 Sort.SortIndex := Column.Index;
2460 wkCategory.Sort(BoardSortProc);
2461 ListView.Refresh;
2462 end else if TObject(TreeView.Selected.Data) is TBoard then begin
2463 wkBoard := TBoard(TreeView.Selected.Data);
2464 Sort.SortOrder := FSortOrder;
2465 Sort.SortIndex := Column.Index;
2466 wkBoard.Sort(ThreadItemSortProc);
2467 ListView.Refresh;
2468 end;
2469 FSortIndex := Column.Index;
2470 end;
2471
2472 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2473 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2474 var
2475 ARect: TRect;
2476 begin
2477 DefaultDraw := True;
2478 Exit;
2479 DefaultDraw := False;
2480 if (cdsSelected in State) or (cdsHot in State) then begin
2481 Sender.Canvas.Brush.Color := clHighlight;
2482 Sender.Canvas.Font.Color := clHighlightText;
2483 end else begin
2484 Sender.Canvas.Brush.Color := clBtnFace;
2485 Sender.Canvas.Font.Color := clBtnText;
2486 end;
2487 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2488 Sender.Canvas.FillRect(ARect);
2489 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2490 end;
2491
2492 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2493 var
2494 Nodes: TTreeNodes;
2495 i: integer;
2496 begin
2497 Nodes := TreeView.Items;
2498
2499 for i := 0 to Nodes.Count - 1 do begin
2500 if Nodes.Item[i].Data = Data then begin
2501 Result := Nodes.Item[i];
2502 Exit;
2503 end;
2504 end;
2505 Result := nil;
2506 end;
2507
2508 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2509 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2510 Headers: OleVariant; var Cancel: WordBool);
2511 var
2512 sNo: string;
2513 p: TPoint;
2514 const
2515 kMenuName: string = 'menu:';
2516 begin
2517
2518 if Pos(kMenuName, URL) <> 0 then begin
2519 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2520
2521 if not GikoSys.IsNumeric(sNo) then Exit;
2522
2523 Cancel := True;
2524 GetCursorpos(p);
2525 KokoPopupMenu.Tag := StrToInt(sNo);
2526 KokoPopupMenu.Popup(p.x, p.y);
2527 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2528 Cancel := not GikoSys.Setting.OpenMailer;
2529 end;
2530
2531 end;
2532
2533 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2534 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2535 var DefaultDraw: Boolean);
2536 var
2537 ThreadItem: TThreadItem;
2538 begin
2539 DefaultDraw := True;
2540 // TListView(Sender).Canvas.Font.Style := [];
2541 if TObject(Item.Data) is TThreadItem then begin
2542 ThreadItem := TThreadItem(Item.Data);
2543 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2544 if ThreadItem.UnRead then
2545 TListView(Sender).Canvas.Font.Style := [fsBold];
2546 end;
2547 end;
2548
2549 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2550 begin
2551 if Application.Terminated then
2552 Exit;
2553 if PreviewTimer.Enabled then
2554 PreviewTimer.Enabled := False;
2555 //?スt?スH?ス[?スJ?スX?ス?ス?ス?ス?ス?ス?スA?スv?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スq?ス?ス?スg?ス?ス?ス?ス?ス?ス
2556 if FHint <> nil then begin
2557 FHint.ReleaseHandle;
2558 FHint.ClearAllRes;
2559 // FHint.Free;
2560 // FHint := nil;
2561 end;
2562 if FPreviewBrowser <> nil then
2563 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2564
2565 end;
2566
2567 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2568 const ARect: TRect; var DefaultDraw: Boolean);
2569 var
2570 NodeRect: TRect;
2571 i, j: Integer;
2572 IsBoardNode: Boolean;
2573 Cnt: Integer;
2574 CntText: string;
2575 TextWidth: Integer;
2576 TextRect: TRect;
2577 Board: TBoard;
2578 Category: TCategory;
2579 Bitmap: TBitmap;
2580 NodeWidth: Integer;
2581 begin
2582 DefaultDraw := True;
2583
2584 if FTreeType = gttHistory then Exit;
2585
2586 TreeView.Canvas.Font.Color := clBlue;
2587 IsBoardNode := False;
2588 Cnt := 0;
2589 for i := 0 to TreeView.Items.Count - 1 do begin
2590
2591 if not TreeView.Items[i].IsVisible then
2592 continue;
2593
2594 if TObject(TreeView.Items[i].Data) is TCategory then begin
2595 if TreeView.Items[i].Expanded then
2596 continue;
2597
2598 IsBoardNode := False;
2599 Category := TCategory(TreeView.Items[i].Data);
2600 for j := 0 to Category.Count - 1 do begin
2601 Board := Category.Items[j];
2602 if Board <> nil then begin
2603 if Board.UnRead > 0 then begin
2604 Cnt := 1;
2605 Break;
2606 end;
2607 end;
2608 end;
2609 if Cnt <> 1 then
2610 continue;
2611 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2612 IsBoardNode := True;
2613 Board := TBoard(TreeView.Items[i].Data);
2614 Cnt := Board.UnRead;
2615 if Cnt <= 0 then
2616 continue;
2617 end else
2618 continue;
2619
2620 Bitmap := TBitmap.Create;
2621 try
2622 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2623 Bitmap.Canvas.Font.Style := [fsBold];
2624 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2625 finally
2626 Bitmap.Free;
2627 end;
2628
2629 NodeRect := TreeView.Items[i].DisplayRect(True);
2630
2631 if IsBoardNode then
2632 CntText := '(' + IntToStr(Cnt) + ')'
2633 else
2634 CntText := '(+)';
2635
2636 TextWidth := TreeView.Canvas.TextWidth(CntText);
2637
2638 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2639 NodeRect.Top,
2640 NodeRect.Left + NodeWidth + TextWidth + 8,
2641 NodeRect.Bottom);
2642 DrawText(TreeView.Canvas.Handle,
2643 PChar(CntText),
2644 -1,
2645 TextRect,
2646 DT_SINGLELINE or DT_VCENTER);
2647 end;
2648 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2649 end;
2650
2651 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2652 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2653 var
2654 Board: TBoard;
2655 Category: TCategory;
2656 i: Integer;
2657 begin
2658 DefaultDraw := True;
2659
2660 if FTreeType = gttHistory then Exit;
2661
2662 TreeView.Canvas.Font.Style := [];
2663 if Node <> nil then begin
2664 if TObject(Node.Data) is TCategory then begin
2665 Category := TCategory(Node.Data);
2666 for i := 0 to Category.Count - 1 do begin
2667 Board := Category.Items[i];
2668 if Board <> nil then begin
2669 if Board.UnRead > 0 then begin
2670 TreeView.Canvas.Font.Style := [fsBold];
2671 Break;
2672 end;
2673 end;
2674 end;
2675 end else if TObject(Node.Data) is TBoard then begin
2676 Board := TBoard(Node.Data);
2677 if Board.UnRead > 0 then
2678 TreeView.Canvas.Font.Style := [fsBold];
2679 end;
2680 end;
2681 end;
2682
2683 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2684 begin
2685 TreeView.Invalidate;
2686
2687 if TObject(Node.Data) is TBBS2ch then begin
2688 TBBS2ch(Node.Data).NodeExpand := True;
2689 end else if TObject(Node.Data) is TCategory then begin
2690 TCategory(Node.Data).NodeExpand := True;
2691 end else if TObject(Node.Data) is TBoard then begin
2692 TBoard(Node.Data).NodeExpand := True;
2693 end;
2694 end;
2695
2696 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2697 begin
2698 TreeSplitter.Visible := PanelVisible;
2699 CabinetPanel.Visible := PanelVisible;
2700 CabinetToolButton.Down := PanelVisible;
2701 end;}
2702
2703 procedure TGikoForm.ListViewAllSelect;
2704 begin
2705 ListView.SetFocus;
2706 ListView.SelectAll;
2707 end;
2708
2709 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2710 var
2711 Board: TBoard;
2712 ThreadItem: TThreadItem;
2713 APoint: TPoint;
2714 HitTest: THitTests;
2715 begin
2716 GetCursorPos(APoint);
2717 APoint := TreeView.ScreenToClient(APoint);
2718 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2719 if not (htOnLabel in HitTest) then Exit;
2720 if TreeView.Selected = nil then Exit;
2721
2722 if FTreeType = gtt2ch then begin
2723 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2724 Board := TBoard(TreeView.Selected.Data);
2725 DownloadList(Board);
2726 end else if FTreeType = gttHistory then begin
2727 if not (TObject(TreeView.Selected.Data) is TThreadItem) then Exit;
2728 ThreadItem := TThreadItem(TreeView.Selected.Data);
2729 DownloadContent(ThreadItem);
2730 end;
2731 end;
2732
2733 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2734 begin
2735
2736 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2737
2738 end;
2739
2740 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2741 begin
2742 AddMessageList(Msg, nil, Icon);
2743 end;
2744
2745 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2746 var
2747 ATitle: string;
2748 s: string;
2749 begin
2750 try
2751 if Item.DownType = gdtBoard then
2752 ATitle := Item.Board.Title
2753 else
2754 ATitle := Item.ThreadItem.Title;
2755 if ATitle = '' then
2756 ATitle := '?スi?ス?ス?ス?ス?スs?ス?ス?スj';
2757
2758 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2759 //?ス?ス?ス?ス?スI?ス?ス
2760 if Item.DownType = gdtBoard then begin
2761 //?ス?ス
2762 Item.SaveListFile;
2763 AddMessageList(ATitle + ' [?スX?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス]', nil, gmiOK);
2764 if GetActiveList = Item.Board then
2765 SetActiveList(Item.Board);
2766 Item.Board.Modified := True;
2767 Item.Board.IsThreadDatRead := True;
2768 PlaySound('New');
2769 end else if Item.DownType = gdtThread then begin
2770 //?スX?ス?ス
2771 Item.SaveItemFile;
2772 Item.ThreadItem.NewArrival := True;
2773 if AddHistory(Item.ThreadItem) then begin
2774 if GetActiveContent = Item.ThreadItem then
2775 InsertBrowserTab(Item.ThreadItem)
2776 else
2777 InsertBrowserTab(Item.ThreadItem, False);
2778 end;
2779
2780 if Item.State = gdsComplete then begin
2781 PlaySound('New');
2782 AddMessageList(ATitle + ' [?スX?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス]', nil, gmiOK);
2783 end else begin
2784 PlaySound('NewDiff');
2785 AddMessageList(ATitle + ' [?スX?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス]', nil, gmiOK);
2786 end;
2787
2788 //?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スP?スO?スO?スO?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス
2789 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2790 Item.ThreadItem.Round := False;
2791 Item.ThreadItem.RoundName := '';
2792 AddMessageList('?ス?ス1000?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス - [' + Item.ThreadItem.Title + ']', nil, gmiOK);
2793 end;
2794
2795 TreeView.Refresh;
2796 end;
2797 ListView.Refresh;
2798 end else if Item.State = gdsNotModify then begin
2799 //?ス?ス?スX?スi?スV
2800 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
2801 //SetContent(Item.ThreadItem);
2802 InsertBrowserTab(Item.ThreadItem);
2803 end;}
2804 AddMessageList(ATitle + ' [?ス?ス?スX?スV]', nil, gmiSAD);
2805 PlaySound('NoChange');
2806 Screen.Cursor := crDefault;
2807 end else if Item.State = gdsAbort then begin
2808 //?ス?ス?スf
2809 AddMessageList(ATitle + ' [?ス?ス?スf]', nil, gmiSAD);
2810 end else if Item.State = gdsError then begin
2811 //?スG?ス?ス?ス[
2812 s := Item.ErrText;
2813 if s <> '' then
2814 s := ':' + s;
2815 AddMessageList(ATitle + ' [?スG?ス?ス?ス[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
2816 // if Item.ResponseCode = 302 then
2817 // AddMessageList('?ス?ス?ス?ス?ス?ス?ス]?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スX?スV?ス?ス?スs?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?スB', nil, gmiNG);
2818 PlaySound('Error');
2819 end;
2820 finally
2821 Item.Free;
2822 Dec(FWorkCount);
2823 if FWorkCount < 0 then FWorkCount := 0;
2824 if FWorkCount = 0 then begin
2825 try
2826 Animate.Active := False;
2827 except
2828 Screen.Cursor := crDefault;
2829 end;
2830 end;
2831
2832 end;
2833 end;
2834
2835 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
2836 begin
2837 // SetProgressValue(Number, 0, AWorkCountMax);
2838 // ProgressBar.Visible := True;
2839 ProgressBar.Position := 0;
2840 ProgressBar.Max := AWorkCountMax;
2841 StatusBar.Panels[1].Text := FDownloadTitle + ' - ?ス_?スE?ス?ス?ス?ス?ス[?スh?ス?ス?スJ?スn?ス?ス?ス?ス?ス?ス';
2842 FDownloadMax := AWorkCountMax;
2843 end;
2844
2845 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
2846 begin
2847 // ProgressBar.Visible := False;
2848 ProgressBar.Position := 0;
2849 // SetProgressValue(Number, 0);
2850 if FDownloadMax <> 0 then
2851 StatusBar.Panels[1].Text := FDownloadTitle + ' - ?ス_?スE?ス?ス?ス?ス?ス[?スh?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス?ス';
2852 end;
2853
2854 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
2855 begin
2856 ProgressBar.Position := AWorkCount;
2857 // SetProgressValue(Number, AWorkCount);
2858 StatusBar.Panels[1].Text := FDownloadTitle + ' - ?ス_?スE?ス?ス?ス?ス?ス[?スh?ス?ス (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
2859 end;
2860
2861 {
2862 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
2863 var
2864 Component: TComponent;
2865 begin
2866 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
2867 if Component <> nil then begin
2868 if not (Component is TProgressBar) then Exit;
2869 if Max <> -1 then
2870 TProgressBar(Component).Max := Max;
2871 TProgressBar(Component).Position := Value;
2872 end;
2873 end;
2874 }
2875
2876 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
2877 var
2878 ListItem: TListItem;
2879 begin
2880 MessageListView.Items.BeginUpdate;
2881 try
2882 ListItem := MessageListView.Items.Add;
2883 ListItem.Caption := ACaption;
2884 ListItem.Data := AObject;
2885 ListItem.MakeVisible(False);
2886 case Icon of
2887 gmiOK: ListItem.ImageIndex := 0;
2888 gmiSAD: ListItem.ImageIndex := 1;
2889 gmiNG: ListItem.ImageIndex := 2;
2890 gmiWhat: ListItem.ImageIndex := 3;
2891 end;
2892 finally
2893 MessageListView.Items.EndUpdate;
2894 end;
2895 end;
2896
2897 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
2898 var
2899 index: Integer;
2900 ThreadItem: TThreadItem;
2901 begin
2902 ThreadItem := GetActiveContent;
2903 if ThreadItem <> nil then begin
2904 SetContent(ThreadItem);
2905 end;
2906 end;}
2907
2908 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
2909 var
2910 i: Integer;
2911 // OldIndex: Integer;
2912 begin
2913 if ThreadItem.IsLogFile then begin
2914 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
2915 if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin
2916 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
2917 if ActiveTab then begin
2918 //OldIndex := BrowserTab.TabIndex;
2919 BrowserTab.TabIndex := i;
2920 // if OldIndex <> i then
2921 BrowserTab.OnChange(nil);
2922 BrowserTab.Repaint;
2923 end;
2924 Exit;
2925 end;
2926 end;
2927 end;
2928 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
2929 BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20));
2930 BrowserTab.Tabs.Objects[0] := ThreadItem;
2931 if ActiveTab then
2932 BrowserTab.TabIndex := 0;
2933 end else begin
2934 i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20));
2935 BrowserTab.Tabs.Objects[i] := ThreadItem;
2936 if ActiveTab then
2937 BrowserTab.TabIndex := i;
2938 end;
2939 if ActiveTab then begin
2940 BrowserTab.OnChange(nil);
2941 BrowserNullTab := nil;
2942 end;
2943 end else begin
2944 //OldIndex := BrowserTab.TabIndex;
2945 BrowserNullTab := ThreadItem;
2946 BrowserTab.TabIndex := -1;
2947 // if OldIndex = -1 then
2948 BrowserTab.OnChange(nil);
2949 end;
2950 BrowserTab.Repaint;
2951 if GikoSys.Setting.URLDisplay then
2952 AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName);
2953 end;
2954
2955 procedure TGikoForm.SetContent(ThreadItem: TThreadItem);
2956 var
2957 BBSID: string;
2958 FileName: string;
2959 sTitle: string;
2960 // HtmlName: string;
2961 doc: Variant;
2962 s: string;
2963 OldCursor: TCursor;
2964 //i: Integer;
2965 begin
2966 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
2967 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
2968 Application.ProcessMessages;
2969 end;
2970
2971 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2972 try
2973