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.338 - (show annotations) (download) (as text)
Tue Jun 8 15:14:18 2004 UTC (19 years, 10 months ago) by h677
Branch: MAIN
Changes since 1.337: +14 -10 lines
File MIME type: text/x-pascal
スレ一覧にフォーカスを当てるときに、既に選択しているアイテムがいたらそれが
トップにくるようにスクロールするようにした。

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