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.294 - (show annotations) (download) (as text)
Mon May 3 15:18:29 2004 UTC (19 years, 11 months ago) by q9_
Branch: MAIN
Changes since 1.293: +29 -13 lines
File MIME type: text/x-pascal
Shiftキーを押しながら板/スレを更新すると強制取得するようにした

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