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.128 - (show annotations) (download) (as text)
Sat Nov 22 17:06:14 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.127: +4 -3 lines
File MIME type: text/x-pascal
・アンカーのリンク先が2ちゃんねるだった場合に IE で開くようになってしまっていたので修正。
・アンカーのリンク先が2ちゃんねるの過去ログだった場合に対応していなかったので修正。

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