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