📄 application.js
字号:
return false;else if(typeof obj.object.getLoaded=="function")
return obj.object.getLoaded();else return true;};_p._removeListeners=function(obj)
{if(obj instanceof BiScriptLoaderQueue)
{obj.removeEventListener("load",this.load,this);obj.removeEventListener("progress",this._onprogress,this);obj.removeEventListener("error",this._onerror,this);}
else if(obj.object!=null&&obj.object instanceof BiEventTarget)
{obj.object.removeEventListener("load",this.load,this);obj.object.removeEventListener("error",this._onerror,this);}};_p.abort=function()
{var items=this._resources;var l=items.length;for(var i=0;i<l;i++)
{if(items[i]instanceof BiScriptLoaderQueue)
items[i].abort()
else if(items[i].object&&typeof items[i].object.abort=="function")
items[i].object.abort();}};_p.getLoaded=function()
{return this._lastLoaded==this._resources.length-1;};_p.getLoadedCount=function()
{var n=0;var items=this._resources;var l=items.length;for(var i=0;i<l;i++)
{if(items[i]instanceof BiScriptLoaderQueue)
n+=items[i].getLoadedCount();else if(this._isLoaded(items[i]))
n++;}
return n;};BiResourceLoader.prototype.getCount=function(){return this._count;};_p.dispose=function()
{if(this._disposed)return;BiEventTarget.prototype.dispose.call(this);var item;for(var i=this._resources.length-1;i>=0;i--)
{item=this._resources[i];if(item instanceof BiScriptLoaderQueue)
item.dispose();else if(item.object&&typeof item.object.dispose=="function")
item.object.dispose();item.object=null;item.uri=null;item.constr=null;}
this._resources=null;this._resourcesId=null;};_p._onprogress=function()
{if(this._loaded)return;this.dispatchEvent(new BiEvent("progress"));};_p._onerror=function(e)
{var t=e.getTarget();throw new Error("Error loading "+t+"\nURI: "+t.getUri());};_p._onAllLoaded=function()
{if(this._loaded)return;this._loaded=true;this._onprogress();this.dispatchEvent(new BiEvent("load"));this._duplicateScripts={};};function BiStringBundle(){if(_biInPrototype)return;BiEventTarget.call(this);this._bundles={};this._language=this._lastUserLang=this.getUserLanguage();this._majorLanguage=this.getMajorLanguage();}
_p=_biExtend(BiStringBundle,BiEventTarget,"BiStringBundle");BiStringBundle.formatString=function(sPattern,args)
{var _args=arguments;return sPattern.replace(/\%(\d+)/g,function(s,n)
{return _args[n];});};_p.setLanguage=function(s){if(s!=this._language){this._language=s;this._majorLanguage=null;this.dispatchEvent(new BiEvent("change"));}};_p.getLanguage=function(){return this._language;}
_p.getLanguages=function()
{var res=[];for(var s in this._bundles)
res.push(s);return res;};_p.getStringKeys=function(sLanguage)
{var b=this.getBundleForLanguage(sLanguage);var res=[];for(var key in b)
res.push(key);return res;};_p.getMajorLanguage=function(){if(this._majorLanguage!=null)
return this._majorLanguage;return this._majorLanguage=this._language.split("-")[0];};_p.getString=function(sStringId,sLanguage)
{return this._getString(sLanguage,sStringId);};_p.getFormattedString=function(sStringId,args)
{var _args=[];_args[0]=this._getString(null,sStringId);for(var i=1;i<arguments.length;i++)
_args[i]=arguments[i];return BiStringBundle.formatString.apply(BiStringBundle,_args);};_p.addBundle=function(sLanguage,oStringMap){this._bundles[sLanguage]=oStringMap;if(sLanguage==this._language)
this.dispatchEvent(new BiEvent("change"));};_p.appendBundle=function(sLanguage,oStringMap)
{if(sLanguage in this._bundles)
{var o=this._bundles[sLanguage];for(var key in oStringMap)
o[key]=oStringMap[key];}
else this._bundles[sLanguage]=oStringMap;};_p.removeBundle=function(sLanguage){delete this._bundles[sLanguage];};_p.getUserLanguage=function(){return navigator.userLanguage||navigator.language;};_p.getBundleForLanguage=function(sLanguage)
{if(sLanguage)
{if(sLanguage in this._bundles)
return this._bundles[sLanguage];var p0=sLanguage.split("-")[0];if(p0 in this._bundles)
return this._bundles[p0];}
if(this.getLanguage()in this._bundles)
return this._bundles[this.getLanguage()];if(this.getMajorLanguage()in this._bundles)
return this._bundles[this.getMajorLanguage()];if("en"in this._bundles)
return this._bundles.en;return{};};_p._getString=function(sLang,sKey)
{var bs=this._bundles;if(sLang)
{if(sLang in bs&&sKey in bs[sLang])
return bs[sLang][sKey];var p0=sLang.split("-")[0];if(p0 in bs&&sKey in bs[p0])
return bs[p0][sKey];}
var l;if((l=this.getLanguage())in bs&&sKey in bs[l])
return bs[l][sKey];if((l=this.getMajorLanguage())in bs&&sKey in bs)
return bs[l][sKey];if("en"in bs&&sKey in bs.en)
return bs.en[sKey];return null;};_p.getBundles=function(){var res=[];for(var s in this._bundles)
res.push(this._bundles[s]);return res;};_p.dispose=function(){if(this.getDisposed())return;this._bundles=null
BiEventTarget.prototype.dispose.call(this);};BiStringBundle._stringBundleMacro=function(p,fOnChange)
{if(fOnChange)
{p.setStringBundle=function(sb)
{if(this._stringBundle!=sb)
{if(sb&&!this._stringBundle)
application.getStringBundle().removeEventListener("change",fOnChange,this);if(this._stringBundle)
this._stringBundle.removeEventListener("change",fOnChange,this);this._stringBundle=sb;if(this._stringBundle)
this._stringBundle.addEventListener("change",fOnChange,this);fOnChange.call(this);}};}
else {p.setStringBundle=function(sb)
{this._stringBundle=sb;};}
p._getString=function(s)
{var sb=this._stringBundle||application.getStringBundle();return sb.getFormattedString.apply(sb,arguments);};};function LoadingStatus()
{this._element=document.createElement("DIV");this._element.className="bi-loading-status";this._htmlElement=document.createElement("DIV");this._htmlElement.className="bi-loading-status-html";this._element.appendChild(this._htmlElement);this._textElement=document.createElement("DIV");this._textElement.className="bi-loading-status-text";this._element.appendChild(this._textElement);this._pbElement=document.createElement("DIV");this._pbElement.className="bi-loading-status-progress-bar";this._element.appendChild(this._pbElement);this._fillElement=document.createElement("DIV");this._pbElement.appendChild(this._fillElement);document.body.appendChild(this._element);var oThis=this;this._onresize=function(){oThis.fixSize();};if(BiBrowserCheck.ie)
window.attachEvent("onresize",this._onresize);else window.addEventListener("resize",this._onresize,false);this.fixSize();this.setHtmlText(LoadingStatus._defaultHtml);}
_p=LoadingStatus.prototype;_p.dispose=function(nValue)
{if(this._disposed)return;if(BiBrowserCheck.ie)
window.detachEvent("onresize",this._onresize);else window.removeEventListener("resize",this._onresize,false);this._element.style.filter="none";if(document.body&&!(application&&application._disposed))
document.body.removeChild(this._element);this._element=this._htmlElement=this._pbElement=this._textElement=this._fillElement=this._onresize=null;this._disposed=true;};_p.setValue=function(nValue)
{this._fillElement.style.width=(nValue==null?"10":nValue)+"%";};_p.setText=function(s)
{while(this._textElement.hasChildNodes())
this._textElement.removeChild(this._textElement.lastChild);this._textElement.appendChild(document.createTextNode(s));};_p.fixSize=function()
{this._element.style.left=Math.max(0,(document.body.clientWidth-this._element.offsetWidth)/2)+"px";this._element.style.top=Math.max(0,(document.body.clientHeight-this._element.offsetHeight)/2)+"px";};_p.setHtmlText=function(sHtml,sStyle)
{if(typeof application!="undefined")
{sHtml=sHtml.replace("%VERSION%",application.getVersion());}
this._htmlElement.innerHTML=sHtml;if(sStyle)
this._htmlElement.style.cssText=sStyle;};_p.setStyle=function(sStyle)
{if(!/visibility/i.test(sStyle)&&this._element.style.visibility!="")
{sStyle="visibility:"+this._element.style.visibility+";"+sStyle;}
this._element.style.cssText=sStyle;this.fixSize();};_p.setStatusTextStyle=function(sStyle)
{if(sStyle)
this._textElement.style.cssText=sStyle;};_p.setProgressBarStyle=function(sStyle)
{if(sStyle)
this._pbElement.style.cssText=sStyle;};_p.setVisible=function(b)
{this._element.style.visibility=b?"visible":"hidden";};LoadingStatus._defaultHtml='<div style="position:absolute;top: 5px;left:10px;width:280px;"><h1 style="font-size:350%;margin:0;">Bindows™'+'<span style="position:relative;left:-2.7em;color:red;font-size:28%;font-weight:bold;white-space:nowrap;">Evaluation Version</span></h1>'+'<p style="font-size:80%;margin:5px 0;">Bindows™ belongs to MB Technologies (Georgia, USA). All rights reserved. You are not allowed to copy or modify this code. Commercial use requires license.</p></div>'+'<div style="position:absolute;bottom:5px;left:10px">Version %VERSION%</div>'+'<div style="position:absolute;bottom:5px;right:10px">© 2003-2005 MB Technologies Inc.</div>';function BiSet()
{if(_biInPrototype)return;this._items={};}
_p=_biExtend(BiSet,BiObject,"BiSet");_p.add=function(o)
{this._items[BiObject.toHashCode(o)]=o;};_p.remove=function(o)
{delete this._items[BiObject.toHashCode(o)];};_p.contains=function(o)
{return BiObject.toHashCode(o)in this._items;};_p.clear=function()
{this._items={};};_p.toArray=function()
{var res=[];for(var hc in this._items)
{res.push(this._items[hc]);}
return res;};_p.dispose=function()
{if(this._disposed)return;BiObject.prototype.dispose.call(this);this._items=null;};function BiThemeManager()
{if(_biInPrototype)return;if(BiThemeManager._singleton)
return BiThemeManager._singleton;BiEventTarget.call(this);this._allSet=new BiSet;this._hoverSet=new BiSet;this._activeSet=new BiSet;this._stateHash={};this._themes={};return BiThemeManager._singleton=this;}
_p=_biExtend(BiThemeManager,BiEventTarget,"BiThemeManager");_p.setClassAppearance=function(fClass,sName,bManual)
{this.setAppearance(fClass.prototype,sName,bManual);};_p.setAppearance=function(oComp,sName,bManual)
{var t=this.getDefaultTheme();oComp._themeAppearance=sName;if(bManual!=null)
oComp._themeManualInteractivity=Boolean(bManual);};_p.addAppearanceListeners=function(oComp)
{var app=oComp.getAppearance();var states=this.getAppearanceStates(app);this._addAppearanceListeners(oComp,states)}
_p._addAppearanceListeners=function(oComp,oStates)
{if(Object.isEmpty(oStates)||oComp._themeManualInteractivity)
return;var win=application.getWindow();if(!win)
return;var hash=oStates;if("hover"in hash)
{oComp.addEventListener("mouseover",this._handleMouseOver,this);oComp.addEventListener("mouseout",this._handleMouseOut,this);}
if("active"in hash)
{oComp.addEventListener("mousedown",this._handleMouseDown,this);}
if("focus"in hash)
{oComp.addEventListener("focusin",this._handleFocusIn,this);oComp.addEventListener("focusout",this._handleFocusOut,this);}
if("checked"in hash)
{oComp.addEventListener("change",this._handleChange,this);}
if("disabled"in hash)
{oComp.addEventListener("enabledchanged",this._handleEnabledChanged,this);}};_p.removeAppearanceListeners=function(oComp)
{var app=oComp.getAppearance();var states=this.getAppearanceStates(app);this._removeAppearanceListeners(oComp,states)}
_p._removeAppearanceListeners=function(oComp,oStates)
{if(Object.isEmpty(oStates)||oComp._themeManualInteractivity)
return;var win=application.getWindow();if(!win)
return;var hash=oStates;if("hover"in hash)
{oComp.removeEventListener("mouseover",this._handleMouseOver,this);oComp.removeEventListener("mouseout",this._handleMouseOut,this);}
if("active"in hash)
{oComp.removeEventListener("mousedown",this._handleMouseDown,this);if(this._addedMouseUpListeners)
{win.removeEventListener("mouseup",this._handleMouseUp,this);this._addedMouseUpListeners=false;}}
if("focus"in hash)
{oComp.removeEventListener("focusin",this._handleFocusIn,this);oComp.removeEventListener("focusout",this._handleFocusOut,this);}
if("checked"in hash)
{oComp.removeEventListener("change",this._handleChange,this);}
if("disabled"in hash)
{oComp.removeEventListener("enabledchanged",this._handleEnabledChanged,this);}};_p.addAppearance=function(oComp)
{this.applyAppearance(oComp);this.addAppearanceListeners(oComp);var app=oComp.getAppearance();var states=this.getAppearanceStates(app);if(Object.isEmpty(states))
return;var hash=states;var changed=false;if("focus"in hash&&(oComp.getFocused()||oComp.getContainsFocus()))
{this.addState(oComp,"focus");changed=true;}
if("selected"in hash&&oComp.getSelected())
{this.addState(oComp,"selected");changed=true;}
if("checked"in hash&&oComp.getChecked&&oComp.getChecked())
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -