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.7 - (show annotations) (download) (as text)
Mon Jun 27 20:46:40 2005 UTC (18 years, 9 months ago) by h677
Branch: Bb50
CVS Tags: v1_50_0_590
Changes since 1.515.2.6: +10 -2 lines
File MIME type: text/x-pascal
板一覧の選択を解除するActionを追加

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