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