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.368 - (show annotations) (download) (as text)
Mon Jul 12 14:48:24 2004 UTC (19 years, 9 months ago) by genyakun
Branch: MAIN
Changes since 1.367: +0 -2 lines
File MIME type: text/x-pascal
Tabをファイル名を指定して保存を削除(Open,SaveDialog削除されていなかったので修正)

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