📄 ssfx.core.js
字号:
ScriptFX.Net.HTTPRequestManager.add_requestInvoking=function(value){ScriptFX.Net.HTTPRequestManager.$0=Delegate.combine(ScriptFX.Net.HTTPRequestManager.$0,value);}ScriptFX.Net.HTTPRequestManager.remove_requestInvoking=function(value){ScriptFX.Net.HTTPRequestManager.$0=Delegate.remove(ScriptFX.Net.HTTPRequestManager.$0,value);}ScriptFX.Net.HTTPRequestManager.add_requestInvoked=function(value){ScriptFX.Net.HTTPRequestManager.$1=Delegate.combine(ScriptFX.Net.HTTPRequestManager.$1,value);}ScriptFX.Net.HTTPRequestManager.remove_requestInvoked=function(value){ScriptFX.Net.HTTPRequestManager.$1=Delegate.remove(ScriptFX.Net.HTTPRequestManager.$1,value);}ScriptFX.Net.HTTPRequestManager.get_online=function(){return window.navigator.onLine;}ScriptFX.Net.HTTPRequestManager.get_timeoutInterval=function(){return ScriptFX.Net.HTTPRequestManager.$2;}ScriptFX.Net.HTTPRequestManager.set_timeoutInterval=function(value){ScriptFX.Net.HTTPRequestManager.$2=value;return value;}ScriptFX.Net.HTTPRequestManager.$5=function($p0,$p1){var $0=$p0.get_$F();if($0){$0.abort();ScriptFX.Net.HTTPRequestManager.$7($p0,null,$p1);}}ScriptFX.Net.HTTPRequestManager.abortAll=function(){var $0=ScriptFX.Net.HTTPRequestManager.$3;ScriptFX.Net.HTTPRequestManager.$3=[];var $enum1=$0.getEnumerator();while($enum1.moveNext()){var $1=$enum1.get_current();ScriptFX.Net.HTTPRequestManager.$5($1,false);}}ScriptFX.Net.HTTPRequestManager.$6=function($p0){if(ScriptFX.Net.HTTPRequestManager.$0){var $2=new ScriptFX.Net.PreHTTPRequestEventArgs($p0);ScriptFX.Net.HTTPRequestManager.$0.invoke(null,$2);if($2.get_isSuppressed()){$p0.$14($2.get_response());return;}}var $0=$p0.get_transportType();if(!$0){$0=ScriptFX.Net._Core$2;}var $1=new $0($p0);$p0.$13($1);ScriptFX.Net.HTTPRequestManager.$3.add($p0);$1.invoke();if(((ScriptFX.Net.HTTPRequestManager.$2)||($p0.get_timeout()))&&(!ScriptFX.Net.HTTPRequestManager.$4)){ScriptFX.Net.HTTPRequestManager.$4=Delegate.create(null,ScriptFX.Net.HTTPRequestManager.$8);ScriptFX.Application.current.add_idle(ScriptFX.Net.HTTPRequestManager.$4);}}ScriptFX.Net.HTTPRequestManager.$7=function($p0,$p1,$p2){ScriptFX.Net.HTTPRequestManager.$3.remove($p0);if($p1){$p0.$14($p1);}else if($p2){$p0.$15();}else{$p0.$12();}if(ScriptFX.Net.HTTPRequestManager.$1){var $0=new ScriptFX.Net.PostHTTPRequestEventArgs($p0,$p1);ScriptFX.Net.HTTPRequestManager.$1.invoke(null,$0);}if((!ScriptFX.Net.HTTPRequestManager.$3.length)&&(ScriptFX.Net.HTTPRequestManager.$4)){ScriptFX.Application.current.remove_idle(ScriptFX.Net.HTTPRequestManager.$4);ScriptFX.Net.HTTPRequestManager.$4=null;}}ScriptFX.Net.HTTPRequestManager.$8=function($p0,$p1){if(!ScriptFX.Net.HTTPRequestManager.$3.length){return;}var $0=null;var $1=(new Date()).getTime();var $enum1=ScriptFX.Net.HTTPRequestManager.$3.getEnumerator();while($enum1.moveNext()){var $2=$enum1.get_current();var $3=$2.get_timeStamp().getTime();var $4=$2.get_timeout();if(!$4){$4=ScriptFX.Net.HTTPRequestManager.$2;if(!$4){continue;}}if(($1-$3)>$4){if(!$0){$0=[];}$0.add($2);}}if($0){var $enum2=$0.getEnumerator();while($enum2.moveNext()){var $5=$enum2.get_current();ScriptFX.Net.HTTPRequestManager.$5($5,true);}}}ScriptFX.Net.HTTPRequestManager.$9=function($p0,$p1){ScriptFX.Net.HTTPRequestManager.$7($p0,$p1,false);}ScriptFX.Net.HTTPTransport=function(request){this.$0=request;}ScriptFX.Net.HTTPTransport.createURI=function(uri,transportType,parameters){if(!parameters){return '{__nullParams: true, __uri:\''+uri+'\', __transportType: '+transportType.get_fullName()+'}';}else{parameters['__uri']=uri;parameters['__transportType']=transportType.get_fullName();return ScriptFX.JSON.serialize(parameters);}}ScriptFX.Net.HTTPTransport.prototype={$0:null,get_parameters:function(){return this.$0.get_$10();},get_request:function(){return this.$0;},getMethod:function(){return Enum.toString(ScriptFX.Net.HTTPVerb,this.$0.get_verb());},onCompleted:function(response){ScriptFX.Net.HTTPRequestManager.$9(this.$0,response);}}ScriptFX.Net.PostHTTPRequestEventArgs=function(request,response){ScriptFX.Net.PostHTTPRequestEventArgs.constructBase(this);this.$1_0=request;this.$1_1=response;}ScriptFX.Net.PostHTTPRequestEventArgs.prototype={$1_0:null,$1_1:null,get_request:function(){return this.$1_0;},get_response:function(){return this.$1_1;}}ScriptFX.Net.PreHTTPRequestEventArgs=function(request){ScriptFX.Net.PreHTTPRequestEventArgs.constructBase(this);this.$1_0=request;}ScriptFX.Net.PreHTTPRequestEventArgs.prototype={$1_0:null,$1_1:null,$1_2:false,get_isSuppressed:function(){return this.$1_2;},get_request:function(){return this.$1_0;},get_response:function(){return this.$1_1;},suppressRequest:function(response){this.$1_2=true;this.$1_1=response;}}ScriptFX.Net._Core$1=function(request,xmlHTTP){this.$3=new Date();this.$0=request;this.$1=xmlHTTP;}ScriptFX.Net._Core$1.prototype={$0:null,$1:null,$2:null,$3:null,$4:null,$5:null,$6:null,get_contentLength:function(){return this.getText().length;},get_contentType:function(){return this.$1.getResponseHeader('Content-Type');},get_headers:function(){if(!this.$2){var $0=this.$1.getAllResponseHeaders();var $1=$0.split('\r\n');this.$2={};var $enum1=$1.getEnumerator();while($enum1.moveNext()){var $2=$enum1.get_current();var $3=$2.indexOf(':');this.$2[$2.substr(0,$3)]=$2.substr($3+1);}}return this.$2;},get_request:function(){return this.$0;},get_statusCode:function(){return this.$1.status;},get_statusText:function(){return this.$1.statusText;},get_timeStamp:function(){return this.$3;},getHeader:function($p0){return this.$1.getResponseHeader($p0);},getObject:function(){if(!this.$5){this.$5=ScriptFX.JSON.deserialize(this.getText());}return this.$5;},getText:function(){if(!this.$4){this.$4=this.$1.responseText;}return this.$4;},getXML:function(){if(!this.$6){var $0=this.$1.responseXML;if((!$0)||(!$0.documentElement)){try{$0=XMLDocumentParser.parse(this.$1.responseText);if(($0)&&($0.documentElement)){this.$6=$0;}}catch($1){}}else{this.$6=$0;if(ScriptFX.Application.current.get_isIE()){$0.setProperty('SelectionLanguage','XPath');}}}return this.$6;}}ScriptFX.Net._Core$2=function(request){ScriptFX.Net._Core$2.constructBase(this,[request]);}ScriptFX.Net._Core$2.prototype={$1:null,abort:function(){if(this.$1){this.$1.onreadystatechange=Delegate.Null;this.$1.abort();this.$1=null;}},dispose:function(){this.abort();},invoke:function(){var $0=this.get_request();this.$1=new XMLHttpRequest();this.$1.onreadystatechange=Delegate.create(this,this.$2);if(!this.get_request().get_hasCredentials()){this.$1.open(this.getMethod(),$0.get_URI(),true);}else{this.$1.open(this.getMethod(),$0.get_URI(),true,$0.get_userName(),$0.get_password());}var $1=($0.get_hasHeaders())?$0.get_headers():null;if($1){var $dict1=$1;for(var $key2 in $dict1){var $3={key:$key2,value:$dict1[$key2]};this.$1.setRequestHeader($3.key,$3.value);}}var $2=$0.get_content();if(($2)&&((!$1)||(!$1['Content-Type']))){this.$1.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}this.$1.send($2);},$2:function(){if(this.$1.readyState===4){var $0=new ScriptFX.Net._Core$1(this.get_request(),this.$1);this.$1.onreadystatechange=Delegate.Null;this.$1=null;this.onCompleted($0);}}}Type.createNamespace('ScriptFX.UI');ScriptFX.UI.AnimationStopState=function(){};ScriptFX.UI.AnimationStopState.prototype = {complete:0,abort:1,revert:2}ScriptFX.UI.AnimationStopState.createEnum('ScriptFX.UI.AnimationStopState',false);ScriptFX.UI.$create_Bounds=function(left,top,width,height){var $o={};$o.left=left;$o.top=top;$o.width=width;$o.height=height;return $o;}ScriptFX.UI.$create_DragDropData=function(mode,dataType,data){var $o={};$o.mode=mode;$o.dataType=dataType;$o.data=data;return $o;}ScriptFX.UI.DragMode=function(){};ScriptFX.UI.DragMode.prototype = {move:0,copy:1}ScriptFX.UI.DragMode.createEnum('ScriptFX.UI.DragMode',false);ScriptFX.UI.IAction=function(){};ScriptFX.UI.IAction.createInterface('ScriptFX.UI.IAction');ScriptFX.UI.IDragDrop=function(){};ScriptFX.UI.IDragDrop.createInterface('ScriptFX.UI.IDragDrop');ScriptFX.UI.IDragSource=function(){};ScriptFX.UI.IDragSource.createInterface('ScriptFX.UI.IDragSource');ScriptFX.UI.IDropTarget=function(){};ScriptFX.UI.IDropTarget.createInterface('ScriptFX.UI.IDropTarget');ScriptFX.UI.IEditableText=function(){};ScriptFX.UI.IEditableText.createInterface('ScriptFX.UI.IEditableText');ScriptFX.UI.IStaticText=function(){};ScriptFX.UI.IStaticText.createInterface('ScriptFX.UI.IStaticText');ScriptFX.UI.IToggle=function(){};ScriptFX.UI.IToggle.createInterface('ScriptFX.UI.IToggle');ScriptFX.UI.IValidator=function(){};ScriptFX.UI.IValidator.createInterface('ScriptFX.UI.IValidator');ScriptFX.UI.Key=function(){};ScriptFX.UI.Key.prototype = {backspace:8,tab:9,enter:13,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127}ScriptFX.UI.Key.createEnum('ScriptFX.UI.Key',false);ScriptFX.UI.$create_Location=function(left,top){var $o={};$o.left=left;$o.top=top;return $o;}ScriptFX.UI.$create_OverlayOptions=function(cssClass){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -