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.365 - (show annotations) (download) (as text)
Mon Jul 12 13:29:38 2004 UTC (19 years, 9 months ago) by h677
Branch: MAIN
Changes since 1.364: +105 -105 lines
File MIME type: text/x-pascal
タブの順番の保存・復元をActionとして登録しなおし&メモリリークの解消

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