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.152 - (show annotations) (download) (as text)
Wed Nov 26 13:58:56 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.151: +62 -57 lines
File MIME type: text/x-pascal
・レス絞込ダイアログでキャンセルを押すとレス絞込が解除されてしまうのを修正。

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