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.170 - (show annotations) (download) (as text)
Wed Dec 3 14:00:21 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.169: +42 -174 lines
File MIME type: text/x-pascal
レスポップアップ用の関数を少しきれいにしただけ。

1 unit Giko;
2
3 interface
4
5 uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
8 {$IF Defined(DELPRO) }
9 SHDocVw,
10 MSHTML,
11 {$ELSE}
12 SHDocVw_TLB,
13 MSHTML_TLB,
14 {$IFEND}
15 IdHTTP, ActiveX, 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 N61: TMenuItem;
505 ExportFavoriteFileAction1: TMenuItem;
506 ExportFavoriteFile: TFileSaveAs;
507 ToolButton21: TToolButton;
508 ToolButton22: TToolButton;
509 ToolButton23: TToolButton;
510 ToolButton24: TToolButton;
511 N6: TMenuItem;
512 N17: TMenuItem;
513 FavoriteTreeViewBrowseBoardAction: TAction;
514 FavoriteTreeViewBrowseThreadAction: TAction;
515 UpBoardAction: TAction;
516 procedure FormCreate(Sender: TObject);
517 procedure FormDestroy(Sender: TObject);
518 procedure CabinetPanelHide(Sender: TObject);
519 procedure FormClose(Sender: TObject; var Action: TCloseAction);
520 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
521 procedure ListViewData(Sender: TObject; Item: TListItem);
522 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
523 const FindString: String; const FindPosition: TPoint;
524 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
525 Wrap: Boolean; var Index: Integer);
526 procedure ListViewDataHint(Sender: TObject; StartIndex,
527 EndIndex: Integer);
528 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
529 EndIndex: Integer; OldState, NewState: TItemStates);
530 procedure BrowserStatusTextChange(Sender: TObject;
531 const Text: WideString);
532 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
533 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
534 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
535 var AllowChange: Boolean);
536 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
537 Shift: TShiftState);
538 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
539 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
540 Button: TToolButton; State: TCustomDrawState;
541 var DefaultDraw: Boolean);
542 procedure BrowserBeforeNavigate2(Sender: TObject;
543 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
544 Headers: OleVariant; var Cancel: WordBool);
545 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
546 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
547 var DefaultDraw: Boolean);
548 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
549 const ARect: TRect; var DefaultDraw: Boolean);
550 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
551 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
552 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
553 procedure TreeViewDblClick(Sender: TObject);
554 procedure FavoriteTreeViewClick(Sender: TObject);
555 procedure ListViewCustomDraw(Sender: TCustomListView;
556 const ARect: TRect; var DefaultDraw: Boolean);
557 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
558 Shift: TShiftState; X, Y: Integer);
559 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
560 procedure MessageListViewResize(Sender: TObject);
561 procedure ExitActionExecute(Sender: TObject);
562 procedure AllSelectActionExecute(Sender: TObject);
563 procedure StdToolBarVisibleActionExecute(Sender: TObject);
564 procedure MsgBarVisibleActionExecute(Sender: TObject);
565 procedure StatusBarVisibleActionExecute(Sender: TObject);
566 procedure LargeIconActionExecute(Sender: TObject);
567 procedure SmallIconActionExecute(Sender: TObject);
568 procedure ListIconActionExecute(Sender: TObject);
569 procedure DetailIconActionExecute(Sender: TObject);
570 procedure SearchActionExecute(Sender: TObject);
571 procedure OptionActionExecute(Sender: TObject);
572 procedure GikoNaviWebPageActionExecute(Sender: TObject);
573 procedure AboutActionExecute(Sender: TObject);
574 procedure CabinetHistoryActionExecute(Sender: TObject);
575 procedure CabinetVisible( isVisible : Boolean );
576 procedure CabinetVisibleActionExecute(Sender: TObject);
577 procedure AllItemActionExecute(Sender: TObject);
578 procedure LogItemActionExecute(Sender: TObject);
579 procedure NewItemActionExecute(Sender: TObject);
580 procedure SelectItemActionExecute(Sender: TObject);
581 procedure ListNumberVisibleActionExecute(Sender: TObject);
582 procedure UpFolderActionExecute(Sender: TObject);
583 procedure IconStyleExecute(Sender: TObject);
584 procedure RoundActionExecute(Sender: TObject);
585 procedure StopActionExecute(Sender: TObject);
586 procedure MsgBarCloseActionExecute(Sender: TObject);
587 procedure BrowserMaxActionExecute(Sender: TObject);
588 procedure ScrollTopActionExecute(Sender: TObject);
589 procedure ScrollLastActionExecute(Sender: TObject);
590 procedure ScrollNewActionExecute(Sender: TObject);
591 procedure ScrollKokoActionExecute(Sender: TObject);
592 procedure EditorActionExecute(Sender: TObject);
593 procedure IEActionExecute(Sender: TObject);
594 procedure ShowThreadActionExecute(Sender: TObject);
595 procedure ShowBoardActionExecute(Sender: TObject);
596 procedure URLCopyActionExecute(Sender: TObject);
597 procedure ItemReloadActionExecute(Sender: TObject);
598 procedure SelectListReloadActionExecute(Sender: TObject);
599 procedure SelectThreadReloadActionExecute(Sender: TObject);
600 procedure SelectListReloadActionUpdate(Sender: TObject);
601 procedure AllItemActionUpdate(Sender: TObject);
602 procedure LogItemActionUpdate(Sender: TObject);
603 procedure NewItemActionUpdate(Sender: TObject);
604 procedure SelectItemActionUpdate(Sender: TObject);
605 procedure UpFolderActionUpdate(Sender: TObject);
606 procedure FormResize(Sender: TObject);
607 procedure ScrollTopActionUpdate(Sender: TObject);
608 procedure ScrollLastActionUpdate(Sender: TObject);
609 procedure ScrollNewActionUpdate(Sender: TObject);
610 procedure ScrollKokoActionUpdate(Sender: TObject);
611 procedure EditorActionUpdate(Sender: TObject);
612 procedure IEActionUpdate(Sender: TObject);
613 procedure ShowThreadActionUpdate(Sender: TObject);
614 procedure ShowBoardActionUpdate(Sender: TObject);
615 procedure SelectThreadReloadActionUpdate(Sender: TObject);
616 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
617 Selected: Boolean);
618 procedure SelectTimerTimer(Sender: TObject);
619 procedure ItemReloadActionUpdate(Sender: TObject);
620 procedure ListViewDblClick(Sender: TObject);
621 procedure LogDeleteActionExecute(Sender: TObject);
622 procedure KokomadeActionExecute(Sender: TObject);
623 procedure ZenbuActionExecute(Sender: TObject);
624 procedure KokoResActionExecute(Sender: TObject);
625 procedure ListPopupMenuPopup(Sender: TObject);
626 procedure SelectItemURLCopyActionExecute(Sender: TObject);
627 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
628 procedure AllSelectActionUpdate(Sender: TObject);
629 procedure LogDeleteActionUpdate(Sender: TObject);
630 procedure BrowserTabCloseActionExecute(Sender: TObject);
631 procedure NotSelectTabCloseActionExecute(Sender: TObject);
632 procedure TreeSelectBoradReloadExecute(Sender: TObject);
633 procedure TreeSelectThreadReloadExecute(Sender: TObject);
634 procedure TreeSelectURLCopyExecute(Sender: TObject);
635 procedure TreePopupMenuPopup(Sender: TObject);
636 procedure ListToolBarVisibleActionExecute(Sender: TObject);
637 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
638 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
639 var Cancel: WordBool);
640 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
641 var Accept: Boolean);
642 procedure ListSplitterMoved(Sender: TObject);
643 procedure BrowserTabChange(Sender: TObject);
644 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
645 Shift: TShiftState; X, Y: Integer);
646 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
647 State: TDragState; var Accept: Boolean);
648 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
649 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
650 Y: Integer);
651 procedure BrowserDocumentComplete(Sender: TObject;
652 const pDisp: IDispatch; var URL: OleVariant);
653 procedure SelectReservActionUpdate(Sender: TObject);
654 procedure RoundNamePopupMenuPopup(Sender: TObject);
655 procedure SelectNewRoundNameExecute(Sender: TObject);
656 procedure SelectDeleteRoundExecute(Sender: TObject);
657 procedure SelectReservActionExecute(Sender: TObject);
658 procedure NewBoardActionExecute(Sender: TObject);
659 procedure LoginActionExecute(Sender: TObject);
660 procedure KeySettingActionExecute(Sender: TObject);
661 procedure AllTabCloseActionExecute(Sender: TObject);
662 procedure ArrangeActionExecute(Sender: TObject);
663 procedure NameURLCopyActionExecute(Sender: TObject);
664 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
665 procedure URLCopyActionUpdate(Sender: TObject);
666 procedure NameURLCopyActionUpdate(Sender: TObject);
667 procedure BrowserTabCloseActionUpdate(Sender: TObject);
668 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
669 procedure AllTabCloseActionUpdate(Sender: TObject);
670 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
671 procedure ActiveLogDeleteActionExecute(Sender: TObject);
672 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
673 procedure ListNameBarVisibleActionExecute(Sender: TObject);
674 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
675 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
676 procedure PaneInitActionExecute(Sender: TObject);
677 procedure FormShow(Sender: TObject);
678 procedure BrowserTabToolBarResize(Sender: TObject);
679 procedure BrowserMinActionExecute(Sender: TObject);
680 procedure SelectTextClearActionExecute(Sender: TObject);
681 procedure NameTextClearActionExecute(Sender: TObject);
682 procedure MailTextClearActionExecute(Sender: TObject);
683 procedure LeftmostTabSelectActionExecute(Sender: TObject);
684 procedure LeftTabSelectActionExecute(Sender: TObject);
685 procedure RightTabSelectActionExecute(Sender: TObject);
686 procedure RightmostTabSelectActionExecute(Sender: TObject);
687 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
688 procedure LeftTabSelectActionUpdate(Sender: TObject);
689 procedure RightTabSelectActionUpdate(Sender: TObject);
690 procedure RightmostTabSelectActionUpdate(Sender: TObject);
691 procedure FavoriteMenuClick(Sender: TObject);
692 procedure FavoriteAddActionExecute(Sender: TObject);
693 procedure FavoriteAddActionUpdate(Sender: TObject);
694 procedure BoardFavoriteAddActionExecute(Sender: TObject);
695 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
696 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
697 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
698 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
699 procedure FavoriteArrangeActionExecute(Sender: TObject);
700 procedure MainCoolBarResize(Sender: TObject);
701 procedure MoveToActionExecute(Sender: TObject);
702 procedure AddressToolBarResize(Sender: TObject);
703 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
704 Shift: TShiftState);
705 procedure AddressBarVisibleActionExecute(Sender: TObject);
706 procedure BrowserEnter(Sender: TObject);
707 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
708 procedure BrowserTabVisibleActionExecute(Sender: TObject);
709 procedure BrowserTabTopActionExecute(Sender: TObject);
710 procedure BrowserTabBottomActionExecute(Sender: TObject);
711 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
712 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
713 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
714 procedure PreviewTimerTimer(Sender: TObject);
715 procedure MessageHideButtonClick(Sender: TObject);
716 procedure MonazillaWebPageActionExecute(Sender: TObject);
717 procedure GikoHelpActionExecute(Sender: TObject);
718 procedure ToolButton18Click(Sender: TObject);
719 procedure KotehanActionExecute(Sender: TObject);
720 procedure LinkBarVisibleActionExecute(Sender: TObject);
721 procedure BBS2chWebPageActionExecute(Sender: TObject);
722 procedure GikoFolderOpenActionExecute(Sender: TObject);
723 procedure MainCoolBarBandInfo(Sender: TObject;
724 var BandInfo: PReBarBandInfoA);
725 procedure MainCoolBarChevronClick(Sender: TObject;
726 RebarChevron: PNMRebarChevron);
727 procedure ListCoolBarBandInfo(Sender: TObject;
728 var BandInfo: PReBarBandInfoA);
729 procedure ListCoolBarChevronClick(Sender: TObject;
730 RebarChevron: PNMRebarChevron);
731 procedure BrowserCoolBarBandInfo(Sender: TObject;
732 var BandInfo: PReBarBandInfoA);
733 procedure BrowserCoolBarChevronClick(Sender: TObject;
734 RebarChevron: PNMRebarChevron);
735 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
736 procedure ThreadEditorActionExecute(Sender: TObject);
737 procedure ThreadEditorActionUpdate(Sender: TObject);
738 procedure ToolBarSettingActionExecute(Sender: TObject);
739 procedure NameCopyActionExecute(Sender: TObject);
740 procedure BoardIEActionExecute(Sender: TObject);
741 procedure SelectItemNameCopyActionExecute(Sender: TObject);
742 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
743 procedure BoardIEActionUpdate(Sender: TObject);
744 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
745 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
746 procedure NameCopyActionUpdate(Sender: TObject);
747 procedure SelectComboBoxChange(Sender: TObject);
748 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
749 Shift: TShiftState);
750 procedure SelectComboBoxExit(Sender: TObject);
751 procedure NG1Click(Sender: TObject);
752 procedure SelectResActionExecute(Sender: TObject);
753 procedure SelectResActionUpdate(Sender: TObject);
754 procedure FormKeyDown(Sender: TObject; var Key: Word;
755 Shift: TShiftState);
756 procedure FormKeyUp(Sender: TObject; var Key: Word;
757 Shift: TShiftState);
758 procedure AllResActionExecute(Sender: TObject);
759 procedure AllResActionUpdate(Sender: TObject);
760 procedure ReloadClick(Sender: TObject);
761 procedure GoBackClick(Sender: TObject);
762 procedure GoFowardClick(Sender: TObject);
763 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
764 Shift: TShiftState; X, Y: Integer);
765 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
766 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
767 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
768 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
769 procedure StatusBarResize(Sender: TObject);
770 procedure IndividualAbon1Click(Sender: TObject);
771 procedure IndividualAbon2Click(Sender: TObject);
772 procedure N42Click(Sender: TObject);
773 procedure SelectComboBoxEnter(Sender: TObject);
774 procedure AntiIndividualAbonClick(Sender: TObject);
775 procedure N51Click(Sender: TObject);
776 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
777 procedure CabinetFavoriteActionExecute(Sender: TObject);
778 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
779 Y: Integer);
780 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
781 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
782 var S: String);
783 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
784 Shift: TShiftState);
785 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
786 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
787 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
788 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
789 procedure ToolButton19Click(Sender: TObject);
790 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
791 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
792 procedure FavoriteTreeViewDblClick(Sender: TObject);
793 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
794 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
795 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
796 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
797 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
798 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
799 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
800 Shift: TShiftState; X, Y: Integer);
801 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
802 State: TDragState; var Accept: Boolean);
803 procedure OnlyAHundredResExecute(Sender: TObject);
804 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
805 Y: Integer);
806 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
807 var Handled: Boolean);
808 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
809 var Handled: Boolean);
810 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
811 var Handled: Boolean);
812 procedure ExportFavoriteFileAccept(Sender: TObject);
813 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
814 procedure CabinetBBSActionExecute(Sender: TObject);
815 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
816 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
817 procedure UpBoardActionExecute(Sender: TObject);
818 procedure UpBoardActionUpdate(Sender: TObject);
819 private
820 { Private 鐃緒申鐃緒申 }
821
822 FSortIndex: Integer;
823 FSortOrder: Boolean;
824
825 FEnabledCloseButton: Boolean;
826 // ThreadCreate: TThreadCreate;
827
828 FClickNode: TTreeNode;
829 FHttpState: Boolean;
830 FHint: TResPopup;
831 FPreviewBrowser: TPreviewBrowser;
832 FPreviewURL: string;
833
834 FBrowserSizeHeight: Integer;
835 FBrowserSizeWidth: Integer;
836
837 // FFavorite: TFavorite;
838 FBrowserComplete: Boolean;
839 FTabHintIndex: Integer;
840 FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
841 FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
842 FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
843 FActiveList: TObject;
844 FActiveContent: TThreadItem; //
845 FActiveBBS : TBBS;
846 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
847 FTreeType: TGikoTreeType;
848 FWorkCount: Integer;
849 FNameCookie: string;
850 FMailCookie: string;
851 // FLastRoundTime: TDateTime;
852 BrowserNullTab: TThreadItem;
853 // DoubleClickOccurred: array [TMouseButton] of Boolean;
854 FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
855 FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
856 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
857
858 Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
859
860 IsDraggingSelectComboBox : Boolean;
861 DraggingSelectComboBoxPosition : TPoint;
862
863 FSearchDialog: TSearchDialog;
864
865 FDropSpaceNode: TTreeNode;
866
867 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
868 FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
869 FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
870
871 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
872 FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
873 FOddColor : TColor; //鐃緒申鐃緒申鐃?
874
875 FSelectResWord : string; // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
876 procedure SetBoardTreeNode( inBBS : TBBS );
877 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
878 function SetBoardListItem(Category: TCategory): Integer;
879 function SetThreadListItem(Board: TBoard): Integer;
880 // function GetRoundName(index: integer): string;
881
882 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
883 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
884 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
885 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
886 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
887
888 procedure SetActiveList(Obj: TObject);
889 procedure ListClick;
890 procedure ListDoubleClick;
891 procedure BrowserMovement(AName: string);
892 procedure SelectListItem(List: TList);
893 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
894 procedure DeleteTab(ThreadItem: TThreadItem);
895 function Hook(var Message: TMessage): Boolean;
896 procedure AddRoundNameMenu(MenuItem: TMenuItem);
897 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
898 procedure SetSelectRoundName(Sender: TObject);
899 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
900
901 procedure SetMenuFont;
902 // procedure CreateFavMenu(Folder: TFavoriteFolder);
903 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
904 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
905 procedure FavoriteClick(Sender: TObject); overload;
906 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
907 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
908 function OnDocumentContextMenu(Sender: TObject): WordBool;
909 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
910 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
911 procedure ShowTextPopup;
912 //procedure ShowTextPopup(HintData: THintData);
913 // procedure SetStdToolBar;
914 // function GetAction(ActionName: string): TContainedAction;
915 procedure SetLinkBar;
916 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
917 procedure MenuBarChevronMenu;
918 procedure LinkBarChevronMenu;
919 procedure ToolBarChevronMenu(ToolBar: TToolBar);
920 procedure ModifySelectList;
921 procedure FavoriteBrowseFolder( node: TTreeNode );
922 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
923 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
924 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
925 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
926 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
927 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
928 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
929 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
930 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
931 //
932 procedure BrowserTabClick(Sender: TObject);
933 procedure SetListViewBackGroundColor(value: TColor);
934 procedure BBSMenuItemOnClick( Sender : TObject );
935 protected
936 procedure CreateParams(var Params: TCreateParams); override;
937 procedure WndProc(var Message: TMessage); override;
938 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
939 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
940 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
941 public
942 { Public 鐃緒申鐃緒申 }
943 // FDownload: TDownload;
944 FControlThread: TThreadControl;
945 procedure MoveToURL(URL: string);
946 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
947 procedure ReloadBBS;
948 function GetHttpState: Boolean;
949 procedure SetEnabledCloseButton(Enabled: Boolean);
950 function GetTreeNode(Data: TObject): TTreeNode;
951 procedure AppFormDeactivate(Sender: TObject);
952 // procedure CabinetPanelVisible(PanelVisible: Boolean);
953 procedure ListViewAllSelect;
954
955 property ListStyle: TViewStyle read FListStyle write FListStyle;
956 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
957 property ViewType: TGikoViewType read FViewType write FViewType;
958
959 property NameCookie: string read FNameCookie write FNameCookie;
960 property MailCookie: string read FMailCookie write FMailCookie;
961
962 procedure SetContent(ThreadItem: TThreadItem);
963 function GetActiveContent: TThreadItem;
964 function GetActiveList: TObject;
965
966 property ActiveList: TObject read GetActiveList write SetActiveList;
967 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
968
969 procedure SetListViewType(AViewType: TGikoViewType); overload;
970 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
971 procedure DownloadContent(ThreadItem: TThreadItem);
972 procedure DownloadList(Board: TBoard);
973 procedure PlaySound(SoundEventName: string);
974
975 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
976 procedure DeleteHistory( threadItem: TThreadItem );
977 procedure ClearHistory;
978 procedure SaveHistory;
979 procedure LoadHistory;
980 procedure ShowBBSTree( inBBS : TBBS );
981 procedure ShowHistoryTree;
982 procedure SetHistoryTreeNode;
983 // procedure SelectTreeNode(Item: TObject);
984 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
985 procedure SetBrowserTabState;
986 // property Favorite: TFavorite read FFavorite write FFavorite;
987 procedure SetToolBarPopup;
988 procedure ShowFavoriteAddDialog( Item : TObject );
989 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
990 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
991 property OddColor : TColor read FOddColor write FOddColor;
992
993 published
994 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
995 end;
996
997 TFavoriteMenuItem = class(TMenuItem)
998 private
999 FData : Pointer;
1000 public
1001 property Data: Pointer read FData write FData;
1002 end;
1003
1004 TBBSMenuItem = class(TMenuItem)
1005 private
1006 FData : Pointer;
1007 public
1008 property Data: Pointer read FData write FData;
1009 end;
1010
1011 TLinkToolButton = class(TToolButton)
1012 private
1013 FData : Pointer;
1014 public
1015 property Data: Pointer read FData write FData;
1016 end;
1017
1018 var
1019 GikoForm: TGikoForm;
1020
1021 implementation
1022
1023 uses
1024 About, Option, Round, Splash, Sort, ListSelect,
1025 NewBoard, MojuUtils;
1026
1027 const
1028 CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1029 BLANK_HTML: string = 'about:blank';
1030 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1031 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1032 //D&D鐃緒申鐃?
1033 DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1034 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1035 ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1036 ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1037 ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1038 ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1039 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1040 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1041 ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1042 ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1043 ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1044 ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1045 ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1046 ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1047 ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1048 ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1049 ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1050 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1051 ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1052
1053 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1054 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1055 TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1056 TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1057 TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1058 TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1059 TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1060
1061 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1062 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1063 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1064
1065 HTML_FILE_NAME = 'temp_preview.html';
1066
1067 {$R *.DFM}
1068
1069 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1070 begin
1071 inherited;
1072 if FormStyle in [fsNormal, fsStayOnTop] then begin
1073 if BorderStyle in [bsSingle, bsSizeable] then begin
1074 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1075 Params.WndParent := 0;
1076 end;
1077 end;
1078 end;
1079
1080 procedure TGikoForm.FormCreate(Sender: TObject);
1081 const
1082 TVS_NOTOOLTIPS = $0080;
1083 var
1084 FileName: string;
1085 Style: DWORD;
1086 msg: string;
1087 i: Integer;
1088 wp: TWindowPlacement;
1089 s: string;
1090 item : TBBSMenuItem;
1091 begin
1092 {$IFDEF DEBUG}
1093 AllocConsole;
1094 Writeln('============================================================');
1095 Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1096 Writeln('');
1097 Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1098 Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1099 Writeln('============================================================');
1100 {$ENDIF}
1101 Application.OnDeactivate := AppFormDeactivate;
1102 Self.OnDeactivate := AppFormDeactivate;
1103 Application.HookMainWindow(Hook);
1104
1105 FTreeType := gttNone;
1106
1107 FSearchDialog := nil;
1108
1109 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1110 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1111
1112 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1113 RoundList := TRoundList.Create;
1114 RoundList.LoadRoundFile;
1115
1116 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1117 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1118
1119 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1120 InitializeBoardPlugIns;
1121
1122 EnabledCloseButton := True;
1123 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1124 GikoSys.ReadBoardFile;
1125 // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1126 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1127 for i := Length( BBSs ) - 1 downto 0 do begin
1128 try
1129 item := TBBSMenuItem.Create( PopupMenu );
1130 item.Caption := BBSs[ i ].Title;
1131 item.Data := BBSs[ i ];
1132 item.OnClick := BBSMenuItemOnClick;
1133 CabinetSelectPopupMenu.Items.Insert( 0, item );
1134 item := TBBSMenuItem.Create( PopupMenu );
1135 item.Caption := BBSs[ i ].Title;
1136 item.Data := BBSs[ i ];
1137 item.OnClick := BBSMenuItemOnClick;
1138 CabinetMenu.Insert( 0, item );
1139 except
1140 end;
1141 end;
1142
1143 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1144 FHistoryList := TList.Create;
1145
1146 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1147 LoadHistory;
1148
1149 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1150 // FFavorite := TFavorite.Create(FavoriteTreeView);
1151 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1152 FavoriteDM.ReadFavorite;
1153
1154 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1155 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1156
1157 //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1158 // MainCoolBar.Top := 0;
1159 // MainCoolBar.Left := 0;
1160
1161 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1162 AnimePanel.Top := 0;
1163 AnimePanel.Left := 0;
1164
1165 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1166
1167 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1168 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1169
1170 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1171 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1172 MsgBarVisibleActionExecute(nil);
1173 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1174
1175 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1176 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1177 StatusBarVisibleActionExecute(nil);
1178
1179 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1180 TreeView.Items.BeginUpdate;
1181 FavoriteTreeView.Items.BeginUpdate;
1182 ListView.Items.BeginUpdate;
1183 try
1184 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1185 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1186 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1187 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1188
1189 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1190 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1191 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1192 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1193
1194 ListView.Font.Name := GikoSys.Setting.ListFontName;
1195 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1196 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1197 //ListView.Color := GikoSys.Setting.ListBackColor;
1198 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1199 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1200 FOddColor := GikoSys.Setting.OddColor;
1201
1202 finally
1203 TreeView.Items.EndUpdate;
1204 FavoriteTreeView.Items.EndUpdate;
1205 ListView.Items.EndUpdate;
1206 end;
1207 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1208 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1209
1210 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1211 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1212 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1213 FDragWFirst := false;
1214
1215 // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1216 // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1217 SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1218
1219 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1220 wp.length := sizeof(wp);
1221 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1222 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1223 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1224 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1225 wp.showCmd := SW_HIDE;
1226 SetWindowPlacement(Handle, @wp);
1227
1228 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1229 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1230 if GikoSys.Setting.WindowMax then
1231 WindowState := wsMaximized;
1232
1233 //鐃?鐃?鐃?鐃?鐃緒申
1234 try
1235 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1236 if FileExists(FileName) then
1237 Animate.FileName := FileName;
1238 except
1239 end;
1240
1241 //鐃?鐃?鐃?鐃?
1242 FNameCookie := '';
1243 FMailCookie := '';
1244
1245 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1246 AllItemAction.Checked := True;
1247 AllResAction.Checked := True;
1248
1249 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1250 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1251 Style := Style or TVS_NOTOOLTIPS;
1252 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1253
1254 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1255 TreeView.Align := alClient;
1256 FavoriteTreeView.Align := alClient;
1257 FavoriteTreeView.Visible := False;
1258
1259 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1260 // FBrowserSizeFlag := False;
1261 // FBrowserSizeHeight := ViewPanel.Height;
1262
1263 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1264 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1265
1266 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1267 ArrangeAction.Execute;
1268
1269 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1270 case GikoSys.Setting.ListWidthState of
1271 glsMax: begin
1272 ViewPanel.Width := 1;
1273 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1274 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1275 end;
1276 glsMin: begin
1277 ViewPanel.Width := GikoSys.Setting.ListWidth;
1278 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1279 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1280 end;
1281 else begin
1282 ViewPanel.Width := GikoSys.Setting.ListWidth;
1283 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1284 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1285 end;
1286 end;
1287 end else begin
1288 case GikoSys.Setting.ListHeightState of
1289 glsMax: begin
1290 ViewPanel.Height := 1;
1291 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1292 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1293 end;
1294 glsMin: begin
1295 ViewPanel.Height := GikoSys.Setting.ListHeight;
1296 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1297 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1298 end;
1299 else begin
1300 ViewPanel.Height := GikoSys.Setting.ListHeight;
1301 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1302 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1303 end;
1304 end;
1305 end;
1306
1307 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1308 // ProgressBar.Visible := False;
1309 ProgressBar.Parent := StatusBar;
1310 ProgressBar.Top := 2;
1311 ProgressBar.Left := 0;
1312 ProgressBar.Width := StatusBar.Panels[0].Width;
1313 ProgressBar.Height := StatusBar.Height - 2;
1314 ProgressBar.Position := 0;
1315
1316 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1317 FControlThread := TThreadControl.Create(True);
1318 FControlThread.MaxThreadCount := 1;
1319 FControlThread.Resume;
1320 FControlThread.OnDownloadEnd := DownloadEnd;
1321 FControlThread.OnDownloadMsg := DownloadMsg;
1322 FControlThread.OnWork := Work;
1323 FControlThread.OnWorkBegin := WorkBegin;
1324 FControlThread.OnWorkEnd := WorkEnd;
1325 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1326
1327 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1328 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1329
1330 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1331 SetBrowserTabState;
1332
1333 BrowserBoardNameLabel.Caption := '';
1334 BrowserNameLabel.Caption := '';
1335 FWorkCount := 0;
1336
1337 FTabHintIndex := -1;
1338
1339 //鐃緒申鐃緒申鐃?鐃?鐃?
1340 SetLinkBar;
1341
1342 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1343 SetMenuFont;
1344
1345 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1346 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1347 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1348
1349 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1350 ReadToolBarSetting(ActionList, StdToolBar);
1351 ReadToolBarSetting(ActionList, ListToolBar);
1352 try
1353 for i := ListToolBar.ControlCount - 1 downto 0 do
1354 begin
1355 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1356 begin
1357 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1358 if (i + 1) < ListToolBar.ControlCount then
1359 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1360 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1361 ListToolBar.Controls[ i + 1 ].Visible := False;
1362
1363 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1364 ListToolBar.Controls[ i ].Visible := False;
1365 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1366 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1367 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1368 SelectComboBox.Parent := ListToolBar;
1369 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1370 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1371 SelectComboBoxSplitter.Parent := ListToolBar;
1372
1373 break;
1374 end;
1375 end;
1376 except
1377 end;
1378 ReadToolBarSetting(ActionList, BrowserToolBar);
1379 SetToolBarPopup;
1380 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1381 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1382 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1383
1384 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1385
1386 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1387 if not FileExists(GikoSys.GetBoardFileName) then begin
1388 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1389 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1390 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1391 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1392 NewBoardAction.Execute;
1393 end;
1394
1395 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1396 GikoSys.LoadKeySetting(ActionList);
1397
1398 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1399 // FLastRoundTime := 0;
1400
1401 //ResHint
1402 FHint := TResPopup.Create(Self);
1403
1404 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1405 CabinetVisible( False );
1406 if GikoSys.Setting.CabinetVisible then begin
1407 i := CabinetSelectPopupMenu.Items.Count - 1;
1408 if GikoSys.Setting.CabinetIndex = i - 1 then
1409 CabinetHistoryAction.Execute
1410 else if GikoSys.Setting.CabinetIndex = i then
1411 CabinetFavoriteAction.Execute
1412 else begin
1413 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1414 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1415 CabinetBBSAction.Execute;
1416 end;
1417 end else begin
1418 ShowBBSTree( BBSs[ 0 ] );
1419 end;
1420
1421 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1422 if GikoSys.Setting.AutoLogin then
1423 LoginAction.Execute;
1424
1425 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1426 for i := 1 to ParamCount do begin
1427 MoveToURL(ParamStr(i));
1428 end;
1429 // SetStdToolBar;
1430 // SetLinkBar;
1431
1432 s := GikoSys.FAbon.NGwordname;
1433 StatusBar.Panels[2].Text := s;
1434 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1435 StatusBarResize(Sender);
1436 end;
1437
1438 //
1439 //
1440 //
1441 procedure TGikoForm.FormShow(Sender: TObject);
1442 var
1443 i: Integer;
1444 CoolSet: TCoolSet;
1445 begin
1446 ShowWindow(Application.Handle, SW_HIDE);
1447
1448 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1449 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1450 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1451 StdToolBarVisibleActionExecute( nil );
1452 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1453 AddressBarVisibleActionExecute( nil );
1454 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1455 LinkBarVisibleActionExecute( nil );
1456 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1457 ListToolBarVisibleActionExecute( nil );
1458 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1459 ListNameBarVisibleActionExecute( nil );
1460 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1461 BrowserToolBarVisibleActionExecute( nil );
1462 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1463 BrowserNameBarVisibleActionExecute( nil );
1464
1465 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1466 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1467 BrowserTabVisibleActionExecute(nil);
1468
1469 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1470 BrowserTabTopAction.Checked := True;
1471 BrowserTabTopActionExecute(nil);
1472 end else begin
1473 BrowserTabBottomAction.Checked := True;
1474 BrowserTabBottomActionExecute(nil);
1475 end;
1476
1477 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1478 BrowserTabTabStyleAction.Checked := True;
1479 BrowserTabTabStyleActionExecute(nil);
1480 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1481 BrowserTabButtonStyleAction.Checked := True;
1482 BrowserTabButtonStyleActionExecute(nil);
1483 end else begin
1484 BrowserTabFlatStyleAction.Checked := True;
1485 BrowserTabFlatStyleActionExecute(nil);
1486 end;
1487
1488
1489 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1490 MainCoolBar.Bands.BeginUpdate;
1491 try
1492 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1493 CoolSet := GikoSys.Setting.MainCoolSet[i];
1494 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1495 Continue;
1496 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1497 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1498 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1499 end;
1500 finally
1501 MainCoolBar.Bands.EndUpdate;
1502 end;
1503
1504 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1505 ListCoolBar.Bands.BeginUpdate;
1506 try
1507 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1508 CoolSet := GikoSys.Setting.ListCoolSet[i];
1509 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1510 Continue;
1511 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1512 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1513 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1514 end;
1515 finally
1516 ListCoolBar.Bands.EndUpdate;
1517 end;
1518
1519 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1520 BrowserCoolBar.Bands.BeginUpdate;
1521 try
1522 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1523 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1524 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1525 Continue;
1526 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1527 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1528 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1529 end;
1530 finally
1531 BrowserCoolBar.Bands.EndUpdate;
1532 end;
1533
1534 end;
1535 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1536 var
1537 i: Integer;
1538 CoolSet: TCoolSet;
1539 wp: TWindowPlacement;
1540 begin
1541 if ( GikoSys.Setting.ShowDialogForEnd ) and
1542 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1543 CanClose := false;
1544 Exit;
1545 end else begin
1546 CanClose := True;
1547 end;
1548 Application.OnDeactivate := nil;
1549 Self.OnDeactivate := nil;
1550
1551 //column鐃緒申
1552 if GetActiveList is TBBS then begin
1553 for i := 0 to ListView.Columns.Count - 1 do
1554 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1555 end else if GetActiveList is TCategory then begin
1556 for i := 0 to ListView.Columns.Count - 1 do
1557 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1558 end else if GetActiveList is TBoard then begin
1559 for i := 0 to ListView.Columns.Count - 1 do
1560 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1561 end;
1562
1563 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1564 wp.length := sizeof(wp);
1565 GetWindowPlacement(Handle, @wp);
1566 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1567 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1568 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1569 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1570 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1571
1572 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1573 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1574 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1575 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1576 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1577 if ArrangeAction.Checked then
1578 GikoSys.Setting.ListOrientation := gloVertical
1579 else
1580 GikoSys.Setting.ListOrientation := gloHorizontal;
1581 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1582
1583 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1584 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1585 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1586 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1587 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1588 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1589 end;
1590 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1591 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1592 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1593 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1594 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1595 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1596 end;
1597 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1598 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1599 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1600 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1601 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1602 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1603 end;
1604
1605 GikoSys.Setting.WriteWindowSettingFile;
1606 GikoSys.Setting.WriteNameMailSettingFile;
1607
1608 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1609 try
1610 FavoriteDM.WriteFavorite;
1611 except
1612 end;
1613 // Favorite.Free;
1614
1615 try
1616 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1617 NotSelectTabCloseAction.Execute;
1618 if BrowserTab.Tabs.Count >= 1 then begin
1619 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1620 end;
1621 except
1622 end;
1623
1624 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1625 try
1626 RoundList.SaveRoundFile;
1627 except
1628 end;
1629
1630 try
1631 RoundList.Clear;
1632 except
1633 end;
1634 try
1635 RoundList.Free;
1636 except
1637 end;
1638
1639 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1640 try
1641 SaveHistory;
1642 except
1643 end;
1644
1645 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1646 try
1647 FHistoryList.Free;
1648 except
1649 end;
1650
1651 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1652 try
1653 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1654 except
1655 end;
1656
1657 try
1658 FControlThread.Terminate;
1659 except
1660 end;
1661
1662 // FDownload.Free;
1663 try
1664 SetActiveList(nil);
1665 except
1666 end;
1667
1668 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1669 //Sleep(10);
1670 Application.ProcessMessages;
1671 try
1672 TreeView.Items.Clear;
1673 except
1674 end;
1675
1676 try
1677 if FavoriteDM <> nil then
1678 FavoriteDM.Free;
1679 FavoriteDM := nil;
1680 if AddressHistoryDM <> nil then
1681 AddressHistoryDM.Free;
1682 AddressHistoryDM := nil;
1683 except
1684 end;
1685
1686 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1687 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1688 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1689 try
1690 for i := 0 to Length( BBSs ) - 1 do begin
1691 if BBSs[ i ] <> nil then
1692 BBSs[ i ].Free;
1693 BBSs[ i ] := nil;
1694 end;
1695 except
1696 end;
1697
1698 try
1699 for i := 0 to Length( BoardPlugIns ) - 1 do begin
1700 if BoardPlugIns[ i ] <> nil then
1701 BoardPlugIns[ i ].Free;
1702 BoardPlugIns[ i ] := nil;
1703 end;
1704 except
1705 end;
1706
1707 try
1708 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1709 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1710 CabinetSelectPopupMenu.Items[ i ].Free;
1711 CabinetMenu.Items[ i ].Free;
1712 end;
1713 end;
1714 except
1715 end;
1716
1717 try
1718 //Hint鐃?鐃緒申
1719 if FHint <> nil then begin
1720 FHint.ReleaseHandle;
1721 FHint.Free;
1722 FHint := nil;
1723 end;
1724 //Preview鐃?鐃緒申
1725 if TPreviewBrowser <> nil then begin
1726 FPreviewBrowser.Free;
1727 FPreviewBrowser := nil;
1728 end;
1729 except
1730 end;
1731 end;
1732
1733 procedure TGikoForm.FormDestroy(Sender: TObject);
1734 begin
1735 end;
1736
1737 //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1738 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1739 begin
1740 Application.Terminate;
1741 Action := caFree;
1742 end;
1743
1744 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1745 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1746 begin
1747 CabinetVisibleAction.Execute;
1748 // CabinetPanelVisible(false);
1749 end;
1750
1751 procedure TGikoForm.ReloadBBS;
1752 var
1753 i : Integer;
1754 item : TBBSMenuItem;
1755 begin
1756 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1757 NotSelectTabCloseAction.Execute;
1758 if BrowserTab.Tabs.Count >= 1 then
1759 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1760 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1761 //FHistoryList.Clear;
1762 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1763 TreeView.Items.Clear;
1764
1765 //BBS鐃?鐃緒申
1766 try
1767 for i := Length( BBSs ) - 1 downto 0 do begin
1768 if BBSs[ i ] <> nil then
1769 BBSs[ i ].Free;
1770 BBSs[ i ] := nil;
1771 end;
1772 except
1773 end;
1774
1775 ActiveList := nil;
1776
1777 FTreeType := gttNone;
1778
1779 GikoSys.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1780 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1781 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1782 try
1783 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1784 CabinetSelectPopupMenu.Items[ i ].Free;
1785 CabinetMenu.Items[ i ].Free;
1786 end;
1787 except
1788 end;
1789 end;
1790 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1791 for i := Length( BBSs ) - 1 downto 0 do begin
1792 try
1793 item := TBBSMenuItem.Create( PopupMenu );
1794 item.Caption := BBSs[ i ].Title;
1795 item.Data := BBSs[ i ];
1796 item.OnClick := BBSMenuItemOnClick;
1797 CabinetSelectPopupMenu.Items.Insert( 0, item );
1798 item := TBBSMenuItem.Create( PopupMenu );
1799 item.Caption := BBSs[ i ].Title;
1800 item.Data := BBSs[ i ];
1801 item.OnClick := BBSMenuItemOnClick;
1802 CabinetMenu.Insert( 0, item );
1803 except
1804 end;
1805 end;
1806 ShowBBSTree( BBSs[ 0 ] );
1807
1808 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1809 SaveHistory;
1810 try
1811 for i := FHistoryList.Count - 1 downto 0 do
1812 TFavoriteThreadItem( FHistoryList[ i ] ).Free;
1813 except
1814 end;
1815 FHistoryList.Clear;
1816 LoadHistory;
1817
1818 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1819 // FFavorite := TFavorite.Create(FavoriteTreeView);
1820 FavoriteTreeView.Items.Clear;
1821 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1822 FavoriteDM.ReadFavorite;
1823 SetLinkBar;
1824
1825 end;
1826
1827 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1828 procedure TGikoForm.SetBoardTreeNode(
1829 inBBS : TBBS
1830 );
1831 var
1832 i, j, k: integer;
1833 Root: TTreeNode;
1834 CategoryNode: TTreeNode;
1835 BoardNode: TTreeNode;
1836 Category: TCategory;
1837 Board: TBoard;
1838 begin
1839 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1840 FActiveBBS := inBBS;
1841 TreeView.Items.BeginUpdate;
1842 TreeView.Items.Clear;
1843 try
1844 try
1845 if SplashWindow <> nil then
1846 SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1847 except
1848 end;
1849
1850 Root := TreeView.Items.Add( nil, inBBS.Title );
1851 Root.ImageIndex := ITEM_ICON_2CH1;
1852 Root.SelectedIndex := ITEM_ICON_2CH2;
1853 Root.Data := inBBS;
1854 for i := 0 to inBBS.Count - 1 do begin
1855 Category := TCategory(inBBS.Items[i]);
1856 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1857 CategoryNode.Data := Category;
1858 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1859 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1860
1861 for j := 0 to Category.Count - 1 do begin
1862 Board := TBoard(Category.Items[j]);
1863 Board.BeginUpdate;
1864 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1865 BoardNode.Data := Board;
1866 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1867 if not Board.IsLogFile then begin
1868 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1869 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1870 end else begin
1871 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1872 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1873 for k := 0 to Board.Count - 1 do begin
1874 if Board.Items[ k ].IsLogFile then begin
1875 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1876 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1877
1878 Break;
1879 end;
1880 end;
1881 end;
1882 Board.EndUpdate;
1883 end;
1884
1885 CategoryNode.Expanded := Category.NodeExpand;
1886
1887 if SplashWindow <> nil then begin
1888 SplashWindow.ProgressBar.StepIt;
1889 Application.ProcessMessages;
1890 end;
1891 end;
1892 finally
1893 TreeView.Items.EndUpdate;
1894 end;
1895 end;
1896
1897 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1898 const
1899 COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1900 var
1901 ListColumn: TListColumn;
1902 i: Integer;
1903 begin
1904 ListView.Items.BeginUpdate;
1905 try
1906 Screen.Cursor := crHourGlass;
1907
1908 ListView.Columns.Clear;
1909 for i := 0 to Length(COLUMN) - 1 do begin
1910 ListColumn := ListView.Columns.Add;
1911 ListColumn.Caption := COLUMN[i];
1912 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1913 end;
1914
1915 ListView.Items.Count := 0;
1916 ListView.Items.Clear;
1917 ListView.Items.Count := ABBS2ch.Count;
1918
1919 // UpFolderAction.Enabled := False;
1920 // AllItemAction.Enabled := False;
1921 // LogItemAction.Enabled := False;
1922 // NewItemAction.Enabled := False;
1923 // SelectItemAction.Enabled := False;
1924 // ListDownloadToolButton.Enabled := False;
1925 // BoardReservToolButton.Enabled := False;
1926 // ListThreadDownloadToolButton.Enabled := False;
1927
1928 ListNameLabel.Caption := ABBS2ch.Title;
1929 FolderImage.Picture := nil;
1930 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1931
1932 FSortIndex := 0;
1933 FSortOrder := False;
1934 ListViewColumnClick(nil, ListView.Column[0]);
1935
1936 Result := ABBS2ch.Count;
1937 finally
1938 Screen.Cursor := crDefault;
1939 ListView.Items.EndUpdate;
1940 end;
1941 end;
1942
1943 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1944 const
1945 COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1946 var
1947 ListColumn: TListColumn;
1948 i: Integer;
1949 begin
1950 ListView.Items.BeginUpdate;
1951 try
1952 Screen.Cursor := crHourGlass;
1953
1954 ListView.Columns.Clear;
1955 for i := 0 to Length(COLUMN) - 1 do begin
1956 ListColumn := ListView.Columns.Add;
1957 ListColumn.Caption := COLUMN[i];
1958 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1959 end;
1960
1961 ListView.Items.Count := 0;
1962 ListView.Items.Clear;
1963 ListView.Items.Count := Category.Count;
1964
1965 // UpFolderAction.Enabled := True;
1966 // AllItemAction.Enabled := False;
1967 // LogItemAction.Enabled := False;
1968 // NewItemAction.Enabled := False;
1969 // SelectItemAction.Enabled := False;
1970 // ListDownloadToolButton.Enabled := False;
1971 // BoardReservToolButton.Enabled := False;
1972 // ListThreadDownloadToolButton.Enabled := False;
1973
1974 ListNameLabel.Caption := Category.Title;
1975 FolderImage.Picture := nil;
1976 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1977
1978 FSortIndex := 0;
1979 FSortOrder := False;
1980 ListViewColumnClick(nil, ListView.Column[0]);
1981
1982 Result := Category.Count;
1983 finally
1984 Screen.Cursor := crDefault;
1985 ListView.Items.EndUpdate;
1986 end;
1987 end;
1988
1989 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1990 const
1991 COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
1992 '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1993 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1994 taRightJustify, taRightJustify,
1995 taRightJustify, taLeftJustify,
1996 taLeftJustify);
1997 //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
1998 var
1999 ListColumn: TListColumn;
2000 i: Integer;
2001 begin
2002 ListView.Items.BeginUpdate;
2003 try
2004 Screen.Cursor := crHourGlass;
2005
2006 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2007 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2008 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2009 begin
2010 ListView.Columns.Clear;
2011 for i := 0 to Length(COLUMN) - 1 do begin
2012 ListColumn := ListView.Columns.Add;
2013 ListColumn.Caption := COLUMN[i];
2014 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2015 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2016 end;
2017 end;
2018
2019 ListView.Items.Count := 0;
2020 ListView.Items.Clear;
2021
2022 case GikoForm.ViewType of
2023 gvtAll: ListView.Items.Count := Board.Count;
2024 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2025 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2026 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2027 end;
2028
2029 ListNameLabel.Caption := Board.Title;
2030 FolderImage.Picture := nil;
2031 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2032
2033 FSortIndex := 0;
2034 FSortOrder := False;
2035 ListViewColumnClick(nil, ListView.Column[0]);
2036
2037 Result := Board.Count;
2038 finally
2039 Screen.Cursor := crDefault;
2040 ListView.Items.EndUpdate;
2041 end;
2042 end;
2043
2044 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2045 var
2046 i: Integer;
2047 begin
2048 if FTreeType = gttHistory then begin
2049 if GetActiveContent <> TFavoriteThreadItem( Node ).Item then
2050 FavoriteClick( Node );
2051 Exit;
2052 end;
2053
2054 ListView.Selected := nil;
2055 ListView.Items.Count := 0;
2056 ListView.Items.Clear;
2057 // ListView.Columns.Clear;
2058
2059 Caption := CAPTION_NAME;
2060 //Application.Title := CAPTION_NAME;
2061
2062
2063 if GetActiveList is TBBS then begin
2064 for i := 0 to ListView.Columns.Count - 1 do
2065 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2066 end else if GetActiveList is TCategory then begin
2067 for i := 0 to ListView.Columns.Count - 1 do
2068 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2069 end else if GetActiveList is TBoard then begin
2070 for i := 0 to ListView.Columns.Count - 1 do
2071 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2072 end;
2073
2074 if TObject(Node.Data) is TBBS then begin
2075 SetActiveList(Node.data);
2076 end else if TObject(Node.Data) is TCategory then begin
2077 SetActiveList(Node.data);
2078 end else if TObject(Node.Data) is TBoard then begin
2079 if not TBoard(Node.Data).IsThreadDatRead then begin
2080 Screen.Cursor := crHourGlass;
2081 try
2082 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2083 finally
2084 Screen.Cursor := crDefault;
2085 end;
2086 end;
2087 SetActiveList(Node.data);
2088 end;
2089 end;
2090
2091 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2092 var
2093 // FileName: string;
2094 // DateTime: TDateTime;
2095 BoardCnt: Integer;
2096 BBS: TBBS;
2097 Category: TCategory;
2098 Board: TBoard;
2099 ThreadItem: TThreadItem;
2100 RepStr: string;
2101 ActivListObj : TObject;
2102 begin
2103 ActivListObj := ActiveList;
2104 if ActivListObj is TBBS then begin
2105 BBS := TBBS(ActivListObj);
2106
2107 ListView.StateImages := nil;
2108
2109 if BBS = nil then Exit;
2110 if BBS.Count <= 0 then Exit;
2111 if Item = nil then Exit;
2112 if Item.Index > BBS.Count then Exit;
2113 if ListView.Items.Count = 0 then Exit;
2114
2115 if not (BBS.Items[Item.index] is TCategory) then Exit;
2116 Category := TCategory(BBS.Items[Item.index]);
2117
2118 if Category = nil then Exit;
2119
2120 if ListNumberVisibleAction.Checked then
2121 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2122 else
2123 Item.Caption := Category.Title;
2124
2125 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2126 Item.Data := Category;
2127 end else if ActivListObj is TCategory then begin
2128 Category := TCategory(ActivListObj);
2129
2130 ListView.StateImages := nil;
2131
2132 if Category = nil then Exit;
2133 if Category.Count <= 0 then Exit;
2134 if Item = nil then Exit;
2135 if Item.Index >= Category.Count then Exit;
2136 if ListView.Items.Count = 0 then Exit;
2137
2138 if not (Category.Items[Item.Index] is TBoard) then Exit;
2139 Board := TBoard(Category.Items[Item.Index]);
2140
2141 if Board = nil then Exit;
2142
2143 if ListNumberVisibleAction.Checked then
2144 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2145 else
2146 Item.Caption := Board.Title;
2147
2148 if Item.SubItems.Count <> 2 then begin
2149 Item.SubItems.Clear;
2150 Item.SubItems.Add('');
2151 Item.SubItems.Add('');
2152 end;
2153
2154 Item.ImageIndex := ITEM_ICON_BOARD1;
2155
2156 if Board.Round then
2157 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2158 else
2159 Item.SubItems[0] := '';
2160
2161 if Board.RoundDate = ZERO_DATE then begin
2162 Item.SubItems[1] := '';
2163 end else
2164 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2165 Item.Data := Board;
2166 end else if ActivListObj is TBoard then begin
2167 Board := TBoard(ActivListObj);
2168
2169 if GikoSys.Setting.ListIconVisible then
2170 ListView.StateImages := StateIconImageList
2171 else
2172 ListView.StateImages := nil;
2173
2174 case GikoForm.ViewType of
2175 gvtAll: BoardCnt := Board.Count;
2176 gvtLog: BoardCnt := Board.GetLogThreadCount;
2177 gvtNew: BoardCnt := Board.GetNewThreadCount;
2178 gvtUser: BoardCnt := Board.GetUserThreadCount;
2179 else
2180 BoardCnt := 0;
2181 end;
2182
2183 // if Board = nil then Exit;
2184 if BoardCnt <= 0 then Exit;
2185 if Item = nil then Exit;
2186 if Item.Index > BoardCnt then Exit;
2187 if ListView.Items.Count = 0 then Exit;
2188
2189 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2190
2191 ThreadItem := nil;
2192 case GikoForm.ViewType of
2193 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2194 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2195 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2196 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2197 end;
2198
2199 if ThreadItem = nil then Exit;
2200
2201 // if ListNumberVisibleAction.Checked then
2202 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2203 // else
2204 RepStr := ThreadItem.Title;
2205 RepStr := CustomStringReplace(RepStr, '&lt;', '<' );
2206 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2207 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2208 RepStr := CustomStringReplace(RepStr, '&amp', '&' );
2209 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2210
2211 if Item.SubItems.Count <> 6 then begin
2212 Item.SubItems.Clear;
2213 Item.SubItems.Add('');
2214 Item.SubItems.Add('');
2215 Item.SubItems.Add('');
2216 Item.SubItems.Add('');
2217 Item.SubItems.Add('');
2218 Item.SubItems.Add('');
2219 end;
2220
2221 if ListNumberVisibleAction.Checked then
2222 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2223 else
2224 Item.Caption := RepStr;
2225
2226 case ThreadItem.AgeSage of
2227 gasNone: Item.StateIndex := -1;
2228 gasNew: Item.StateIndex := 0;
2229 gasAge: Item.StateIndex := 1;
2230 gasSage: Item.StateIndex := 2;
2231 end;
2232
2233 if ThreadItem.IsLogFile then begin
2234 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2235 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2236 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2237 if ThreadItem.NewResCount = 0 then
2238 Item.SubItems[2] := ''
2239 else
2240 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2241 Item.SubItems[3] := '';
2242 if ThreadItem.Round then
2243 Item.SubItems[4] := ThreadItem.RoundName
2244 else
2245 Item.SubItems[4] := '';
2246 if ThreadItem.RoundDate = ZERO_DATE then begin
2247 Item.SubItems[5] := '';
2248 end else
2249 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2250 if ThreadItem.NewArrival then
2251 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2252 end else begin
2253 Item.ImageIndex := ITEM_ICON_THREAD1;
2254 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2255 Item.SubItems[1] := '';
2256 Item.SubItems[2] := '';
2257 Item.SubItems[3] := '';
2258 Item.SubItems[4] := '';
2259 Item.SubItems[5] := '';
2260 end;
2261 Item.Data := ThreadItem;
2262 end;
2263 end;
2264
2265 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2266 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2267 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2268 var Index: Integer);
2269 begin
2270 //
2271 end;
2272
2273 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2274 EndIndex: Integer);
2275 begin
2276 //
2277 end;
2278
2279 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2280 EndIndex: Integer; OldState, NewState: TItemStates);
2281 begin
2282 //
2283 end;
2284
2285 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2286 var
2287 p: TPoint;
2288 s: string;
2289 tmp2: string;
2290 URL: string;
2291 ATitle: Boolean;
2292
2293 threadItem : TThreadItem;
2294 board : TBoard;
2295 Protocol, Host, Path, Document, Port, Bookmark: string;
2296
2297 //wkInt: Integer;
2298 wkIntSt: Integer;
2299 wkIntTo: Integer;
2300 ps : Integer;
2301 pch :PChar;
2302 ActiveFileName: string;
2303 e: IHTMLElement;
2304 Ext: string;
2305 buf: string;
2306 PathRec: TPathRec;
2307 begin
2308 try
2309 try
2310 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2311 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2312 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2313 end;
2314 except
2315 end;
2316 finally
2317 end;
2318 if PreviewTimer.Enabled then
2319 PreviewTimer.Enabled := False;
2320 Application.CancelHint;
2321 if GetActiveContent <> nil then
2322 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2323 else
2324 ActiveFileName := '';
2325
2326 StatusBar.Panels[1].Text := Text;
2327
2328 if FHint <> nil then begin
2329 FHint.ReleaseHandle;
2330 FHint.ClearAllRes;
2331 end;
2332 if FPreviewBrowser <> nil then
2333 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2334
2335 if not GikoSys.Setting.UnActivePopup then
2336 if not GikoForm.Active then
2337 Exit;
2338
2339 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2340 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2341
2342 s := '';
2343 Ext := AnsiLowerCase(ExtractFileExt(Text));
2344 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2345 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2346 if FPreviewBrowser = nil then begin
2347 FPreviewBrowser := TPreviewBrowser.Create(Self);
2348 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2349 TOleControl(FPreviewBrowser).Parent := nil;
2350 end;
2351 FPreviewBrowser.Navigate('about:blank');//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2352 FPreviewURL := Text;
2353 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2354 PreviewTimer.Enabled := True;
2355 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2356 if Pos('mailto:', Text) = 1 then begin
2357 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2358 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2359 GetCursorPos(p);
2360 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2361 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2362 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2363 if (Assigned(e)) then begin
2364 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2365 if (GikoSys.IsNumeric(tmp2)) then begin
2366 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2367 wkIntSt := StrToInt(tmp2);
2368 wkIntTo := StrToInt(tmp2);
2369 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2370 FHint.PopupType := gptThread;
2371 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2372 end else begin
2373 FHint.PopupType := gptRaw;
2374 FHint.Caption := s;
2375 end;
2376 end;
2377 end else begin
2378 URL := Text;
2379
2380 if Pos('about:blank..', URL) = 1 then begin
2381 threadItem := GetActiveContent;
2382 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2383 if AnsiPos('http://jbbs.shitaraba.com/', URL) <> 0 then begin
2384 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2385 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2386 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2387 else if( PathRec.FSt <> 0 ) then
2388 buf := IntToStr(PathRec.FSt);
2389 end else
2390 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2391 URL := URL + buf;
2392 end;
2393 PathRec := Gikosys.Parse2chURL2(URL);
2394 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2395 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2396
2397 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2398
2399 URL := GikoSys.GetBrowsableThreadURL( URL );
2400 wkIntSt := PathRec.FSt;
2401 wkIntTo := PathRec.FTo;
2402
2403 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2404 wkIntSt := 1;
2405 wkIntTo := 1;
2406 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2407 wkIntSt := wkIntTo;
2408 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2409 wkIntTo := wkIntSt;
2410 end else if wkIntSt > wkIntTo then begin
2411 //wkInt := wkIntTo;
2412 wkIntTo := wkIntSt;
2413 wkIntSt := wkIntTo;
2414 end;
2415 //if wkIntSt = 0 then
2416 // wkIntSt := 1;
2417 //if wkINtTo = 0 then
2418 // wkIntTo := 1;
2419 //if PathRec.FFirst then
2420 // wkIntSt := 1;
2421 if PathRec.FStBegin then
2422 wkIntSt := 1;
2423 if PathRec.FToEnd then
2424 wkIntTo := 9999;
2425
2426 ATitle := ActiveFileName <> PathRec.FKey;
2427
2428 threadItem := BBSsFindThreadFromURL( URL );
2429
2430 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2431 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2432 if board <> nil then
2433 threadItem := board.Find( PathRec.FKey + '.dat' );
2434
2435 end;
2436
2437 if threadItem <> nil then begin
2438 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2439 FHint.PopupType := gptThread;
2440 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2441 end;
2442 end;
2443 end;
2444
2445 //if s <> '' then
2446 // ShowTextPopup(s);
2447 if FHint.PopupType = gptRaw then begin
2448 if FHint.Caption <> '' then
2449 ShowTextPopup;
2450 end else begin
2451 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2452 ShowTextPopup;
2453 end;
2454 end;
2455 end;
2456
2457 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2458 const Text: WideString);
2459 var
2460 Title: string;
2461 begin
2462 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2463 Title := CAPTION_NAME
2464 else
2465 Title := CAPTION_NAME + ' - [' + Text + ']';
2466 Caption := Title;
2467 //Application.Title := Title;
2468 end;
2469
2470 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2471 var
2472 SysMenu: HMenu;
2473 //SysMenuApp: HMenu;
2474 begin
2475 FEnabledCloseButton := Enabled;
2476 SysMenu := GetSystemMenu(Handle, False);
2477 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2478
2479 if Enabled then begin
2480 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2481 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2482 end else begin
2483 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2484 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2485 end;
2486
2487 DrawMenuBar(Handle);
2488 //DrawMenuBar(Application.Handle);
2489 end;
2490
2491 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2492 var AllowChange: Boolean);
2493 begin
2494 if FTreeType = gtt2ch then
2495 FSortIndex := -1;
2496 end;
2497
2498 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2499 Shift: TShiftState);
2500 begin
2501 if Key = VK_BACK then begin
2502 // UpFolderButtonClick(Sender);
2503 end else if Key = VK_SPACE then begin
2504 // ListClick;
2505 end else if Key = VK_RETURN then begin
2506 ListDoubleClick;
2507 end;
2508 end;
2509
2510 function TGikoForm.GetHttpState: Boolean;
2511 begin
2512 Result := FHttpState;
2513 end;
2514
2515 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2516 Column: TListColumn);
2517 var
2518 i: Integer;
2519 wkBBS: TBBS;
2520 wkCategory: TCategory;
2521 wkBoard: TBoard;
2522 begin
2523 if FSortIndex = Column.Index then
2524 FSortOrder := not FSortOrder
2525 else
2526 FSortOrder := False;
2527
2528 for i := 0 to ListView.Columns.Count - 1 do
2529 ListView.Column[i].ImageIndex := -1;
2530 if FSortOrder then
2531 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2532 else
2533 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2534
2535 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2536
2537 //if TObject(TreeView.Selected.Data) is TBBS then begin
2538 if TObject( FActiveList ) is TBBS then begin
2539 //wkBBS := TBBS(TreeView.Selected.Data);
2540 wkBBS := TBBS( FActiveList );
2541 Sort.SortOrder := FSortOrder;
2542 Sort.SortIndex := Column.Index;
2543 wkBBS.Sort(CategorySortProc);
2544 ListView.Refresh;
2545 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2546 end else if TObject( FActiveList ) is TCategory then begin
2547 //wkCategory := TCategory(TreeView.Selected.Data);
2548 wkCategory := TCategory( FActiveList );
2549 Sort.SortOrder := FSortOrder;
2550 Sort.SortIndex := Column.Index;
2551 wkCategory.Sort(BoardSortProc);
2552 ListView.Refresh;
2553 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2554 end else if TObject( FActiveList ) is TBoard then begin
2555 //wkBoard := TBoard(TreeView.Selected.Data);
2556 wkBoard := TBoard( FActiveList );
2557 Sort.SortOrder := FSortOrder;
2558 Sort.SortIndex := Column.Index;
2559 wkBoard.Sort(ThreadItemSortProc);
2560 ListView.Refresh;
2561 end;
2562 FSortIndex := Column.Index;
2563 end;
2564
2565 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2566 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2567 var
2568 ARect: TRect;
2569 begin
2570 DefaultDraw := True;
2571 Exit;
2572 DefaultDraw := False;
2573 if (cdsSelected in State) or (cdsHot in State) then begin
2574 Sender.Canvas.Brush.Color := clHighlight;
2575 Sender.Canvas.Font.Color := clHighlightText;
2576 end else begin
2577 Sender.Canvas.Brush.Color := clBtnFace;
2578 Sender.Canvas.Font.Color := clBtnText;
2579 end;
2580 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2581 Sender.Canvas.FillRect(ARect);
2582 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2583 end;
2584
2585 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2586 var
2587 Nodes: TTreeNodes;
2588 i: integer;
2589 begin
2590 Nodes := TreeView.Items;
2591
2592 for i := 0 to Nodes.Count - 1 do begin
2593 if Nodes.Item[i].Data = Data then begin
2594 Result := Nodes.Item[i];
2595 Exit;
2596 end;
2597 end;
2598 Result := nil;
2599 end;
2600
2601 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2602 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2603 Headers: OleVariant; var Cancel: WordBool);
2604 var
2605 sNo: string;
2606 p: TPoint;
2607 const
2608 kMenuName: string = 'menu:';
2609 begin
2610
2611 if Pos(kMenuName, URL) <> 0 then begin
2612 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2613
2614 if not GikoSys.IsNumeric(sNo) then Exit;
2615
2616 Cancel := True;
2617 GetCursorpos(p);
2618 KokoPopupMenu.Tag := StrToInt(sNo);
2619 KokoPopupMenu.Popup(p.x, p.y);
2620 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2621 Cancel := not GikoSys.Setting.OpenMailer;
2622 end;
2623
2624 end;
2625
2626 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2627 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2628 var DefaultDraw: Boolean);
2629 var
2630 ThreadItem: TThreadItem;
2631 begin
2632 //
2633 // TListView(Sender).Canvas.Font.Style := [];
2634 if TObject(Item.Data) is TThreadItem then begin
2635 ThreadItem := TThreadItem(Item.Data);
2636 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2637 ListView.Canvas.Brush.Color := FOddColor;
2638 end else begin
2639 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2640 end;
2641 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2642 if ThreadItem.UnRead then
2643 TListView(Sender).Canvas.Font.Style := [fsBold];
2644 end;
2645 end;
2646
2647 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2648 begin
2649 if Application.Terminated then
2650 Exit;
2651 if PreviewTimer.Enabled then
2652 PreviewTimer.Enabled := False;
2653 //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2654 if FHint <> nil then begin
2655 FHint.ReleaseHandle;
2656 FHint.ClearAllRes;
2657 // FHint.Free;
2658 // FHint := nil;
2659 end;
2660 if FPreviewBrowser <> nil then
2661 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2662
2663 end;
2664
2665 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2666 const ARect: TRect; var DefaultDraw: Boolean);
2667 var
2668 NodeRect: TRect;
2669 i, j: Integer;
2670 IsBoardNode: Boolean;
2671 Cnt: Integer;
2672 CntText: string;
2673 TextWidth: Integer;
2674 TextRect: TRect;
2675 Board: TBoard;
2676 Category: TCategory;
2677 Bitmap: TBitmap;
2678 NodeWidth: Integer;
2679 begin
2680 DefaultDraw := True;
2681
2682 if FTreeType = gttHistory then Exit;
2683
2684 TreeView.Canvas.Font.Color := clBlue;
2685 IsBoardNode := False;
2686
2687 for i := 0 to TreeView.Items.Count - 1 do begin
2688 Cnt := 0;
2689 if not TreeView.Items[i].IsVisible then
2690 continue;
2691
2692 if TObject(TreeView.Items[i].Data) is TCategory then begin
2693 if TreeView.Items[i].Expanded then
2694 continue;
2695
2696 IsBoardNode := False;
2697 Category := TCategory(TreeView.Items[i].Data);
2698 for j := 0 to Category.Count - 1 do begin
2699 Board := Category.Items[j];
2700 if Board <> nil then begin
2701 if Board.UnRead > 0 then begin
2702 Cnt := 1;
2703 Break;
2704 end;
2705 end;
2706 end;
2707 if Cnt <> 1 then
2708 continue;
2709 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2710 IsBoardNode := True;
2711 Board := TBoard(TreeView.Items[i].Data);
2712 Cnt := Board.UnRead;
2713 if Cnt <= 0 then
2714 continue;
2715 end else
2716 continue;
2717
2718 Bitmap := TBitmap.Create;
2719 try
2720 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2721 Bitmap.Canvas.Font.Style := [fsBold];
2722 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2723 finally
2724 Bitmap.Free;
2725 end;
2726
2727 NodeRect := TreeView.Items[i].DisplayRect(True);
2728
2729 if IsBoardNode then
2730 CntText := '(' + IntToStr(Cnt) + ')'
2731 else if Cnt = 1 then
2732 CntText := '(+)';
2733
2734
2735 TextWidth := TreeView.Canvas.TextWidth(CntText);
2736
2737 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2738 NodeRect.Top,
2739 NodeRect.Left + NodeWidth + TextWidth + 8,
2740 NodeRect.Bottom);
2741 DrawText(TreeView.Canvas.Handle,
2742 PChar(CntText),
2743 -1,
2744 TextRect,
2745 DT_SINGLELINE or DT_VCENTER);
2746 end;
2747 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2748 end;
2749
2750 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2751 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2752 var
2753 Board: TBoard;
2754 Category: TCategory;
2755 i: Integer;
2756 begin
2757 DefaultDraw := True;
2758
2759 if FTreeType = gttHistory then Exit;
2760
2761 TreeView.Canvas.Font.Style := [];
2762 if Node <> nil then begin
2763 if TObject(Node.Data) is TCategory then begin
2764 Category := TCategory(Node.Data);
2765 for i := 0 to Category.Count - 1 do begin
2766 Board := Category.Items[i];
2767 if Board <> nil then begin
2768 if Board.UnRead > 0 then begin
2769 TreeView.Canvas.Font.Style := [fsBold];
2770 Break;
2771 end;
2772 end;
2773 end;
2774 end else if TObject(Node.Data) is TBoard then begin
2775 Board := TBoard(Node.Data);
2776 if Board.UnRead > 0 then
2777 TreeView.Canvas.Font.Style := [fsBold];
2778 end;
2779 end;
2780 end;
2781
2782 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2783 begin
2784 TreeView.Invalidate;
2785
2786 if TObject(Node.Data) is TBBS then begin
2787 TBBS(Node.Data).NodeExpand := True;
2788 end else if TObject(Node.Data) is TCategory then begin
2789 TCategory(Node.Data).NodeExpand := True;
2790 end else if TObject(Node.Data) is TBoard then begin
2791 TBoard(Node.Data).NodeExpand := True;
2792 end;
2793 end;
2794
2795 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2796 begin
2797 TreeSplitter.Visible := PanelVisible;
2798 CabinetPanel.Visible := PanelVisible;
2799 CabinetToolButton.Down := PanelVisible;
2800 end;}
2801
2802 procedure TGikoForm.ListViewAllSelect;
2803 begin
2804 ListView.SetFocus;
2805 ListView.SelectAll;
2806 end;
2807
2808 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2809 var
2810 Board: TBoard;
2811 ThreadItem: TThreadItem;
2812 APoint: TPoint;
2813 HitTest: THitTests;
2814 begin
2815 GetCursorPos(APoint);
2816 APoint := TreeView.ScreenToClient(APoint);
2817 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2818 if not (htOnLabel in HitTest) then Exit;
2819 if TreeView.Selected = nil then Exit;
2820
2821 if FTreeType = gtt2ch then begin
2822 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2823 Board := TBoard(TreeView.Selected.Data);
2824 DownloadList(Board);
2825 end else if FTreeType = gttHistory then begin
2826 if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
2827 ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
2828 DownloadContent(ThreadItem);
2829 end;
2830 end;
2831
2832 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2833 begin
2834
2835 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2836
2837 end;
2838
2839 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2840 begin
2841 AddMessageList(Msg, nil, Icon);
2842 end;
2843
2844 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2845 var
2846 ATitle: string;
2847 s: string;
2848 begin
2849 try
2850 if Item.DownType = gdtBoard then
2851 ATitle := Item.Board.Title
2852 else
2853 ATitle := Item.ThreadItem.Title;
2854 if ATitle = '' then
2855 ATitle := '鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?';
2856
2857 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2858 //鐃緒申鐃緒申鐃?鐃緒申
2859 if Item.DownType = gdtBoard then begin
2860 //鐃緒申
2861 Item.SaveListFile;
2862 AddMessageList(ATitle + ' [鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申]', nil, gmiOK);
2863 if GetActiveList = Item.Board then
2864 SetActiveList(Item.Board);
2865 Item.Board.Modified := True;
2866 Item.Board.IsThreadDatRead := True;
2867 PlaySound('New');
2868 end else if Item.DownType = gdtThread then begin
2869 //鐃?鐃緒申
2870 Item.SaveItemFile;
2871 Item.ThreadItem.NewArrival := True;
2872 if GetActiveContent = Item.ThreadItem then
2873 InsertBrowserTab(Item.ThreadItem)
2874 else
2875 InsertBrowserTab(Item.ThreadItem, False);
2876
2877 if Item.State = gdsComplete then begin
2878 PlaySound('New');
2879 AddMessageList(ATitle + ' [鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申]', nil, gmiOK);
2880 end else begin
2881 PlaySound('NewDiff');
2882 AddMessageList(ATitle + ' [鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申]', nil, gmiOK);
2883 end;
2884
2885 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2886 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2887 Item.ThreadItem.Round := False;
2888 Item.ThreadItem.RoundName := '';
2889 AddMessageList('鐃緒申1000鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 - [' + Item.ThreadItem.Title + ']', nil, gmiOK);
2890 end;
2891
2892 TreeView.Refresh;
2893 end;
2894 ListView.Refresh;
2895 end else if Item.State = gdsNotModify then begin
2896 //鐃緒申鐃?鐃?鐃?
2897 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
2898 //SetContent(Item.ThreadItem);
2899 InsertBrowserTab(Item.ThreadItem);
2900 end;}
2901 AddMessageList(ATitle + ' [鐃緒申鐃?鐃?]', nil, gmiSAD);
2902 PlaySound(