Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Giko.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.515.2.16 - (show annotations) (download) (as text)
Tue Jul 5 16:56:27 2005 UTC (18 years, 9 months ago) by h677
Branch: Bb50
Changes since 1.515.2.15: +74 -184 lines
File MIME type: text/x-pascal
ActionListのUpdateの関数を同じ条件のものをまとめた。

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