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