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.353 - (show annotations) (download) (as text)
Sun Jul 11 16:01:08 2004 UTC (19 years, 9 months ago) by genyakun
Branch: MAIN
Changes since 1.352: +10 -0 lines
File MIME type: text/x-pascal
タブ保存機能(未定)の下地を用意

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