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.146 - (show annotations) (download) (as text)
Tue Nov 25 16:03:40 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.145: +16 -6 lines
File MIME type: text/x-pascal
・ReloadBBS を若干強化。

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