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.388 - (show annotations) (download) (as text)
Tue Aug 10 12:49:48 2004 UTC (19 years, 8 months ago) by h677
Branch: MAIN
Changes since 1.387: +20 -7 lines
File MIME type: text/x-pascal
NGワード編集とHead.txtのアイコン登録

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