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.346 - (show annotations) (download) (as text)
Wed Jun 23 14:47:39 2004 UTC (19 years, 9 months ago) by h677
Branch: MAIN
CVS Tags: v1_48_0_510
Changes since 1.345: +6 -7 lines
File MIME type: text/x-pascal
browserpanelのリサイズでのスレッド表示の再描画命令をはずした

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