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.511.2.24 - (show annotations) (download) (as text)
Thu Jun 23 21:27:44 2005 UTC (18 years, 9 months ago) by h677
Branch: remodeling
CVS Tags: v1_50_0_587, v1_50_0_588
Changes since 1.511.2.23: +56 -46 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.MaxRecordCount);
1348
1349 EnabledCloseButton := True;
1350
1351 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1352 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1353
1354 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1355 AnimePanel.Top := 0;
1356 AnimePanel.Left := 0;
1357
1358 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1359
1360 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1361 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1362
1363 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1364 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1365 MsgBarVisibleActionExecute(nil);
1366 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1367
1368 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1369 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1370 StatusBarVisibleActionExecute(nil);
1371
1372 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1373 TreeView.Items.BeginUpdate;
1374 FavoriteTreeView.Items.BeginUpdate;
1375 ListView.Items.BeginUpdate;
1376 try
1377 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1378 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1379 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1380 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1381 FavoriteTreeView.Font.Assign(TreeView.Font);
1382 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1383
1384 ListView.Font.Name := GikoSys.Setting.ListFontName;
1385 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1386 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1387 ListView.Font.Style := [];
1388 if GikoSys.Setting.ListFontBold then
1389 ListView.Font.Style := [fsbold];
1390 if GikoSys.Setting.ListFontItalic then
1391 ListView.Font.Style := ListView.Font.Style + [fsitalic];
1392
1393 ListViewBackGroundColor := clWhite; // 鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1394 ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1395 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1396 FOddColor := GikoSys.Setting.OddColor;
1397
1398 finally
1399 TreeView.Items.EndUpdate;
1400 FavoriteTreeView.Items.EndUpdate;
1401 ListView.Items.EndUpdate;
1402 end;
1403 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1404 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1405
1406 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1407 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1408 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1409 BrowserTab.Font.Style := [];
1410 if GikoSys.Setting.BrowserTabFontBold then
1411 BrowserTab.Font.Style := [fsBold];
1412 if GikoSys.Setting.BrowserTabFontItalic then
1413 BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1414 FDragWFirst := false;
1415 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1416
1417 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1418 ProgressBar.Parent := StatusBar;
1419 ProgressBar.Top := 2;
1420 ProgressBar.Left := 0;
1421 ProgressBar.Width := StatusBar.Panels[0].Width;
1422 ProgressBar.Height := StatusBar.Height - 2;
1423 ProgressBar.Position := 0;
1424
1425 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1426 InitializeBoardPlugIns;
1427
1428 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1429 GikoSys.ListBoardFile;
1430
1431 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1432 SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
1433
1434 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1435 for i := Length(BBSs) - 1 downto 0 do begin
1436 if not BBSs[i].IsBoardFileRead then
1437 GikoSys.ReadBoardFile(BBSs[i]);
1438
1439 if SplashWindow <> nil then begin
1440 SplashWindow.ProgressBar.StepBy(20);
1441 SplashWindow.Update;
1442 end;
1443 end;
1444 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1445 RoundList := TRoundList.Create;
1446 RoundList.LoadRoundBoardFile;
1447 RoundList.LoadRoundThreadFile;
1448
1449 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1450 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1451 Style := Style or TVS_NOTOOLTIPS;
1452 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1453
1454 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1455 TreeView.Align := alClient;
1456 FavoriteTreeView.Align := alClient;
1457 FavoriteTreeView.Visible := False;
1458
1459 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1460 SetBBSMenu;
1461
1462 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1463 wp.length := sizeof(wp);
1464 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1465 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1466 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1467 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1468 wp.showCmd := SW_HIDE;
1469 SetWindowPlacement(Handle, @wp);
1470 //Self.Update;
1471
1472 if GikoSys.Setting.WindowMax then
1473 WindowState := wsMaximized;
1474
1475 //鐃?鐃?鐃?鐃?鐃緒申
1476 try
1477 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1478 if FileExists(FileName) then
1479 Animate.FileName := FileName;
1480 except
1481 end;
1482
1483 //鐃?鐃?鐃?鐃?
1484 FNameCookie := '';
1485 FMailCookie := '';
1486
1487 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1488 AllItemAction.Checked := True;
1489 AllResAction.Checked := True;
1490
1491 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1492 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1493 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1494
1495
1496 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1497 FHistoryList := TList.Create;
1498
1499 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1500 LoadHistory;
1501
1502 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1503 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1504 FavoriteDM.ReadFavorite;
1505
1506 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1507 ArrangeAction.Execute;
1508
1509 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1510 case GikoSys.Setting.ListWidthState of
1511 glsMax: begin
1512 ViewPanel.Width := 1;
1513 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1514 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1515 end;
1516 glsMin: begin
1517 ViewPanel.Width := GikoSys.Setting.ListWidth;
1518 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1519 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1520 end;
1521 else begin
1522 ViewPanel.Width := GikoSys.Setting.ListWidth;
1523 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1524 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1525 end;
1526 end;
1527 end else begin
1528 case GikoSys.Setting.ListHeightState of
1529 glsMax: begin
1530 ViewPanel.Height := 1;
1531 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1532 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1533 end;
1534 glsMin: begin
1535 ViewPanel.Height := GikoSys.Setting.ListHeight;
1536 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1537 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1538 end;
1539 else begin
1540 ViewPanel.Height := GikoSys.Setting.ListHeight;
1541 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1542 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1543 end;
1544 end;
1545 end;
1546
1547 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1548 FControlThread := TThreadControl.Create(True);
1549 FControlThread.MaxThreadCount := 1;
1550 FControlThread.Resume;
1551 FControlThread.OnDownloadEnd := DownloadEnd;
1552 FControlThread.OnDownloadMsg := DownloadMsg;
1553 FControlThread.OnWork := Work;
1554 FControlThread.OnWorkBegin := WorkBegin;
1555 FControlThread.OnWorkEnd := WorkEnd;
1556 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1557
1558 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1559 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1560
1561 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1562 SetBrowserTabState;
1563
1564 BrowserBoardNameLabel.Caption := '';
1565 BrowserNameLabel.Caption := '';
1566 FWorkCount := 0;
1567
1568 FTabHintIndex := -1;
1569
1570 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1571 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1572 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1573
1574 MakeDefaultINIFile();
1575 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1576 ReadToolBarSetting(ActionList, StdToolBar);
1577 ReadToolBarSetting(ActionList, ListToolBar);
1578 ReadToolBarSetting(ActionList, BrowserToolBar);
1579 SetToolBarPopup;
1580
1581
1582 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1583 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1584
1585 //鐃緒申鐃緒申鐃?鐃?鐃?
1586 SetLinkBar;
1587
1588 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1589 FResRangeMenuSelect := GikoSys.ResRange;
1590 case GikoSys.ResRange of
1591 Ord( grrAll ):
1592 begin
1593 AllResAction.Execute;
1594 end;
1595 Ord( grrSelect ):
1596 begin
1597 SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1598 SelectResAction.Checked := True;
1599 end;
1600 else
1601 // ResRangeAction.Execute;
1602 case FResRangeMenuSelect of
1603 Ord( grrKoko ): OnlyKokoResAction.Checked := True;
1604 Ord( grrNew ): OnlyNewResAction.Checked := True;
1605 100: OnlyAHundredResAction.Checked := True;
1606 end;
1607 end;
1608
1609 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1610 // ThreadRangeAction.Execute;
1611 case GikoSys.Setting.ThreadRange of
1612 gtrAll:
1613 begin
1614 AllItemAction.Checked := True;
1615 ViewType := gvtAll;
1616 end;
1617 gtrLog:
1618 begin
1619 LogItemAction.Checked := True;
1620 ViewType := gvtLog;
1621 end;
1622 gtrNew:
1623 begin
1624 NewItemAction.Checked := True;
1625 ViewType := gvtNew;
1626 end;
1627 end;
1628
1629
1630 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1631
1632 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1633 if not FileExists(GikoSys.GetBoardFileName) then begin
1634 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1635 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1636 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1637 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1638 NewBoardAction.Execute;
1639 end;
1640
1641 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1642 GikoSys.LoadKeySetting(ActionList);
1643
1644 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1645 // FLastRoundTime := 0;
1646
1647 //ResHint
1648 FHint := TResPopup.Create(Self);
1649
1650 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1651 CabinetVisible( False );
1652 if GikoSys.Setting.CabinetVisible then begin
1653 i := CabinetSelectPopupMenu.Items.Count - 1;
1654 if GikoSys.Setting.CabinetIndex = i - 1 then
1655 CabinetHistoryAction.Execute
1656 else if GikoSys.Setting.CabinetIndex = i then
1657 CabinetFavoriteAction.Execute
1658 else begin
1659 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1660 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1661 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1662 FIsIgnoreResize := rtResizing;
1663 CabinetBBSAction.Execute;
1664 end;
1665 end else begin
1666 ShowBBSTreeOld( BBSs[ 0 ] );
1667 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1668 end;
1669
1670
1671 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1672 for i := 1 to ParamCount do begin
1673 MoveToURL(ParamStr(i));
1674 end;
1675
1676 s := GikoSys.FAbon.NGwordname;
1677 StatusBar.Panels[2].Text := s;
1678 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1679 StatusBarResize(Sender);
1680
1681 dummy1.Caption := ItemReservPMenu.Caption;
1682 dummy1.Hint := ItemReservPMenu.Hint;
1683
1684 //Samba24鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
1685 GikoSys.SambaFileExists();
1686
1687 {$IFDEF SPAM_FILTER_ENABLED}
1688 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1689 GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1690 {$ENDIF}
1691
1692 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1693 MouseGesture := TMouseGesture.Create;
1694 GikoSys.Setting.Gestures.LoadGesture(
1695 GikoSys.Setting.GetGestureFileName, ActionList );
1696 MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
1697 MouseGesture.OnGestureStart := OnGestureStart;
1698 MouseGesture.OnGestureMove := OnGestureMove;
1699 MouseGesture.OnGestureEnd := OnGestureEnd;
1700 if GikoSys.Setting.GestureEnabled then
1701 MouseGesture.SetHook( Handle );
1702
1703 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1704 GikoSys.Setting.SetMessages;
1705
1706 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1707 if GikoSys.Setting.AutoLogin then
1708 LoginAction.Execute;
1709
1710 MuteAction.Checked := GikoSys.Setting.Mute;
1711
1712 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1713 // LockWindowUpdate(0);
1714 end;
1715
1716 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1717 procedure TGikoForm.SaveCoolBarSettings;
1718 begin
1719
1720 if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1721 Exit;
1722 SaveMainCoolBarSettings;
1723 SaveBoardCoolBarSettings;
1724 SaveBrowserCoolBarSettings;
1725
1726 end;
1727 procedure TGikoForm.SaveMainCoolBarSettings;
1728 var
1729 i : Integer;
1730 CoolSet : TCoolSet;
1731 begin
1732 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1733 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1734 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1735 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1736 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1737 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1738 end;
1739 end;
1740 procedure TGikoForm.SaveBoardCoolBarSettings;
1741 var
1742 i : Integer;
1743 CoolSet : TCoolSet;
1744 begin
1745 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1746 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1747 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1748 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1749 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1750 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1751 end;
1752 end;
1753 procedure TGikoForm.SaveBrowserCoolBarSettings;
1754 var
1755 i : Integer;
1756 CoolSet : TCoolSet;
1757 begin
1758 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1759 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1760 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1761 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1762 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1763 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1764 end;
1765 end;
1766 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1767 procedure TGikoForm.LoadCoolBarSettings;
1768 var
1769 i : Integer;
1770 CoolSet : TCoolSet;
1771 begin
1772
1773 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1774 MainCoolBar.Bands.BeginUpdate;
1775 try
1776 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1777 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1778 CoolSet := GikoSys.Setting.MainCoolSet[i];
1779 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1780 FIsIgnoreResize := rtNone;
1781 SaveCoolBarSettings;
1782 Exit;
1783 end;
1784 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1785 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1786 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1787 end;
1788 finally
1789 MainCoolBar.Bands.EndUpdate;
1790 end;
1791
1792 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1793 ListCoolBar.Bands.BeginUpdate;
1794 try
1795 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1796 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1797 CoolSet := GikoSys.Setting.ListCoolSet[i];
1798 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1799 FIsIgnoreResize := rtNone;
1800 SaveCoolBarSettings;
1801 Exit;
1802 end;
1803 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1804 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1805 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1806 end;
1807 finally
1808 ListCoolBar.Bands.EndUpdate;
1809 end;
1810
1811 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1812 BrowserCoolBar.Bands.BeginUpdate;
1813 try
1814 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1815 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1816 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1817 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1818 FIsIgnoreResize := rtNone;
1819 SaveCoolBarSettings;
1820 Exit;
1821 end;
1822 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1823 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1824 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1825 end;
1826 finally
1827 BrowserCoolBar.Bands.EndUpdate;
1828 end;
1829
1830 end;
1831
1832 //
1833 //
1834 //
1835 procedure TGikoForm.FormShow(Sender: TObject);
1836 var
1837 i :Integer;
1838 begin
1839 if FStartUp then begin
1840 ShowWindow(Application.Handle, SW_HIDE);
1841
1842
1843
1844 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1845 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1846 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1847 StdToolBarVisibleActionExecute( nil );
1848 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1849 AddressBarVisibleActionExecute( nil );
1850 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1851 LinkBarVisibleActionExecute( nil );
1852 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1853 ListToolBarVisibleActionExecute( nil );
1854 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1855 ListNameBarVisibleActionExecute( nil );
1856 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1857 BrowserToolBarVisibleActionExecute( nil );
1858 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1859 BrowserNameBarVisibleActionExecute( nil );
1860
1861 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1862 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1863 BrowserTabVisibleActionExecute(nil);
1864
1865 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1866 BrowserTabTopAction.Checked := True;
1867 BrowserTabTopActionExecute(nil);
1868 end else begin
1869 BrowserTabBottomAction.Checked := True;
1870 BrowserTabBottomActionExecute(nil);
1871 end;
1872
1873 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1874 BrowserTabTabStyleAction.Checked := True;
1875 BrowserTabTabStyleActionExecute(nil);
1876 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1877 BrowserTabButtonStyleAction.Checked := True;
1878 BrowserTabButtonStyleActionExecute(nil);
1879 end else begin
1880 BrowserTabFlatStyleAction.Checked := True;
1881 BrowserTabFlatStyleActionExecute(nil);
1882 end;
1883
1884 // ListView 鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?
1885 // ListView.FullDrag := True;
1886
1887 // CoolBar 鐃緒申鐃緒申
1888 LoadCoolBarSettings;
1889
1890 //ListToolBar鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申ComboBox鐃緒申鐃?鐃?
1891 try
1892 for i := ListToolBar.ControlCount - 1 downto 0 do
1893 begin
1894 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1895 begin
1896 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1897 if (i + 1) < ListToolBar.ControlCount then
1898 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1899 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1900 ListToolBar.Controls[ i + 1 ].Visible := False;
1901
1902
1903 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1904 ListToolBar.Controls[ i ].Visible := False;
1905 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1906 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1907 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1908 SelectComboBox.Parent := ListToolBar;
1909 SelectComboBox.Visible := True;
1910 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1911 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1912 SelectComboBoxSplitter.Visible := True;
1913 SelectComboBoxSplitter.Parent := ListToolBar;
1914 break;
1915 end;
1916 end;
1917 except
1918 end;
1919 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1920 ResetBandInfo( ListCoolBar, ListToolBar );
1921
1922 FIsIgnoreResize := rtNone;
1923
1924 //TabAutoLoad
1925 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1926 if GikoSys.Setting.TabAutoLoadSave then begin
1927 TabAutoLoadAction.Execute;
1928 end;
1929 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1930 if GikoSys.Setting.GengoSupport then begin
1931 //鐃?鐃緒申鐃?
1932 //Test鐃緒申鐃緒申
1933 end;
1934 FStartUp := false;
1935 end;
1936 end;
1937
1938 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1939 begin
1940 // if GikoForm.WindowState <> wsMinimized then
1941 // SaveCoolBarSettings;
1942 if ( GikoSys.Setting.ShowDialogForEnd ) and
1943 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1944 CanClose := false;
1945 Exit;
1946 end else begin
1947 CanClose := True;
1948 if GikoSys.Setting.TabAutoLoadSave then begin
1949 TabAutoSaveAction.Execute;
1950 end;
1951 end;
1952 { //2ch鐃緒申鐃緒申鐃緒申鐃緒申Free
1953 if GikoSys.Setting.Gengo <> nil then begin
1954 GikoSys.Setting.Gengo.Free;
1955 end;
1956 }
1957 //Application.HookMainWindow(Hook);
1958 Application.UnhookMainWindow(Hook);
1959 Application.Terminate;
1960 end;
1961
1962 procedure TGikoForm.FormDestroy(Sender: TObject);
1963 var
1964 i : Integer;
1965 // CoolSet: TCoolSet;
1966 wp : TWindowPlacement;
1967 tmpBool : Boolean;
1968 begin
1969 // Application.OnDeactivate := nil;
1970 // Self.OnDeactivate := nil;
1971 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1972 try
1973 MouseGesture.UnHook;
1974 except
1975 end;
1976 try
1977 ActiveListColumnSave;
1978 except
1979 end;
1980 try
1981 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1982 wp.length := sizeof(wp);
1983 GetWindowPlacement(Handle, @wp);
1984 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1985 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1986 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1987 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1988 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1989
1990 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1991 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1992 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1993 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1994 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1995 if ArrangeAction.Checked then
1996 GikoSys.Setting.ListOrientation := gloVertical
1997 else
1998 GikoSys.Setting.ListOrientation := gloHorizontal;
1999 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
2000 except
2001 end;
2002
2003 try
2004 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2005 if not GikoSys.Setting.ResRangeHold then
2006 GikoSys.Setting.ResRange := FResRangeMenuSelect;
2007 except
2008 end;
2009 if WindowState <> wsNormal then
2010 WindowState := wsNormal;
2011 SaveCoolBarSettings;
2012 try
2013 GikoSys.Setting.WriteWindowSettingFile;
2014 GikoSys.Setting.WriteNameMailSettingFile;
2015 except
2016 end;
2017 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
2018 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2019
2020 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
2021 // CoolBar 鐃緒申鐃緒申
2022 //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
2023
2024
2025 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2026 try
2027 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2028 FavoriteDM.WriteFavorite;
2029 FavoriteDM.Clear;
2030 except
2031 end;
2032 LockWindowUpdate(Self.Handle);
2033 try
2034 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2035 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2036 GikoSys.Setting.ShowDialogForAllTabClose := false;
2037 AllTabCloseAction.Execute;
2038 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2039 except
2040 end;
2041 try
2042 for i := FBrowsers.Count - 1 downto 0 do begin
2043 TWebBrowser(FBrowsers[i]).Free;
2044 end;
2045 FBrowsers.Clear;
2046 FBrowsers.Capacity := 0;
2047 finally
2048 FBrowsers.Free;
2049 end;
2050 try
2051 if BrowserNullTab <> nil then begin
2052 BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
2053 *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2054 *}
2055 BrowserNullTab.Free;
2056 end;
2057 except
2058 end;
2059
2060 try
2061 TreeView.Items.BeginUpdate;
2062 TreeView.Items.GetFirstNode.Free;
2063 TreeView.Items.Clear;
2064 TreeView.Items.EndUpdate;
2065 except
2066 end;
2067
2068 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2069 try
2070 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
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 //BBS鐃?鐃緒申
2225 try
2226 for i := Length( BBSs ) - 1 downto 0 do begin
2227 if BBSs[ i ] <> nil then
2228 BBSs[ i ].Free;
2229 BBSs[ i ] := nil;
2230 end;
2231 except
2232 end;
2233
2234 ActiveList := nil;
2235
2236 FTreeType := gttNone;
2237 //GikoSys.FBoardURLList.Clear;
2238 for i := Length(BoardGroups) - 1 downto 0 do begin
2239 BoardGroups[i].Clear;
2240 end;
2241 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2242
2243 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2244 SetBBSMenu;
2245
2246 ShowBBSTree( BBSs[ 0 ] );
2247
2248 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2249 SaveHistory;
2250 ClearHistory;
2251 LoadHistory;
2252
2253 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2254 FavoriteDM.WriteFavorite;
2255 FavoriteDM.Clear;
2256 FavoriteDM.ReadFavorite;
2257
2258 SetLinkBar;
2259
2260 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2261 for i := Length(BBSs) - 1 downto 0 do begin
2262 if not BBSs[i].IsBoardFileRead then
2263 GikoSys.ReadBoardFile(BBSs[i]);
2264 end;
2265
2266 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2267 try
2268 RoundList.SaveRoundFile;
2269 except
2270 end;
2271 try
2272 RoundList.Clear;
2273 except
2274 end;
2275 RoundList.LoadRoundBoardFile;
2276 RoundList.LoadRoundThreadFile;
2277
2278 //
2279 TabsOpenAction.Execute;
2280 end;
2281
2282 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2283 procedure TGikoForm.SetBoardTreeNode(
2284 inBBS : TBBS
2285 );
2286 var
2287 i, j, k: integer;
2288 Root: TTreeNode;
2289 CategoryNode: TTreeNode;
2290 BoardNode: TTreeNode;
2291 Category: TCategory;
2292 Board: TBoard;
2293 begin
2294 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2295 FActiveBBS := inBBS;
2296 TreeView.Items.BeginUpdate;
2297 TreeView.Items.Clear;
2298 try
2299 if not inBBS.IsBoardFileRead then
2300 GikoSys.ReadBoardFile( inBBS );
2301 try
2302 //if SplashWindow <> nil then
2303 //SplashWindow.ProgressBar.Max := inBBS.Count;
2304 // SplashWindow.ProgressBar.Max := inBBS.Count + Length(BBSs) * 20;
2305 except
2306 end;
2307
2308 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2309 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2310 Sort.SortOrder := true;
2311 Sort.SortIndex := 0;
2312 Sort.SortNoFlag := true;
2313 inBBS.Sort(CategorySortProc);
2314 end;
2315
2316 Root := TreeView.Items.Add( nil, inBBS.Title );
2317 Root.ImageIndex := ITEM_ICON_2CH1;
2318 Root.SelectedIndex := ITEM_ICON_2CH2;
2319 Root.Data := inBBS;
2320 for i := inBBS.Count - 1 downto 0 do begin
2321 Category := TCategory(inBBS.Items[i]);
2322 CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
2323 CategoryNode.Data := Category;
2324 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2325 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2326
2327 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2328 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2329 Sort.SortOrder := true;
2330 Sort.SortIndex := 0;
2331 Sort.SortNoFlag := true;
2332 Category.CustomSort(BoardSortProc);
2333 end;
2334
2335 for j := Category.Count - 1 downto 0 do begin
2336 Board := TBoard(Category.Items[j]);
2337 Board.BeginUpdate;
2338 BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
2339 BoardNode.Data := Board;
2340 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2341 if not Board.IsLogFile then begin
2342 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2343 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2344 end else begin
2345 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2346 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2347 for k := 0 to Board.Count - 1 do begin
2348 if Board.Items[ k ].IsLogFile then begin
2349 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2350 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2351
2352 Break;
2353 end;
2354 end;
2355 end;
2356 Board.EndUpdate;
2357 end;
2358
2359 CategoryNode.Expanded := Category.NodeExpand;
2360
2361 //if SplashWindow <> nil then begin
2362 // SplashWindow.ProgressBar.StepIt;
2363 //Application.ProcessMessages;
2364 // SplashWindow.Update;
2365 //end;
2366 end;
2367 finally
2368 TreeView.Items.EndUpdate;
2369 end;
2370 end;
2371
2372 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2373 var
2374 TitleColumn : TListColumn;
2375 ListColumn : TListColumn;
2376 i, id, idx : Integer;
2377 begin
2378 ListView.Items.BeginUpdate;
2379 try
2380 Screen.Cursor := crHourGlass;
2381
2382 ListView.Columns.Clear;
2383 TitleColumn := ListView.Columns.Add;
2384 TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
2385 TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
2386 idx := 0;
2387 for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
2388 if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
2389 TitleColumn.Tag := i;
2390 idx := i;
2391 end else begin
2392 id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
2393 if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
2394 (id <= Integer( High( TGikoBBSColumnID ) )) then begin
2395 ListColumn := ListView.Columns.Add;
2396 // ListColumn.Tag := id;
2397 ListColumn.Tag := i;
2398 ListColumn.Caption := GikoBBSColumnCaption[ id ];
2399 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
2400 end;
2401 end;
2402 end;
2403 TitleColumn.Index := idx;
2404
2405 ListView.Items.Count := 0;
2406 ListView.Items.Clear;
2407 ListView.Items.Count := ABBS2ch.Count;
2408
2409 // UpFolderAction.Enabled := False;
2410 // AllItemAction.Enabled := False;
2411 // LogItemAction.Enabled := False;
2412 // NewItemAction.Enabled := False;
2413 // SelectItemAction.Enabled := False;
2414 // ListDownloadToolButton.Enabled := False;
2415 // BoardReservToolButton.Enabled := False;
2416 // ListThreadDownloadToolButton.Enabled := False;
2417
2418 ListNameLabel.Caption := ABBS2ch.Title;
2419 FolderImage.Picture := nil;
2420 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2421
2422 FSortIndex := GikoSys.Setting.BBSSortIndex;
2423 FSortOrder := GikoSys.Setting.BBSSortOrder;
2424 for i := ListView.Columns.Count - 1 downto 0 do begin
2425 idx := ListView.Column[ i ].Tag;
2426 if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
2427 ListViewSort( nil, ListView.Column[ i ] );
2428 end;
2429
2430 Result := ABBS2ch.Count;
2431 finally
2432 Screen.Cursor := crDefault;
2433 ListView.Items.EndUpdate;
2434 end;
2435 end;
2436
2437 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2438 var
2439 TitleColumn : TListColumn;
2440 ListColumn : TListColumn;
2441 i, id, idx : Integer;
2442 begin
2443 ListView.Items.BeginUpdate;
2444 try
2445 Screen.Cursor := crHourGlass;
2446
2447 ListView.Columns.Clear;
2448 TitleColumn := ListView.Columns.Add;
2449 TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
2450 TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
2451 idx := 0;
2452 for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
2453 if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
2454 TitleColumn.Tag := i;
2455 idx := i;
2456 end else begin
2457 id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
2458 if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
2459 (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
2460 ListColumn := ListView.Columns.Add;
2461 // ListColumn.Tag := id;
2462 ListColumn.Tag := i;
2463 ListColumn.Caption := GikoCategoryColumnCaption[ id ];
2464 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
2465 end;
2466 end;
2467 end;
2468 TitleColumn.Index := idx;
2469
2470 ListView.Items.Count := 0;
2471 ListView.Items.Clear;
2472 ListView.Items.Count := Category.Count;
2473
2474 for i := Category.Count - 1 downto 0 do begin
2475 if( Category.Items[i].ParentCategory <> Category ) then begin
2476 Category.Items[i].ParentCategory := Category;
2477 Category.Items[i].No := i + 1;
2478 end;
2479 end;
2480 // UpFolderAction.Enabled := True;
2481 // AllItemAction.Enabled := False;
2482 // LogItemAction.Enabled := False;
2483 // NewItemAction.Enabled := False;
2484 // SelectItemAction.Enabled := False;
2485 // ListDownloadToolButton.Enabled := False;
2486 // BoardReservToolButton.Enabled := False;
2487 // ListThreadDownloadToolButton.Enabled := False;
2488
2489 ListNameLabel.Caption := Category.Title;
2490 FolderImage.Picture := nil;
2491 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2492
2493 FSortIndex := GikoSys.Setting.CategorySortIndex;
2494 FSortOrder := GikoSys.Setting.CategorySortOrder;
2495 for i := ListView.Columns.Count - 1 downto 0 do begin
2496 idx := ListView.Column[ i ].Tag;
2497 if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
2498 ListViewSort( nil, ListView.Column[ i ] );
2499 end;
2500
2501 Result := Category.Count;
2502 finally
2503 Screen.Cursor := crDefault;
2504 ListView.Items.EndUpdate;
2505 end;
2506 end;
2507
2508 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2509 var
2510 TitleColumn : TListColumn;
2511 ListColumn : TListColumn;
2512 i, id, idx : Integer;
2513 begin
2514 ListView.Items.BeginUpdate;
2515 try
2516 Screen.Cursor := crHourGlass;
2517
2518 {*
2519 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2520 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2521 if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
2522 *}
2523 begin
2524 ListView.Columns.Clear;
2525 TitleColumn := ListView.Columns.Add;
2526 TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
2527 TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
2528 idx := 0;
2529 for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2530 if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
2531 TitleColumn.Tag := i;
2532 idx := i;
2533 end else begin
2534 id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
2535 if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
2536 (id <= Integer( High( TGikoBoardColumnID ) )) then begin
2537 ListColumn := ListView.Columns.Add;
2538 ListColumn.Caption := GikoBoardColumnCaption[ id ];
2539 // ListColumn.Tag := id;
2540 ListColumn.Tag := i;
2541 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
2542 ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
2543 end;
2544 end;
2545 end;
2546 TitleColumn.Index := idx;
2547 end;
2548
2549 ListView.Items.Count := 0;
2550 ListView.Items.Clear;
2551
2552 {case GikoForm.ViewType of
2553 gvtAll: ListView.Items.Count := Board.Count;
2554 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2555 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2556 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2557 end;
2558 }
2559 case GikoForm.ViewType of
2560 gvtAll: ListView.Items.Count := Board.Count;
2561 gvtLog:
2562 begin
2563 Board.LogThreadCount := Board.GetLogThreadCount;
2564 ListView.Items.Count := Board.LogThreadCount;
2565 end;
2566 gvtNew:
2567 begin
2568 Board.NewThreadCount := Board.GetNewThreadCount;
2569 ListView.Items.Count := Board.NewThreadCount;
2570 end;
2571 gvtUser:
2572 begin
2573 Board.UserThreadCount:= Board.GetUserThreadCount;
2574 ListView.Items.Count := Board.UserThreadCount;
2575 end;
2576 end;
2577
2578 ListNameLabel.Caption := Board.Title;
2579 FolderImage.Picture := nil;
2580 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2581
2582 FSortIndex := GikoSys.Setting.BoardSortIndex;
2583 FSortOrder := GikoSys.Setting.BoardSortOrder;
2584 for i := ListView.Columns.Count - 1 downto 0 do begin
2585 idx := ListView.Column[ i ].Tag;
2586 if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
2587 ListViewSort( nil, ListView.Column[ i ] );
2588 end;
2589
2590 Result := Board.Count;
2591 finally
2592 Screen.Cursor := crDefault;
2593 ListView.Items.EndUpdate;
2594 end;
2595 end;
2596
2597 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2598 var
2599 // FileName: string;
2600 // DateTime: TDateTime;
2601 BoardCnt: Integer;
2602 BBS: TBBS;
2603 Category: TCategory;
2604 Board: TBoard;
2605 ThreadItem: TThreadItem;
2606 RepStr: string;
2607 ActivListObj : TObject;
2608 i, idx : Integer;
2609 begin
2610 ActivListObj := ActiveList;
2611 if ActivListObj is TBBS then begin
2612 //===== 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃? =====
2613 BBS := TBBS(ActivListObj);
2614
2615 ListView.StateImages := nil;
2616
2617 if (BBS = nil) or (BBS.Count <= 0) or (Item = nil)
2618 or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0)
2619 or (not (BBS.Items[Item.index] is TCategory)) then Exit;
2620 //if BBS.Count <= 0 then Exit;
2621 //if Item = nil then Exit;
2622 //if Item.Index >= BBS.Count then Exit;
2623 //if ListView.Items.Count = 0 then Exit;
2624
2625 //if not (BBS.Items[Item.index] is TCategory) then Exit;
2626 Category := TCategory(BBS.Items[Item.index]);
2627
2628 if Category = nil then Exit;
2629
2630 if ListNumberVisibleAction.Checked then
2631 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2632 else
2633 Item.Caption := Category.Title;
2634
2635 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2636 Item.Data := Category;
2637
2638 end else if ActivListObj is TCategory then begin
2639
2640 //===== 鐃緒申鐃緒申鐃?鐃? =====
2641 Category := TCategory(ActivListObj);
2642
2643 ListView.StateImages := nil;
2644
2645 if (Category = nil) or (Category.Count <= 0) or (Item = nil)
2646 or (Item.Index >= Category.Count) or (ListView.Items.Count = 0)
2647 or (not (Category.Items[Item.Index] is TBoard)) then Exit;
2648 //if Category.Count <= 0 then Exit;
2649 //if Item = nil then Exit;
2650 //if Item.Index >= Category.Count then Exit;
2651 //if ListView.Items.Count = 0 then Exit;
2652
2653 //if not (Category.Items[Item.Index] is TBoard) then Exit;
2654 Board := TBoard(Category.Items[Item.Index]);
2655
2656 if Board = nil then Exit;
2657
2658 if ListNumberVisibleAction.Checked then
2659 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2660 //Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title
2661 else
2662 Item.Caption := Board.Title;
2663
2664 if Item.SubItems.Count <> ListView.Columns.Count then begin
2665 Item.SubItems.Clear;
2666 Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count;
2667 for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
2668 Item.SubItems.Add('');
2669 end;
2670
2671 Item.ImageIndex := ITEM_ICON_BOARD1;
2672 idx := 0;
2673 for i := 0 to ListView.Columns.Count - 1 do begin
2674 if GikoSys.Setting.CategoryColumnOrder.Count <= i then
2675 Break;
2676 // case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
2677 case GikoSys.Setting.CategoryColumnOrder[ i ] of
2678 gccTitle:
2679 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2680 Dec( idx );
2681
2682 gccRoundName:
2683 if Board.Round then
2684 Item.SubItems[ idx ] := Board.RoundName // '鐃?鐃緒申'
2685 else
2686 Item.SubItems[ idx ] := '';
2687
2688 gccLastModified:
2689 if Board.RoundDate = ZERO_DATE then begin
2690 Item.SubItems[ idx ] := '';
2691 end else
2692 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2693 end;
2694 Inc( idx );
2695 end;
2696
2697 Item.Data := Board;
2698
2699 end else if ActivListObj is TBoard then begin
2700
2701 //===== 鐃?鐃緒申鐃緒申鐃?鐃? =====
2702 Board := TBoard(ActivListObj);
2703
2704 if GikoSys.Setting.ListIconVisible then
2705 ListView.StateImages := StateIconImageList
2706 else
2707 ListView.StateImages := nil;
2708
2709
2710 case GikoForm.ViewType of
2711 gvtAll: BoardCnt := Board.Count;
2712 gvtLog: BoardCnt := Board.LogThreadCount;
2713 gvtNew: BoardCnt := Board.NewThreadCount;
2714 gvtUser: BoardCnt := Board.UserThreadCount;
2715 else
2716 BoardCnt := 0;
2717 end;
2718 {
2719 case GikoForm.ViewType of
2720 gvtAll: BoardCnt := Board.Count;
2721 gvtLog: BoardCnt := Board.GetLogThreadCount;
2722 gvtNew: BoardCnt := Board.GetNewThreadCount;
2723 gvtUser: BoardCnt := Board.GetUserThreadCount;
2724 else
2725 BoardCnt := 0;
2726 end;
2727 }
2728 // if Board = nil then Exit;
2729 if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
2730 or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
2731
2732 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?/////////////////////////////////////////////////////
2733 ThreadItem := nil;
2734 case GikoForm.ViewType of
2735 gvtAll: if Item.Index >= Board.Count then Exit else
2736 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2737 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2738 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2739 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2740 end;
2741 //////////////////////////////////////////////////////////////////////////
2742
2743 if ThreadItem = nil then Exit;
2744
2745 RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );
2746 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2747 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2748 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2749 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2750 if Item.SubItems.Count <> ListView.Columns.Count then begin
2751 Item.SubItems.Clear;
2752 Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
2753 for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
2754 Item.SubItems.Add('');
2755 end;
2756
2757 if ListNumberVisibleAction.Checked then
2758 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2759 else
2760 Item.Caption := RepStr;
2761
2762 case ThreadItem.AgeSage of
2763 gasNone: Item.StateIndex := -1;
2764 gasNew: Item.StateIndex := 0;
2765 gasAge: Item.StateIndex := 1;
2766 gasSage: Item.StateIndex := 2;
2767 end;
2768
2769 if ThreadItem.IsLogFile then begin
2770 idx := 0;
2771 for i := 0 to ListView.Columns.Count - 1 do begin
2772 if GikoSys.Setting.BoardColumnOrder.Count <= i then
2773 Break;
2774 // case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2775 case GikoSys.Setting.BoardColumnOrder[ i ] of
2776 gbcTitle:
2777 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2778 Dec( idx );
2779
2780 gbcAllCount:
2781 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2782
2783 gbcLocalCount:
2784 Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
2785
2786 gbcNonAcqCount:
2787 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
2788
2789 gbcNewCount:
2790 if ThreadItem.NewResCount = 0 then
2791 Item.SubItems[ idx ] := ''
2792 else
2793 Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
2794
2795 gbcUnReadCount:
2796 Item.SubItems[ idx ] := '';
2797
2798 gbcRoundName:
2799 if ThreadItem.Round then
2800 Item.SubItems[ idx ] := ThreadItem.RoundName
2801 else
2802 Item.SubItems[ idx ] := '';
2803
2804 gbcRoundDate://gbcLastModified:
2805 if (ThreadItem.RoundDate = ZERO_DATE) then begin
2806 Item.SubItems[ idx ] := '';
2807 end else
2808 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2809
2810 gbcCreated:
2811 if ThreadItem.CreateDate = ZERO_DATE then begin
2812 Item.SubItems[ idx ] := '';
2813 end else
2814 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2815
2816 gbcLastModified:
2817 if (ThreadItem.LastModified = ZERO_DATE) then begin
2818 Item.SubItems[ idx ] := '';
2819 end else
2820 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
2821
2822
2823 end;
2824 Inc( idx );
2825 end;
2826
2827 if ThreadItem.NewArrival then
2828 Item.ImageIndex := ITEM_ICON_THREADNEW1
2829 else
2830 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2831
2832
2833 end else begin
2834 idx := 0;
2835 for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2836 // case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2837 case GikoSys.Setting.BoardColumnOrder[ i ] of
2838 gbcTitle:
2839 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2840 Dec( idx );
2841
2842 gbcAllCount:
2843 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2844
2845 gbcRoundDate://gbcLastModified:
2846 Item.SubItems[ idx ] := '';
2847
2848 gbcCreated:
2849 if ThreadItem.CreateDate = ZERO_DATE then begin
2850 Item.SubItems[ idx ] := '';
2851 end else
2852 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2853
2854 gbcLastModified:
2855 Item.SubItems[ idx ] := '';
2856
2857 else
2858 Item.SubItems[ idx ] := '';
2859 end;
2860 Inc( idx );
2861 end;
2862 if ThreadItem.NewArrival then
2863 Item.ImageIndex := ITEM_ICON_THREADNEW1
2864 else
2865 Item.ImageIndex := ITEM_ICON_THREAD1;
2866 end;
2867
2868 Item.Data := ThreadItem;
2869
2870 end;
2871 end;
2872
2873 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2874 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2875 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2876 var Index: Integer);
2877 begin
2878
2879 //
2880 end;
2881
2882 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2883 EndIndex: Integer);
2884 begin
2885 //
2886 end;
2887
2888 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2889 EndIndex: Integer; OldState, NewState: TItemStates);
2890 begin
2891 //
2892 end;
2893
2894 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2895 var
2896 p: TPoint;
2897 s: string;
2898 tmp2: string;
2899 URL: string;
2900 ATitle: Boolean;
2901
2902 threadItem : TThreadItem;
2903 board : TBoard;
2904 Protocol, Host, Path, Document, Port, Bookmark: string;
2905
2906 wkInt: Integer;
2907 wkIntSt: Integer;
2908 wkIntTo: Integer;
2909 ActiveFileName: string;
2910 e: IHTMLElement;
2911 Ext: string;
2912 // buf, buf2: string;
2913 PathRec: TPathRec;
2914 begin
2915 if not( TObject(Sender) is TWebBrowser )then
2916 Exit;
2917 try
2918 try
2919 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2920 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2921 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2922 end;
2923 end;
2924 except
2925 end;
2926 finally
2927 end;
2928 if PreviewTimer.Enabled then
2929 PreviewTimer.Enabled := False;
2930 Application.CancelHint;
2931 try
2932 if GetActiveContent <> nil then
2933 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2934 else