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.182 - (show annotations) (download) (as text)
Fri Dec 12 10:20:59 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.181: +15 -15 lines
File MIME type: text/x-pascal
終了時にアクセスバイオレーションが出るようになった。
RoundListのメモリの解放のタイミングのよう。応急処置でRoundList自体の
解放をしないようにした。

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