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.193 - (show annotations) (download) (as text)
Mon Jan 19 11:36:27 2004 UTC (20 years, 3 months ago) by h677
Branch: MAIN
Changes since 1.192: +7 -2 lines
File MIME type: text/x-pascal
レスポップアップでIntの範囲を超える時があるのでInt64に変更。
新着レスへの移動の不具合の修正

1 unit Giko;
2
3 interface
4
5 uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
8 {$IF Defined(DELPRO) }
9 SHDocVw,
10 MSHTML,
11 {$ELSE}
12 SHDocVw_TLB,
13 MSHTML_TLB,
14 {$IFEND}
15 IdHTTP, ActiveX, ActnList, ImgList,
16 ToolWin, Buttons, {Clipbrd,} {HTTPApp,} YofUtils, IdComponent,
17 ShellAPI, UrlMon, Tabs, IdGlobal, StrUtils,
18 CommCtrl, IniFiles, Dialogs,
19 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
20 Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
21 FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
22 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
23 IndividualAbon, Search, ExternalBoardManager, ExternalBoardPlugInMain,
24 StdActns, GikoXMLDoc;
25
26 type
27 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
28
29 TGikoForm = class(TForm)
30 StatusBar: TStatusBar;
31 MainPanel: TPanel;
32 ClientPanel: TPanel;
33 TreeSplitter: TSplitter;
34 CabinetPanel: TPanel;
35 TreeView: TTreeView;
36 ThreadMainPanel: TPanel;
37 ListSplitter: TSplitter;
38 ViewPanel: TPanel;
39 ListView: TGikoListView;
40 ThreadPanel: TPanel;
41 MessagePanel: TPanel;
42 MessageBar: TPanel;
43 MessageHideButton: TSpeedButton;
44 MessageListView: TListView;
45 MessageSplitter: TSplitter;
46 Panel3: TPanel;
47 SpeedButton1: TSpeedButton;
48 ToolBar1: TToolBar;
49 CabinetSelectToolButton: TToolButton;
50 HistoryToolBar: TToolBar;
51 ToolButton15: TToolButton;
52 ToolButton18: TToolButton;
53 ItemIcon16: TImageList;
54 ItemIcon32: TImageList;
55 HotToobarImageList: TImageList;
56 ToobarImageList: TImageList;
57 ItemImageList: TImageList;
58 ActionList: TActionList;
59 LogDeleteAction: TAction;
60 KidokuAction: TAction;
61 StdToolBarVisibleAction: TAction;
62 SearchAction: TAction;
63 GikoNaviWebPageAction: TAction;
64 AboutAction: TAction;
65 ExitAction: TAction;
66 MsgBarVisibleAction: TAction;
67 StatusBarVisibleAction: TAction;
68 LargeIconAction: TAction;
69 SmallIconAction: TAction;
70 ListIconAction: TAction;
71 DetailIconAction: TAction;
72 CabinetBBSAction: TAction;
73 CabinetHistoryAction: TAction;
74 CabinetVisibleAction: TAction;
75 MidokuAction: TAction;
76 AllSelectAction: TAction;
77 UpFolderAction: TAction;
78 ListNumberVisibleAction: TAction;
79 AllItemAction: TAction;
80 LogItemAction: TAction;
81 NewItemAction: TAction;
82 SelectItemAction: TAction;
83 ShowThreadAction: TAction;
84 StopAction: TAction;
85 MainMenu: TMainMenu;
86 FileMenu: TMenuItem;
87 DeleteMenu: TMenuItem;
88 ExitMenu: TMenuItem;
89 KidokuMenu: TMenuItem;
90 MidokuMenu: TMenuItem;
91 AllSelectMenu: TMenuItem;
92 ViewMenu: TMenuItem;
93 StdToolBarMenu: TMenuItem;
94 CabinetMenu: TMenuItem;
95 H1: TMenuItem;
96 N4: TMenuItem;
97 CabinetVisibleMenu: TMenuItem;
98 MessageMenu: TMenuItem;
99 StatusBarMenu: TMenuItem;
100 MMSep03: TMenuItem;
101 LargeIconMenu: TMenuItem;
102 SmallIconMenu: TMenuItem;
103 ListMenu: TMenuItem;
104 DetailMenu: TMenuItem;
105 ToolMenu: TMenuItem;
106 Find1: TMenuItem;
107 RoundMenu: TMenuItem;
108 MMSep04: TMenuItem;
109 OptionMenu: TMenuItem;
110 HelpMenu: TMenuItem;
111 G1: TMenuItem;
112 N1: TMenuItem;
113 AboutMenu: TMenuItem;
114 IconStyle: TAction;
115 BrowserPopupMenu: TPopupMenu;
116 ShowThreadMenu: TMenuItem;
117 ShowBoardMenu: TMenuItem;
118 ShowBoardAction: TAction;
119 ListIconPopupMenu: TPopupMenu;
120 LargeIconPMenu: TMenuItem;
121 SmallIconPMenu: TMenuItem;
122 ListPMenu: TMenuItem;
123 DetailPMenu: TMenuItem;
124 CabinetCloseAction: TAction;
125 ClosePopupMenu: TPopupMenu;
126 CloseMenu: TMenuItem;
127 OptionAction: TAction;
128 U1: TMenuItem;
129 N3: TMenuItem;
130 B1: TMenuItem;
131 S1: TMenuItem;
132 N2: TMenuItem;
133 A1: TMenuItem;
134 L1: TMenuItem;
135 N5: TMenuItem;
136 S2: TMenuItem;
137 RoundAction: TAction;
138 ListPopupMenu: TPopupMenu;
139 ListRoundPMenu: TMenuItem;
140 ListReservPMenu: TMenuItem;
141 LPMSep01: TMenuItem;
142 ItemRoundPMenu: TMenuItem;
143 LPMSep02: TMenuItem;
144 KidokuPMenu: TMenuItem;
145 MidokuPMenu: TMenuItem;
146 AllSelectPMenu: TMenuItem;
147 UrlCopyPMenu: TMenuItem;
148 LPMSep05: TMenuItem;
149 DeletePMenu: TMenuItem;
150 LPMSep06: TMenuItem;
151 ViewPMenu: TMenuItem;
152 LargeIconLPMenu: TMenuItem;
153 SmallIconLPMenu: TMenuItem;
154 ListLPMenu: TMenuItem;
155 DetailLPMenu: TMenuItem;
156 T1: TMenuItem;
157 B2: TMenuItem;
158 N8: TMenuItem;
159 URLCopyAction: TAction;
160 URLC1: TMenuItem;
161 N9: TMenuItem;
162 N10: TMenuItem;
163 MsgBarCloseAction: TAction;
164 ScrollTopAction: TAction;
165 ScrollLastAction: TAction;
166 ScrollNewAction: TAction;
167 ScrollKokoAction: TAction;
168 EditorAction: TAction;
169 IEAction: TAction;
170 ItemReloadAction: TAction;
171 BrowserMaxAction: TAction;
172 G2: TMenuItem;
173 N11: TMenuItem;
174 T3: TMenuItem;
175 L2: TMenuItem;
176 N12: TMenuItem;
177 K1: TMenuItem;
178 N13: TMenuItem;
179 N14: TMenuItem;
180 R1: TMenuItem;
181 A2: TMenuItem;
182 N15: TMenuItem;
183 SelectListReloadAction: TAction;
184 SelectThreadReloadAction: TAction;
185 SelectTimer: TTimer;
186 KokoPopupMenu: TPopupMenu;
187 KokomadePMenu: TMenuItem;
188 AllPMenu: TMenuItem;
189 MenuItem1: TMenuItem;
190 MenuItem2: TMenuItem;
191 BrowserTabCloseAction: TAction;
192 BrowserTabPopupMenu: TPopupMenu;
193 Close1: TMenuItem;
194 KokomadeAction: TAction;
195 ZenbuAction: TAction;
196 KokoResAction: TAction;
197 SelectItemURLCopyAction: TAction;
198 SelectReservAction: TAction;
199 NotSelectTabCloseAction: TAction;
200 A3: TMenuItem;
201 N16: TMenuItem;
202 A4: TMenuItem;
203 TreePopupMenu: TPopupMenu;
204 TreeSelectThreadPupupMenu: TMenuItem;
205 TreeSelectBoardPupupMenu: TMenuItem;
206 TPMSep01: TMenuItem;
207 TreeSelectURLPupupMenu: TMenuItem;
208 TreeSelectBoradReload: TAction;
209 TreeSelectThreadReload: TAction;
210 TreeSelectURLCopy: TAction;
211 ListToolBarVisibleAction: TAction;
212 BrowserToolBarVisibleAction: TAction;
213 T2: TMenuItem;
214 L3: TMenuItem;
215 B3: TMenuItem;
216 BrowserBottomPanel: TGikoPanel;
217 CabinetSelectPopupMenu: TPopupMenu;
218 H2: TMenuItem;
219 ItemReservPMenu: TMenuItem;
220 RoundNamePopupMenu: TPopupMenu;
221 SelectNewRoundName: TAction;
222 SelectDeleteRound: TAction;
223 NewBoardAction: TAction;
224 N7: TMenuItem;
225 B4: TMenuItem;
226 LoginAction: TAction;
227 L4: TMenuItem;
228 KeySettingAction: TAction;
229 K2: TMenuItem;
230 AllTabCloseAction: TAction;
231 A5: TMenuItem;
232 A6: TMenuItem;
233 C1: TMenuItem;
234 V1: TMenuItem;
235 N19: TMenuItem;
236 D1: TMenuItem;
237 D2: TMenuItem;
238 MessageImageList: TImageList;
239 ProgressBar: TProgressBar;
240 ArrangeAction: TAction;
241 URL1: TMenuItem;
242 NameURLCopyAction: TAction;
243 SelectItemNameURLCopyAction: TAction;
244 NameUrlCopyPMenu: TMenuItem;
245 URLC2: TMenuItem;
246 URLN1: TMenuItem;
247 N21: TMenuItem;
248 URLC3: TMenuItem;
249 URLN2: TMenuItem;
250 N22: TMenuItem;
251 N23: TMenuItem;
252 ListCoolBar: TGikoCoolBar;
253 ListToolBar: TToolBar;
254 ViewNoButton: TToolButton;
255 IconToolButton: TToolButton;
256 UpFolderButton: TToolButton;
257 Sepa01ToolButton: TToolButton;
258 AllItemToolButton: TToolButton;
259 LogItemToolButton: TToolButton;
260 NewItemToolButton: TToolButton;
261 ListDownloadToolButton: TToolButton;
262 ListThreadDownloadToolButton: TToolButton;
263 ToolButton2: TToolButton;
264 ToolButton1: TToolButton;
265 BrowserCoolBar: TGikoCoolBar;
266 BrowserToolBar: TToolBar;
267 BrowserSizeButton: TToolButton;
268 ToolButton3: TToolButton;
269 TopButton: TToolButton;
270 LastBotton: TToolButton;
271 NewButton: TToolButton;
272 KokoButton: TToolButton;
273 ToolButton9: TToolButton;
274 EditorButton: TToolButton;
275 ToolButton11: TToolButton;
276 IEButton: TToolButton;
277 ToolButton5: TToolButton;
278 ItemReloadButton: TToolButton;
279 ListNameToolBar: TToolBar;
280 ListNameLabel: TLabel;
281 FolderImage: TImage;
282 BrowserNameToolBar: TToolBar;
283 ItemBoardImage: TImage;
284 BrowserBoardNameLabel: TLabel;
285 ItemImage: TImage;
286 BrowserNameLabel: TLabel;
287 ActiveLogDeleteAction: TAction;
288 D3: TMenuItem;
289 N25: TMenuItem;
290 N26: TMenuItem;
291 ListNameBarVisibleAction: TAction;
292 D4: TMenuItem;
293 BrowserNameBarVisibleAction: TAction;
294 S3: TMenuItem;
295 R2: TMenuItem;
296 TreeSelectNameURLCopy: TAction;
297 TreeSelectNameURLPupupMenu: TMenuItem;
298 N27: TMenuItem;
299 H3: TMenuItem;
300 PaneInitAction: TAction;
301 I1: TMenuItem;
302 BrowserTabToolBar: TToolBar;
303 BrowserTab: TTabControl;
304 ToolButton7: TToolButton;
305 BrowserMinAction: TAction;
306 About1: TMenuItem;
307 N28: TMenuItem;
308 SelectTextClearAction: TAction;
309 MailTextClearAction: TAction;
310 NameTextClearAction: TAction;
311 S4: TMenuItem;
312 N29: TMenuItem;
313 N30: TMenuItem;
314 LeftmostTabSelectAction: TAction;
315 LeftTabSelectAction: TAction;
316 RightTabSelectAction: TAction;
317 RightmostTabSelectAction: TAction;
318 N31: TMenuItem;
319 L5: TMenuItem;
320 L6: TMenuItem;
321 A7: TMenuItem;
322 R3: TMenuItem;
323 FavoriteMenu: TMenuItem;
324 FavoriteAddAction: TAction;
325 N32: TMenuItem;
326 BoardFavoriteAddMenu: TMenuItem;
327 BoardFavoriteAddAction: TAction;
328 ThreadFavoriteAddAction: TAction;
329 ThreadFavoriteAddMenu: TMenuItem;
330 TreeSelectFavoriteAddAction: TAction;
331 N33: TMenuItem;
332 TreeSelectFavoriteAddPupupMenu: TMenuItem;
333 FavoriteArrangeAction: TAction;
334 FavoriteTreeView: TTreeView;
335 StateIconImageList: TImageList;
336 TopPanel: TPanel;
337 TopRightPanel: TPanel;
338 AnimePanel: TPanel;
339 Animate: TAnimate;
340 TopCoolPanel: TPanel;
341 MainCoolBar: TGikoCoolBar;
342 MenuToolBar: TToolBar;
343 StdToolBar: TToolBar;
344 RoundToolButton: TToolButton;
345 ToolButton6: TToolButton;
346 ToolButton4: TToolButton;
347 ToolButton13: TToolButton;
348 AbortToolButton: TToolButton;
349 LoginToolButton: TToolButton;
350 AddressToolBar: TToolBar;
351 AddressComboBox: TComboBox;
352 MoveToToolButton: TToolButton;
353 MoveToAction: TAction;
354 AddressImageList: TImageList;
355 AddressBarVisibleAction: TAction;
356 AddressToolBarMenu: TMenuItem;
357 T4: TMenuItem;
358 BrowserTabVisibleAction: TAction;
359 Show1: TMenuItem;
360 N34: TMenuItem;
361 BrowserTabTopAction: TAction;
362 BrowserTabBottomAction: TAction;
363 T5: TMenuItem;
364 B5: TMenuItem;
365 N35: TMenuItem;
366 BrowserTabTabStyleAction: TAction;
367 BrowserTabButtonStyleAction: TAction;
368 BrowserTabFlatStyleAction: TAction;
369 A8: TMenuItem;
370 U2: TMenuItem;
371 F1: TMenuItem;
372 PreviewTimer: TTimer;
373 MonazillaWebPageAction: TAction;
374 MonazillaWebPageAction1: TMenuItem;
375 GikoHelpAction: TAction;
376 N36: TMenuItem;
377 H4: TMenuItem;
378 KotehanAction: TAction;
379 K3: TMenuItem;
380 LinkBarVisibleAction: TAction;
381 L7: TMenuItem;
382 N37: TMenuItem;
383 A9: TMenuItem;
384 ChevronPopupMenu: TPopupMenu;
385 BBS2chWebPageAction: TAction;
386 N2N1: TMenuItem;
387 N38: TMenuItem;
388 GikoFolderOpenAction: TAction;
389 F2: TMenuItem;
390 LinkToolBar: TToolBar;
391 a10: TMenuItem;
392 ToolButton8: TToolButton;
393 ToolButton10: TToolButton;
394 ThreadEditorAction: TAction;
395 N39: TMenuItem;
396 T6: TMenuItem;
397 N40: TMenuItem;
398 LinkBarPopupMenu: TPopupMenu;
399 ToolBarSettingAction: TAction;
400 T7: TMenuItem;
401 ToolButton12: TToolButton;
402 ToolButton14: TToolButton;
403 ThreadPopupMenu: TPopupMenu;
404 MenuItem4: TMenuItem;
405 MenuItem5: TMenuItem;
406 MenuItem6: TMenuItem;
407 T8: TMenuItem;
408 NameCopyAction: TAction;
409 BoardIEAction: TAction;
410 URLN3: TMenuItem;
411 SelectItemNameCopyAction: TAction;
412 SelectItemNameCopyAction1: TMenuItem;
413 B6: TMenuItem;
414 T9: TMenuItem;
415 C2: TMenuItem;
416 SelectComboBox: TComboBox;
417 MainCoolBarPopupMenu: TPopupMenu;
418 StdToolBarVisiblePMenu: TMenuItem;
419 AddressToolBarVisiblePMenu: TMenuItem;
420 LinkToolBarVisiblePMenu: TMenuItem;
421 NG1: TMenuItem;
422 NG2: TMenuItem;
423 N43: TMenuItem;
424 N44: TMenuItem;
425 L9: TMenuItem;
426 I3: TMenuItem;
427 N45: TMenuItem;
428 B9: TMenuItem;
429 R5: TMenuItem;
430 T12: TMenuItem;
431 Show3: TMenuItem;
432 N46: TMenuItem;
433 T13: TMenuItem;
434 B10: TMenuItem;
435 N47: TMenuItem;
436 A12: TMenuItem;
437 U4: TMenuItem;
438 F4: TMenuItem;
439 N48: TMenuItem;
440 T14: TMenuItem;
441 SelectItemToolButton: TToolButton;
442 SelectResToolButton: TToolButton;
443 SelectResAction: TAction;
444 ToolButton16: TToolButton;
445 AllResAction: TAction;
446 AllResToolButton: TToolButton;
447 N50: TMenuItem;
448 A11: TMenuItem;
449 S5: TMenuItem;
450 Reload: TMenuItem;
451 GoBack: TMenuItem;
452 GoFoward: TMenuItem;
453 EditAction: TAction;
454 ReloadAction: TAction;
455 GoFowardAction: TAction;
456 GoBackAction: TAction;
457 SelectComboBoxSplitter: TImage;
458 IndividualAbon1: TMenuItem;
459 N41: TMenuItem;
460 IndividualAbon2: TMenuItem;
461 N42: TMenuItem;
462 CancellIndividualAbon: TAction;
463 AntiIndividualAbon: TMenuItem;
464 N49: TMenuItem;
465 N51: TMenuItem;
466 N52: TMenuItem;
467 N53: TMenuItem;
468 SearchBoardName: TMenuItem;
469 N55: TMenuItem;
470 TreeSelectSearchBoardName: TAction;
471 CabinetFavoriteAction: TAction;
472 N54: TMenuItem;
473 A13: TMenuItem;
474 FavoriteTreePopupMenu: TPopupMenu;
475 FavoriteTreeViewRenameAction: TAction;
476 FavoriteTreeRenamePopupMenu: TMenuItem;
477 FavoriteTreeViewNewFolderAction: TAction;
478 FavoriteTreeNewFolderPopupMenu: TMenuItem;
479 N56: TMenuItem;
480 FavoriteTreeViewDeleteAction: TAction;
481 FavoriteTreeDeletePopupMenu: TMenuItem;
482 FavoriteToolBar: TToolBar;
483 ToolButton17: TToolButton;
484 ToolButton19: TToolButton;
485 FavoriteTreeViewBrowseFolderAction: TAction;
486 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
487 N57: TMenuItem;
488 FavoriteTreeReloadPopupMenu: TMenuItem;
489 N58: TMenuItem;
490 FavoriteTreeURLCopyPopupMenu: TMenuItem;
491 FavoriteTreeNameCopyPopupMenu: TMenuItem;
492 FavoriteTreeLogDeletePopupMenu: TMenuItem;
493 N59: TMenuItem;
494 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
495 FavoriteTreeViewReloadAction: TAction;
496 FavoriteTreeViewURLCopyAction: TAction;
497 FavoriteTreeViewNameCopyAction: TAction;
498 FavoriteTreeViewNameURLCopyAction: TAction;
499 FavoriteTreeViewLogDeleteAction: TAction;
500 OnlyAHundredRes: TAction;
501 ToolButton20: TToolButton;
502 AHundredResButton: TToolButton;
503 N60: TMenuItem;
504 ExportFavoriteFileAction1: TMenuItem;
505 ExportFavoriteFile: TFileSaveAs;
506 ToolButton21: TToolButton;
507 ToolButton22: TToolButton;
508 ToolButton23: TToolButton;
509 ToolButton24: TToolButton;
510 N6: TMenuItem;
511 N17: TMenuItem;
512 FavoriteTreeViewBrowseBoardAction: TAction;
513 FavoriteTreeViewBrowseThreadAction: TAction;
514 UpBoardAction: TAction;
515 N18: TMenuItem;
516 N20: TMenuItem;
517 N24: TMenuItem;
518 N62: TMenuItem;
519 N61: TMenuItem;
520 N63: TMenuItem;
521 KoreCopy: TAction;
522 N64: TMenuItem;
523 dummy1: TMenuItem;
524 Browser: TWebBrowser;
525 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
1764
1765 end;
1766
1767 procedure TGikoForm.FormDestroy(Sender: TObject);
1768 begin
1769 ;
1770 end;
1771
1772 //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1773 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1774 begin
1775 // ListCoolBar.WindowProc := nil;
1776 // BrowserCoolBar.WindowProc := nil;
1777 // MainCoolBar.WindowProc := nil;
1778 Application.Terminate;
1779 Action := caFree;
1780 // Application.UnhookMainWindow(Hook);
1781 end;
1782
1783 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1784 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1785 begin
1786 CabinetVisibleAction.Execute;
1787 // CabinetPanelVisible(false);
1788 end;
1789
1790 procedure TGikoForm.ReloadBBS;
1791 var
1792 i : Integer;
1793 item : TBBSMenuItem;
1794 begin
1795 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1796 NotSelectTabCloseAction.Execute;
1797 if BrowserTab.Tabs.Count >= 1 then
1798 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1799 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1800 //FHistoryList.Clear;
1801 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1802 TreeView.Items.Clear;
1803
1804 //BBS鐃?鐃緒申
1805 try
1806 for i := Length( BBSs ) - 1 downto 0 do begin
1807 if BBSs[ i ] <> nil then
1808 BBSs[ i ].Free;
1809 BBSs[ i ] := nil;
1810 end;
1811 except
1812 end;
1813
1814 ActiveList := nil;
1815
1816 FTreeType := gttNone;
1817
1818 GikoSys.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1819 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1820 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1821 try
1822 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1823 CabinetSelectPopupMenu.Items[ i ].Free;
1824 CabinetMenu.Items[ i ].Free;
1825 end;
1826 except
1827 end;
1828 end;
1829 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1830 for i := Length( BBSs ) - 1 downto 0 do begin
1831 try
1832 item := TBBSMenuItem.Create( PopupMenu );
1833 item.Caption := BBSs[ i ].Title;
1834 item.Data := BBSs[ i ];
1835 item.OnClick := BBSMenuItemOnClick;
1836 CabinetSelectPopupMenu.Items.Insert( 0, item );
1837 item := TBBSMenuItem.Create( PopupMenu );
1838 item.Caption := BBSs[ i ].Title;
1839 item.Data := BBSs[ i ];
1840 item.OnClick := BBSMenuItemOnClick;
1841 CabinetMenu.Insert( 0, item );
1842 except
1843 end;
1844 end;
1845 ShowBBSTree( BBSs[ 0 ] );
1846
1847 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1848 SaveHistory;
1849 try
1850 for i := FHistoryList.Count - 1 downto 0 do
1851 TFavoriteThreadItem( FHistoryList[ i ] ).Free;
1852 except
1853 end;
1854 FHistoryList.Clear;
1855 LoadHistory;
1856
1857 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1858 // FFavorite := TFavorite.Create(FavoriteTreeView);
1859 FavoriteTreeView.Items.Clear;
1860 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1861 FavoriteDM.ReadFavorite;
1862 SetLinkBar;
1863
1864 end;
1865
1866 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1867 procedure TGikoForm.SetBoardTreeNode(
1868 inBBS : TBBS
1869 );
1870 var
1871 i, j, k: integer;
1872 Root: TTreeNode;
1873 CategoryNode: TTreeNode;
1874 BoardNode: TTreeNode;
1875 Category: TCategory;
1876 Board: TBoard;
1877 begin
1878 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1879 FActiveBBS := inBBS;
1880 TreeView.Items.BeginUpdate;
1881 TreeView.Items.Clear;
1882 try
1883 try
1884 if SplashWindow <> nil then
1885 SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1886 except
1887 end;
1888
1889 Root := TreeView.Items.Add( nil, inBBS.Title );
1890 Root.ImageIndex := ITEM_ICON_2CH1;
1891 Root.SelectedIndex := ITEM_ICON_2CH2;
1892 Root.Data := inBBS;
1893 for i := 0 to inBBS.Count - 1 do begin
1894 Category := TCategory(inBBS.Items[i]);
1895 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1896 CategoryNode.Data := Category;
1897 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1898 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1899
1900 for j := 0 to Category.Count - 1 do begin
1901 Board := TBoard(Category.Items[j]);
1902 Board.BeginUpdate;
1903 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1904 BoardNode.Data := Board;
1905 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1906 if not Board.IsLogFile then begin
1907 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1908 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1909 end else begin
1910 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1911 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1912 for k := 0 to Board.Count - 1 do begin
1913 if Board.Items[ k ].IsLogFile then begin
1914 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1915 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1916
1917 Break;
1918 end;
1919 end;
1920 end;
1921 Board.EndUpdate;
1922 end;
1923
1924 CategoryNode.Expanded := Category.NodeExpand;
1925
1926 if SplashWindow <> nil then begin
1927 SplashWindow.ProgressBar.StepIt;
1928 Application.ProcessMessages;
1929 end;
1930 end;
1931 finally
1932 TreeView.Items.EndUpdate;
1933 end;
1934 end;
1935
1936 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1937 const
1938 COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1939 var
1940 ListColumn: TListColumn;
1941 i: Integer;
1942 begin
1943 ListView.Items.BeginUpdate;
1944 try
1945 Screen.Cursor := crHourGlass;
1946
1947 ListView.Columns.Clear;
1948 for i := 0 to Length(COLUMN) - 1 do begin
1949 ListColumn := ListView.Columns.Add;
1950 ListColumn.Caption := COLUMN[i];
1951 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1952 end;
1953
1954 ListView.Items.Count := 0;
1955 ListView.Items.Clear;
1956 ListView.Items.Count := ABBS2ch.Count;
1957
1958 // UpFolderAction.Enabled := False;
1959 // AllItemAction.Enabled := False;
1960 // LogItemAction.Enabled := False;
1961 // NewItemAction.Enabled := False;
1962 // SelectItemAction.Enabled := False;
1963 // ListDownloadToolButton.Enabled := False;
1964 // BoardReservToolButton.Enabled := False;
1965 // ListThreadDownloadToolButton.Enabled := False;
1966
1967 ListNameLabel.Caption := ABBS2ch.Title;
1968 FolderImage.Picture := nil;
1969 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1970
1971 FSortIndex := 0;
1972 FSortOrder := False;
1973 ListViewColumnClick(nil, ListView.Column[0]);
1974
1975 Result := ABBS2ch.Count;
1976 finally
1977 Screen.Cursor := crDefault;
1978 ListView.Items.EndUpdate;
1979 end;
1980 end;
1981
1982 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1983 const
1984 COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1985 var
1986 ListColumn: TListColumn;
1987 i: Integer;
1988 begin
1989 ListView.Items.BeginUpdate;
1990 try
1991 Screen.Cursor := crHourGlass;
1992
1993 ListView.Columns.Clear;
1994 for i := 0 to Length(COLUMN) - 1 do begin
1995 ListColumn := ListView.Columns.Add;
1996 ListColumn.Caption := COLUMN[i];
1997 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1998 end;
1999
2000 ListView.Items.Count := 0;
2001 ListView.Items.Clear;
2002 ListView.Items.Count := Category.Count;
2003
2004 // UpFolderAction.Enabled := True;
2005 // AllItemAction.Enabled := False;
2006 // LogItemAction.Enabled := False;
2007 // NewItemAction.Enabled := False;
2008 // SelectItemAction.Enabled := False;
2009 // ListDownloadToolButton.Enabled := False;
2010 // BoardReservToolButton.Enabled := False;
2011 // ListThreadDownloadToolButton.Enabled := False;
2012
2013 ListNameLabel.Caption := Category.Title;
2014 FolderImage.Picture := nil;
2015 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2016
2017 FSortIndex := 0;
2018 FSortOrder := False;
2019 ListViewColumnClick(nil, ListView.Column[0]);
2020
2021 Result := Category.Count;
2022 finally
2023 Screen.Cursor := crDefault;
2024 ListView.Items.EndUpdate;
2025 end;
2026 end;
2027
2028 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2029 const
2030 COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2031 '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2032 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2033 taRightJustify, taRightJustify,
2034 taRightJustify, taLeftJustify,
2035 taLeftJustify);
2036 //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2037 var
2038 ListColumn: TListColumn;
2039 i: Integer;
2040 begin
2041 ListView.Items.BeginUpdate;
2042 try
2043 Screen.Cursor := crHourGlass;
2044
2045 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2046 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2047 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2048 begin
2049 ListView.Columns.Clear;
2050 for i := 0 to Length(COLUMN) - 1 do begin
2051 ListColumn := ListView.Columns.Add;
2052 ListColumn.Caption := COLUMN[i];
2053 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2054 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2055 end;
2056 end;
2057
2058 ListView.Items.Count := 0;
2059 ListView.Items.Clear;
2060
2061 case GikoForm.ViewType of
2062 gvtAll: ListView.Items.Count := Board.Count;
2063 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2064 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2065 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2066 end;
2067
2068 ListNameLabel.Caption := Board.Title;
2069 FolderImage.Picture := nil;
2070 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2071
2072 FSortIndex := 0;
2073 FSortOrder := False;
2074 ListViewColumnClick(nil, ListView.Column[0]);
2075
2076 Result := Board.Count;
2077 finally
2078 Screen.Cursor := crDefault;
2079 ListView.Items.EndUpdate;
2080 end;
2081 end;
2082
2083 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2084 var
2085 i: Integer;
2086 begin
2087 if FTreeType = gttHistory then begin
2088 if GetActiveContent <> TFavoriteThreadItem( Node ).Item then
2089 FavoriteClick( Node );
2090 Exit;
2091 end;
2092
2093 ListView.Selected := nil;
2094 ListView.Items.Count := 0;
2095 ListView.Items.Clear;
2096 // ListView.Columns.Clear;
2097
2098 Caption := CAPTION_NAME;
2099 //Application.Title := CAPTION_NAME;
2100
2101
2102 if GetActiveList is TBBS then begin
2103 for i := 0 to ListView.Columns.Count - 1 do
2104 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2105 end else if GetActiveList is TCategory then begin
2106 for i := 0 to ListView.Columns.Count - 1 do
2107 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2108 end else if GetActiveList is TBoard then begin
2109 for i := 0 to ListView.Columns.Count - 1 do
2110 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2111 end;
2112
2113 if TObject(Node.Data) is TBBS then begin
2114 SetActiveList(Node.data);
2115 end else if TObject(Node.Data) is TCategory then begin
2116 SetActiveList(Node.data);
2117 end else if TObject(Node.Data) is TBoard then begin
2118 if not TBoard(Node.Data).IsThreadDatRead then begin
2119 Screen.Cursor := crHourGlass;
2120 try
2121 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2122 finally
2123 Screen.Cursor := crDefault;
2124 end;
2125 end;
2126 SetActiveList(Node.data);
2127 end;
2128 end;
2129
2130 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2131 var
2132 // FileName: string;
2133 // DateTime: TDateTime;
2134 BoardCnt: Integer;
2135 BBS: TBBS;
2136 Category: TCategory;
2137 Board: TBoard;
2138 ThreadItem: TThreadItem;
2139 RepStr: string;
2140 ActivListObj : TObject;
2141 begin
2142 ActivListObj := ActiveList;
2143 if ActivListObj is TBBS then begin
2144 BBS := TBBS(ActivListObj);
2145
2146 ListView.StateImages := nil;
2147
2148 if BBS = nil then Exit;
2149 if BBS.Count <= 0 then Exit;
2150 if Item = nil then Exit;
2151 if Item.Index > BBS.Count then Exit;
2152 if ListView.Items.Count = 0 then Exit;
2153
2154 if not (BBS.Items[Item.index] is TCategory) then Exit;
2155 Category := TCategory(BBS.Items[Item.index]);
2156
2157 if Category = nil then Exit;
2158
2159 if ListNumberVisibleAction.Checked then
2160 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2161 else
2162 Item.Caption := Category.Title;
2163
2164 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2165 Item.Data := Category;
2166 end else if ActivListObj is TCategory then begin
2167 Category := TCategory(ActivListObj);
2168
2169 ListView.StateImages := nil;
2170
2171 if Category = nil then Exit;
2172 if Category.Count <= 0 then Exit;
2173 if Item = nil then Exit;
2174 if Item.Index >= Category.Count then Exit;
2175 if ListView.Items.Count = 0 then Exit;
2176
2177 if not (Category.Items[Item.Index] is TBoard) then Exit;
2178 Board := TBoard(Category.Items[Item.Index]);
2179
2180 if Board = nil then Exit;
2181
2182 if ListNumberVisibleAction.Checked then
2183 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2184 else
2185 Item.Caption := Board.Title;
2186
2187 if Item.SubItems.Count <> 2 then begin
2188 Item.SubItems.Clear;
2189 Item.SubItems.Add('');
2190 Item.SubItems.Add('');
2191 end;
2192
2193 Item.ImageIndex := ITEM_ICON_BOARD1;
2194
2195 if Board.Round then
2196 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2197 else
2198 Item.SubItems[0] := '';
2199
2200 if Board.RoundDate = ZERO_DATE then begin
2201 Item.SubItems[1] := '';
2202 end else
2203 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2204 Item.Data := Board;
2205 end else if ActivListObj is TBoard then begin
2206 Board := TBoard(ActivListObj);
2207
2208 if GikoSys.Setting.ListIconVisible then
2209 ListView.StateImages := StateIconImageList
2210 else
2211 ListView.StateImages := nil;
2212
2213 case GikoForm.ViewType of
2214 gvtAll: BoardCnt := Board.Count;
2215 gvtLog: BoardCnt := Board.GetLogThreadCount;
2216 gvtNew: BoardCnt := Board.GetNewThreadCount;
2217 gvtUser: BoardCnt := Board.GetUserThreadCount;
2218 else
2219 BoardCnt := 0;
2220 end;
2221
2222 // if Board = nil then Exit;
2223 if BoardCnt <= 0 then Exit;
2224 if Item = nil then Exit;
2225 if Item.Index > BoardCnt then Exit;
2226 if ListView.Items.Count = 0 then Exit;
2227
2228 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2229
2230 ThreadItem := nil;
2231 case GikoForm.ViewType of
2232 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2233 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2234 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2235 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2236 end;
2237
2238 if ThreadItem = nil then Exit;
2239
2240 // if ListNumberVisibleAction.Checked then
2241 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2242 // else
2243 RepStr := ThreadItem.Title;
2244 RepStr := CustomStringReplace(RepStr, '&lt;', '<' );
2245 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2246 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2247 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2248 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2249
2250 if Item.SubItems.Count <> 6 then begin
2251 Item.SubItems.Clear;
2252 Item.SubItems.Add('');
2253 Item.SubItems.Add('');
2254 Item.SubItems.Add('');
2255 Item.SubItems.Add('');
2256 Item.SubItems.Add('');
2257 Item.SubItems.Add('');
2258 end;
2259
2260 if ListNumberVisibleAction.Checked then
2261 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2262 else
2263 Item.Caption := RepStr;
2264
2265 case ThreadItem.AgeSage of
2266 gasNone: Item.StateIndex := -1;
2267 gasNew: Item.StateIndex := 0;
2268 gasAge: Item.StateIndex := 1;
2269 gasSage: Item.StateIndex := 2;
2270 end;
2271
2272 if ThreadItem.IsLogFile then begin
2273 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2274 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2275 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2276 if ThreadItem.NewResCount = 0 then
2277 Item.SubItems[2] := ''
2278 else
2279 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2280 Item.SubItems[3] := '';
2281 if ThreadItem.Round then
2282 Item.SubItems[4] := ThreadItem.RoundName
2283 else
2284 Item.SubItems[4] := '';
2285 if ThreadItem.RoundDate = ZERO_DATE then begin
2286 Item.SubItems[5] := '';
2287 end else
2288 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2289 if ThreadItem.NewArrival then
2290 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2291 end else begin
2292 Item.ImageIndex := ITEM_ICON_THREAD1;
2293 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2294 Item.SubItems[1] := '';
2295 Item.SubItems[2] := '';
2296 Item.SubItems[3] := '';
2297 Item.SubItems[4] := '';
2298 Item.SubItems[5] := '';
2299 end;
2300 Item.Data := ThreadItem;
2301 end;
2302 end;
2303
2304 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2305 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2306 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2307 var Index: Integer);
2308 begin
2309 //
2310 end;
2311
2312 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2313 EndIndex: Integer);
2314 begin
2315 //
2316 end;
2317
2318 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2319 EndIndex: Integer; OldState, NewState: TItemStates);
2320 begin
2321 //
2322 end;
2323
2324 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2325 var
2326 p: TPoint;
2327 s: string;
2328 tmp2: string;
2329 URL: string;
2330 ATitle: Boolean;
2331
2332 threadItem : TThreadItem;
2333 board : TBoard;
2334 Protocol, Host, Path, Document, Port, Bookmark: string;
2335
2336 //wkInt: Integer;
2337 wkIntSt: Integer;
2338 wkIntTo: Integer;
2339 ActiveFileName: string;
2340 e: IHTMLElement;
2341 Ext: string;
2342 buf: string;
2343 PathRec: TPathRec;
2344 begin
2345 try
2346 try
2347 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2348 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2349 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2350 end;
2351 except
2352 end;
2353 finally
2354 end;
2355 if PreviewTimer.Enabled then
2356 PreviewTimer.Enabled := False;
2357 Application.CancelHint;
2358 if GetActiveContent <> nil then
2359 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2360 else
2361 ActiveFileName := '';
2362
2363 StatusBar.Panels[1].Text := Text;
2364
2365 if FHint <> nil then begin
2366 FHint.ReleaseHandle;
2367 FHint.ClearAllRes;
2368 end;
2369 if FPreviewBrowser <> nil then
2370 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2371
2372 if not GikoSys.Setting.UnActivePopup then
2373 if not GikoForm.Active then
2374 Exit;
2375
2376 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2377 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2378
2379 s := '';
2380 Ext := AnsiLowerCase(ExtractFileExt(Text));
2381 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2382 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2383 if FPreviewBrowser = nil then begin
2384 FPreviewBrowser := TPreviewBrowser.Create(Self);
2385 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2386 TOleControl(FPreviewBrowser).Parent := nil;
2387 end;
2388 FPreviewBrowser.Navigate('about:blank');//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2389 FPreviewURL := Text;
2390 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2391 PreviewTimer.Enabled := True;
2392 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2393 if Pos('mailto:', Text) = 1 then begin
2394 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2395 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2396 GetCursorPos(p);
2397 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2398 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2399 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2400 if (Assigned(e)) then begin
2401 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2402 if (GikoSys.IsNumeric(tmp2)) then begin
2403 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2404 wkIntSt := StrToInt(tmp2);
2405 wkIntTo := StrToInt(tmp2);
2406 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2407 FHint.PopupType := gptThread;
2408 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2409 end else begin
2410 FHint.PopupType := gptRaw;
2411 FHint.Caption := s;
2412 end;
2413 end;
2414 end else begin
2415 URL := Text;
2416
2417 if Pos('about:blank..', URL) = 1 then begin
2418 threadItem := GetActiveContent;
2419 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2420 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2421 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2422 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2423 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2424 else if( PathRec.FSt <> 0 ) then
2425 buf := IntToStr(PathRec.FSt);
2426 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2427 URL := threaditem.URL;
2428 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2429 end else begin
2430
2431 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2432 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2433 end;
2434 URL := URL + buf;
2435 end;
2436 PathRec := Gikosys.Parse2chURL2(URL);
2437 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2438 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2439
2440 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2441
2442 URL := GikoSys.GetBrowsableThreadURL( URL );
2443 wkIntSt := PathRec.FSt;
2444 wkIntTo := PathRec.FTo;
2445
2446 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2447 wkIntSt := 1;
2448 wkIntTo := 1;
2449 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2450 wkIntSt := wkIntTo;
2451 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2452 wkIntTo := wkIntSt;
2453 end else if wkIntSt > wkIntTo then begin
2454 //wkInt := wkIntTo;
2455 wkIntTo := wkIntSt;
2456 wkIntSt := wkIntTo;
2457 end;
2458 //if wkIntSt = 0 then
2459 // wkIntSt := 1;
2460 //if wkINtTo = 0 then
2461 // wkIntTo := 1;
2462 //if PathRec.FFirst then
2463 // wkIntSt := 1;
2464 if PathRec.FStBegin then
2465 wkIntSt := 1;
2466 if PathRec.FToEnd then
2467 wkIntTo := 9999;
2468
2469 ATitle := ActiveFileName <> PathRec.FKey;
2470
2471 threadItem := BBSsFindThreadFromURL( URL );
2472
2473 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2474 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2475 if board <> nil then
2476 threadItem := board.Find( PathRec.FKey + '.dat' );
2477
2478 end;
2479
2480 if threadItem <> nil then begin
2481 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2482 FHint.PopupType := gptThread;
2483 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2484 end;
2485 end;
2486 end;
2487
2488 //if s <> '' then
2489 // ShowTextPopup(s);
2490 if FHint.PopupType = gptRaw then begin
2491 if FHint.Caption <> '' then
2492 ShowTextPopup;
2493 end else begin
2494 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2495 ShowTextPopup;
2496 end;
2497 end;
2498 end;
2499
2500 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2501 const Text: WideString);
2502 var
2503 Title: string;
2504 begin
2505 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2506 Title := CAPTION_NAME
2507 else
2508 Title := CAPTION_NAME + ' - [' + Text + ']';
2509 Caption := Title;
2510 //Application.Title := Title;
2511 end;
2512
2513 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2514 var
2515 SysMenu: HMenu;
2516 //SysMenuApp: HMenu;
2517 begin
2518 FEnabledCloseButton := Enabled;
2519 SysMenu := GetSystemMenu(Handle, False);
2520 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2521
2522 if Enabled then begin
2523 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2524 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2525 end else begin
2526 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2527 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2528 end;
2529
2530 DrawMenuBar(Handle);
2531 //DrawMenuBar(Application.Handle);
2532 end;
2533
2534 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2535 var AllowChange: Boolean);
2536 begin
2537 if FTreeType = gtt2ch then
2538 FSortIndex := -1;
2539 end;
2540
2541 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2542 Shift: TShiftState);
2543 begin
2544 if Key = VK_BACK then begin
2545 // UpFolderButtonClick(Sender);
2546 end else if Key = VK_SPACE then begin
2547 // ListClick;
2548 end else if Key = VK_RETURN then begin
2549 ListDoubleClick;
2550 end;
2551 end;
2552
2553 function TGikoForm.GetHttpState: Boolean;
2554 begin
2555 Result := FHttpState;
2556 end;
2557
2558 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2559 Column: TListColumn);
2560 var
2561 i: Integer;
2562 wkBBS: TBBS;
2563 wkCategory: TCategory;
2564 wkBoard: TBoard;
2565 begin
2566 if FSortIndex = Column.Index then
2567 FSortOrder := not FSortOrder
2568 else
2569 FSortOrder := False;
2570
2571 for i := 0 to ListView.Columns.Count - 1 do
2572 ListView.Column[i].ImageIndex := -1;
2573 if FSortOrder then
2574 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2575 else
2576 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2577
2578 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2579
2580 //if TObject(TreeView.Selected.Data) is TBBS then begin
2581 if TObject( FActiveList ) is TBBS then begin
2582 //wkBBS := TBBS(TreeView.Selected.Data);
2583 wkBBS := TBBS( FActiveList );
2584 Sort.SortOrder := FSortOrder;
2585 Sort.SortIndex := Column.Index;
2586 wkBBS.Sort(CategorySortProc);
2587 ListView.Refresh;
2588 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2589 end else if TObject( FActiveList ) is TCategory then begin
2590 //wkCategory := TCategory(TreeView.Selected.Data);
2591 wkCategory := TCategory( FActiveList );
2592 Sort.SortOrder := FSortOrder;
2593 Sort.SortIndex := Column.Index;
2594 wkCategory.Sort(BoardSortProc);
2595 ListView.Refresh;
2596 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2597 end else if TObject( FActiveList ) is TBoard then begin
2598 //wkBoard := TBoard(TreeView.Selected.Data);
2599 wkBoard := TBoard( FActiveList );
2600 Sort.SortOrder := FSortOrder;
2601 Sort.SortIndex := Column.Index;
2602 wkBoard.Sort(ThreadItemSortProc);
2603 ListView.Refresh;
2604 end;
2605 FSortIndex := Column.Index;
2606 end;
2607
2608 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2609 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2610 var
2611 ARect: TRect;
2612 begin
2613 DefaultDraw := True;
2614 Exit;
2615 DefaultDraw := False;
2616 if (cdsSelected in State) or (cdsHot in State) then begin
2617 Sender.Canvas.Brush.Color := clHighlight;
2618 Sender.Canvas.Font.Color := clHighlightText;
2619 end else begin
2620 Sender.Canvas.Brush.Color := clBtnFace;
2621 Sender.Canvas.Font.Color := clBtnText;
2622 end;
2623 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2624 Sender.Canvas.FillRect(ARect);
2625 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2626 end;
2627
2628 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2629 var
2630 Nodes: TTreeNodes;
2631 i: integer;
2632 begin
2633 Nodes := TreeView.Items;
2634
2635 for i := 0 to Nodes.Count - 1 do begin
2636 if Nodes.Item[i].Data = Data then begin
2637 Result := Nodes.Item[i];
2638 Exit;
2639 end;
2640 end;
2641 Result := nil;
2642 end;
2643
2644 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2645 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2646 Headers: OleVariant; var Cancel: WordBool);
2647 var
2648 sNo: string;
2649 p: TPoint;
2650 const
2651 kMenuName: string = 'menu:';
2652 begin
2653
2654 if Pos(kMenuName, URL) <> 0 then begin
2655 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2656
2657 if not GikoSys.IsNumeric(sNo) then Exit;
2658
2659 Cancel := True;
2660 GetCursorpos(p);
2661 KokoPopupMenu.Tag := StrToInt(sNo);
2662 KokoPopupMenu.Popup(p.x, p.y);
2663 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2664 Cancel := not GikoSys.Setting.OpenMailer;
2665 end;
2666
2667 end;
2668
2669 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2670 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2671 var DefaultDraw: Boolean);
2672 var
2673 ThreadItem: TThreadItem;
2674 begin
2675 //
2676 // TListView(Sender).Canvas.Font.Style := [];
2677 if TObject(Item.Data) is TThreadItem then begin
2678 ThreadItem := TThreadItem(Item.Data);
2679 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2680 ListView.Canvas.Brush.Color := FOddColor;
2681 end else begin
2682 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2683 end;
2684 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2685 if ThreadItem.UnRead then
2686 TListView(Sender).Canvas.Font.Style := [fsBold];
2687 end;
2688 end;
2689
2690 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2691 begin
2692 if Application.Terminated then
2693 Exit;
2694 if PreviewTimer.Enabled then
2695 PreviewTimer.Enabled := False;
2696 //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2697 if FHint <> nil then begin
2698 FHint.ReleaseHandle;
2699 FHint.ClearAllRes;
2700 // FHint.Free;
2701 // FHint := nil;
2702 end;
2703 if FPreviewBrowser <> nil then
2704 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2705
2706 end;
2707
2708 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2709 const ARect: TRect; var DefaultDraw: Boolean);
2710 var
2711 NodeRect: TRect;
2712 i, j: Integer;
2713 IsBoardNode: Boolean;
2714 Cnt: Integer;
2715 CntText: string;
2716 TextWidth: Integer;
2717 TextRect: TRect;
2718 Board: TBoard;
2719 Category: TCategory;
2720 Bitmap: TBitmap;
2721 NodeWidth: Integer;
2722 begin
2723 DefaultDraw := True;
2724
2725 if FTreeType = gttHistory then Exit;
2726
2727 TreeView.Canvas.Font.Color := clBlue;
2728 IsBoardNode := False;
2729 for i := 0 to TreeView.Items.Count - 1 do begin
2730 Cnt := 0;
2731 if not TreeView.Items[i].IsVisible then
2732 continue;
2733
2734 if TObject(TreeView.Items[i].Data) is TCategory then begin
2735 if TreeView.Items[i].Expanded then
2736 continue;
2737
2738 IsBoardNode := False;
2739 Category := TCategory(TreeView.Items[i].Data);
2740 for j := 0 to Category.Count - 1 do begin
2741 Board := Category.Items[j];
2742 if Board <> nil then begin
2743 if Board.UnRead > 0 then begin
2744 Cnt := 1;
2745 Break;
2746 end;
2747 end;
2748 end;
2749 if Cnt <> 1 then
2750 continue;
2751 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2752 IsBoardNode := True;
2753 Board := TBoard(TreeView.Items[i].Data);
2754 Cnt := Board.UnRead;
2755 if Cnt <= 0 then
2756 continue;
2757 end else
2758 continue;
2759
2760 Bitmap := TBitmap.Create;
2761 try
2762 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2763 Bitmap.Canvas.Font.Style := [fsBold];
2764 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2765 finally
2766 Bitmap.Free;
2767 end;
2768
2769 NodeRect := TreeView.Items[i].DisplayRect(True);
2770
2771 if IsBoardNode then
2772 CntText := '(' + IntToStr(Cnt) + ')'
2773 else if Cnt = 1 then
2774 CntText := '(+)';
2775
2776
2777 TextWidth := TreeView.Canvas.TextWidth(CntText);
2778
2779 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2780 NodeRect.Top,
2781 NodeRect.Left + NodeWidth + TextWidth + 8,
2782 NodeRect.Bottom);
2783 DrawText(TreeView.Canvas.Handle,
2784 PChar(CntText),
2785 -1,
2786 TextRect,
2787 DT_SINGLELINE or DT_VCENTER);
2788 end;
2789 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2790 end;
2791
2792 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2793 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2794 var
2795 Board: TBoard;
2796 Category: TCategory;
2797 i: Integer;
2798 begin
2799 DefaultDraw := True;
2800
2801 if FTreeType = gttHistory then Exit;
2802
2803 TreeView.Canvas.Font.Style := [];
2804 if Node <> nil then begin
2805 if TObject(Node.Data) is TCategory then begin
2806 Category := TCategory(Node.Data);
2807 for i := 0 to Category.Count - 1 do begin
2808 Board := Category.Items[i];
2809 if Board <> nil then begin
2810 if Board.UnRead > 0 then begin
2811 TreeView.Canvas.Font.Style := [fsBold];
2812 Break;
2813 end;
2814 end;
2815 end;
2816 end else if TObject(Node.Data) is TBoard then begin
2817 Board := TBoard(Node.Data);
2818 if Board.UnRead > 0 then
2819 TreeView.Canvas.Font.Style := [fsBold];
2820 end;
2821 end;
2822 end;
2823
2824 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2825 begin
2826 TreeView.Invalidate;
2827
2828 if TObject(Node.Data) is TBBS then begin
2829 TBBS(Node.Data).NodeExpand := True;
2830 end else if TObject(Node.Data) is TCategory then begin
2831 TCategory(Node.Data).NodeExpand := True;
2832 end else if TObject(Node.Data) is TBoard then begin
2833 TBoard(Node.Data).NodeExpand := True;
2834 end;
2835 end;
2836
2837 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2838 begin
2839 TreeSplitter.Visible := PanelVisible;
2840 CabinetPanel.Visible := PanelVisible;
2841 CabinetToolButton.Down := PanelVisible;
2842 end;}
2843
2844 procedure TGikoForm.ListViewAllSelect;
2845 begin
2846 ListView.SetFocus;
2847 ListView.SelectAll;
2848 end;
2849
2850 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2851 var
2852 Board: TBoard;
2853 ThreadItem: TThreadItem;
2854 APoint: TPoint;
2855 HitTest: THitTests;
2856 begin
2857 GetCursorPos(APoint);
2858 APoint := TreeView.ScreenToClient(APoint);
2859 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2860 if not (htOnLabel in HitTest) then Exit;
2861 if TreeView.Selected = nil then Exit;
2862
2863 if FTreeType = gtt2ch then begin
2864 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2865 Board := TBoard(TreeView.Selected.Data);
2866 DownloadList(Board);
2867 end else if FTreeType = gttHistory then begin
2868 if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
2869 ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
2870 DownloadContent(ThreadItem);
2871 end;
2872 end;
2873
2874 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2875 begin
2876
2877 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2878
2879 end;
2880
2881 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2882 begin
2883 AddMessageList(Msg, nil, Icon);
2884 end;
2885
2886 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2887 var
2888 ATitle: string;
2889 s: string;
2890 begin
2891 try
2892 if Item.DownType = gdtBoard then
2893 ATitle := Item.Board.Title
2894 else
2895 ATitle := Item.ThreadItem.Title;
2896 if ATitle = '' then
2897 ATitle := '鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?';
2898
2899 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2900 //鐃緒申鐃緒申鐃?鐃緒申
2901 if Item.DownType = gdtBoard then begin
2902 //鐃緒申
2903 Item.SaveListFile;
2904 AddMessageList(ATitle + ' [鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申]', nil, gmiOK);
2905 if GetActiveList = Item.Board then
2906 SetActiveList(Item.Board);
2907 Item.Board.Modified := True;
2908 Item.Board.IsThreadDatRead := True;
2909 PlaySound('New');
2910