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.532 - (show annotations) (download) (as text)
Wed Nov 16 15:02:05 2005 UTC (18 years, 5 months ago) by h677
Branch: MAIN
Changes since 1.531: +22 -15 lines
File MIME type: text/x-pascal
アクションの移植

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 BrowserCoolBar: TGikoCoolBar;
259 BrowserToolBar: TToolBar;
260 ToolButton3: TToolButton;
261 ToolButton9: TToolButton;
262 ToolButton11: TToolButton;
263 ToolButton5: TToolButton;
264 ListNameToolBar: TToolBar;
265 ListNameLabel: TLabel;
266 FolderImage: TImage;
267 BrowserNameToolBar: TToolBar;
268 ItemBoardImage: TImage;
269 BrowserBoardNameLabel: TLabel;
270 ItemImage: TImage;
271 BrowserNameLabel: TLabel;
272 ActiveLogDeleteAction: TAction;
273 D3: TMenuItem;
274 N25: TMenuItem;
275 N26: TMenuItem;
276 ListNameBarVisibleAction: TAction;
277 D4: TMenuItem;
278 BrowserNameBarVisibleAction: TAction;
279 S3: TMenuItem;
280 R2: TMenuItem;
281 TreeSelectNameURLCopy: TAction;
282 TreeSelectNameURLPupupMenu: TMenuItem;
283 N27: TMenuItem;
284 H3: TMenuItem;
285 PaneInitAction: TAction;
286 I1: TMenuItem;
287 BrowserTabToolBar: TToolBar;
288 BrowserTab: TTabControl;
289 BrowserMinAction: TAction;
290 About1: TMenuItem;
291 N28: TMenuItem;
292 SelectTextClearAction: TAction;
293 MailTextClearAction: TAction;
294 NameTextClearAction: TAction;
295 S4: TMenuItem;
296 N29: TMenuItem;
297 N30: TMenuItem;
298 LeftmostTabSelectAction: TAction;
299 LeftTabSelectAction: TAction;
300 RightTabSelectAction: TAction;
301 RightmostTabSelectAction: TAction;
302 N31: TMenuItem;
303 L5: TMenuItem;
304 L6: TMenuItem;
305 A7: TMenuItem;
306 R3: TMenuItem;
307 FavoriteMenu: TMenuItem;
308 FavoriteAddAction: TAction;
309 N32: TMenuItem;
310 BoardFavoriteAddMenu: TMenuItem;
311 BoardFavoriteAddAction: TAction;
312 ThreadFavoriteAddAction: TAction;
313 ThreadFavoriteAddMenu: TMenuItem;
314 TreeSelectFavoriteAddAction: TAction;
315 N33: TMenuItem;
316 TreeSelectFavoriteAddPupupMenu: TMenuItem;
317 FavoriteArrangeAction: TAction;
318 FavoriteTreeView: TTreeView;
319 StateIconImageList: TImageList;
320 TopPanel: TPanel;
321 TopRightPanel: TPanel;
322 AnimePanel: TPanel;
323 Animate: TAnimate;
324 TopCoolPanel: TPanel;
325 MainCoolBar: TGikoCoolBar;
326 MenuToolBar: TToolBar;
327 StdToolBar: TToolBar;
328 AddressToolBar: TToolBar;
329 AddressComboBox: TComboBox;
330 MoveToToolButton: TToolButton;
331 MoveToAction: TAction;
332 AddressImageList: TImageList;
333 AddressBarVisibleAction: TAction;
334 AddressToolBarMenu: TMenuItem;
335 T4: TMenuItem;
336 BrowserTabVisibleAction: TAction;
337 Show1: TMenuItem;
338 N34: TMenuItem;
339 BrowserTabTopAction: TAction;
340 BrowserTabBottomAction: TAction;
341 T5: TMenuItem;
342 B5: TMenuItem;
343 N35: TMenuItem;
344 BrowserTabTabStyleAction: TAction;
345 BrowserTabButtonStyleAction: TAction;
346 BrowserTabFlatStyleAction: TAction;
347 A8: TMenuItem;
348 U2: TMenuItem;
349 F1: TMenuItem;
350 PreviewTimer: TTimer;
351 MonazillaWebPageAction: TAction;
352 MonazillaWebPageAction1: TMenuItem;
353 GikoHelpAction: TAction;
354 N36: TMenuItem;
355 H4: TMenuItem;
356 KotehanAction: TAction;
357 K3: TMenuItem;
358 LinkBarVisibleAction: TAction;
359 L7: TMenuItem;
360 N37: TMenuItem;
361 A9: TMenuItem;
362 ChevronPopupMenu: TPopupMenu;
363 BBS2chWebPageAction: TAction;
364 N2N1: TMenuItem;
365 N38: TMenuItem;
366 GikoFolderOpenAction: TAction;
367 F2: TMenuItem;
368 LinkToolBar: TToolBar;
369 a10: TMenuItem;
370 ThreadEditorAction: TAction;
371 N39: TMenuItem;
372 T6: TMenuItem;
373 N40: TMenuItem;
374 LinkBarPopupMenu: TPopupMenu;
375 ToolBarSettingAction: TAction;
376 T7: TMenuItem;
377 ThreadPopupMenu: TPopupMenu;
378 MenuItem4: TMenuItem;
379 MenuItem5: TMenuItem;
380 MenuItem6: TMenuItem;
381 T8: TMenuItem;
382 NameCopyAction: TAction;
383 BoardIEAction: TAction;
384 URLN3: TMenuItem;
385 SelectItemNameCopyAction: TAction;
386 SelectItemNameCopyAction1: TMenuItem;
387 B6: TMenuItem;
388 T9: TMenuItem;
389 C2: TMenuItem;
390 SelectComboBox: TComboBox;
391 MainCoolBarPopupMenu: TPopupMenu;
392 StdToolBarVisiblePMenu: TMenuItem;
393 AddressToolBarVisiblePMenu: TMenuItem;
394 LinkToolBarVisiblePMenu: TMenuItem;
395 NG1: TMenuItem;
396 NG2: TMenuItem;
397 N43: TMenuItem;
398 N44: TMenuItem;
399 L9: TMenuItem;
400 I3: TMenuItem;
401 N45: TMenuItem;
402 B9: TMenuItem;
403 R5: TMenuItem;
404 T12: TMenuItem;
405 Show3: TMenuItem;
406 N46: TMenuItem;
407 T13: TMenuItem;
408 B10: TMenuItem;
409 N47: TMenuItem;
410 A12: TMenuItem;
411 U4: TMenuItem;
412 F4: TMenuItem;
413 N48: TMenuItem;
414 T14: TMenuItem;
415 SelectResAction: TAction;
416 ToolButton16: TToolButton;
417 AllResAction: TAction;
418 N50: TMenuItem;
419 A11: TMenuItem;
420 S5: TMenuItem;
421 Reload: TMenuItem;
422 GoBack: TMenuItem;
423 GoFoward: TMenuItem;
424 EditNGAction: TAction;
425 ReloadAction: TAction;
426 GoFowardAction: TAction;
427 GoBackAction: TAction;
428 IndividualAbon1: TMenuItem;
429 N41: TMenuItem;
430 IndividualAbon2: TMenuItem;
431 N42: TMenuItem;
432 CancellIndividualAbon: TAction;
433 AntiIndividualAbon: TMenuItem;
434 N49: TMenuItem;
435 N51: TMenuItem;
436 N52: TMenuItem;
437 SearchBoardName: TMenuItem;
438 TreeSelectLogDeleteSeparator: TMenuItem;
439 TreeSelectSearchBoardName: TAction;
440 CabinetFavoriteAction: TAction;
441 N54: TMenuItem;
442 A13: TMenuItem;
443 FavoriteTreePopupMenu: TPopupMenu;
444 FavoriteTreeViewRenameAction: TAction;
445 FavoriteTreeRenamePopupMenu: TMenuItem;
446 FavoriteTreeViewNewFolderAction: TAction;
447 FavoriteTreeNewFolderPopupMenu: TMenuItem;
448 N56: TMenuItem;
449 FavoriteTreeViewDeleteAction: TAction;
450 FavoriteTreeDeletePopupMenu: TMenuItem;
451 FavoriteToolBar: TToolBar;
452 ToolButton17: TToolButton;
453 ToolButton19: TToolButton;
454 FavoriteTreeViewBrowseFolderAction: TAction;
455 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
456 N57: TMenuItem;
457 FavoriteTreeReloadPopupMenu: TMenuItem;
458 N58: TMenuItem;
459 FavoriteTreeURLCopyPopupMenu: TMenuItem;
460 FavoriteTreeNameCopyPopupMenu: TMenuItem;
461 FavoriteTreeLogDeletePopupMenu: TMenuItem;
462 N59: TMenuItem;
463 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
464 FavoriteTreeViewReloadAction: TAction;
465 FavoriteTreeViewURLCopyAction: TAction;
466 FavoriteTreeViewNameCopyAction: TAction;
467 FavoriteTreeViewNameURLCopyAction: TAction;
468 FavoriteTreeViewLogDeleteAction: TAction;
469 ResRangeAction: TAction;
470 ToolButton20: TToolButton;
471 N60: TMenuItem;
472 ExportFavoriteFileAction1: TMenuItem;
473 ExportFavoriteFile: TFileSaveAs;
474 N6: TMenuItem;
475 N17: TMenuItem;
476 FavoriteTreeViewBrowseBoardAction: TAction;
477 FavoriteTreeViewBrowseThreadAction: TAction;
478 UpBoardAction: TAction;
479 N18: TMenuItem;
480 N20: TMenuItem;
481 N24: TMenuItem;
482 N62: TMenuItem;
483 N61: TMenuItem;
484 N63: TMenuItem;
485 KoreCopy: TAction;
486 N64: TMenuItem;
487 dummy1: TMenuItem;
488 TreeSelectLogDeletePopupMenu: TMenuItem;
489 N65: TMenuItem;
490 BBSSelectPopupMenu: TPopupMenu;
491 PlugInMenu: TMenuItem;
492 TreeSelectNameCopy: TAction;
493 TreeSelectNamePupupMenu: TMenuItem;
494 BrowserPanel: TPanel;
495 SetFocusForBrowserAction: TAction;
496 SetFocusForThreadListAction: TAction;
497 SetFocusForCabinetAction: TAction;
498 FileRun1: TFileRun;
499 ThreadlistMaxAndFocusAction: TAction;
500 BrowserMaxAndFocusAction: TAction;
501 SelectTimer: TTimer;
502 SelectThreadSave: TMenuItem;
503 SelectItemSaveForHTML: TAction;
504 FileSaveAs1: TFileSaveAs;
505 N55: TMenuItem;
506 N66: TMenuItem;
507 dat1: TMenuItem;
508 SelectItemSaveForDat: TAction;
509 LogFolderOpenAction: TAction;
510 OpenLogFolder: TMenuItem;
511 Browser: TWebBrowser;
512 TabSave: TMenuItem;
513 TabOpen: TMenuItem;
514 TabsSaveAction: TAction;
515 TabsOpenAction: TAction;
516 ResRangePopupMenu: TPopupMenu;
517 N1001: TMenuItem;
518 N501: TMenuItem;
519 N22: TMenuItem;
520 OnlyAHundredResAction: TAction;
521 OnlyNewResAction: TAction;
522 OnlyKokoResAction: TAction;
523 A14: TMenuItem;
524 BrowsBoradHeadAction: TAction;
525 BrowsBoradHeadAction1: TMenuItem;
526 ThreadRangeAction: TAction;
527 ThreadRangePopupMenu: TPopupMenu;
528 A15: TMenuItem;
529 L8: TMenuItem;
530 N67: TMenuItem;
531 N68: TMenuItem;
532 S6: TMenuItem;
533 N69: TMenuItem;
534 S7: TMenuItem;
535 TabAutoSaveAction: TAction;
536 TabAutoLoadAction: TAction;
537 ListColumnPopupMenu: TPopupMenu;
538 JumpToNumOfResAction: TAction;
539 FavoriteTreeViewCollapseAction: TAction;
540 RightTabCloseAction: TAction;
541 LeftTabCloseAction: TAction;
542 N70: TMenuItem;
543 SameIDResAnchorAction: TAction;
544 ID1: TMenuItem;
545 IndividualAbon1Action: TAction;
546 IndividualAbon0Action: TAction;
547 AntiIndividualAbonAction: TAction;
548 AntiIndividualAbonDlgAction: TAction;
549 IndividualAbonID1Action: TAction;
550 ID2: TMenuItem;
551 N53: TMenuItem;
552 ID3: TMenuItem;
553 IndividualAbonID0Action: TAction;
554 N71: TMenuItem;
555 MuteAction: TAction;
556 N72: TMenuItem;
557 N73: TMenuItem;
558 SortActiveColumnAction: TAction;
559 SortNextColumnAction: TAction;
560 SortPrevColumnAction: TAction;
561 BeLogInOutAction: TAction;
562 UnSelectedListViewAction: TAction;
563 SelectComboBoxPanel: TPanel;
564 SelectComboBoxSplitter: TImage;
565 ToolButton1: TToolButton;
566 N74: TMenuItem;
567 WikiFAQ: TMenuItem;
568 WikiFAQWebPageAction: TAction;
569 procedure FormCreate(Sender: TObject);
570 procedure FormDestroy(Sender: TObject);
571 procedure BrowserStatusTextChange(Sender: TObject;
572 const Text: WideString);
573 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
574 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
575 var AllowChange: Boolean);
576 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
577 Shift: TShiftState);
578 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
579 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
580 Button: TToolButton; State: TCustomDrawState;
581 var DefaultDraw: Boolean);
582 procedure BrowserBeforeNavigate2(Sender: TObject;
583 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
584 Headers: OleVariant; var Cancel: WordBool);
585 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
586 const ARect: TRect; var DefaultDraw: Boolean);
587 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
588 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
589 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
590 procedure TreeViewDblClick(Sender: TObject);
591 procedure ListViewCustomDraw(Sender: TCustomListView;
592 const ARect: TRect; var DefaultDraw: Boolean);
593 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
594 Shift: TShiftState; X, Y: Integer);
595 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
596 procedure MessageListViewResize(Sender: TObject);
597 procedure ExitActionExecute(Sender: TObject);
598 procedure AllSelectActionExecute(Sender: TObject);
599 procedure StdToolBarVisibleActionExecute(Sender: TObject);
600 procedure MsgBarVisibleActionExecute(Sender: TObject);
601 procedure StatusBarVisibleActionExecute(Sender: TObject);
602 procedure LargeIconActionExecute(Sender: TObject);
603 procedure SmallIconActionExecute(Sender: TObject);
604 procedure ListIconActionExecute(Sender: TObject);
605 procedure DetailIconActionExecute(Sender: TObject);
606 procedure SearchActionExecute(Sender: TObject);
607 procedure OptionActionExecute(Sender: TObject);
608 procedure GikoNaviWebPageActionExecute(Sender: TObject);
609 procedure AboutActionExecute(Sender: TObject);
610 procedure CabinetHistoryActionExecute(Sender: TObject);
611 procedure CabinetVisible( isVisible : Boolean );
612 procedure CabinetVisibleActionExecute(Sender: TObject);
613 procedure AllItemActionExecute(Sender: TObject);
614 procedure LogItemActionExecute(Sender: TObject);
615 procedure NewItemActionExecute(Sender: TObject);
616 procedure SelectItemActionExecute(Sender: TObject);
617 procedure ListNumberVisibleActionExecute(Sender: TObject);
618 procedure UpFolderActionExecute(Sender: TObject);
619 procedure IconStyleExecute(Sender: TObject);
620 procedure RoundActionExecute(Sender: TObject);
621 procedure StopActionExecute(Sender: TObject);
622 procedure MsgBarCloseActionExecute(Sender: TObject);
623 procedure BrowserMaxActionExecute(Sender: TObject);
624 procedure ScrollTopActionExecute(Sender: TObject);
625 procedure ScrollLastActionExecute(Sender: TObject);
626 procedure ScrollNewActionExecute(Sender: TObject);
627 procedure ScrollKokoActionExecute(Sender: TObject);
628 procedure EditorActionExecute(Sender: TObject);
629 procedure IEActionExecute(Sender: TObject);
630 procedure ShowThreadActionExecute(Sender: TObject);
631 procedure ShowBoardActionExecute(Sender: TObject);
632 procedure URLCopyActionExecute(Sender: TObject);
633 procedure ItemReloadActionExecute(Sender: TObject);
634 procedure SelectListReloadActionExecute(Sender: TObject);
635 procedure SelectThreadReloadActionExecute(Sender: TObject);
636 procedure SelectListReloadActionUpdate(Sender: TObject);
637 procedure UpFolderActionUpdate(Sender: TObject);
638 procedure FormResize(Sender: TObject);
639 procedure ScrollKokoActionUpdate(Sender: TObject);
640 procedure SelectThreadReloadActionUpdate(Sender: TObject);
641 procedure LogDeleteActionExecute(Sender: TObject);
642 procedure KokomadeActionExecute(Sender: TObject);
643 procedure ZenbuActionExecute(Sender: TObject);
644 procedure KokoResActionExecute(Sender: TObject);
645 procedure ListPopupMenuPopup(Sender: TObject);
646 procedure SelectItemURLCopyActionExecute(Sender: TObject);
647 procedure AllSelectActionUpdate(Sender: TObject);
648 procedure BrowserTabCloseActionExecute(Sender: TObject);
649 procedure NotSelectTabCloseActionExecute(Sender: TObject);
650 procedure TreeSelectBoradReloadExecute(Sender: TObject);
651 procedure TreeSelectThreadReloadExecute(Sender: TObject);
652 procedure TreeSelectURLCopyExecute(Sender: TObject);
653 procedure TreePopupMenuPopup(Sender: TObject);
654 procedure ListToolBarVisibleActionExecute(Sender: TObject);
655 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
656 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
657 var Cancel: WordBool);
658 procedure ListSplitterMoved(Sender: TObject);
659 procedure BrowserTabChange(Sender: TObject);
660 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
661 Shift: TShiftState; X, Y: Integer);
662 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
663 State: TDragState; var Accept: Boolean);
664 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
665 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
666 Y: Integer);
667 procedure BrowserDocumentComplete(Sender: TObject;
668 const pDisp: IDispatch; var URL: OleVariant);
669 procedure SelectReservActionUpdate(Sender: TObject);
670 procedure RoundNamePopupMenuPopup(Sender: TObject);
671 procedure SelectNewRoundNameExecute(Sender: TObject);
672 procedure SelectDeleteRoundExecute(Sender: TObject);
673 procedure SelectReservActionExecute(Sender: TObject);
674 procedure NewBoardActionExecute(Sender: TObject);
675 procedure LoginActionExecute(Sender: TObject);
676 procedure KeySettingActionExecute(Sender: TObject);
677 procedure AllTabCloseActionExecute(Sender: TObject);
678 procedure ArrangeActionExecute(Sender: TObject);
679 procedure NameURLCopyActionExecute(Sender: TObject);
680 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
681 procedure AllTabCloseActionUpdate(Sender: TObject);
682 procedure ActiveLogDeleteActionExecute(Sender: TObject);
683 procedure ListNameBarVisibleActionExecute(Sender: TObject);
684 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
685 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
686 procedure PaneInitActionExecute(Sender: TObject);
687 procedure FormShow(Sender: TObject);
688 procedure BrowserTabToolBarResize(Sender: TObject);
689 procedure BrowserMinActionExecute(Sender: TObject);
690 procedure SelectTextClearActionExecute(Sender: TObject);
691 procedure NameTextClearActionExecute(Sender: TObject);
692 procedure MailTextClearActionExecute(Sender: TObject);
693 procedure LeftmostTabSelectActionExecute(Sender: TObject);
694 procedure LeftTabSelectActionExecute(Sender: TObject);
695 procedure RightTabSelectActionExecute(Sender: TObject);
696 procedure RightmostTabSelectActionExecute(Sender: TObject);
697 procedure LeftTabSelectActionUpdate(Sender: TObject);
698 procedure RightTabSelectActionUpdate(Sender: TObject);
699 procedure FavoriteMenuClick(Sender: TObject);
700 procedure FavoriteAddActionExecute(Sender: TObject);
701 procedure BoardFavoriteAddActionExecute(Sender: TObject);
702 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
703 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
704 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
705 procedure FavoriteArrangeActionExecute(Sender: TObject);
706 procedure MainCoolBarResize(Sender: TObject);
707 procedure MoveToActionExecute(Sender: TObject);
708 procedure AddressToolBarResize(Sender: TObject);
709 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
710 Shift: TShiftState);
711 procedure AddressBarVisibleActionExecute(Sender: TObject);
712 procedure BrowserEnter(Sender: TObject);
713 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
714 procedure BrowserTabVisibleActionExecute(Sender: TObject);
715 procedure BrowserTabTopActionExecute(Sender: TObject);
716 procedure BrowserTabBottomActionExecute(Sender: TObject);
717 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
718 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
719 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
720 procedure PreviewTimerTimer(Sender: TObject);
721 procedure MessageHideButtonClick(Sender: TObject);
722 procedure MonazillaWebPageActionExecute(Sender: TObject);
723 procedure GikoHelpActionExecute(Sender: TObject);
724 procedure ToolButton18Click(Sender: TObject);
725 procedure KotehanActionExecute(Sender: TObject);
726 procedure LinkBarVisibleActionExecute(Sender: TObject);
727 procedure BBS2chWebPageActionExecute(Sender: TObject);
728 procedure GikoFolderOpenActionExecute(Sender: TObject);
729 procedure MainCoolBarBandInfo(Sender: TObject;
730 var BandInfo: PReBarBandInfoA);
731 procedure MainCoolBarChevronClick(Sender: TObject;
732 RebarChevron: PNMRebarChevron);
733 procedure ListCoolBarBandInfo(Sender: TObject;
734 var BandInfo: PReBarBandInfoA);
735 procedure ListCoolBarChevronClick(Sender: TObject;
736 RebarChevron: PNMRebarChevron);
737 procedure BrowserCoolBarBandInfo(Sender: TObject;
738 var BandInfo: PReBarBandInfoA);
739 procedure BrowserCoolBarChevronClick(Sender: TObject;
740 RebarChevron: PNMRebarChevron);
741 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
742 procedure ThreadEditorActionExecute(Sender: TObject);
743 procedure ToolBarSettingActionExecute(Sender: TObject);
744 procedure NameCopyActionExecute(Sender: TObject);
745 procedure BoardIEActionExecute(Sender: TObject);
746 procedure SelectItemNameCopyActionExecute(Sender: TObject);
747 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
748 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
749 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
750 procedure SelectComboBoxChange(Sender: TObject);
751 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
752 Shift: TShiftState);
753 procedure SelectComboBoxExit(Sender: TObject);
754 procedure SelectResActionExecute(Sender: TObject);
755 procedure AllResActionExecute(Sender: TObject);
756 procedure ReloadClick(Sender: TObject);
757 procedure GoBackClick(Sender: TObject);
758 procedure GoFowardClick(Sender: TObject);
759 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
760 Shift: TShiftState; X, Y: Integer);
761 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
762 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
763 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
764 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
765 procedure StatusBarResize(Sender: TObject);
766 procedure SelectComboBoxEnter(Sender: TObject);
767 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
768 procedure CabinetFavoriteActionExecute(Sender: TObject);
769 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
770 Y: Integer);
771 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
772 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
773 var S: String);
774 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
775 Shift: TShiftState);
776 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
777 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
778 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
779 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
780 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
781 procedure FavoriteTreeViewDblClick(Sender: TObject);
782 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
783 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
784 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
785 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
786 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
787 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
788 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
789 Shift: TShiftState; X, Y: Integer);
790 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
791 State: TDragState; var Accept: Boolean);
792 procedure ResRangeActionExecute(Sender: TObject);
793 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
794 Y: Integer);
795 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
796 var Handled: Boolean);
797 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
798 var Handled: Boolean);
799 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
800 var Handled: Boolean);
801 procedure ExportFavoriteFileAccept(Sender: TObject);
802 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
803 procedure CabinetBBSActionExecute(Sender: TObject);
804 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
805 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
806 procedure UpBoardActionExecute(Sender: TObject);
807 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
808 var Handled: Boolean);
809 procedure KoreCopyExecute(Sender: TObject);
810 procedure BrowserTabPopupMenuPopup(Sender: TObject);
811 procedure BrowserTabResize(Sender: TObject);
812 procedure TreeViewClick(Sender: TObject);
813 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
814 Shift: TShiftState);
815 procedure FavoriteTreeViewMouseDown(Sender: TObject;
816 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
817 procedure MessagePanelResize(Sender: TObject);
818 procedure OnResized;
819 procedure TreeSelectNameCopyExecute(Sender: TObject);
820 procedure FavoriteTreeViewMouseUp(Sender: TObject;
821 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
822 procedure SetFocusForBrowserActionExecute(Sender: TObject);
823 procedure SetFocusForBrowserActionUpdate(Sender: TObject);
824 procedure SetFocusForThreadListActionExecute(Sender: TObject);
825 procedure SetFocusForCabinetActionExecute(Sender: TObject);
826 procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
827 procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
828 procedure SetFocusForCabinetActionUpdate(Sender: TObject);
829 procedure SelectTimerTimer(Sender: TObject);
830 procedure SelectItemSaveForHTMLExecute(Sender: TObject);
831 procedure KidokuActionExecute(Sender: TObject);
832 procedure MidokuActionExecute(Sender: TObject);
833 procedure SelectItemSaveForDatExecute(Sender: TObject);
834 procedure LogFolderOpenActionExecute(Sender: TObject);
835 procedure TabsSaveActionExecute(Sender: TObject);
836 procedure TabsOpenActionExecute(Sender: TObject);
837 procedure OnlyAHundredResActionExecute(Sender: TObject);
838 procedure OnlyKokoResActionExecute(Sender: TObject);
839 procedure OnlyNewResActionExecute(Sender: TObject);
840 procedure BrowsBoradHeadActionExecute(Sender: TObject);
841 procedure EditNGActionExecute(Sender: TObject);
842 procedure ThreadRangeActionExecute(Sender: TObject);
843 procedure TabAutoSaveActionExecute(Sender: TObject);
844 procedure TabAutoLoadActionExecute(Sender: TObject);
845 procedure ListViewColumnRightClick(Sender: TObject;
846 Column: TListColumn; Point: TPoint);
847 procedure JumpToNumOfResActionExecute(Sender: TObject);
848 procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject);
849 procedure ListViewCustomDrawItem(Sender: TCustomListView;
850 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
851 procedure FormActivate(Sender: TObject);
852 procedure BrowserPanelResize(Sender: TObject);
853 procedure MenuToolBarResize(Sender: TObject);
854 procedure ListToolBarResize(Sender: TObject);
855 procedure BrowserToolBarResize(Sender: TObject);
856 procedure RightTabCloseActionExecute(Sender: TObject);
857 procedure RightTabCloseActionUpdate(Sender: TObject);
858 procedure LeftTabCloseActionExecute(Sender: TObject);
859 procedure SameIDResAnchorActionExecute(Sender: TObject);
860 procedure IndividualAbon1ActionExecute(Sender: TObject);
861 procedure IndividualAbon0ActionExecute(Sender: TObject);
862 procedure AntiIndividualAbonActionExecute(Sender: TObject);
863 procedure AntiIndividualAbonDlgActionExecute(Sender: TObject);
864 procedure IndividualAbonID1ActionExecute(Sender: TObject);
865 procedure IndividualAbonID0ActionExecute(Sender: TObject);
866 procedure KokoPopupMenuPopup(Sender: TObject);
867 procedure MuteActionExecute(Sender: TObject);
868 procedure SortActiveColumnActionExecute(Sender: TObject);
869 procedure SortNextColumnActionExecute(Sender: TObject);
870 procedure SortPrevColumnActionExecute(Sender: TObject);
871 procedure BeLogInOutActionExecute(Sender: TObject);
872 procedure BeLogInOutActionUpdate(Sender: TObject);
873 procedure UnSelectedListViewActionExecute(Sender: TObject);
874 procedure ListViewKeyUp(Sender: TObject; var Key: Word;
875 Shift: TShiftState);
876 procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
877 var AllowEdit: Boolean);
878 procedure WikiFAQWebPageActionExecute(Sender: TObject);
879 private
880 { Private 鐃緒申鐃緒申 }
881 FSortIndex: Integer;
882 FSortOrder: Boolean;
883 FEnabledCloseButton: Boolean;
884 FClickNode: TTreeNode;
885 FHttpState: Boolean;
886 FHint: TResPopup;
887 FPreviewBrowser: TWebBrowser;
888 FPreviewURL: string;
889 FBrowserSizeHeight: Integer;
890 FBrowserSizeWidth: Integer;
891 FTabHintIndex: Integer;
892 FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
893 FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
894 FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
895 FActiveList: TObject;
896 FActiveContent: TBrowserRecord; //
897 FActiveBBS : TBBS;
898 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
899 FTreeType: TGikoTreeType;
900 FWorkCount: Integer;
901 FNameCookie: string;
902 FMailCookie: string;
903 BrowserNullTab: TBrowserRecord;
904 FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
905 FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
906 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
907 IsDraggingSelectComboBox : Boolean;
908 DraggingSelectComboBoxPosition : TPoint;
909 FSearchDialog: TSearchDialog;
910 FDropSpaceNode: TTreeNode;
911 FDragTime : Cardinal; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
912 FDragButton : TToolButton; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
913 FDragWFirst : Boolean; ///< WebTab鐃緒申D&D鐃?
914 FListViewBackGroundColor : TColor; ///< ListView鐃緒申BackGroundColor
915 FUseOddResOddColor : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
916 FOddColor : TColor; ///< 鐃緒申鐃緒申鐃?
917 FSelectResWord : string; ///< 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
918 FIsIgnoreResize : TResizeType; ///< 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
919 FIsMinimize : TMinimizeType; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
920 FOldFormWidth : Integer; ///< 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
921 FToolBarSettingSender : TToolBarSettingSenderType; ///< 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
922 FMouseDownPos : TPoint; ///< 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
923 FBrowsers: TList;
924 FResRangeMenuSelect : Longint; ///< ResRangeButton 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 (鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 ResRange 鐃緒申鐃緒申)
925 FStartUp : Boolean;
926 FIsHandledWheel : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 WM_MOUSEWHEEL 鐃緒申鐃緒申鐃緒申鐃緒申
927 DiffComp: Boolean; //Add by Genyakun 鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申True鐃緒申鐃緒申鐃緒申
928 FOrigenCaption: String; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
929 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
930 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
931 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
932 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
933 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
934 procedure ListClick;
935 procedure ListDoubleClick(Shift: TShiftState);
936 procedure BrowserMovement(const AName: string); overload;
937 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
938 procedure SelectListItem(List: TList);
939 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
940 function Hook(var Message: TMessage): Boolean;
941 procedure AddRoundNameMenu(MenuItem: TMenuItem);
942 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
943 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
944 procedure SetSelectRoundName(Sender: TObject);
945 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
946 procedure SetMenuFont;
947 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
948 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
949 procedure FavoriteClick(Sender: TObject); overload;
950 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
951 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
952 function OnDocumentContextMenu(Sender: TObject): WordBool;
953 procedure ShowTextPopup;
954 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
955 procedure MenuBarChevronMenu;
956 procedure LinkBarChevronMenu;
957 procedure ToolBarChevronMenu(ToolBar: TToolBar);
958 procedure ModifySelectList;
959 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
960 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
961 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
962 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
963 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
964 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
965 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
966 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
967 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
968 //
969 procedure SetListViewBackGroundColor(value: TColor);
970 procedure BBSMenuItemOnClick( Sender : TObject );
971 //
972 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
973 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
974 procedure SaveCoolBarSettings;
975 procedure SaveMainCoolBarSettings;
976 procedure SaveBoardCoolBarSettings;
977 procedure SaveBrowserCoolBarSettings;
978 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
979 procedure LoadCoolBarSettings;
980 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
981 procedure OnMinimize;
982 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
983 procedure OnMinimized;
984 /// TreeView 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
985 procedure TreeClick( Node : TTreeNode );
986 /// TreeView 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
987 procedure TreeDoubleClick( Node : TTreeNode );
988 /// 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
989 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
990 /// 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
991 /// 鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 True 鐃緒申鐃緒申鐃緒申
992 // function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
993 /// 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
994 procedure SetBBSMenu;
995 function WebBrowserClick(Sender: TObject): WordBool;
996 /// 鐃?鐃?鐃緒申鐃緒申
997 function GetTabURLs(AStringList: TStringList) : Boolean;
998 /// 鐃?鐃?鐃緒申鐃緒申
999 function SaveTabURLs : Boolean;
1000 /// 鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1001 function LoadTabURLs : Boolean;
1002 /// 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1003 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1004 /// ListColumnPopupMenu 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
1005 procedure ListColumnPopupMenuOnClick( Sender : TObject );
1006 // BrowserRecord鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FBrowser鐃緒申鐃?鐃緒申
1007 procedure ReleaseBrowser( BRecord: TBrowserRecord);
1008 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?
1009 procedure OnGestureStart(Sender: TObject);
1010 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申
1011 procedure OnGestureMove(Sender: TObject);
1012 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1013 procedure OnGestureEnd(Sender: TObject);
1014 //! 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1015 procedure SetSelectWord( const text : string );
1016 protected
1017 procedure CreateParams(var Params: TCreateParams); override;
1018 procedure WndProc(var Message: TMessage); override;
1019 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1020 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1021 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1022
1023 public
1024 { Public 鐃緒申鐃緒申 }
1025 LastRoundTime: TDateTime;
1026 FControlThread: TThreadControl;
1027 procedure MoveToURL(const inURL: string);
1028 function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
1029 procedure ReloadBBS;
1030 function GetHttpState: Boolean;
1031 procedure SetEnabledCloseButton(Enabled: Boolean);
1032 function GetTreeNode(Data: TObject): TTreeNode;
1033 procedure AppFormDeactivate(Sender: TObject);
1034 procedure ListViewAllSelect;
1035 property ListStyle: TViewStyle read FListStyle write FListStyle;
1036 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1037 property ViewType: TGikoViewType read FViewType write FViewType;
1038 property NameCookie: string read FNameCookie write FNameCookie;
1039 property MailCookie: string read FMailCookie write FMailCookie;
1040 property ClickNode: TTreeNode read FClickNode write FClickNode;
1041 property TreeType: TGikoTreeType read FTreeType;
1042 procedure SetContent(inThread: TBrowserRecord);
1043 function GetActiveContent: TThreadItem;
1044 function GetActiveList: TObject;
1045 procedure SetListViewType(AViewType: TGikoViewType); overload;
1046 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1047 procedure PlaySound(SoundEventName: string);
1048 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1049 procedure ClearHistory;
1050 procedure SaveHistory;
1051 procedure LoadHistory;
1052 procedure ShowBBSTree( inBBS : TBBS );
1053 procedure ShowBBSTreeOld( inBBS : TBBS );
1054 procedure ShowHistoryTree;
1055 procedure SetHistoryTreeNode;
1056 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1057 procedure SetBrowserTabState;
1058 procedure SetToolBarPopup;
1059 procedure ShowFavoriteAddDialog( Item : TObject );
1060 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1061 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1062 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1063 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1064 property OddColor : TColor read FOddColor write FOddColor;
1065 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1066 procedure OnPlugInMenuItem( Sender : TObject );
1067 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1068 /// ListView 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申 KuroutSetting鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1069 procedure ActiveListColumnSave;
1070 procedure SetActiveList(Obj: TObject);
1071 property ActiveList: TObject read GetActiveList write SetActiveList;
1072 /// CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1073 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1074 //鐃緒申鐃緒申ID鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1075 procedure IndividualAbonID(Atype : Integer);
1076 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
1077 procedure IndividualAbon(Atag, Atype : Integer);
1078 //ID鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1079 procedure IDAnchorPopup(Abody :string);
1080 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申 true:鐃?鐃緒申鐃緒申鐃?鐃? false:鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1081 procedure RepaintAllTabsBrowser();
1082 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1083 procedure SetLinkBar;
1084 procedure FavoriteBrowseFolder( node: TTreeNode );
1085 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1086 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1087 //鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1088 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1089 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1090 procedure DeleteHistory( threadItem: TThreadItem );
1091 //鐃?鐃?鐃緒申鐃緒申鐃緒申
1092 procedure DeleteTab(ThreadItem: TThreadItem); overload;
1093 published
1094 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1095 //TAction鐃緒申GetActiveContent鐃緒申nil鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1096 procedure DependActiveCntentActionUpdate(Sender: TObject);
1097 //TAction鐃緒申GetActiveContent鐃緒申nil鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1098 procedure DependActiveCntentLogActionUpdate(Sender: TObject);
1099 //TAction鐃緒申ActiveList鐃緒申TBoard鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1100 procedure DependActiveListTBoardActionUpdate(Sender: TObject);
1101 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1102 procedure AppException(Sender: TObject; E: Exception);
1103 end;
1104
1105 TFavoriteMenuItem = class(TMenuItem)
1106 private
1107 FData : Pointer;
1108 public
1109 property Data: Pointer read FData write FData;
1110 end;
1111
1112 TBBSMenuItem = class(TMenuItem)
1113 private
1114 FData : Pointer;
1115 public
1116 property Data: Pointer read FData write FData;
1117 end;
1118
1119 TLinkToolButton = class(TToolButton)
1120 private
1121 FData : Pointer;
1122 public
1123 property Data: Pointer read FData write FData;
1124 end;
1125
1126 TBrowserRecord = class( TObject )
1127 private
1128 FBrowser : TWebBrowser;
1129 FEvent: THTMLDocumentEventSink; ///< 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1130 FThread : TThreadItem;
1131 FLastSize : Integer;
1132 FRepaint : Boolean;
1133 FMovement : string; ///< 鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?
1134 public
1135 destructor Destroy; override;
1136 property Browser : TWebBrowser read FBrowser write FBrowser;
1137 property Thread : TThreadItem read FThread write FThread;
1138 property LastSize : Integer read FLastSize write FLastSize;
1139 property Repaint : Boolean read FRepaint write FRepaint;
1140 property Movement : string read FMovement write FMovement;
1141 end;
1142
1143 var
1144 GikoForm: TGikoForm;
1145
1146 implementation
1147
1148 uses
1149 About, Option, Round, Splash, Sort, ListSelect, Imm,
1150 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
1151 HTMLCreate, ListViewUtils, GikoDataModule;
1152
1153 const
1154 CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1155 BLANK_HTML: string = 'about:blank';
1156 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1157 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1158 //D&D鐃緒申鐃?
1159 DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1160 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1161 //ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1162 //ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1163 //ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1164 //ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1165 //ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1166 ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1167 ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1168 //ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1169 //ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1170 //ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1171 //ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1172 ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1173 ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1174 //ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1175 //ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1176
1177 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1178 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1179 TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1180 TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1181 TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1182 TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1183 TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1184
1185 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1186 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1187 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1188
1189 HTML_FILE_NAME = 'temp_preview.html';
1190
1191 WM_XBUTTONDOWN = $020B;
1192 WM_XBUTTONUP = $020C;
1193 WM_XBUTTONDBLCLK = $020D;
1194 XBUTTON1 = $0001;
1195 XBUTTON2 = $0002;
1196 USER_TREECLICK = WM_USER + 2000;
1197 USER_RESIZED = WM_USER + 2001;
1198 USER_MINIMIZED = WM_USER + 2002;
1199 USER_SETLINKBAR = WM_USER + 2003;
1200 USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
1201 SELECTTIME_INTERBAL = 110;
1202
1203 BROWSER_COUNT = 5; //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1204
1205 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
1206 URL_MONAZILLA: string = 'http://www.monazilla.org/';
1207 URL_2ch: string = 'http://www.2ch.net/';
1208 URL_Wiki: string = 'http://gikowiki.dyndns.info/index.php?FAQ';
1209
1210 {$R *.DFM}
1211
1212 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1213 begin
1214 inherited;
1215 if FormStyle in [fsNormal, fsStayOnTop] then begin
1216 if BorderStyle in [bsSingle, bsSizeable] then begin
1217 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1218 Params.WndParent := 0;
1219 end;
1220 end;
1221 end;
1222
1223 procedure TGikoForm.FormCreate(Sender: TObject);
1224 const
1225 TVS_NOTOOLTIPS = $0080;
1226 var
1227 FileName: string;
1228 Style: DWORD;
1229 msg: string;
1230 i: Integer;
1231 wp: TWindowPlacement;
1232 s: string;
1233 newbrowser: TWebBrowser;
1234 ToolButton: TToolButton;
1235 begin
1236 {$IFDEF DEBUG}
1237 AllocConsole;
1238 Writeln('============================================================');
1239 Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1240 Writeln('');
1241 Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1242 Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1243 Writeln('============================================================');
1244 {$ENDIF}
1245 FTreeType := gttNone;
1246 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1247 FStartUp := true;
1248 // LockWindowUpdate(Self.Handle);
1249 Application.OnDeactivate := AppFormDeactivate;
1250 //Self.OnDeactivate := AppFormDeactivate;
1251 Application.HookMainWindow(Hook);
1252 Application.OnException := AppException; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1253 // Application.OnMessage := HandleAppMessage; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?by鐃?鐃緒申鐃緒申鐃緒申
1254 FIsIgnoreResize := rtResizing;
1255
1256 FSearchDialog := nil;
1257 BrowserNullTab := TBrowserRecord.Create;
1258 BrowserNullTab.Browser := Browser;
1259 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1260 FBrowsers := TList.Create;
1261 for i := 0 to BROWSER_COUNT -1 do begin
1262 FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
1263 newBrowser := FBrowsers[FBrowsers.Count - 1];
1264 TOleControl(newBrowser).Parent := BrowserPanel;
1265 TOleControl(newBrowser).Align := alNone;
1266 TOleControl(newBrowser).Left := 0;
1267 TOleControl(newBrowser).Top := 0;
1268 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1269 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1270 newBrowser.OnEnter := BrowserEnter;
1271 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1272 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1273 newBrowser.Navigate(BLANK_HTML);
1274 ShowWindow(newBrowser.Handle, SW_HIDE);
1275 end;
1276 BrowserNullTab.Browser.BringToFront;
1277 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1278
1279 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1280 SetMenuFont;
1281
1282 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1283 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1284
1285 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1286 //AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1287 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
1288
1289 EnabledCloseButton := True;
1290
1291 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1292 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1293
1294 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1295 AnimePanel.Top := 0;
1296 AnimePanel.Left := 0;
1297
1298 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1299
1300 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1301 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1302
1303 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1304 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1305 MsgBarVisibleActionExecute(nil);
1306 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1307
1308 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1309 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1310 StatusBarVisibleActionExecute(nil);
1311
1312 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1313 TreeView.Items.BeginUpdate;
1314 FavoriteTreeView.Items.BeginUpdate;
1315 ListView.Items.BeginUpdate;
1316 try
1317 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1318 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1319 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1320 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1321 FavoriteTreeView.Font.Assign(TreeView.Font);
1322 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1323
1324 ListView.Font.Name := GikoSys.Setting.ListFontName;
1325 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1326 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1327 ListView.Font.Style := [];
1328 if GikoSys.Setting.ListFontBold then
1329 ListView.Font.Style := [fsbold];
1330 if GikoSys.Setting.ListFontItalic then
1331 ListView.Font.Style := ListView.Font.Style + [fsitalic];
1332
1333 ListViewBackGroundColor := clWhite; // 鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1334 ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1335 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1336 FOddColor := GikoSys.Setting.OddColor;
1337
1338 finally
1339 TreeView.Items.EndUpdate;
1340 FavoriteTreeView.Items.EndUpdate;
1341 ListView.Items.EndUpdate;
1342 end;
1343 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1344 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1345
1346 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1347 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1348 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1349 BrowserTab.Font.Style := [];
1350 if GikoSys.Setting.BrowserTabFontBold then
1351 BrowserTab.Font.Style := [fsBold];
1352 if GikoSys.Setting.BrowserTabFontItalic then
1353 BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1354 FDragWFirst := false;
1355 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1356
1357 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1358 ProgressBar.Parent := StatusBar;
1359 ProgressBar.Top := 2;
1360 ProgressBar.Left := 0;
1361 ProgressBar.Width := StatusBar.Panels[0].Width;
1362 ProgressBar.Height := StatusBar.Height - 2;
1363 ProgressBar.Position := 0;
1364
1365 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1366 InitializeBoardPlugIns;
1367
1368 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1369 GikoSys.ListBoardFile;
1370
1371 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1372 SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
1373
1374 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1375 for i := Length(BBSs) - 1 downto 0 do begin
1376 if not BBSs[i].IsBoardFileRead then
1377 GikoSys.ReadBoardFile(BBSs[i]);
1378
1379 if SplashWindow <> nil then begin
1380 SplashWindow.ProgressBar.StepBy(20);
1381 SplashWindow.Update;
1382 end;
1383 end;
1384 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1385 RoundList := TRoundList.Create;
1386 RoundList.LoadRoundBoardFile;
1387 RoundList.LoadRoundThreadFile;
1388
1389 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1390 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1391 Style := Style or TVS_NOTOOLTIPS;
1392 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1393
1394 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1395 TreeView.Align := alClient;
1396 FavoriteTreeView.Align := alClient;
1397 FavoriteTreeView.Visible := False;
1398
1399 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1400 SetBBSMenu;
1401
1402 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1403 wp.length := sizeof(wp);
1404 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1405 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1406 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1407 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1408 wp.showCmd := SW_HIDE;
1409 SetWindowPlacement(Handle, @wp);
1410 //Self.Update;
1411
1412 if GikoSys.Setting.WindowMax then
1413 WindowState := wsMaximized;
1414
1415 //鐃?鐃?鐃?鐃?鐃緒申
1416 try
1417 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1418 if FileExists(FileName) then
1419 Animate.FileName := FileName;
1420 except
1421 end;
1422
1423 //鐃?鐃?鐃?鐃?
1424 FNameCookie := '';
1425 FMailCookie := '';
1426
1427 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1428 AllItemAction.Checked := True;
1429 AllResAction.Checked := True;
1430
1431 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1432 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1433 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1434
1435
1436 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1437 FHistoryList := TList.Create;
1438
1439 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1440 LoadHistory;
1441
1442 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1443 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1444 FavoriteDM.ReadFavorite;
1445
1446 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1447 ArrangeAction.Execute;
1448
1449 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1450 case GikoSys.Setting.ListWidthState of
1451 glsMax: begin
1452 ViewPanel.Width := 1;
1453 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1454 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1455 end;
1456 glsMin: begin
1457 ViewPanel.Width := GikoSys.Setting.ListWidth;
1458 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1459 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1460 end;
1461 else begin
1462 ViewPanel.Width := GikoSys.Setting.ListWidth;
1463 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1464 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1465 end;
1466 end;
1467 end else begin
1468 case GikoSys.Setting.ListHeightState of
1469 glsMax: begin
1470 ViewPanel.Height := 1;
1471 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1472 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1473 end;
1474 glsMin: begin
1475 ViewPanel.Height := GikoSys.Setting.ListHeight;
1476 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1477 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1478 end;
1479 else begin
1480 ViewPanel.Height := GikoSys.Setting.ListHeight;
1481 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1482 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1483 end;
1484 end;
1485 end;
1486
1487 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1488 FControlThread := TThreadControl.Create(True);
1489 FControlThread.MaxThreadCount := 1;
1490 FControlThread.Resume;
1491 FControlThread.OnDownloadEnd := DownloadEnd;
1492 FControlThread.OnDownloadMsg := DownloadMsg;
1493 FControlThread.OnWork := Work;
1494 FControlThread.OnWorkBegin := WorkBegin;
1495 FControlThread.OnWorkEnd := WorkEnd;
1496 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1497
1498 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1499 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1500
1501 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1502 SetBrowserTabState;
1503
1504 BrowserBoardNameLabel.Caption := '';
1505 BrowserNameLabel.Caption := '';
1506 FWorkCount := 0;
1507
1508 FTabHintIndex := -1;
1509
1510 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1511 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1512 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1513
1514 MakeDefaultINIFile();
1515 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1516 ReadToolBarSetting(ActionList, StdToolBar);
1517 ReadToolBarSetting(ActionList, ListToolBar);
1518 ReadToolBarSetting(ActionList, BrowserToolBar);
1519 SetToolBarPopup;
1520
1521 //ListToolBar鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申ComboBox鐃緒申鐃?鐃?
1522 SelectComboBoxPanel.Visible := False;
1523 try
1524 for i := ListToolBar.ControlCount - 1 downto 0 do
1525 begin
1526 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1527 begin
1528 SelectComboBoxPanel.Left := ListToolBar.Controls[ i ].Left;
1529 SelectComboBoxPanel.Width := GikoSys.Setting.SelectComboBoxWidth;
1530 SelectComboBoxPanel.Parent := ListToolBar;
1531 SelectComboBoxPanel.Visible := True;
1532
1533 SelectComboBox.Left := 0;
1534 SelectComboBox.Top := 0;
1535 SelectComboBox.Height := SelectComboBoxPanel.ClientHeight;
1536 SelectComboBox.Width := SelectComboBoxPanel.Width -
1537 SelectComboBoxSplitter.Width;
1538
1539 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1540 ToolButton := TToolButton.Create(ListToolBar);
1541 ToolButton.Name := 'SelectComboBoxDummy';
1542 ToolButton.Style := tbsSeparator;
1543 ToolButton.Width := 0;
1544 ToolButton.Left := ListToolBar.Controls[ i ].Left;
1545 ListToolBar.InsertControl(ToolButton);
1546 ToolButton.Visible := False;
1547
1548 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1549 if (i + 1) < ListToolBar.ControlCount then
1550 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1551 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1552 ListToolBar.Controls[ i + 1 ].Visible := False;
1553
1554
1555 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1556 ListToolBar.Controls[ i ].Visible := False;
1557
1558 break;
1559 end;
1560 end;
1561 except
1562 end;
1563
1564
1565 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1566 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1567
1568 //鐃緒申鐃緒申鐃?鐃?鐃?
1569 SetLinkBar;
1570
1571 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1572 FResRangeMenuSelect := GikoSys.ResRange;
1573 case GikoSys.ResRange of
1574 Ord( grrAll ):
1575 begin
1576 AllResAction.Execute;
1577 end;
1578 Ord( grrSelect ):
1579 begin
1580 SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1581 SelectResAction.Checked := True;
1582 end;
1583 else
1584 // ResRangeAction.Execute;
1585 case FResRangeMenuSelect of
1586 Ord( grrKoko ): OnlyKokoResAction.Checked := True;
1587 Ord( grrNew ): OnlyNewResAction.Checked := True;
1588 100: OnlyAHundredResAction.Checked := True;
1589 end;
1590 end;
1591
1592 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1593 // ThreadRangeAction.Execute;
1594 case GikoSys.Setting.ThreadRange of
1595 gtrAll:
1596 begin
1597 AllItemAction.Checked := True;
1598 ViewType := gvtAll;
1599 end;
1600 gtrLog:
1601 begin
1602 LogItemAction.Checked := True;
1603 ViewType := gvtLog;
1604 end;
1605 gtrNew:
1606 begin
1607 NewItemAction.Checked := True;
1608 ViewType := gvtNew;
1609 end;
1610 end;
1611
1612
1613 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1614
1615 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1616 if not FileExists(GikoSys.GetBoardFileName) then begin
1617 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1618 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1619 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1620 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1621 NewBoardAction.Execute;
1622 end;
1623
1624 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1625 GikoSys.LoadKeySetting(ActionList);
1626
1627 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1628 // FLastRoundTime := 0;
1629
1630 //ResHint
1631 FHint := TResPopup.Create(Self);
1632
1633 ListView.OnData := TListViewUtils.ListViewData;
1634
1635 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1636 CabinetVisible( False );
1637 if GikoSys.Setting.CabinetVisible then begin
1638 i := CabinetSelectPopupMenu.Items.Count - 1;
1639 if GikoSys.Setting.CabinetIndex = i - 1 then
1640 CabinetHistoryAction.Execute
1641 else if GikoSys.Setting.CabinetIndex = i then
1642 CabinetFavoriteAction.Execute
1643 else begin
1644 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1645 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1646 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1647 FIsIgnoreResize := rtResizing;
1648 CabinetBBSAction.Execute;
1649 end;
1650 end else begin
1651 ShowBBSTreeOld( BBSs[ 0 ] );
1652 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1653 end;
1654
1655
1656 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1657 for i := 1 to ParamCount do begin
1658 MoveToURL(ParamStr(i));
1659 end;
1660
1661 s := GikoSys.FAbon.NGwordname;
1662 StatusBar.Panels[2].Text := s;
1663 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1664 StatusBarResize(Sender);
1665
1666 dummy1.Caption := ItemReservPMenu.Caption;
1667 dummy1.Hint := ItemReservPMenu.Hint;
1668
1669 //Samba24鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
1670 GikoSys.SambaFileExists();
1671
1672 {$IFDEF SPAM_FILTER_ENABLED}
1673 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1674 GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1675 {$ENDIF}
1676
1677 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1678 MouseGesture := TMouseGesture.Create;
1679 GikoSys.Setting.Gestures.LoadGesture(
1680 GikoSys.Setting.GetGestureFileName, ActionList );
1681 MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
1682 MouseGesture.OnGestureStart := OnGestureStart;
1683 MouseGesture.OnGestureMove := OnGestureMove;
1684 MouseGesture.OnGestureEnd := OnGestureEnd;
1685 if GikoSys.Setting.GestureEnabled then
1686 MouseGesture.SetHook( Handle );
1687
1688 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1689 GikoSys.Setting.SetMessages;
1690
1691 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1692 if GikoSys.Setting.AutoLogin then
1693 LoginAction.Execute;
1694
1695 MuteAction.Checked := GikoSys.Setting.Mute;
1696
1697 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1698 // LockWindowUpdate(0);
1699 end;
1700
1701 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1702 procedure TGikoForm.SaveCoolBarSettings;
1703 begin
1704
1705 if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1706 Exit;
1707 SaveMainCoolBarSettings;
1708 SaveBoardCoolBarSettings;
1709 SaveBrowserCoolBarSettings;
1710
1711 end;
1712 procedure TGikoForm.SaveMainCoolBarSettings;
1713 var
1714 i : Integer;
1715 CoolSet : TCoolSet;
1716 begin
1717 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1718 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1719 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1720 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1721 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1722 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1723 end;
1724 end;
1725 procedure TGikoForm.SaveBoardCoolBarSettings;
1726 var
1727 i : Integer;
1728 CoolSet : TCoolSet;
1729 begin
1730 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1731 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1732 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1733 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1734 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1735 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1736 end;
1737 end;
1738 procedure TGikoForm.SaveBrowserCoolBarSettings;
1739 var
1740 i : Integer;
1741 CoolSet : TCoolSet;
1742 begin
1743 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1744 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1745 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1746 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1747 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1748 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1749 end;
1750 end;
1751 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1752 procedure TGikoForm.LoadCoolBarSettings;
1753 var
1754 i : Integer;
1755 CoolSet : TCoolSet;
1756 begin
1757
1758 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1759 MainCoolBar.Bands.BeginUpdate;
1760 try
1761 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1762 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1763 CoolSet := GikoSys.Setting.MainCoolSet[i];
1764 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1765 FIsIgnoreResize := rtNone;
1766 SaveCoolBarSettings;
1767 Exit;
1768 end;
1769 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1770 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1771 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1772 end;
1773 finally
1774 MainCoolBar.Bands.EndUpdate;
1775 end;
1776
1777 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1778 ListCoolBar.Bands.BeginUpdate;
1779 try
1780 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1781 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1782 CoolSet := GikoSys.Setting.ListCoolSet[i];
1783 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1784 FIsIgnoreResize := rtNone;
1785 SaveCoolBarSettings;
1786 Exit;
1787 end;
1788 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1789 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1790 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1791 end;
1792 finally
1793 ListCoolBar.Bands.EndUpdate;
1794 end;
1795
1796 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1797 BrowserCoolBar.Bands.BeginUpdate;
1798 try
1799 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1800 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1801 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1802 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1803 FIsIgnoreResize := rtNone;
1804 SaveCoolBarSettings;
1805 Exit;
1806 end;
1807 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1808 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1809 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1810 end;
1811 finally
1812 BrowserCoolBar.Bands.EndUpdate;
1813 end;
1814
1815 end;
1816 //
1817 procedure TGikoForm.FormShow(Sender: TObject);
1818 begin
1819 if FStartUp then begin
1820 ShowWindow(Application.Handle, SW_HIDE);
1821
1822 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1823 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1824 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1825 StdToolBarVisibleActionExecute( nil );
1826 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1827 AddressBarVisibleActionExecute( nil );
1828 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1829 LinkBarVisibleActionExecute( nil );
1830 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1831 ListToolBarVisibleActionExecute( nil );
1832 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1833 ListNameBarVisibleActionExecute( nil );
1834 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1835 BrowserToolBarVisibleActionExecute( nil );
1836 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1837 BrowserNameBarVisibleActionExecute( nil );
1838
1839 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1840 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1841 BrowserTabVisibleActionExecute(nil);
1842
1843 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1844 BrowserTabTopAction.Checked := True;
1845 BrowserTabTopActionExecute(nil);
1846 end else begin
1847 BrowserTabBottomAction.Checked := True;
1848 BrowserTabBottomActionExecute(nil);
1849 end;
1850
1851 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1852 BrowserTabTabStyleAction.Checked := True;
1853 BrowserTabTabStyleActionExecute(nil);
1854 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1855 BrowserTabButtonStyleAction.Checked := True;
1856 BrowserTabButtonStyleActionExecute(nil);
1857 end else begin
1858 BrowserTabFlatStyleAction.Checked := True;
1859 BrowserTabFlatStyleActionExecute(nil);
1860 end;
1861
1862 // ListView 鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?
1863 // ListView.FullDrag := True;
1864
1865 // CoolBar 鐃緒申鐃緒申
1866 LoadCoolBarSettings;
1867
1868 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1869 // ResetBandInfo( ListCoolBar, ListToolBar );
1870 FIsIgnoreResize := rtNone;
1871
1872 //TabAutoLoad
1873 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1874 if GikoSys.Setting.TabAutoLoadSave then begin
1875 TabAutoLoadAction.Execute;
1876 end;
1877 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1878 if GikoSys.Setting.GengoSupport then begin
1879 //鐃?鐃緒申鐃?
1880 //Test鐃緒申鐃緒申
1881 end;
1882 FStartUp := false;
1883 end;
1884 end;
1885
1886 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1887 begin
1888 // if GikoForm.WindowState <> wsMinimized then
1889 // SaveCoolBarSettings;
1890 if ( GikoSys.Setting.ShowDialogForEnd ) and
1891 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1892 CanClose := false;
1893 Exit;
1894 end else begin
1895 CanClose := True;
1896 if GikoSys.Setting.TabAutoLoadSave then begin
1897 TabAutoSaveAction.Execute;
1898 end;
1899 end;
1900 { //2ch鐃緒申鐃緒申鐃緒申鐃緒申Free
1901 if GikoSys.Setting.Gengo <> nil then begin
1902 GikoSys.Setting.Gengo.Free;
1903 end;
1904 }
1905 Application.UnhookMainWindow(Hook);
1906 Application.Terminate;
1907 end;
1908
1909 procedure TGikoForm.FormDestroy(Sender: TObject);
1910 var
1911 i : Integer;
1912 // CoolSet: TCoolSet;
1913 wp : TWindowPlacement;
1914 tmpBool : Boolean;
1915 begin
1916 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1917 try
1918 MouseGesture.UnHook;
1919 except
1920 end;
1921 try
1922 ActiveListColumnSave;
1923 except
1924 end;
1925 try
1926 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1927 wp.length := sizeof(wp);
1928 GetWindowPlacement(Handle, @wp);
1929 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1930 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1931 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1932 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1933 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1934
1935 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1936 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1937 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1938 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1939 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1940 if ArrangeAction.Checked then
1941 GikoSys.Setting.ListOrientation := gloVertical
1942 else
1943 GikoSys.Setting.ListOrientation := gloHorizontal;
1944 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1945 except
1946 end;
1947
1948 try
1949 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1950 if not GikoSys.Setting.ResRangeHold then
1951 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1952 except
1953 end;
1954 if WindowState <> wsNormal then
1955 WindowState := wsNormal;
1956 SaveCoolBarSettings;
1957 try
1958 GikoSys.Setting.WriteWindowSettingFile;
1959 GikoSys.Setting.WriteNameMailSettingFile;
1960 except
1961 end;
1962 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
1963 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1964
1965 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
1966 // CoolBar 鐃緒申鐃緒申
1967 //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
1968
1969
1970 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1971 try
1972 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1973 FavoriteDM.WriteFavorite;
1974 FavoriteDM.Clear;
1975 except
1976 end;
1977 LockWindowUpdate(Self.Handle);
1978 try
1979 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1980 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1981 GikoSys.Setting.ShowDialogForAllTabClose := false;
1982 AllTabCloseAction.Execute;
1983 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1984 except
1985 end;
1986 try
1987 for i := FBrowsers.Count - 1 downto 0 do begin
1988 TWebBrowser(FBrowsers[i]).Free;
1989 end;
1990 FBrowsers.Clear;
1991 FBrowsers.Capacity := 0;
1992 finally
1993 FBrowsers.Free;
1994 end;
1995 try
1996 if BrowserNullTab <> nil then begin
1997 BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
1998 *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1999 *}
2000 BrowserNullTab.Free;
2001 end;
2002 except
2003 end;
2004
2005 try
2006 TreeView.Items.BeginUpdate;
2007 TreeView.Items.GetFirstNode.Free;
2008 TreeView.Items.Clear;
2009 TreeView.Items.EndUpdate;
2010 except
2011 end;
2012
2013 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2014 try
2015 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2016 //AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2017 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
2018 except
2019 end;
2020
2021 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
2022 try
2023 SaveHistory;
2024 except
2025 end;
2026 try
2027 try
2028 ClearHistory;
2029 except
2030 end;
2031 finally
2032 FHistoryList.Free;
2033 end;
2034
2035 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2036 try
2037 RoundList.SaveRoundFile;
2038 except
2039 end;
2040 try
2041 try
2042 RoundList.Clear;
2043 except
2044 end;
2045 finally
2046 RoundList.Free;
2047 end;
2048
2049 try
2050 try
2051 FControlThread.Terminate;
2052 FControlThread.WaitFor;
2053 except
2054 end;
2055 finally
2056 FControlThread.Free;
2057 end;
2058
2059 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2060 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2061 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2062 for i := Length(BoardGroups) - 1 downto 0 do begin
2063 //BoardGroups[i].Clear;
2064 BoardGroups[i].Free;
2065 end;
2066
2067 try
2068 for i := Length( BBSs ) - 1 downto 0 do begin
2069 if BBSs[ i ] <> nil then
2070 BBSs[ i ].Free;
2071 BBSs[ i ] := nil;
2072 end;
2073 except
2074 end;
2075
2076 try
2077 if FEvent <> nil then
2078 FEvent.Free;
2079
2080 //Hint鐃?鐃緒申
2081 if FHint <> nil then begin
2082 FHint.ReleaseHandle;
2083 FHint.Free;
2084 FHint := nil;
2085 end;
2086 //Preview鐃?鐃緒申
2087 if TPreviewBrowser <> nil then begin
2088 FPreviewBrowser.Free;
2089 FPreviewBrowser := nil;
2090 end;
2091 except
2092 end;
2093 LockWindowUpdate(0);
2094 end;
2095
2096 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
2097 procedure TGikoForm.SetBBSMenu;
2098 var
2099 i : Integer;
2100 item : TBBSMenuItem;
2101 begin
2102
2103 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2104 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2105 try
2106 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2107 CabinetSelectPopupMenu.Items[ i ].Free;
2108 CabinetMenu.Items[ i ].Free;
2109 BBSSelectPopupMenu.Items[ i ].Free;
2110 end;
2111 except
2112 end;
2113 end;
2114
2115 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2116 for i := Length( BBSs ) - 1 downto 0 do begin
2117 try
2118 item := TBBSMenuItem.Create( PopupMenu );
2119 item.Caption := BBSs[ i ].Title;
2120 item.Data := BBSs[ i ];
2121 item.OnClick := BBSMenuItemOnClick;
2122 CabinetSelectPopupMenu.Items.Insert( 0, item );
2123 item := TBBSMenuItem.Create( PopupMenu );
2124 item.Caption := BBSs[ i ].Title;
2125 item.Data := BBSs[ i ];
2126 item.OnClick := BBSMenuItemOnClick;
2127 CabinetMenu.Insert( 0, item );
2128 item := TBBSMenuItem.Create( PopupMenu );
2129 item.Caption := BBSs[ i ].Title;
2130 item.Data := BBSs[ i ];
2131 item.OnClick := BBSMenuItemOnClick;
2132 BBSSelectPopupMenu.Items.Insert( 0, Item );
2133 except
2134 end;
2135 end;
2136
2137 end;
2138
2139 procedure TGikoForm.ReloadBBS;
2140 var
2141 i : Integer;
2142 tmpBool: Boolean;
2143 begin
2144 LockWindowUpdate(Self.Handle);
2145
2146 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2147 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2148 GikoSys.Setting.ShowDialogForAllTabClose := false;
2149 AllTabCloseAction.Execute;
2150 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2151
2152 SetContent(BrowserNullTab);
2153 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
2154 TreeView.Items.Clear;
2155
2156 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
2157 try
2158 RoundList.SaveRoundFile;
2159 except
2160 end;
2161 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
2162 try
2163 RoundList.Clear;
2164 except
2165 end;
2166
2167 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
2168 try
2169 SaveHistory;
2170 ClearHistory;
2171 except
2172 end;
2173
2174 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
2175 try
2176 FavoriteDM.WriteFavorite;
2177 FavoriteDM.Clear;
2178 except
2179 end;
2180
2181 //鐃緒申鐃?鐃?鐃緒申鐃?PLUGIN鐃緒申鐃?鐃緒申
2182 for i := Length(BoardGroups) - 1 downto 0 do begin
2183 try
2184 BoardGroups[i].Free;
2185 except
2186 end;
2187 end;
2188 //BBS鐃?鐃緒申
2189 try
2190 for i := Length( BBSs ) - 1 downto 0 do begin
2191 if BBSs[ i ] <> nil then
2192 BBSs[ i ].Free;
2193 BBSs[ i ] := nil;
2194 end;
2195 except
2196 end;
2197
2198 ActiveList := nil;
2199
2200 FTreeType := gttNone;
2201
2202 //============鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申================================//
2203
2204 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
2205 InitializeBoardPlugIns;
2206
2207 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2208
2209 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2210 for i := Length(BBSs) - 1 downto 0 do begin
2211 if not BBSs[i].IsBoardFileRead then
2212 GikoSys.ReadBoardFile(BBSs[i]);
2213 end;
2214
2215 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2216 SetBBSMenu;
2217
2218 ShowBBSTree( BBSs[ 0 ] );
2219
2220 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2221 LoadHistory;
2222
2223 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2224 FavoriteDM.ReadFavorite;
2225
2226 SetLinkBar;
2227
2228 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2229 RoundList.LoadRoundBoardFile;
2230 RoundList.LoadRoundThreadFile;
2231
2232 LockWindowUpdate(0);
2233 //
2234 TabsOpenAction.Execute;
2235 end;
2236
2237
2238 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2239 var
2240 p: TPoint;
2241 s: string;
2242 tmp2: string;
2243 URL: string;
2244 ATitle: Boolean;
2245
2246 threadItem : TThreadItem;
2247 board : TBoard;
2248 Protocol, Host, Path, Document, Port, Bookmark: string;
2249
2250 wkInt: Integer;
2251 wkIntSt: Integer;
2252 wkIntTo: Integer;
2253 ActiveFileName: string;
2254 e: IHTMLElement;
2255 Ext: string;
2256 PathRec: TPathRec;
2257 begin
2258 if not( TObject(Sender) is TWebBrowser )then
2259 Exit;
2260 try
2261 try
2262 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2263 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2264 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2265 end;
2266 end;
2267 except
2268 end;
2269 finally
2270 end;
2271 if PreviewTimer.Enabled then
2272 PreviewTimer.Enabled := False;
2273 Application.CancelHint;
2274 try
2275 if GetActiveContent <> nil then
2276 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2277 else
2278 ActiveFileName := '';
2279 except
2280 FActiveContent := nil;
2281 Exit;
2282 end;
2283
2284 StatusBar.Panels[1].Text := Text;
2285
2286 if FHint <> nil then begin
2287 FHint.ReleaseHandle;
2288 FHint.ClearAllRes;
2289 end;
2290 if FPreviewBrowser <> nil then
2291 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2292
2293 if not GikoSys.Setting.UnActivePopup then
2294 if not GikoForm.Active then
2295 Exit;
2296
2297 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2298 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2299
2300 s := '';
2301 Ext := AnsiLowerCase(ExtractFileExt(Text));
2302 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2303 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2304 if FPreviewBrowser = nil then begin
2305 FPreviewBrowser := TPreviewBrowser.Create(Self);
2306 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2307 TOleControl(FPreviewBrowser).Parent := nil;
2308 end;
2309 FPreviewBrowser.Navigate(BLANK_HTML);//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2310 FPreviewURL := Text;
2311 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2312 PreviewTimer.Enabled := True;
2313 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2314 if Pos('mailto:', Text) = 1 then begin
2315 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2316 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2317 GetCursorPos(p);
2318 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2319 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2320 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2321 if (Assigned(e)) then begin
2322 tmp2 := ZenToHan(e.Get_outerText);
2323 if (GikoSys.IsNumeric(tmp2)) then begin
2324 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2325 wkIntSt := StrToInt(tmp2);
2326 wkIntTo := StrToInt(tmp2);
2327 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2328 FHint.PopupType := gptThread;
2329 HTMLCreater.SetResPopupText(FHint, GetActiveContent, wkIntSt, wkIntTo, False, False);
2330 end else begin
2331 FHint.PopupType := gptRaw;
2332 FHint.Caption := s;
2333 end;
2334 end;
2335 end else begin
2336 threadItem := GetActiveContent;
2337 URL := THTMLCreate.GetRespopupURL(Text, threadItem.URL);
2338 PathRec := Gikosys.Parse2chURL2(URL);
2339 if (PathRec.FNoParam) then begin
2340 PathRec.FSt := 1;
2341 PathRec.FTo := 1;
2342 end else begin
2343 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2344 end;
2345 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2346
2347 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2348
2349 URL := GikoSys.GetBrowsableThreadURL( URL );
2350 wkIntSt := PathRec.FSt;
2351 wkIntTo := PathRec.FTo;
2352
2353 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2354 wkIntSt := 1;
2355 wkIntTo := 1;
2356 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2357 wkIntSt := wkIntTo;
2358 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2359 wkIntTo := wkIntSt;
2360 end else if wkIntSt > wkIntTo then begin
2361 wkInt := wkIntTo;
2362 wkIntTo := wkIntSt;
2363 wkIntSt := wkInt;
2364 end;
2365 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2366 ATitle := false
2367 else
2368 ATitle := true;
2369
2370 threadItem := BBSsFindThreadFromURL( URL );
2371
2372 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2373 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2374 if board <> nil then begin
2375 if not board.IsThreadDatRead then
2376 GikoSys.ReadSubjectFile( board );
2377 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2378 end;
2379 end;
2380
2381 if threadItem <> nil then begin
2382 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2383 //URL鐃緒申鐃緒申鐃緒申鐃緒申/鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2384 if ( IntToStr(wkIntSt) = ChangeFileExt(threadItem.FileName, '') ) then begin
2385 wkIntSt := 1;
2386 wkIntTo := 1;
2387 end;
2388 FHint.PopupType := gptThread;
2389 HTMLCreater.SetResPopupText(FHint, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2390 end;
2391 end;
2392 end;
2393
2394 if FHint.PopupType = gptRaw then begin
2395 if FHint.Caption <> '' then
2396 ShowTextPopup;
2397 end else begin
2398 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2399 ShowTextPopup;
2400 end;
2401 end;
2402 end;
2403
2404 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2405 var
2406 SysMenu: HMenu;
2407 begin
2408 FEnabledCloseButton := Enabled;
2409 SysMenu := GetSystemMenu(Handle, False);
2410
2411 if Enabled then begin
2412 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2413 end else begin
2414 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2415 end;
2416
2417 DrawMenuBar(Handle);
2418 end;
2419
2420 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2421 var AllowChange: Boolean);
2422 begin
2423 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2424 // if FTreeType = gtt2ch then
2425 // FSortIndex := -1;
2426 end;
2427
2428 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2429 Shift: TShiftState);
2430 var
2431 pos : TPoint;
2432 begin
2433 if GetActiveList is TBoard then begin
2434 case Key of
2435 VK_BACK:; // UpFolderButtonClick(Sender);
2436 VK_SPACE: ListDoubleClick(Shift);
2437 VK_RETURN: ListClick;
2438 VK_APPS:
2439 begin
2440 if ListView.Selected <> nil then begin
2441 pos.X := ListView.Column[ 0 ].Width;
2442 pos.Y := ListView.Selected.Top;
2443 end else begin
2444 pos.X := ListView.Left;
2445 pos.Y := ListView.Top;
2446 end;
2447 Windows.ClientToScreen( ListView.Handle, pos );
2448 ListPopupMenu.Popup( pos.X, pos.Y );
2449 end;
2450 end;
2451 end else begin // TBBS, TCategory
2452 case Key of
2453 VK_BACK:; // UpFolderButtonClick(Sender);
2454 VK_SPACE: ListClick;
2455 VK_RETURN: ListDoubleClick(Shift);
2456 VK_APPS:
2457 begin
2458 if ListView.Selected <> nil then begin
2459 pos.X := ListView.Column[ 0 ].Width;
2460 pos.Y := ListView.Selected.Top;
2461 end else begin
2462 pos.X := ListView.Left;
2463 pos.Y := ListView.Top;
2464 end;
2465 Windows.ClientToScreen( ListView.Handle, pos );
2466 ListPopupMenu.Popup( pos.X, pos.Y );
2467 end;
2468 end;
2469 end;
2470 end;
2471
2472 function TGikoForm.GetHttpState: Boolean;
2473 begin
2474 Result := FHttpState;
2475 end;
2476
2477 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2478 Column: TListColumn);
2479 var
2480 id, idx : Integer;
2481 orderList : TList;
2482 begin
2483 idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
2484
2485 if TObject( FActiveList ) is TBBS then
2486 orderList := GikoSys.Setting.BBSColumnOrder
2487 else if TObject( FActiveList ) is TCategory then
2488 orderList := GikoSys.Setting.CategoryColumnOrder
2489 else if TObject( FActiveList ) is TBoard then
2490 orderList := GikoSys.Setting.BoardColumnOrder
2491 else
2492 Exit;
2493
2494 id := Integer( orderList[ idx ] );
2495
2496 if FSortIndex = id then
2497 FSortOrder := not FSortOrder
2498 else begin
2499 FSortOrder := id = 0;
2500 end;
2501
2502 TListViewUtils.ListViewSort(Sender, ListView, Column, ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
2503 end;
2504
2505 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2506 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2507 var
2508 ARect: TRect;
2509 begin
2510 DefaultDraw := True;
2511 Exit;
2512 DefaultDraw := False;
2513 if (cdsSelected in State) or (cdsHot in State) then begin
2514 Sender.Canvas.Brush.Color := clHighlight;
2515 Sender.Canvas.Font.Color := clHighlightText;
2516 end else begin
2517 Sender.Canvas.Brush.Color := clBtnFace;
2518 Sender.Canvas.Font.Color := clBtnText;
2519 end;
2520 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2521 Sender.Canvas.FillRect(ARect);
2522 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2523 end;
2524
2525 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2526 var
2527 Nodes: TTreeNodes;
2528 i: integer;
2529 begin
2530 Nodes := TreeView.Items;
2531
2532 for i := 0 to Nodes.Count - 1 do begin
2533 if Nodes.Item[i].Data = Data then begin
2534 Result := Nodes.Item[i];
2535 Exit;
2536 end;
2537 end;
2538 Result := nil;
2539 end;
2540
2541 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2542 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2543 Headers: OleVariant; var Cancel: WordBool);
2544 var
2545 sNo: string;
2546 p: TPoint;
2547 const
2548 kMenuName: string = 'menu:';
2549 begin
2550
2551 if Pos(kMenuName, URL) <> 0 then begin
2552 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2553
2554 if not GikoSys.IsNumeric(sNo) then Exit;
2555
2556 Cancel := True;
2557 GetCursorpos(p);
2558 KokoPopupMenu.Tag := StrToInt(sNo);
2559 KokoPopupMenu.Popup(p.x, p.y);
2560 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2561 Cancel := not GikoSys.Setting.OpenMailer;
2562 end;
2563
2564 end;
2565
2566 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2567 begin
2568 Application.ProcessMessages;
2569 if not Application.Terminated then begin
2570 if PreviewTimer.Enabled then
2571 PreviewTimer.Enabled := False;
2572 //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2573 if FHint <> nil then begin
2574 FHint.ReleaseHandle;
2575 FHint.ClearAllRes;
2576 end;
2577 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
2578 if FPreviewBrowser <> nil then
2579 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2580 end;
2581 end;
2582
2583 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2584 const ARect: TRect; var DefaultDraw: Boolean);
2585 var
2586 NodeRect: TRect;
2587 i, j: Integer;
2588 IsBoardNode: Boolean;
2589 Cnt: Integer;
2590 CntText: string;
2591 TextWidth: Integer;
2592 TextRect: TRect;
2593 Board: TBoard;
2594 Category: TCategory;
2595 Bitmap: TBitmap;
2596 NodeWidth: Integer;
2597 begin
2598 DefaultDraw := True;
2599
2600 if FTreeType = gttHistory then Exit;
2601
2602 TreeView.Canvas.Font.Color := clBlue;
2603 IsBoardNode := False;
2604 for i := 0 to TreeView.Items.Count - 1 do begin
2605 Cnt := 0;
2606 if not TreeView.Items[i].IsVisible then
2607 continue;
2608
2609 if TObject(TreeView.Items[i].Data) is TCategory then begin
2610 if TreeView.Items[i].Expanded then
2611 continue;
2612
2613 IsBoardNode := False;
2614 Category := TCategory(TreeView.Items[i].Data);
2615 for j := 0 to Category.Count - 1 do begin
2616 Board := Category.Items[j];
2617 if Board <> nil then begin
2618 if Board.UnRead > 0 then begin
2619 Cnt := 1;
2620 Break;
2621 end;
2622 end;
2623 end;
2624 if Cnt <> 1 then
2625 continue;
2626 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2627 IsBoardNode := True;
2628 Board := TBoard(TreeView.Items[i].Data);
2629
2630 Cnt := Board.UnRead;
2631 if Cnt <= 0 then
2632 continue;
2633 end else
2634 continue;
2635
2636 Bitmap := TBitmap.Create;
2637 try
2638 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2639 Bitmap.Canvas.Font.Style := [fsBold];
2640 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2641 finally
2642 Bitmap.Free;
2643 end;
2644
2645 NodeRect := TreeView.Items[i].DisplayRect(True);
2646
2647 if IsBoardNode then
2648 CntText := '(' + IntToStr(Cnt) + ')'
2649 else if Cnt = 1 then
2650 CntText := '(+)';
2651
2652
2653 TextWidth := TreeView.Canvas.TextWidth(CntText);
2654
2655 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2656 NodeRect.Top,
2657 NodeRect.Left + NodeWidth + TextWidth + 8,
2658 NodeRect.Bottom);
2659 DrawText(TreeView.Canvas.Handle,
2660 PChar(CntText),
2661 -1,
2662 TextRect,
2663 DT_SINGLELINE or DT_VCENTER);
2664 end;
2665 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2666 end;
2667
2668 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2669 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2670 var
2671 Board: TBoard;
2672 Category: TCategory;
2673 i: Integer;
2674 begin
2675 DefaultDraw := True;
2676
2677 if FTreeType = gttHistory then Exit;
2678
2679 TreeView.Canvas.Font.Style := [];
2680 if Node <> nil then begin
2681 if TObject(Node.Data) is TCategory then begin
2682 Category := TCategory(Node.Data);
2683 for i := 0 to Category.Count - 1 do begin
2684 Board := Category.Items[i];
2685 if Board <> nil then begin
2686 if Board.UnRead > 0 then begin
2687 TreeView.Canvas.Font.Style := [fsBold];
2688 Break;
2689 end;
2690 end;
2691 end;
2692 end else if TObject(Node.Data) is TBoard then begin
2693 Board := TBoard(Node.Data);
2694 if Board.UnRead > 0 then
2695 TreeView.Canvas.Font.Style := [fsBold];
2696 end;
2697 end;
2698 end;
2699
2700 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2701 begin
2702 TreeView.Invalidate;
2703
2704 if TObject(Node.Data) is TBBS then begin
2705 TBBS(Node.Data).NodeExpand := True;
2706 end else if TObject(Node.Data) is TCategory then begin
2707 TCategory(Node.Data).NodeExpand := True;
2708 end else if TObject(Node.Data) is TBoard then begin
2709 TBoard(Node.Data).NodeExpand := True;
2710 end;
2711 end;
2712
2713 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2714 begin
2715 TreeSplitter.Visible := PanelVisible;
2716 CabinetPanel.Visible := PanelVisible;
2717 CabinetToolButton.Down := PanelVisible;
2718 end;}
2719
2720 procedure TGikoForm.ListViewAllSelect;
2721 begin
2722 ListView.SetFocus;
2723 ListView.SelectAll;
2724 end;
2725
2726 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2727 var
2728 APoint: TPoint;
2729 HitTest: THitTests;
2730 begin
2731 GetCursorPos(APoint);
2732 APoint := TreeView.ScreenToClient(APoint);
2733 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2734 if not (htOnLabel in HitTest) then Exit;
2735
2736 TreeDoubleClick( TreeView.Selected );
2737 end;
2738
2739 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2740 begin
2741 AddMessageList(Msg, nil, Icon);
2742 end;
2743
2744 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2745 var
2746 ATitle: string;
2747 s: string;
2748 boardPlugIn : TBoardPlugIn;
2749 i: Integer;
2750 browserRec : TBrowserRecord;
2751 begin
2752 try
2753 if Item.DownType = gdtBoard then
2754 ATitle := Item.Board.Title
2755 else
2756 ATitle := Item.ThreadItem.Title;
2757 if ATitle = '' then
2758 ATitle := GikoSys.Setting.GetMessage(Ord(gmUnKnown));
2759
2760 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2761 //鐃緒申鐃緒申鐃?鐃緒申
2762 if Item.DownType = gdtBoard then begin
2763 //鐃緒申
2764 Item.SaveListFile;
2765 AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureItiran)), nil, gmiOK);
2766 if GetActiveList = Item.Board then begin
2767 FActiveList := nil;
2768 SetActiveList(Item.Board);
2769 end;
2770 Item.Board.Modified := True;
2771 Item.Board.IsThreadDatRead := True;
2772 PlaySound('New');
2773 end else if Item.DownType = gdtThread then begin
2774 //鐃?鐃緒申
2775 Item.SaveItemFile;
2776 Item.ThreadItem.NewArrival := True;
2777 //if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
2778 if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
2779 //boardPlugIn := Item.ThreadItem.BoardPlugIn;
2780 boardPlugIn := Item.ThreadItem.ParentBoard.BoardPlugIn;
2781 Item.ThreadItem.Title := DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
2782 ATitle := Item.ThreadItem.Title;
2783 end else if ATitle = '鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?' then begin
2784 ATitle := DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
2785 end;
2786 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
2787 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin
2788 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
2789 break;
2790 end;
2791 end;
2792 if GikoSys.Setting.BrowserTabVisible then begin
2793 if GetActiveContent = Item.ThreadItem then
2794 browserRec := InsertBrowserTab(Item.ThreadItem)
2795 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
2796 browserRec := InsertBrowserTab(Item.ThreadItem, True)
2797 else
2798 browserRec := InsertBrowserTab(Item.ThreadItem, False);
2799 if browserRec.Thread = BrowserNullTab.Thread then begin
2800 browserRec.Movement := BrowserNullTab.Movement;
2801 BrowserNullTab.Movement := '';
2802 end;
2803 end else begin
2804 if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
2805 InsertBrowserTab(Item.ThreadItem);
2806 end;
2807
2808 Application.ProcessMessages;
2809
2810 if Item.State = gdsComplete then begin
2811 PlaySound('New');
2812 AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);
2813 //Add by Genyakun
2814 DiffComp := True;
2815 end else begin
2816 PlaySound('NewDiff');
2817 AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureDiff)), nil, gmiOK);
2818 //Add by Genyakun
2819 DiffComp := True;
2820 end;
2821
2822 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2823 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2824 Item.ThreadItem.Round := False;
2825 //Item.ThreadItem.RoundName := '';
2826 AddMessageList('鐃緒申1000鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 - [' + Item.ThreadItem.Title + ']', nil, gmiOK);
2827 end;
2828 TreeView.Refresh;
2829 //ListView鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
2830 if (ActiveList <> nil) and (ActiveList is TBoard) then begin
2831 TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount;
2832 TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount;
2833 TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount;
2834 //ListView鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?
2835 case GikoForm.ViewType of
2836 gvtAll: ListView.Items.Count := TBoard(ActiveList).Count;
2837 gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount;
2838 gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount;
2839 gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount;
2840 end;
2841 end;
2842 end;
2843 ListView.Refresh;
2844 end else if Item.State = gdsNotModify then begin
2845 //鐃緒申鐃?鐃?鐃?
2846 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
2847 //SetContent(Item.ThreadItem);
2848 InsertBrowserTab(Item.ThreadItem);
2849 end;}
2850 AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmNotMod)), nil, gmiSAD);
2851 PlaySound('NoChange');
2852 Screen.Cursor := crDefault;
2853 end else if Item.State = gdsAbort then begin
2854 //鐃緒申鐃?
2855 AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK);
2856 end else if Item.State = gdsError then begin
2857 //鐃?鐃緒申鐃?
2858 s := Item.ErrText;
2859 if s <> '' then
2860 s := ':' + s;
2861 AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmError)) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
2862 // if Item.ResponseCode = 302 then
2863 // AddMessageList('鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', nil, gmiNG);
2864 PlaySound('Error');
2865 end;
2866 finally
2867 Item.Free;
2868 Dec(FWorkCount);
2869 if FWorkCount < 0 then FWorkCount := 0;
2870 if FWorkCount = 0 then begin
2871 try
2872 Animate.Active := False;
2873 finally
2874 Screen.Cursor := crDefault;
2875 end;
2876 end;
2877
2878 end;
2879 end;
2880
2881 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
2882 begin
2883 // SetProgressValue(Number, 0, AWorkCountMax);
2884 // ProgressBar.Visible := True;
2885 ProgressBar.Position := 0;
2886 ProgressBar.Max := AWorkCountMax;
2887 FDownloadTitle := AWorkTitle;
2888 StatusBar.Panels[1].Text := FDownloadTitle + ' - 鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申';
2889 FDownloadMax := AWorkCountMax;
2890 end;
2891
2892 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
2893 begin
2894 ProgressBar.Position := 0;
2895 if FDownloadMax <> 0 then
2896 StatusBar.Panels[1].Text := FDownloadTitle + ' - 鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申';
2897 end;
2898
2899 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
2900 begin
2901 ProgressBar.Position := AWorkCount;
2902 // SetProgressValue(Number, AWorkCount);
2903 StatusBar.Panels[1].Text := FDownloadTitle + ' - 鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
2904 end;
2905
2906 {
2907 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
2908 var
2909 Component: TComponent;
2910 begin
2911 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
2912 if Component <> nil then begin
2913 if not (Component is TProgressBar) then Exit;
2914 if Max <> -1 then
2915 TProgressBar(Component).Max := Max;
2916 TProgressBar(Component).Position := Value;
2917 end;
2918 end;
2919 }
2920
2921 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject;