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