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.342 - (show annotations) (download) (as text)
Sat Jun 19 15:15:33 2004 UTC (19 years, 10 months ago) by h677
Branch: MAIN
Changes since 1.341: +3 -2 lines
File MIME type: text/x-pascal
スレ一覧のポップアップメニューに選択スレのHTML化保存を追加

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