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