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.189 - (show annotations) (download) (as text)
Tue Jan 6 16:14:39 2004 UTC (20 years, 3 months ago) by h677
Branch: MAIN
Changes since 1.188: +7 -0 lines
File MIME type: text/x-pascal
お気に入りのURLを鯖移転時に自動で変更するようにしてみた。

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