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.464 - (show annotations) (download) (as text)
Mon Oct 18 15:43:21 2004 UTC (19 years, 6 months ago) by h677
Branch: MAIN
Changes since 1.463: +3 -2 lines
File MIME type: text/x-pascal
スレ一覧のカラムクリックでid=0(カテゴリ名、板名、スレ名)だけ、
クリック一回目で昇順になるようにした。

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