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.436 - (show annotations) (download) (as text)
Sat Sep 18 03:08:14 2004 UTC (19 years, 7 months ago) by h677
Branch: MAIN
Changes since 1.435: +33 -7 lines
File MIME type: text/x-pascal
チャットちゃんえる系でレスポップアップできるように修正。
新着に移動するときにListViewをRefreshするようにした。

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