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 - (show annotations) (download) (as text)
Sat Jun 25 13:02:29 2005 UTC (18 years, 9 months ago) by h677
Branch: MAIN
CVS Tags: root-of-Bb50
Branch point for: Bb50
Changes since 1.514: +36 -28 lines
File MIME type: text/x-pascal
板更新時の不具合修正

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