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.515.2.30 - (show annotations) (download) (as text)
Sat Oct 1 22:56:20 2005 UTC (18 years, 6 months ago) by genyakun
Branch: Bb50
Changes since 1.515.2.29: +14 -4 lines
File MIME type: text/x-pascal
履歴関連のメッセージ修正、ヘルプにギコナビFAQを追加、新bbsmenuのURL変更に対応

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