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.478 - (show annotations) (download) (as text)
Tue Oct 26 14:24:01 2004 UTC (19 years, 5 months ago) by h677
Branch: MAIN
Changes since 1.477: +50 -5 lines
File MIME type: text/x-pascal
IDポップアップ(?)を実装してみた。

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