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.348 - (show annotations) (download) (as text)
Fri Jul 2 06:21:07 2004 UTC (19 years, 9 months ago) by genyakun
Branch: MAIN
Changes since 1.347: +42 -19 lines
File MIME type: text/x-pascal
ローカルルール取得下地&アイコン作成

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