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.148 - (show annotations) (download) (as text)
Wed Nov 26 03:57:48 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.147: +28 -0 lines
File MIME type: text/x-pascal
・板更新後に BBS を切り替えるとエラーが起きるようになってしまったので修正。

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