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.125 - (show annotations) (download) (as text)
Sat Nov 22 06:48:15 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.124: +4 -6 lines
File MIME type: text/x-pascal
・R1.124の処置を取り消し。

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