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.373 - (show annotations) (download) (as text)
Sat Jul 31 08:20:34 2004 UTC (19 years, 8 months ago) by genyakun
Branch: MAIN
Changes since 1.372: +7 -9 lines
File MIME type: text/x-pascal
AV出ないように工夫(起動時自動オープンは不明なのでコメントアウト)

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