⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkingloginstatecomponent.js

📁 Bindows 1.01 完全版 Bindows 框架提供给你: 基于类的面向对象 API; 一个完整的窗口系统
💻 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 + -