?? checkingloginstatecomponent.js
字號:
function CheckingLoginStateComponent(oStringBundle, oRegService) { BiComponent.call(this); this.stringBundle = oStringBundle; this.messageLabel = new BiLabel; this.progressBar = new BiUndeterminedProgressBar(); this.regService = oRegService; this.updateStrings(); this.messageLabel.setLeft(10); this.messageLabel.setRight(10); this.progressBar.setLeft(10); this.progressBar.setRight(10); this.add(this.messageLabel); this.add(this.progressBar); this.stringBundle.addEventListener("change", this.updateStrings, this); this.regService.addEventListener("isloggedin", this.onIsLoggedIn, this); this.regService.addEventListener("isloggedinerror", this.onIsLoggedIn, this);}var _p = CheckingLoginStateComponent.prototype = new BiComponent;_p._className = "CheckingLoginStateComponent";_p._isLoggedIn = false;_p.layoutAllChildrenY = function () { var mh = this.messageLabel.getHeight(); var ph = this.progressBar.getHeight(); var h = this.getHeight(); this.messageLabel.setTop( (h - mh - ph - 5) / 2 ); this.progressBar.setTop( (h - mh - ph - 5) / 2 + mh + 5 ); BiComponent.prototype.layoutAllChildrenY.call(this);};_p.layoutAllChildren = function () { this.layoutAllChildrenY(); this.layoutAllChildrenX();}_p.check = function () { this.regService.isLoggedIn(); this.progressBar.start();};_p.getIsLoggedIn = function () { return this._isLoggedIn;};_p.updateStrings = function (e) { this.messageLabel.setText( this.stringBundle.getString("checkingForIsLoggedIn") );};_p.onIsLoggedIn = function (e) { this.progressBar.stop(); if (e.result.error || e.result.value != true) this.dispatchEvent( new BiEvent("notloggedin") ); else this.dispatchEvent( new BiEvent("loggedin") );};_p.dispose = function () { if (this.getDisposed()) return; this.stringBundle = null; this.regservice = null; BiComponent.prototype.dispose.call(this);};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -