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.322 - (show annotations) (download) (as text)
Thu Jun 3 09:22:42 2004 UTC (19 years, 10 months ago) by yoffy
Branch: MAIN
Changes since 1.321: +2 -1 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 procedure FormCreate(Sender: TObject);
544 procedure FormDestroy(Sender: TObject);
545 procedure CabinetPanelHide(Sender: TObject);
546 procedure FormClose(Sender: TObject; var Action: TCloseAction);
547 procedure ListViewData(Sender: TObject; Item: TListItem);
548 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
549 const FindString: String; const FindPosition: TPoint;
550 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
551 Wrap: Boolean; var Index: Integer);
552 procedure ListViewDataHint(Sender: TObject; StartIndex,
553 EndIndex: Integer);
554 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
555 EndIndex: Integer; OldState, NewState: TItemStates);
556 procedure BrowserStatusTextChange(Sender: TObject;
557 const Text: WideString);
558 procedure BrowserTitleChange(Sender: TObject; 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 private
870 { Private 鐃緒申鐃緒申 }
871 //RoundList : TRoundList;
872 FSortIndex: Integer;
873 FSortOrder: Boolean;
874
875 FEnabledCloseButton: Boolean;
876 // ThreadCreate: TThreadCreate;
877
878 FClickNode: TTreeNode;
879 FHttpState: Boolean;
880 FHint: TResPopup;
881 FPreviewBrowser: TPreviewBrowser;
882 FPreviewURL: string;
883
884 FBrowserSizeHeight: Integer;
885 FBrowserSizeWidth: Integer;
886
887 // FFavorite: TFavorite;
888 FTabHintIndex: Integer;
889 FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
890 FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
891 FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
892 FActiveList: TObject;
893 FActiveContent: TBrowserRecord; //
894 FActiveBBS : TBBS;
895 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
896 FTreeType: TGikoTreeType;
897 FWorkCount: Integer;
898 FNameCookie: string;
899 FMailCookie: string;
900 // FLastRoundTime: TDateTime;
901 BrowserNullTab: TBrowserRecord;
902 // DoubleClickOccurred: array [TMouseButton] of Boolean;
903 FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
904 FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
905 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
906
907 // Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
908
909 IsDraggingSelectComboBox : Boolean;
910 DraggingSelectComboBoxPosition : TPoint;
911
912 FSearchDialog: TSearchDialog;
913
914 FDropSpaceNode: TTreeNode;
915
916 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
917 FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
918 FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
919
920 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
921 FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
922 FOddColor : TColor; //鐃緒申鐃緒申鐃?
923
924 FSelectResWord : string; // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
925 FIsIgnoreResize : Boolean; // 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
926 FIsMinimize : TMinimizeType; // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
927 FOldFormWidth : Integer; // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
928 FToolBarSettingSender : TToolBarSettingSenderType; // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
929 FMouseDownPos : TPoint; // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
930 FBrowsers: TList;
931 procedure SetBoardTreeNode( inBBS : TBBS );
932 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
933 function SetBoardListItem(Category: TCategory): Integer;
934 function SetThreadListItem(Board: TBoard): Integer;
935 // function GetRoundName(index: integer): string;
936
937 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
938 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
939 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
940 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
941 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
942
943 procedure SetActiveList(Obj: TObject);
944 procedure ListClick;
945 procedure ListDoubleClick(Shift: TShiftState);
946 procedure BrowserMovement(const AName: string); overload;
947 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
948 procedure SelectListItem(List: TList);
949 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
950 procedure DeleteTab(ThreadItem: TThreadItem); overload;
951 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
952 function Hook(var Message: TMessage): Boolean;
953 procedure AddRoundNameMenu(MenuItem: TMenuItem);
954 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
955 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
956 procedure SetSelectRoundName(Sender: TObject);
957 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
958
959 procedure SetMenuFont;
960 // procedure CreateFavMenu(Folder: TFavoriteFolder);
961 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
962 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
963 procedure FavoriteClick(Sender: TObject); overload;
964 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
965 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
966 function OnDocumentContextMenu(Sender: TObject): WordBool;
967 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
968 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
969 procedure ShowTextPopup;
970 //procedure ShowTextPopup(HintData: THintData);
971 // procedure SetStdToolBar;
972 // function GetAction(ActionName: string): TContainedAction;
973 procedure SetLinkBar;
974 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
975 procedure MenuBarChevronMenu;
976 procedure LinkBarChevronMenu;
977 procedure ToolBarChevronMenu(ToolBar: TToolBar);
978 procedure ModifySelectList;
979 procedure FavoriteBrowseFolder( node: TTreeNode );
980 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
981 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
982 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
983 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
984 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
985 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
986 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
987 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
988 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
989 //
990 procedure SetListViewBackGroundColor(value: TColor);
991 procedure BBSMenuItemOnClick( Sender : TObject );
992 //
993 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
994 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
995 procedure SaveCoolBarSettings;
996 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
997 procedure LoadCoolBarSettings;
998 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
999 procedure OnMinimize;
1000 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1001 procedure OnMinimized;
1002 // CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1003 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1004 // TreeView 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1005 procedure TreeClick( Node : TTreeNode );
1006 // TreeView 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1007 procedure TreeDoubleClick( Node : TTreeNode );
1008 // 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1009 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1010 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1011 // 鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 True 鐃緒申鐃緒申鐃緒申
1012 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1013 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1014 procedure SetBBSMenu;
1015 function WebBrowserClick(Sender: TObject): WordBool;
1016 protected
1017 procedure CreateParams(var Params: TCreateParams); override;
1018 procedure WndProc(var Message: TMessage); override;
1019 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1020 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1021 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1022
1023 public
1024 { Public 鐃緒申鐃緒申 }
1025 // FDownload: TDownload;
1026 FControlThread: TThreadControl;
1027 procedure MoveToURL(URL: string);
1028 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1029 procedure ReloadBBS;
1030 function GetHttpState: Boolean;
1031 procedure SetEnabledCloseButton(Enabled: Boolean);
1032 function GetTreeNode(Data: TObject): TTreeNode;
1033 procedure AppFormDeactivate(Sender: TObject);
1034 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1035 procedure ListViewAllSelect;
1036
1037 property ListStyle: TViewStyle read FListStyle write FListStyle;
1038 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1039 property ViewType: TGikoViewType read FViewType write FViewType;
1040
1041 property NameCookie: string read FNameCookie write FNameCookie;
1042 property MailCookie: string read FMailCookie write FMailCookie;
1043
1044 procedure SetContent(inThread: TBrowserRecord);
1045 function GetActiveContent: TThreadItem;
1046 function GetActiveList: TObject;
1047
1048 property ActiveList: TObject read GetActiveList write SetActiveList;
1049 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1050
1051 procedure SetListViewType(AViewType: TGikoViewType); overload;
1052 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1053 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1054 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1055 procedure PlaySound(SoundEventName: string);
1056
1057 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1058 procedure DeleteHistory( threadItem: TThreadItem );
1059 procedure ClearHistory;
1060 procedure SaveHistory;
1061 procedure LoadHistory;
1062 procedure ShowBBSTree( inBBS : TBBS );
1063 procedure ShowBBSTreeOld( inBBS : TBBS );
1064 procedure ShowHistoryTree;
1065 procedure SetHistoryTreeNode;
1066 // procedure SelectTreeNode(Item: TObject);
1067 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1068 procedure SetBrowserTabState;
1069 // property Favorite: TFavorite read FFavorite write FFavorite;
1070 procedure SetToolBarPopup;
1071 procedure ShowFavoriteAddDialog( Item : TObject );
1072 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1073 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1074 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1075 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1076 property OddColor : TColor read FOddColor write FOddColor;
1077
1078 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1079 procedure OnPlugInMenuItem( Sender : TObject );
1080
1081 published
1082 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1083 end;
1084
1085 TFavoriteMenuItem = class(TMenuItem)
1086 private
1087 FData : Pointer;
1088 public
1089 property Data: Pointer read FData write FData;
1090 end;
1091
1092 TBBSMenuItem = class(TMenuItem)
1093 private
1094 FData : Pointer;
1095 public
1096 property Data: Pointer read FData write FData;
1097 end;
1098
1099 TLinkToolButton = class(TToolButton)
1100 private
1101 FData : Pointer;
1102 public
1103 property Data: Pointer read FData write FData;
1104 end;
1105
1106 TBrowserRecord = class( TObject )
1107 private
1108 FBrowser : TWebBrowser;
1109 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1110 FThread : TThreadItem;
1111 FLastSize : Integer;
1112 FRepaint : Boolean;
1113 FOnlyHundred: Boolean;
1114 public
1115 destructor Destroy; override;
1116 property Browser : TWebBrowser read FBrowser write FBrowser;
1117 property Thread : TThreadItem read FThread write FThread;
1118 property LastSize : Integer read FLastSize write FLastSize;
1119 property Repaint : Boolean read FRepaint write FRepaint;
1120 property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1121 end;
1122
1123 var
1124 GikoForm: TGikoForm;
1125
1126 implementation
1127
1128 uses
1129 About, Option, Round, Splash, Sort, ListSelect,
1130 NewBoard, MojuUtils,Clipbrd;
1131
1132 const
1133 CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1134 BLANK_HTML: string = 'about:blank';
1135 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1136 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1137 //D&D鐃緒申鐃?
1138 DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1139 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1140 ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1141 ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1142 ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1143 ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1144 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1145 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1146 ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1147 ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1148 ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1149 ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1150 ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1151 ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1152 ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1153 ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1154 ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1155 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1156 ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1157
1158 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1159 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1160 TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1161 TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1162 TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1163 TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1164 TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1165
1166 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1167 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1168 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1169
1170 HTML_FILE_NAME = 'temp_preview.html';
1171
1172 WM_XBUTTONDOWN = $020B;
1173 WM_XBUTTONUP = $020C;
1174 WM_XBUTTONDBLCLK = $020D;
1175 XBUTTON1 = $0001;
1176 XBUTTON2 = $0002;
1177 USER_TREECLICK = WM_USER + 2000;
1178 USER_RESIZED = WM_USER + 2001;
1179 USER_MINIMIZED = WM_USER + 2002;
1180 USER_SETLINKBAR = WM_USER + 2003;
1181
1182 {$R *.DFM}
1183
1184 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1185 begin
1186 inherited;
1187 if FormStyle in [fsNormal, fsStayOnTop] then begin
1188 if BorderStyle in [bsSingle, bsSizeable] then begin
1189 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1190 Params.WndParent := 0;
1191 end;
1192 end;
1193 end;
1194
1195 procedure TGikoForm.FormCreate(Sender: TObject);
1196 const
1197 TVS_NOTOOLTIPS = $0080;
1198 var
1199 FileName: string;
1200 Style: DWORD;
1201 msg: string;
1202 i: Integer;
1203 wp: TWindowPlacement;
1204 s: string;
1205 newbrowser: TWebBrowser;
1206 begin
1207 {$IFDEF DEBUG}
1208 AllocConsole;
1209 Writeln('============================================================');
1210 Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1211 Writeln('');
1212 Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1213 Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1214 Writeln('============================================================');
1215 {$ENDIF}
1216 Application.OnDeactivate := AppFormDeactivate;
1217 Self.OnDeactivate := AppFormDeactivate;
1218 Application.HookMainWindow(Hook);
1219 Application.OnMessage := HandleAppMessage; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?by鐃?鐃緒申鐃緒申鐃緒申
1220
1221 FTreeType := gttNone;
1222
1223 FSearchDialog := nil;
1224 BrowserNullTab := TBrowserRecord.Create;
1225 BrowserNullTab.Browser := Browser;
1226 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1227 FBrowsers := TList.Create;
1228 for i := 0 to 4 do begin
1229 newBrowser := TWebBrowser.Create(nil);
1230 TOleControl(newBrowser).Parent := BrowserPanel;
1231 TOleControl(newBrowser).Align := alClient;
1232 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1233 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1234 newBrowser.OnEnter := BrowserEnter;
1235 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1236 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1237 newBrowser.OnTitleChange := BrowserTitleChange;
1238 newBrowser.Navigate(BLANK_HTML);
1239 ShowWindow(newBrowser.Handle, SW_HIDE);
1240 FBrowsers.Add(newBrowser);
1241 end;
1242 BrowserNullTab.Browser.BringToFront;
1243 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1244
1245 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1246 FIsIgnoreResize := True;
1247
1248 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1249 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1250
1251
1252 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1253 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1254
1255 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1256 InitializeBoardPlugIns;
1257
1258 EnabledCloseButton := True;
1259
1260
1261 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1262 RoundList := TRoundList.Create;
1263 RoundList.LoadRoundBoardFile;
1264
1265 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1266 GikoSys.ListBoardFile;
1267
1268 RoundList.LoadRoundThreadFile;
1269
1270 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1271 GikoSys.ListBoardFile;
1272
1273 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1274 SetBBSMenu;
1275
1276 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1277 FHistoryList := TList.Create;
1278
1279 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1280 LoadHistory;
1281
1282 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1283 // FFavorite := TFavorite.Create(FavoriteTreeView);
1284 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1285 FavoriteDM.ReadFavorite;
1286
1287 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1288 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1289
1290 //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1291 // MainCoolBar.Top := 0;
1292 // MainCoolBar.Left := 0;
1293
1294 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1295 AnimePanel.Top := 0;
1296 AnimePanel.Left := 0;
1297
1298 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1299
1300 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1301 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1302
1303 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1304 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1305 MsgBarVisibleActionExecute(nil);
1306 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1307
1308 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1309 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1310 StatusBarVisibleActionExecute(nil);
1311
1312 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1313 TreeView.Items.BeginUpdate;
1314 FavoriteTreeView.Items.BeginUpdate;
1315 ListView.Items.BeginUpdate;
1316 try
1317 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1318 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1319 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1320 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1321
1322 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1323 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1324 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1325 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1326
1327 ListView.Font.Name := GikoSys.Setting.ListFontName;
1328 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1329 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1330 //ListView.Color := GikoSys.Setting.ListBackColor;
1331 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1332 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1333 FOddColor := GikoSys.Setting.OddColor;
1334
1335 finally
1336 TreeView.Items.EndUpdate;
1337 FavoriteTreeView.Items.EndUpdate;
1338 ListView.Items.EndUpdate;
1339 end;
1340 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1341 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1342
1343 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1344 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1345 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1346 FDragWFirst := false;
1347 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1348 // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1349 // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1350
1351
1352 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1353 wp.length := sizeof(wp);
1354 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1355 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1356 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1357 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1358 wp.showCmd := SW_HIDE;
1359 SetWindowPlacement(Handle, @wp);
1360
1361 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1362 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1363 if GikoSys.Setting.WindowMax then
1364 WindowState := wsMaximized;
1365
1366 //鐃?鐃?鐃?鐃?鐃緒申
1367 try
1368 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1369 if FileExists(FileName) then
1370 Animate.FileName := FileName;
1371 except
1372 end;
1373
1374 //鐃?鐃?鐃?鐃?
1375 FNameCookie := '';
1376 FMailCookie := '';
1377
1378 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1379 AllItemAction.Checked := True;
1380 AllResAction.Checked := True;
1381
1382 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1383 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1384 Style := Style or TVS_NOTOOLTIPS;
1385 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1386
1387 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1388 TreeView.Align := alClient;
1389 FavoriteTreeView.Align := alClient;
1390 FavoriteTreeView.Visible := False;
1391
1392 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1393 // FBrowserSizeFlag := False;
1394 // FBrowserSizeHeight := ViewPanel.Height;
1395
1396 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1397 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1398
1399 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1400 ArrangeAction.Execute;
1401
1402 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1403 case GikoSys.Setting.ListWidthState of
1404 glsMax: begin
1405 ViewPanel.Width := 1;
1406 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1407 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1408 end;
1409 glsMin: begin
1410 ViewPanel.Width := GikoSys.Setting.ListWidth;
1411 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1412 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1413 end;
1414 else begin
1415 ViewPanel.Width := GikoSys.Setting.ListWidth;
1416 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1417 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1418 end;
1419 end;
1420 end else begin
1421 case GikoSys.Setting.ListHeightState of
1422 glsMax: begin
1423 ViewPanel.Height := 1;
1424 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1425 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1426 end;
1427 glsMin: begin
1428 ViewPanel.Height := GikoSys.Setting.ListHeight;
1429 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1430 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1431 end;
1432 else begin
1433 ViewPanel.Height := GikoSys.Setting.ListHeight;
1434 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1435 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1436 end;
1437 end;
1438 end;
1439
1440 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1441 // ProgressBar.Visible := False;
1442 ProgressBar.Parent := StatusBar;
1443 ProgressBar.Top := 2;
1444 ProgressBar.Left := 0;
1445 ProgressBar.Width := StatusBar.Panels[0].Width;
1446 ProgressBar.Height := StatusBar.Height - 2;
1447 ProgressBar.Position := 0;
1448
1449 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1450 FControlThread := TThreadControl.Create(True);
1451 FControlThread.MaxThreadCount := 1;
1452 FControlThread.Resume;
1453 FControlThread.OnDownloadEnd := DownloadEnd;
1454 FControlThread.OnDownloadMsg := DownloadMsg;
1455 FControlThread.OnWork := Work;
1456 FControlThread.OnWorkBegin := WorkBegin;
1457 FControlThread.OnWorkEnd := WorkEnd;
1458 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1459
1460 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1461 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1462
1463 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1464 SetBrowserTabState;
1465
1466 BrowserBoardNameLabel.Caption := '';
1467 BrowserNameLabel.Caption := '';
1468 FWorkCount := 0;
1469
1470 FTabHintIndex := -1;
1471
1472 //鐃緒申鐃緒申鐃?鐃?鐃?
1473 SetLinkBar;
1474
1475 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1476 SetMenuFont;
1477
1478 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1479 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1480 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1481
1482 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1483 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1484 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1485
1486 MakeDefaultINIFile();
1487 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1488 ReadToolBarSetting(ActionList, StdToolBar);
1489 ReadToolBarSetting(ActionList, ListToolBar);
1490 try
1491 for i := ListToolBar.ControlCount - 1 downto 0 do
1492 begin
1493 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1494 begin
1495 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1496 if (i + 1) < ListToolBar.ControlCount then
1497 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1498 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1499 ListToolBar.Controls[ i + 1 ].Visible := False;
1500
1501 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1502 ListToolBar.Controls[ i ].Visible := False;
1503 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1504 SelectComboBox.Parent := ListToolBar;
1505 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1506 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1507 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1508 SelectComboBoxSplitter.Parent := ListToolBar;
1509 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1510
1511 break;
1512 end;
1513 end;
1514 except
1515 end;
1516 ReadToolBarSetting(ActionList, BrowserToolBar);
1517 SetToolBarPopup;
1518 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1519 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1520 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1521
1522 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1523
1524 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1525 if not FileExists(GikoSys.GetBoardFileName) then begin
1526 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1527 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1528 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1529 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1530 NewBoardAction.Execute;
1531 end;
1532
1533 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1534 GikoSys.LoadKeySetting(ActionList);
1535
1536 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1537 // FLastRoundTime := 0;
1538
1539 //ResHint
1540 FHint := TResPopup.Create(Self);
1541
1542 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1543 CabinetVisible( False );
1544 if GikoSys.Setting.CabinetVisible then begin
1545 i := CabinetSelectPopupMenu.Items.Count - 1;
1546 if GikoSys.Setting.CabinetIndex = i - 1 then
1547 CabinetHistoryAction.Execute
1548 else if GikoSys.Setting.CabinetIndex = i then
1549 CabinetFavoriteAction.Execute
1550 else begin
1551 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1552 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1553 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1554 FIsIgnoreResize := True;
1555 CabinetBBSAction.Execute;
1556 end;
1557 end else begin
1558 ShowBBSTreeOld( BBSs[ 0 ] );
1559 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1560 end;
1561
1562 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 3
1563 FIsIgnoreResize := True;
1564
1565 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1566 if GikoSys.Setting.AutoLogin then
1567 LoginAction.Execute;
1568
1569 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1570 for i := 1 to ParamCount do begin
1571 MoveToURL(ParamStr(i));
1572 end;
1573 // SetStdToolBar;
1574 // SetLinkBar;
1575
1576 s := GikoSys.FAbon.NGwordname;
1577 StatusBar.Panels[2].Text := s;
1578 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1579 StatusBarResize(Sender);
1580
1581 dummy1.Caption := ItemReservPMenu.Caption;
1582 dummy1.Hint := ItemReservPMenu.Hint;
1583
1584 //Samba24鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
1585 GikoSys.SambaFileExists();
1586
1587 end;
1588
1589 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1590 procedure TGikoForm.SaveCoolBarSettings;
1591 var
1592 i : Integer;
1593 CoolSet : TCoolSet;
1594 begin
1595
1596 if IsIconic( Handle ) or FIsIgnoreResize then
1597 Exit;
1598
1599 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1600 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1601 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1602 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1603 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1604 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1605 end;
1606 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1607 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1608 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1609 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1610 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1611 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1612 end;
1613 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1614 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1615 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1616 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1617 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1618 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1619 end;
1620
1621 end;
1622
1623 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1624 procedure TGikoForm.LoadCoolBarSettings;
1625 var
1626 i : Integer;
1627 CoolSet : TCoolSet;
1628 begin
1629
1630 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1631 MainCoolBar.Bands.BeginUpdate;
1632 try
1633 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1634 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1635 CoolSet := GikoSys.Setting.MainCoolSet[i];
1636 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1637 FIsIgnoreResize := False;
1638 SaveCoolBarSettings;
1639 Exit;
1640 end;
1641 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1642 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1643 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1644 end;
1645 finally
1646 MainCoolBar.Bands.EndUpdate;
1647 end;
1648
1649 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1650 ListCoolBar.Bands.BeginUpdate;
1651 try
1652 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1653 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1654 CoolSet := GikoSys.Setting.ListCoolSet[i];
1655 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1656 FIsIgnoreResize := False;
1657 SaveCoolBarSettings;
1658 Exit;
1659 end;
1660 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1661 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1662 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1663 end;
1664 finally
1665 ListCoolBar.Bands.EndUpdate;
1666 end;
1667
1668 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1669 BrowserCoolBar.Bands.BeginUpdate;
1670 try
1671 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1672 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1673 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1674 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1675 FIsIgnoreResize := False;
1676 SaveCoolBarSettings;
1677 Exit;
1678 end;
1679 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1680 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1681 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1682 end;
1683 finally
1684 BrowserCoolBar.Bands.EndUpdate;
1685 end;
1686
1687 end;
1688
1689 //
1690 //
1691 //
1692 procedure TGikoForm.FormShow(Sender: TObject);
1693 begin
1694 ShowWindow(Application.Handle, SW_HIDE);
1695
1696 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1697 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1698 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1699 StdToolBarVisibleActionExecute( nil );
1700 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1701 AddressBarVisibleActionExecute( nil );
1702 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1703 LinkBarVisibleActionExecute( nil );
1704 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1705 ListToolBarVisibleActionExecute( nil );
1706 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1707 ListNameBarVisibleActionExecute( nil );
1708 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1709 BrowserToolBarVisibleActionExecute( nil );
1710 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1711 BrowserNameBarVisibleActionExecute( nil );
1712
1713 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1714 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1715 BrowserTabVisibleActionExecute(nil);
1716
1717 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1718 BrowserTabTopAction.Checked := True;
1719 BrowserTabTopActionExecute(nil);
1720 end else begin
1721 BrowserTabBottomAction.Checked := True;
1722 BrowserTabBottomActionExecute(nil);
1723 end;
1724
1725 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1726 BrowserTabTabStyleAction.Checked := True;
1727 BrowserTabTabStyleActionExecute(nil);
1728 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1729 BrowserTabButtonStyleAction.Checked := True;
1730 BrowserTabButtonStyleActionExecute(nil);
1731 end else begin
1732 BrowserTabFlatStyleAction.Checked := True;
1733 BrowserTabFlatStyleActionExecute(nil);
1734 end;
1735
1736 // CoolBar 鐃緒申鐃緒申
1737 LoadCoolBarSettings;
1738
1739 FIsIgnoreResize := False;
1740 end;
1741
1742 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1743 begin
1744 if GikoForm.WindowState <> wsMinimized then
1745 SaveCoolBarSettings;
1746 if ( GikoSys.Setting.ShowDialogForEnd ) and
1747 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1748 CanClose := false;
1749 Exit;
1750 end else begin
1751 CanClose := True;
1752 end;
1753 //Application.HookMainWindow(Hook);
1754 Application.UnhookMainWindow(Hook);
1755 Application.Terminate;
1756 end;
1757
1758 procedure TGikoForm.FormDestroy(Sender: TObject);
1759 var
1760 i: Integer;
1761 // CoolSet: TCoolSet;
1762 wp: TWindowPlacement;
1763 tmpBool: Boolean;
1764 begin
1765 // Application.OnDeactivate := nil;
1766 // Self.OnDeactivate := nil;
1767 try
1768 //column鐃緒申
1769 if GetActiveList is TBBS then begin
1770 for i := 0 to ListView.Columns.Count - 1 do
1771 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1772 end else if GetActiveList is TCategory then begin
1773 for i := 0 to ListView.Columns.Count - 1 do
1774 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1775 end else if GetActiveList is TBoard then begin
1776 for i := 0 to ListView.Columns.Count - 1 do
1777 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1778 end;
1779 except
1780 end;
1781 try
1782 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1783 wp.length := sizeof(wp);
1784 GetWindowPlacement(Handle, @wp);
1785 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1786 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1787 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1788 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1789 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1790
1791 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1792 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1793 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1794 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1795 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1796 if ArrangeAction.Checked then
1797 GikoSys.Setting.ListOrientation := gloVertical
1798 else
1799 GikoSys.Setting.ListOrientation := gloHorizontal;
1800 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1801 except
1802 end;
1803 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
1804 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1805 {
1806 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
1807 // CoolBar 鐃緒申鐃緒申
1808 if GikoForm.WindowState <> wsMinimized then
1809 SaveCoolBarSettings;
1810 }
1811 try
1812 GikoSys.Setting.WriteWindowSettingFile;
1813 GikoSys.Setting.WriteNameMailSettingFile;
1814 except
1815 end;
1816
1817 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1818 try
1819 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1820 FavoriteDM.WriteFavorite;
1821 FavoriteDM.Clear;
1822 except
1823 end;
1824
1825 try
1826 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1827 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1828 GikoSys.Setting.ShowDialogForAllTabClose := false;
1829 AllTabCloseAction.Execute;
1830 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1831 except
1832 end;
1833 try
1834 LockWindowUpdate(Self.Handle);
1835 for i := FBrowsers.Count - 1 downto 0 do begin
1836 TWebBrowser(FBrowsers[i]).Free;
1837 end;
1838 FBrowsers.Clear;
1839 FBrowsers.Capacity := 0;
1840 finally
1841 FBrowsers.Free;
1842 end;
1843 try
1844 if BrowserNullTab <> nil then begin
1845 BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
1846 *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1847 *}
1848 BrowserNullTab.Free;
1849 end;
1850 except
1851 end;
1852 LockWindowUpdate(0);
1853 try
1854 TreeView.Items.BeginUpdate;
1855 for i := TreeView.Items.Count - 1 downto 0 do begin
1856 TreeView.Items[i].Free;
1857 end;
1858 TreeView.Items.Clear;
1859 TreeView.Items.EndUpdate;
1860 except
1861 end;
1862
1863 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1864 try
1865 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1866 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1867 except
1868 end;
1869
1870 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1871 try
1872 SaveHistory;
1873 except
1874 end;
1875 try
1876 try
1877 ClearHistory;
1878 except
1879 end;
1880 finally
1881 FHistoryList.Free;
1882 end;
1883
1884 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1885 try
1886 RoundList.SaveRoundFile;
1887 except
1888 end;
1889 try
1890 try
1891 RoundList.Clear;
1892 except
1893 end;
1894 finally
1895 RoundList.Free;
1896 end;
1897
1898 try
1899 try
1900 FControlThread.Terminate;
1901 FControlThread.WaitFor;
1902 except
1903 end;
1904 finally
1905 FControlThread.Free;
1906 end;
1907
1908 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1909 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1910 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1911 try
1912 for i := Length( BBSs ) - 1 downto 0 do begin
1913 if BBSs[ i ] <> nil then
1914 BBSs[ i ].Free;
1915 BBSs[ i ] := nil;
1916 end;
1917 except
1918 end;
1919
1920 try
1921 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
1922 if BoardPlugIns[ i ] <> nil then
1923 BoardPlugIns[ i ].Free;
1924 BoardPlugIns[ i ] := nil;
1925 end;
1926 except
1927 end;
1928
1929 try
1930 if FEvent <> nil then
1931 FEvent.Free;
1932
1933 //Hint鐃?鐃緒申
1934 if FHint <> nil then begin
1935 FHint.ReleaseHandle;
1936 FHint.Free;
1937 FHint := nil;
1938 end;
1939 //Preview鐃?鐃緒申
1940 if TPreviewBrowser <> nil then begin
1941 FPreviewBrowser.Free;
1942 FPreviewBrowser := nil;
1943 end;
1944 except
1945 end;
1946
1947 end;
1948
1949 //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1950 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1951 begin
1952 end;
1953 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1954 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1955 begin
1956 CabinetVisibleAction.Execute;
1957 // CabinetPanelVisible(false);
1958 end;
1959
1960 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1961 procedure TGikoForm.SetBBSMenu;
1962 var
1963 i : Integer;
1964 item : TBBSMenuItem;
1965 begin
1966
1967 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1968 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1969 try
1970 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1971 CabinetSelectPopupMenu.Items[ i ].Free;
1972 CabinetMenu.Items[ i ].Free;
1973 BBSSelectPopupMenu.Items[ i ].Free;
1974 end;
1975 except
1976 end;
1977 end;
1978
1979 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1980 for i := Length( BBSs ) - 1 downto 0 do begin
1981 try
1982 item := TBBSMenuItem.Create( PopupMenu );
1983 item.Caption := BBSs[ i ].Title;
1984 item.Data := BBSs[ i ];
1985 item.OnClick := BBSMenuItemOnClick;
1986 CabinetSelectPopupMenu.Items.Insert( 0, item );
1987 item := TBBSMenuItem.Create( PopupMenu );
1988 item.Caption := BBSs[ i ].Title;
1989 item.Data := BBSs[ i ];
1990 item.OnClick := BBSMenuItemOnClick;
1991 CabinetMenu.Insert( 0, item );
1992 item := TBBSMenuItem.Create( PopupMenu );
1993 item.Caption := BBSs[ i ].Title;
1994 item.Data := BBSs[ i ];
1995 item.OnClick := BBSMenuItemOnClick;
1996 BBSSelectPopupMenu.Items.Insert( 0, Item );
1997 except
1998 end;
1999 end;
2000
2001 end;
2002
2003 procedure TGikoForm.ReloadBBS;
2004 var
2005 i : Integer;
2006 tmpBool: Boolean;
2007 begin
2008 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2009 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2010 GikoSys.Setting.ShowDialogForAllTabClose := false;
2011 AllTabCloseAction.Execute;
2012 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2013
2014 SetContent(BrowserNullTab);
2015 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
2016 TreeView.Items.Clear;
2017
2018 //BBS鐃?鐃緒申
2019 try
2020 for i := Length( BBSs ) - 1 downto 0 do begin
2021 if BBSs[ i ] <> nil then
2022 BBSs[ i ].Free;
2023 BBSs[ i ] := nil;
2024 end;
2025 except
2026 end;
2027
2028 ActiveList := nil;
2029
2030 FTreeType := gttNone;
2031
2032 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2033
2034 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2035 SetBBSMenu;
2036
2037 ShowBBSTree( BBSs[ 0 ] );
2038
2039 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2040 SaveHistory;
2041 ClearHistory;
2042 LoadHistory;
2043
2044 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2045 FavoriteDM.WriteFavorite;
2046 FavoriteDM.Clear;
2047 FavoriteDM.ReadFavorite;
2048
2049 SetLinkBar;
2050
2051 end;
2052
2053 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2054 procedure TGikoForm.SetBoardTreeNode(
2055 inBBS : TBBS
2056 );
2057 var
2058 i, j, k: integer;
2059 Root: TTreeNode;
2060 CategoryNode: TTreeNode;
2061 BoardNode: TTreeNode;
2062 Category: TCategory;
2063 Board: TBoard;
2064 begin
2065 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2066 FActiveBBS := inBBS;
2067 TreeView.Items.BeginUpdate;
2068 TreeView.Items.Clear;
2069 try
2070 if not inBBS.IsBoardFileRead then
2071 GikoSys.ReadBoardFile( inBBS );
2072 try
2073 if SplashWindow <> nil then
2074 SplashWindow.ProgressBar.Max := inBBS.Count;
2075 except
2076 end;
2077
2078 Root := TreeView.Items.Add( nil, inBBS.Title );
2079 Root.ImageIndex := ITEM_ICON_2CH1;
2080 Root.SelectedIndex := ITEM_ICON_2CH2;
2081 Root.Data := inBBS;
2082 for i := 0 to inBBS.Count - 1 do begin
2083 Category := TCategory(inBBS.Items[i]);
2084 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2085 CategoryNode.Data := Category;
2086 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2087 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2088
2089 for j := 0 to Category.Count - 1 do begin
2090 Board := TBoard(Category.Items[j]);
2091 Board.BeginUpdate;
2092 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2093 BoardNode.Data := Board;
2094 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2095 if not Board.IsLogFile then begin
2096 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2097 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2098 end else begin
2099 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2100 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2101 for k := 0 to Board.Count - 1 do begin
2102 if Board.Items[ k ].IsLogFile then begin
2103 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2104 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2105
2106 Break;
2107 end;
2108 end;
2109 end;
2110 Board.EndUpdate;
2111 end;
2112
2113 CategoryNode.Expanded := Category.NodeExpand;
2114
2115 if SplashWindow <> nil then begin
2116 SplashWindow.ProgressBar.StepIt;
2117 Application.ProcessMessages;
2118 end;
2119 end;
2120 finally
2121 TreeView.Items.EndUpdate;
2122 end;
2123 end;
2124
2125 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2126 const
2127 COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
2128 var
2129 ListColumn: TListColumn;
2130 i: Integer;
2131 begin
2132 ListView.Items.BeginUpdate;
2133 try
2134 Screen.Cursor := crHourGlass;
2135
2136 ListView.Columns.Clear;
2137 for i := 0 to Length(COLUMN) - 1 do begin
2138 ListColumn := ListView.Columns.Add;
2139 ListColumn.Caption := COLUMN[i];
2140 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2141 end;
2142
2143 ListView.Items.Count := 0;
2144 ListView.Items.Clear;
2145 ListView.Items.Count := ABBS2ch.Count;
2146
2147 // UpFolderAction.Enabled := False;
2148 // AllItemAction.Enabled := False;
2149 // LogItemAction.Enabled := False;
2150 // NewItemAction.Enabled := False;
2151 // SelectItemAction.Enabled := False;
2152 // ListDownloadToolButton.Enabled := False;
2153 // BoardReservToolButton.Enabled := False;
2154 // ListThreadDownloadToolButton.Enabled := False;
2155
2156 ListNameLabel.Caption := ABBS2ch.Title;
2157 FolderImage.Picture := nil;
2158 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2159
2160 FSortIndex := 0;
2161 FSortOrder := False;
2162 ListViewColumnClick(nil, ListView.Column[0]);
2163
2164 Result := ABBS2ch.Count;
2165 finally
2166 Screen.Cursor := crDefault;
2167 ListView.Items.EndUpdate;
2168 end;
2169 end;
2170
2171 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2172 const
2173 COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2174 var
2175 ListColumn: TListColumn;
2176 i: Integer;
2177 begin
2178 ListView.Items.BeginUpdate;
2179 try
2180 Screen.Cursor := crHourGlass;
2181
2182 ListView.Columns.Clear;
2183 for i := 0 to Length(COLUMN) - 1 do begin
2184 ListColumn := ListView.Columns.Add;
2185 ListColumn.Caption := COLUMN[i];
2186 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2187 end;
2188
2189 ListView.Items.Count := 0;
2190 ListView.Items.Clear;
2191 ListView.Items.Count := Category.Count;
2192
2193 // UpFolderAction.Enabled := True;
2194 // AllItemAction.Enabled := False;
2195 // LogItemAction.Enabled := False;
2196 // NewItemAction.Enabled := False;
2197 // SelectItemAction.Enabled := False;
2198 // ListDownloadToolButton.Enabled := False;
2199 // BoardReservToolButton.Enabled := False;
2200 // ListThreadDownloadToolButton.Enabled := False;
2201
2202 ListNameLabel.Caption := Category.Title;
2203 FolderImage.Picture := nil;
2204 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2205
2206 FSortIndex := 0;
2207 FSortOrder := False;
2208 ListViewColumnClick(nil, ListView.Column[0]);
2209
2210 Result := Category.Count;
2211 finally
2212 Screen.Cursor := crDefault;
2213 ListView.Items.EndUpdate;
2214 end;
2215 end;
2216
2217 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2218 const
2219 COLUMN: array[0..7] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2220 '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申', '鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
2221 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2222 taRightJustify, taRightJustify,
2223 taRightJustify, taLeftJustify,
2224 taLeftJustify, taLeftJustify);
2225 //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2226 var
2227 ListColumn: TListColumn;
2228 i: Integer;
2229 begin
2230 ListView.Items.BeginUpdate;
2231 try
2232 Screen.Cursor := crHourGlass;
2233
2234 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2235 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2236 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2237 begin
2238 ListView.Columns.Clear;
2239 for i := 0 to Length(COLUMN) - 1 do begin
2240 ListColumn := ListView.Columns.Add;
2241 ListColumn.Caption := COLUMN[i];
2242 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2243 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2244 end;
2245 end;
2246
2247 ListView.Items.Count := 0;
2248 ListView.Items.Clear;
2249
2250 case GikoForm.ViewType of
2251 gvtAll: ListView.Items.Count := Board.Count;
2252 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2253 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2254 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2255 end;
2256
2257 ListNameLabel.Caption := Board.Title;
2258 FolderImage.Picture := nil;
2259 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2260
2261 FSortIndex := 0;
2262 FSortOrder := False;
2263 ListViewColumnClick(nil, ListView.Column[0]);
2264
2265 Result := Board.Count;
2266 finally
2267 Screen.Cursor := crDefault;
2268 ListView.Items.EndUpdate;
2269 end;
2270 end;
2271
2272 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2273 var
2274 // FileName: string;
2275 // DateTime: TDateTime;
2276 BoardCnt: Integer;
2277 BBS: TBBS;
2278 Category: TCategory;
2279 Board: TBoard;
2280 ThreadItem: TThreadItem;
2281 RepStr: string;
2282 ActivListObj : TObject;
2283 begin
2284 ActivListObj := ActiveList;
2285 if ActivListObj is TBBS then begin
2286 BBS := TBBS(ActivListObj);
2287
2288 ListView.StateImages := nil;
2289
2290 if BBS = nil then Exit;
2291 if BBS.Count <= 0 then Exit;
2292 if Item = nil then Exit;
2293 if Item.Index >= BBS.Count then Exit;
2294 if ListView.Items.Count = 0 then Exit;
2295
2296 if not (BBS.Items[Item.index] is TCategory) then Exit;
2297 Category := TCategory(BBS.Items[Item.index]);
2298
2299 if Category = nil then Exit;
2300
2301 if ListNumberVisibleAction.Checked then
2302 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2303 else
2304 Item.Caption := Category.Title;
2305
2306 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2307 Item.Data := Category;
2308 end else if ActivListObj is TCategory then begin
2309 Category := TCategory(ActivListObj);
2310
2311 ListView.StateImages := nil;
2312
2313 if Category = nil then Exit;
2314 if Category.Count <= 0 then Exit;
2315 if Item = nil then Exit;
2316 if Item.Index >= Category.Count then Exit;
2317 if ListView.Items.Count = 0 then Exit;
2318
2319 if not (Category.Items[Item.Index] is TBoard) then Exit;
2320 Board := TBoard(Category.Items[Item.Index]);
2321
2322 if Board = nil then Exit;
2323
2324 if ListNumberVisibleAction.Checked then
2325 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2326 else
2327 Item.Caption := Board.Title;
2328
2329 if Item.SubItems.Count <> 2 then begin
2330 Item.SubItems.Clear;
2331 Item.SubItems.Add('');
2332 Item.SubItems.Add('');
2333 end;
2334
2335 Item.ImageIndex := ITEM_ICON_BOARD1;
2336
2337 if Board.Round then
2338 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2339 else
2340 Item.SubItems[0] := '';
2341
2342 if Board.RoundDate = ZERO_DATE then begin
2343 Item.SubItems[1] := '';
2344 end else
2345 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2346 Item.Data := Board;
2347 end else if ActivListObj is TBoard then begin
2348 Board := TBoard(ActivListObj);
2349
2350 if GikoSys.Setting.ListIconVisible then
2351 ListView.StateImages := StateIconImageList
2352 else
2353 ListView.StateImages := nil;
2354
2355 case GikoForm.ViewType of
2356 gvtAll: BoardCnt := Board.Count;
2357 gvtLog: BoardCnt := Board.GetLogThreadCount;
2358 gvtNew: BoardCnt := Board.GetNewThreadCount;
2359 gvtUser: BoardCnt := Board.GetUserThreadCount;
2360 else
2361 BoardCnt := 0;
2362 end;
2363
2364 // if Board = nil then Exit;
2365 if BoardCnt <= 0 then Exit;
2366 if Item = nil then Exit;
2367 if Item.Index > BoardCnt then Exit;
2368 if ListView.Items.Count = 0 then Exit;
2369
2370 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2371
2372 ThreadItem := nil;
2373 case GikoForm.ViewType of
2374 gvtAll: if Item.Index >= Board.Count then Exit else
2375 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2376 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2377 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2378 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2379 end;
2380
2381 if ThreadItem = nil then Exit;
2382
2383 // if ListNumberVisibleAction.Checked then
2384 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2385 // else
2386 RepStr := ThreadItem.Title;
2387 RepStr := CustomStringReplace(RepStr, '&lt;', '<' );
2388 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2389 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2390 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2391 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2392
2393 if Item.SubItems.Count <> 7 then begin
2394 Item.SubItems.Clear;
2395 Item.SubItems.Add('');
2396 Item.SubItems.Add('');
2397 Item.SubItems.Add('');
2398 Item.SubItems.Add('');
2399 Item.SubItems.Add('');
2400 Item.SubItems.Add('');
2401 Item.SubItems.Add('');
2402 end;
2403
2404 if ListNumberVisibleAction.Checked then
2405 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2406 else
2407 Item.Caption := RepStr;
2408
2409 case ThreadItem.AgeSage of
2410 gasNone: Item.StateIndex := -1;
2411 gasNew: Item.StateIndex := 0;
2412 gasAge: Item.StateIndex := 1;
2413 gasSage: Item.StateIndex := 2;
2414 end;
2415
2416 if ThreadItem.IsLogFile then begin
2417 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2418 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2419 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2420 if ThreadItem.NewResCount = 0 then
2421 Item.SubItems[2] := ''
2422 else
2423 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2424 Item.SubItems[3] := '';
2425 if ThreadItem.Round then
2426 Item.SubItems[4] := ThreadItem.RoundName
2427 else
2428 Item.SubItems[4] := '';
2429 if ThreadItem.RoundDate = ZERO_DATE then begin
2430 Item.SubItems[5] := '';
2431 end else
2432 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2433 if ThreadItem.NewArrival then
2434 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2435 if ThreadItem.CreateDate = ZERO_DATE then begin
2436 Item.SubItems[6] := '';
2437 end else
2438 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2439
2440 end else begin
2441 Item.ImageIndex := ITEM_ICON_THREAD1;
2442 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2443 Item.SubItems[1] := '';
2444 Item.SubItems[2] := '';
2445 Item.SubItems[3] := '';
2446 Item.SubItems[4] := '';
2447 Item.SubItems[5] := '';
2448 if not GikoSys.Setting.CreationTimeLogs then
2449 if ThreadItem.CreateDate = ZERO_DATE then
2450 Item.SubItems[6] := ''
2451 else
2452 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2453
2454 end;
2455
2456 Item.Data := ThreadItem;
2457 end;
2458 end;
2459
2460 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2461 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2462 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2463 var Index: Integer);
2464 begin
2465
2466 //
2467 end;
2468
2469 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2470 EndIndex: Integer);
2471 begin
2472 //
2473 end;
2474
2475 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2476 EndIndex: Integer; OldState, NewState: TItemStates);
2477 begin
2478 //
2479 end;
2480
2481 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2482 var
2483 p: TPoint;
2484 s: string;
2485 tmp2: string;
2486 URL: string;
2487 ATitle: Boolean;
2488
2489 threadItem : TThreadItem;
2490 board : TBoard;
2491 Protocol, Host, Path, Document, Port, Bookmark: string;
2492
2493 //wkInt: Integer;
2494 wkIntSt: Integer;
2495 wkIntTo: Integer;
2496 ActiveFileName: string;
2497 e: IHTMLElement;
2498 Ext: string;
2499 buf: string;
2500 PathRec: TPathRec;
2501 begin
2502 if not( TObject(Sender) is TWebBrowser )then
2503 Exit;
2504 try
2505 try
2506 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2507 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2508 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2509 end;
2510 end;
2511 except
2512 end;
2513 finally
2514 end;
2515 if PreviewTimer.Enabled then
2516 PreviewTimer.Enabled := False;
2517 Application.CancelHint;
2518 if GetActiveContent <> nil then
2519 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2520 else
2521 ActiveFileName := '';
2522
2523 StatusBar.Panels[1].Text := Text;
2524
2525 if FHint <> nil then begin
2526 FHint.ReleaseHandle;
2527 FHint.ClearAllRes;
2528 end;
2529 if FPreviewBrowser <> nil then
2530 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2531
2532 if not GikoSys.Setting.UnActivePopup then
2533 if not GikoForm.Active then
2534 Exit;
2535
2536 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2537 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2538
2539 s := '';
2540 Ext := AnsiLowerCase(ExtractFileExt(Text));
2541 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2542 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2543 if FPreviewBrowser = nil then begin
2544 FPreviewBrowser := TPreviewBrowser.Create(Self);
2545 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2546 TOleControl(FPreviewBrowser).Parent := nil;
2547 end;
2548 FPreviewBrowser.Navigate(BLANK_HTML);//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2549 FPreviewURL := Text;
2550 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2551 PreviewTimer.Enabled := True;
2552 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2553 if Pos('mailto:', Text) = 1 then begin
2554 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2555 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2556 GetCursorPos(p);
2557 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2558 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2559 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2560 if (Assigned(e)) then begin
2561 tmp2 := ZenToHan(e.Get_outerText);
2562 if (GikoSys.IsNumeric(tmp2)) then begin
2563 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2564 wkIntSt := StrToInt(tmp2);
2565 wkIntTo := StrToInt(tmp2);
2566 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2567 FHint.PopupType := gptThread;
2568 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2569 end else begin
2570 FHint.PopupType := gptRaw;
2571 FHint.Caption := s;
2572 end;
2573 end;
2574 end else begin
2575 threadItem := GetActiveContent;
2576 if Pos('about:blank..', Text) = 1 then begin
2577 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2578 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2579 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2580 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2581 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2582 else if( PathRec.FSt <> 0 ) then
2583 buf := IntToStr(PathRec.FSt);
2584 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2585 URL := threaditem.URL;
2586 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2587 end else begin
2588 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2589 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2590 end;
2591 URL := URL + buf;
2592 end else begin
2593 URL := Text;
2594 end;
2595 PathRec := Gikosys.Parse2chURL2(URL);
2596 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2597 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2598
2599 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2600
2601 URL := GikoSys.GetBrowsableThreadURL( URL );
2602 wkIntSt := PathRec.FSt;
2603 wkIntTo := PathRec.FTo;
2604
2605 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2606 wkIntSt := 1;
2607 wkIntTo := 1;
2608 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2609 wkIntSt := wkIntTo;
2610 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2611 wkIntTo := wkIntSt;
2612 end else if wkIntSt > wkIntTo then begin
2613 //wkInt := wkIntTo;
2614 wkIntTo := wkIntSt;
2615 wkIntSt := wkIntTo;
2616 end;
2617 //if wkIntSt = 0 then
2618 // wkIntSt := 1;
2619 //if wkINtTo = 0 then
2620 // wkIntTo := 1;
2621 //if PathRec.FFirst then
2622 // wkIntSt := 1;
2623 if PathRec.FStBegin then
2624 wkIntSt := 1;
2625 if PathRec.FToEnd then
2626 wkIntTo := 9999;
2627
2628 //ATitle := ActiveFileName <> PathRec.FKey;
2629 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2630 ATitle := false
2631 else
2632 ATitle := true;
2633
2634 threadItem := BBSsFindThreadFromURL( URL );
2635
2636 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2637 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2638 if board <> nil then begin
2639 if not board.IsThreadDatRead then
2640 GikoSys.ReadSubjectFile( board );
2641 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2642 end;
2643 end;
2644
2645 if threadItem <> nil then begin
2646 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2647 FHint.PopupType := gptThread;
2648 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2649 end;
2650 end;
2651 end;
2652
2653 //if s <> '' then
2654 // ShowTextPopup(s);
2655 if FHint.PopupType = gptRaw then begin
2656 if FHint.Caption <> '' then
2657 ShowTextPopup;
2658 end else begin
2659 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2660 ShowTextPopup;
2661 end;
2662 end;
2663 end;
2664
2665 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2666 const Text: WideString);
2667 var
2668 Title: string;
2669 begin
2670 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2671 Title := CAPTION_NAME
2672 else
2673 Title := CAPTION_NAME + ' - [' + Text + ']';
2674 Caption := Title;
2675 //Application.Title := Title;
2676 end;
2677
2678 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2679 var
2680 SysMenu: HMenu;
2681 //SysMenuApp: HMenu;
2682 begin
2683 FEnabledCloseButton := Enabled;
2684 SysMenu := GetSystemMenu(Handle, False);
2685 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2686
2687 if Enabled then begin
2688 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2689 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2690 end else begin
2691 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2692 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2693 end;
2694
2695 DrawMenuBar(Handle);
2696 //DrawMenuBar(Application.Handle);
2697 end;
2698
2699 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2700 var AllowChange: Boolean);
2701 begin
2702 if FTreeType = gtt2ch then
2703 FSortIndex := -1;
2704 end;
2705
2706 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2707 Shift: TShiftState);
2708 begin
2709 if GetActiveList is TBoard then begin
2710 if Key = VK_BACK then begin
2711 // UpFolderButtonClick(Sender);
2712 end else if Key = VK_SPACE then begin
2713 ListDoubleClick(Shift);
2714 end else if Key = VK_RETURN then begin
2715 ListClick;
2716 end;
2717 end else begin // TBBS, TCategory
2718 if Key = VK_BACK then begin
2719 // UpFolderButtonClick(Sender);
2720 end else if Key = VK_SPACE then begin
2721 ListClick;
2722 end else if Key = VK_RETURN then begin
2723 ListDoubleClick(Shift);
2724 end;
2725 end;
2726 end;
2727
2728 function TGikoForm.GetHttpState: Boolean;
2729 begin
2730 Result := FHttpState;
2731 end;
2732
2733 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2734 Column: TListColumn);
2735 var
2736 i: Integer;
2737 wkBBS: TBBS;
2738 wkCategory: TCategory;
2739 wkBoard: TBoard;
2740 begin
2741 if FSortIndex = Column.Index then
2742 FSortOrder := not FSortOrder
2743 else
2744 FSortOrder := False;
2745
2746 for i := 0 to ListView.Columns.Count - 1 do
2747 ListView.Column[i].ImageIndex := -1;
2748 if FSortOrder then
2749 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2750 else
2751 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2752
2753 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2754
2755 //if TObject(TreeView.Selected.Data) is TBBS then begin
2756 if TObject( FActiveList ) is TBBS then begin
2757 //wkBBS := TBBS(TreeView.Selected.Data);
2758 wkBBS := TBBS( FActiveList );
2759 Sort.SortOrder := FSortOrder;
2760 Sort.SortIndex := Column.Index;
2761 wkBBS.Sort(CategorySortProc);
2762 ListView.Refresh;
2763 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2764 end else if TObject( FActiveList ) is TCategory then begin
2765 //wkCategory := TCategory(TreeView.Selected.Data);
2766 wkCategory := TCategory( FActiveList );
2767 Sort.SortOrder := FSortOrder;
2768 Sort.SortIndex := Column.Index;
2769 wkCategory.CustomSort(BoardSortProc);
2770 ListView.Refresh;
2771 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2772 end else if TObject( FActiveList ) is TBoard then begin
2773 //wkBoard := TBoard(TreeView.Selected.Data);
2774 wkBoard := TBoard( FActiveList );
2775 Sort.SortOrder := FSortOrder;
2776 Sort.SortIndex := Column.Index;
2777 wkBoard.CustomSort(ThreadItemSortProc);
2778 ListView.Refresh;
2779 end;
2780 FSortIndex := Column.Index;
2781 end;
2782
2783 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2784 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2785 var
2786 ARect: TRect;
2787 begin
2788 DefaultDraw := True;
2789 Exit;
2790 DefaultDraw := False;
2791 if (cdsSelected in State) or (cdsHot in State) then begin
2792 Sender.Canvas.Brush.Color := clHighlight;
2793 Sender.Canvas.Font.Color := clHighlightText;
2794 end else begin
2795 Sender.Canvas.Brush.Color := clBtnFace;
2796 Sender.Canvas.Font.Color := clBtnText;
2797 end;
2798 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2799 Sender.Canvas.FillRect(ARect);
2800 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2801 end;
2802
2803 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2804 var
2805 Nodes: TTreeNodes;
2806 i: integer;
2807 begin
2808 Nodes := TreeView.Items;
2809
2810 for i := 0 to Nodes.Count - 1 do begin
2811 if Nodes.Item[i].Data = Data then begin
2812 Result := Nodes.Item[i];
2813 Exit;
2814 end;
2815 end;
2816 Result := nil;
2817 end;
2818
2819 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2820 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2821 Headers: OleVariant; var Cancel: WordBool);
2822 var
2823 sNo: string;
2824 p: TPoint;
2825 const
2826 kMenuName: string = 'menu:';
2827 begin
2828
2829 if Pos(kMenuName, URL) <> 0 then begin
2830 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2831
2832 if not GikoSys.IsNumeric(sNo) then Exit;
2833
2834 Cancel := True;
2835 GetCursorpos(p);
2836 KokoPopupMenu.Tag := StrToInt(sNo);
2837 KokoPopupMenu.Popup(p.x, p.y);
2838 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2839 Cancel := not GikoSys.Setting.OpenMailer;
2840 end;
2841
2842 end;
2843
2844 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2845 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2846 var DefaultDraw: Boolean);
2847 var
2848 ThreadItem: TThreadItem;
2849 begin
2850 // TListView(Sender).Canvas.Font.Style := [];
2851 if TObject(Item.Data) is TThreadItem then begin
2852 ThreadItem := TThreadItem(Item.Data);
2853 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2854 ListView.Canvas.Brush.Color := FOddColor;
2855 end else begin
2856 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2857 end;
2858 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2859 if ThreadItem.UnRead then
2860 TListView(Sender).Canvas.Font.Style := [fsBold];
2861 end;
2862 end;
2863
2864 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2865 begin
2866 Application.ProcessMessages;
2867 if Application.Terminated then
2868 Exit;
2869 if PreviewTimer.Enabled then
2870 PreviewTimer.Enabled := False;
2871 //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2872 if FHint <> nil then begin
2873 FHint.ReleaseHandle;
2874 FHint.ClearAllRes;
2875 // FHint.Free;
2876 // FHint := nil;
2877 end;
2878 if FPreviewBrowser <> nil then
2879 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2880
2881 end;
2882
2883 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2884 const ARect: TRect; var DefaultDraw: Boolean);
2885 var
2886 NodeRect: TRect;
2887 i, j: Integer;
2888 IsBoardNode: Boolean;
2889 Cnt: Integer;
2890 CntText: string;
2891 TextWidth: Integer;
2892 TextRect: TRect;
2893 Board: TBoard;
2894 Category: TCategory;
2895 Bitmap: TBitmap;
2896 NodeWidth: Integer;
2897 begin
2898 DefaultDraw := True;
2899
2900 if FTreeType = gttHistory then Exit;
2901
2902 TreeView.Canvas.Font.Color := clBlue;
2903 IsBoardNode := False;
2904 for i := 0 to TreeView.Items.Count - 1 do begin
2905 Cnt := 0