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.426 - (show annotations) (download) (as text)
Sun Sep 12 11:20:19 2004 UTC (19 years, 7 months ago) by h677
Branch: MAIN
Changes since 1.425: +0 -2 lines
File MIME type: text/x-pascal
StatusBarに使用しているNGワードの名前が出ない不具合の解消と
スレッド表示エリアのリサイズの修正

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