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