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.135 - (show annotations) (download) (as text)
Sun Nov 23 18:00:42 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.134: +85 -7 lines
File MIME type: text/x-pascal
・履歴を保存するようにしてみた。

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