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.89 - (show annotations) (download) (as text)
Sun Oct 5 10:17:16 2003 UTC (20 years, 6 months ago) by h677
Branch: MAIN
Changes since 1.88: +15 -3 lines
File MIME type: text/x-pascal
WebTab、ホD&D、ホトエター

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