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.21 - (show annotations) (download) (as text)
Sat Jul 9 05:28:35 2005 UTC (18 years, 9 months ago) by h677
Branch: Bb50
CVS Tags: v1_50_0_595
Changes since 1.515.2.20: +7 -11 lines
File MIME type: text/x-pascal
マウスジェスチャーのコンテキスト上とかでの動作の修正

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