📄 ssfx.core.js
字号:
var $o={};$o.cssClass=cssClass;$o.fadeInOutInterval=250;$o.opacity=0.75;return $o;}ScriptFX.UI.PopupMode=function(){};ScriptFX.UI.PopupMode.prototype = {center:0,anchorTopLeft:1,anchorTopRight:2,anchorBottomRight:3,anchorBottomLeft:4,alignTopLeft:5,alignTopRight:6,alignBottomRight:7,alignBottomLeft:8}ScriptFX.UI.PopupMode.createEnum('ScriptFX.UI.PopupMode',false);ScriptFX.UI.$create_PopupOptions=function(referenceElement,mode){var $o={};$o.referenceElement=referenceElement;$o.mode=mode;$o.id=null;$o.xOffset=0;$o.yOffset=0;return $o;}ScriptFX.UI.$create_Size=function(width,height){var $o={};$o.width=width;$o.height=height;return $o;}ScriptFX.UI.Animation=function(domElement){if(!domElement){domElement=document.documentElement;}this.$0=domElement;this.$1=1;ScriptFX.Application.current.registerDisposableObject(this);}ScriptFX.UI.Animation.prototype={$0:null,$1:0,$2:false,$3:0,$4:false,$5:false,$6:false,$7:0,$8:0,$9:false,add_repeating:function(value){this.$A=Delegate.combine(this.$A,value);},remove_repeating:function(value){this.$A=Delegate.remove(this.$A,value);},$A:null,add_starting:function(value){this.$B=Delegate.combine(this.$B,value);},remove_starting:function(value){this.$B=Delegate.remove(this.$B,value);},$B:null,add_stopped:function(value){this.$C=Delegate.combine(this.$C,value);},remove_stopped:function(value){this.$C=Delegate.remove(this.$C,value);},$C:null,get_autoReverse:function(){return this.$2;},set_autoReverse:function(value){this.$2=value;return value;},get_completed:function(){return this.$4;},get_domElement:function(){return this.$0;},get_isPlaying:function(){return this.$5;},get_isReversed:function(){return this.$9;},get_repeatCount:function(){return this.$1;},set_repeatCount:function(value){this.$1=value;return value;},get_repeatDelay:function(){return this.$3;},set_repeatDelay:function(value){this.$3=value;return value;},get_repetitions:function(){return this.$7;},dispose:function(){if(this.$5){this.stop(1);}if(this.$0){this.$0=null;ScriptFX.Application.current.unregisterDisposableObject(this);}},$D:function($p0){if(this.$B){this.$B.invoke(this,EventArgs.Empty);}this.performSetup();this.$5=true;this.$7=1;this.$9=$p0;this.playCore();},$E:function($p0,$p1){this.stopCore($p0,$p1);this.$4=$p0;this.$5=false;this.performCleanup();if(this.$C){this.$C.invoke(this,EventArgs.Empty);}},$F:function($p0){if(this.$6){if((this.$3)&&((this.$8+this.$3)>$p0)){return false;}}var $0=this.progressCore(this.$6,$p0);this.$6=false;if($0&&((!this.$1)||(this.$1>this.$7))){$0=false;this.$7++;if(this.$A){var $1=new ScriptFX.CancelEventArgs();this.$A.invoke(this,$1);$0=$1.get_canceled();}if(!$0){this.$6=true;if(this.$2){this.$9=!this.$9;}this.$8=$p0;this.performRepetition(this.$9);}}return $0;},performCleanup:function(){},performRepetition:function(reversed){},performSetup:function(){},play:function(){this.$4=false;ScriptFX.UI.AnimationManager.$4(this,this.$0);},stop:function(stopState){ScriptFX.UI.AnimationManager.$5(this,stopState);}}ScriptFX.UI.AnimationManager=function(){}ScriptFX.UI.AnimationManager.get_FPS=function(){return ScriptFX.UI.AnimationManager.$0;}ScriptFX.UI.AnimationManager.set_FPS=function(value){ScriptFX.UI.AnimationManager.$0=value;return value;}ScriptFX.UI.AnimationManager.$3=function(){ScriptFX.UI.AnimationManager.$2=0;if(!ScriptFX.UI.AnimationManager.$1.length){return;}var $0=(new Date()).getTime();var $1=ScriptFX.UI.AnimationManager.$1;var $2=[];ScriptFX.UI.AnimationManager.$1=null;var $enum1=$1.getEnumerator();while($enum1.moveNext()){var $3=$enum1.get_current();var $4=$3.$F($0);if($4){$3.$E(true,0);}else{$2.add($3);}}if($2.length){ScriptFX.UI.AnimationManager.$1=$2;if(!ScriptFX.UI.AnimationManager.$2){ScriptFX.UI.AnimationManager.$2=window.setTimeout(Delegate.create(null,ScriptFX.UI.AnimationManager.$3),1000/ScriptFX.UI.AnimationManager.$0);}}}ScriptFX.UI.AnimationManager.$4=function($p0,$p1){if(!ScriptFX.UI.AnimationManager.$1){ScriptFX.UI.AnimationManager.$1=[];}ScriptFX.UI.AnimationManager.$1.add($p0);$p0.$D(false);if(!ScriptFX.UI.AnimationManager.$2){ScriptFX.UI.AnimationManager.$2=window.setTimeout(Delegate.create(null,ScriptFX.UI.AnimationManager.$3),1000/ScriptFX.UI.AnimationManager.$0);}}ScriptFX.UI.AnimationManager.$5=function($p0,$p1){$p0.$E(false,$p1);ScriptFX.UI.AnimationManager.$1.remove($p0);}ScriptFX.UI.AnimationSequence=function(animations){ScriptFX.UI.AnimationSequence.constructBase(this,[null]);this.$10=animations;this.$12=-1;}ScriptFX.UI.AnimationSequence.prototype={$10:null,$11:0,$12:0,$13:false,$14:0,get_successionDelay:function(){return this.$11;},set_successionDelay:function(value){this.$11=value;return value;},playCore:function(){if(!this.get_isReversed()){this.$12=0;}else{this.$12=this.$10.length-1;}this.$10[this.$12].$D(this.get_isReversed());},progressCore:function(startRepetition,timeStamp){if(startRepetition){if(!this.get_isReversed()){this.$12=0;}else{this.$12=this.$10.length-1;}this.$13=true;}var $0=this.$10[this.$12];if(this.$13){if((this.$11)&&((this.$14+this.$11)>timeStamp)){return false;}this.$13=false;$0.$D(this.get_isReversed());}var $1=$0.$F(timeStamp);if($1){$0.$E(true,0);if(!this.get_isReversed()){this.$12++;}else{this.$12--;}this.$13=true;this.$14=timeStamp;}return $1&&((this.$12===this.$10.length)||(this.$12===-1));},stopCore:function(completed,stopState){if(!completed){var $0=this.$10[this.$12];$0.$E(false,stopState);}}}ScriptFX.UI.Behavior=function(domElement,id){ScriptFX.Application.current.registerDisposableObject(this);this.$0=domElement;this.$1=id;if(!String.isNullOrEmpty(id)){if(id==='control'){var $1=domElement[id];if(($1)&&(Type.getInstanceType($1)===ScriptFX.UI._Core$4)){delete domElement.control;ScriptFX.Application.current.unregisterDisposableObject($1);this.$3=$1.get_$5();}}domElement[id] = this;}if(id!=='control'){var $2=domElement.control;if(!$2){$2=new ScriptFX.UI._Core$4(domElement);}}var $0=domElement._behaviors;if(!$0){$0=[];domElement._behaviors = $0;}$0.add(this);}ScriptFX.UI.Behavior.getBehavior=function(domElement,type){var $0=domElement._behaviors;if($0){var $enum1=$0.getEnumerator();while($enum1.moveNext()){var $1=$enum1.get_current();if(type.isAssignableFrom(Type.getInstanceType($1))){return $1;}}}return null;}ScriptFX.UI.Behavior.getBehaviors=function(domElement,type){var $0=domElement._behaviors;if(isNullOrUndefined($0)||(!$0.length)){return null;}if(!type){return $0.clone();}return $0.filter(Delegate.create(null,function($p1_0){return type.isAssignableFrom(Type.getInstanceType($p1_0));}));}ScriptFX.UI.Behavior.getNamedBehavior=function(domElement,id){return domElement[id];}ScriptFX.UI.Behavior.prototype={$0:null,$1:null,$2:null,$3:null,$4:false,get_domElement:function(){return this.$0;},get_domEvents:function(){if(!this.$2){this.$2=new ScriptFX.UI.DOMEventList(this.$0);}return this.$2;},get_events:function(){if(!this.$3){this.$3=new ScriptFX.EventList();}return this.$3;},get_$5:function(){return this.$3;},get_isDisposed:function(){return (!this.$0);},get_isInitializing:function(){return this.$4;},add_propertyChanged:function(value){this.get_events().addHandler('PropertyChanged',value);},remove_propertyChanged:function(value){this.get_events().removeHandler('PropertyChanged',value);},beginInitialize:function(){this.$4=true;},dispose:function(){if(this.$2){this.$2.dispose();}if(this.$0){if(this.$1){if(ScriptFX.Application.current.get_isIE()){this.$0.removeAttribute(this.$1);}else{delete this.$0[this.$1];}}var $0=this.$0._behaviors;$0.remove(this);this.$0=null;ScriptFX.Application.current.unregisterDisposableObject(this);}},endInitialize:function(){this.$4=false;},raisePropertyChanged:function(propertyName){var $0=this.get_events().getHandler('PropertyChanged');if($0){$0.invoke(this,new ScriptFX.PropertyChangedEventArgs(propertyName));}}}ScriptFX.UI.Color=function(red,green,blue){this.$0=red;this.$1=green;this.$2=blue;}ScriptFX.UI.Color.format=function(red,green,blue){return String.format('#{0:X2}{1:X2}{2:X2}',red,green,blue);}ScriptFX.UI.Color.parse=function(s){if(String.isNullOrEmpty(s)){return null;}if((s.length===7)&&s.startsWith('#')){var $0=parseInt(s.substr(1,2),16);var $1=parseInt(s.substr(3,2),16);var $2=parseInt(s.substr(5,2),16);return new ScriptFX.UI.Color($0,$1,$2);}else if(s.startsWith('rgb(')&&s.endsWith(')')){var $3=s.substring(4,s.length-1).split(',');if($3.length===3){return new ScriptFX.UI.Color(parseInt($3[0].trim()),parseInt($3[1].trim()),parseInt($3[2].trim()));}}return null;}ScriptFX.UI.Color.prototype={$0:0,$1:0,$2:0,get_blue:function(){return this.$2;},get_green:function(){return this.$1;},get_red:function(){return this.$0;},toString:function(){return ScriptFX.UI.Color.format(this.$0,this.$1,this.$2);}}ScriptFX.UI.Control=function(domElement){ScriptFX.UI.Control.constructBase(this,[domElement,'control']);}ScriptFX.UI.Control.getControl=function(domElement){return ScriptFX.UI.Behavior.getNamedBehavior(domElement,'control');}ScriptFX.UI.Control.prototype={add_disposing:function(value){this.get_events().addHandler('disposing',value);},remove_disposing:function(value){this.get_events().removeHandler('disposing',value);},dispose:function(){var $0=this.get_domElement();if($0){var $1=this.get_events().getHandler('disposing');if($1){$1.invoke(this,EventArgs.Empty);}var $2=ScriptFX.UI.Behavior.getBehaviors($0,null);if($2.length>1){var $enum1=$2.getEnumerator();while($enum1.moveNext()){var $3=$enum1.get_current();if($3!==this){$3.dispose();}}}}ScriptFX.UI.Control.callBase(this, 'dispose');}}ScriptFX.UI.DOMEventList=function(element){this.$0=element;this.$1={};}ScriptFX.UI.DOMEventList.prototype={$0:null,$1:null,attach:function(eventName,handler){this.$0.attachEvent(eventName,handler);this.$1[eventName]=handler;},detach:function(eventName){var $0=this.$1[eventName];if($0){this.$0.detachEvent(eventName,$0);return true;}return false;},dispose:function(){if(this.$0){var $dict1=this.$1;for(var $key2 in $dict1){var $0={key:$key2,value:$dict1[$key2]};this.$0.detachEvent($0.key,$0.value);}this.$0=null;this.$1=null;}},isAttached:function(eventName){return (this.$1[eventName])?true:false;}}ScriptFX.UI.DragDropEventArgs=function(dataObject){ScriptFX.UI.DragDropEventArgs.constructBase(this);this.$1_0=dataObject;}ScriptFX.UI.DragDropEventArgs.prototype={$1_0:null,get_dataObject:function(){return this.$1_0;}}ScriptFX.UI.DragDropManager=function(){}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -