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.138 - (show annotations) (download) (as text)
Mon Nov 24 10:01:44 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.137: +71 -11 lines
File MIME type: text/x-pascal
・キャビネットがトグルするようになった。
 これにより、CabinetVisibleAction はデフォルトのボタンからはずし、
 Cabinet2chAction, CabinetHistoryAction, CabinetFavoriteAction をデフォルトに追加。

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