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.382 - (show annotations) (download) (as text)
Thu Aug 5 03:34:37 2004 UTC (19 years, 8 months ago) by genyakun
Branch: MAIN
Changes since 1.381: +7 -4 lines
File MIME type: text/x-pascal
Tab自動ロード機能の封印を解除。(FormShowに移動)

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