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.67 - (show annotations) (download) (as text)
Sun Sep 28 05:32:39 2003 UTC (20 years, 6 months ago) by yoffy
Branch: MAIN
Changes since 1.66: +23 -10 lines
File MIME type: text/x-pascal
・常にポップアップしても問題無さそうなので [スキンでもポップアップ] を廃止。
 常時ポップアップするようになった。
・オプションダイアログの最後に選択されたタブを覚えるようになった。
・最後に選択されたキャビネットを覚えるようになった。
・オプションダイアログでキャビネットのフォントに関する変更を行った際にお気に入りキャビネットには適用されていなかったので修正。

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