Files
SIG/Scripts/AjaxControlToolkit/Release/AutoComplete.js
2024-11-05 10:47:20 -07:00

1 line
22 KiB
JavaScript

Type.registerNamespace("Sys.Extended.UI"),Sys.Extended.UI.AutoCompleteBehavior=function(e){Sys.Extended.UI.AutoCompleteBehavior.initializeBase(this,[e]),this._servicePath=null,this._serviceMethod=null,this._contextKey=null,this._useContextKey=!1,this._minimumPrefixLength=3,this._completionSetCount=10,this._completionInterval=1e3,this._completionListElementID=null,this._completionListElement=null,this._textColor="windowtext",this._textBackground="window",this._popupBehavior=null,this._popupBehaviorHiddenHandler=null,this._onShowJson=null,this._onHideJson=null,this._timer=null,this._cache=null,this._currentPrefix=null,this._selectIndex=-1,this._focusHandler=null,this._blurHandler=null,this._bodyClickHandler=null,this._clickHandler=null,this._completionListBlurHandler=null,this._keyDownHandler=null,this._mouseDownHandler=null,this._mouseUpHandler=null,this._mouseOverHandler=null,this._tickHandler=null,this._enableCaching=!0,this._flyoutHasFocus=!1,this._textBoxHasFocus=!1,this._completionListCssClass=null,this._completionListItemCssClass=null,this._highlightedItemCssClass=null,this._delimiterCharacters=null,this._firstRowSelected=!1,this._showOnlyCurrentWordInCompletionListItem=!1,this._webRequest=null},Sys.Extended.UI.AutoCompleteBehavior.prototype={initialize:function(){Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(this,"initialize"),$common.prepareHiddenElementForATDeviceUpdate(),this._popupBehaviorHiddenHandler=Function.createDelegate(this,this._popupHidden),this._tickHandler=Function.createDelegate(this,this._onTimerTick),this._focusHandler=Function.createDelegate(this,this._onGotFocus),this._blurHandler=Function.createDelegate(this,this._onLostFocus),this._keyDownHandler=Function.createDelegate(this,this._onKeyDown),this._mouseDownHandler=Function.createDelegate(this,this._onListMouseDown),this._mouseUpHandler=Function.createDelegate(this,this._onListMouseUp),this._mouseOverHandler=Function.createDelegate(this,this._onListMouseOver),this._completionListBlurHandler=Function.createDelegate(this,this._onCompletionListBlur),this._bodyClickHandler=Function.createDelegate(this,this._onCompletionListBlur),this._clickHandler=Function.createDelegate(this,this._onInputClick),this._timer=new Sys.Timer,this.initializeTimer(this._timer);var e=this.get_element();this.initializeTextBox(e),null!==this._completionListElementID&&(this._completionListElement=$get(this._completionListElementID)),null==this._completionListElement&&(this._completionListElement=document.createElement("ul"),this._completionListElement.id=this.get_id()+"_completionListElem",Sys.Browser.agent===Sys.Browser.Safari?document.body.appendChild(this._completionListElement):e.parentNode.insertBefore(this._completionListElement,e.nextSibling)),this.initializeCompletionList(this._completionListElement),this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"PopupBehavior",parentElement:e,positioningMode:Sys.Extended.UI.PositioningMode.BottomLeft},null,null,this._completionListElement),this._popupBehavior.add_hidden(this._popupBehaviorHiddenHandler),this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson),this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson)},dispose:function(){this._onShowJson=null,this._onHideJson=null,this._popupBehavior&&(this._popupBehaviorHiddenHandler&&this._popupBehavior.remove_hidden(this._popupBehaviorHiddenHandler),this._popupBehavior.dispose(),this._popupBehavior=null),this._timer&&(this._timer.dispose(),this._timer=null);var e=this.get_element();e&&($removeHandler(e,"focus",this._focusHandler),$removeHandler(e,"blur",this._blurHandler),$removeHandler(e,"keydown",this._keyDownHandler),$removeHandler(e,"click",this._clickHandler),$removeHandler(this._completionListElement,"blur",this._completionListBlurHandler),$removeHandler(this._completionListElement,"mousedown",this._mouseDownHandler),$removeHandler(this._completionListElement,"mouseup",this._mouseUpHandler),$removeHandler(this._completionListElement,"mouseover",this._mouseOverHandler)),this._bodyClickHandler&&($removeHandler(document.body,"click",this._bodyClickHandler),this._bodyClickHandler=null),this._popupBehaviorHiddenHandler=null,this._tickHandler=null,this._focusHandler=null,this._blurHandler=null,this._clickHandler=null,this._keyDownHandler=null,this._completionListBlurHandler=null,this._mouseDownHandler=null,this._mouseUpHandler=null,this._mouseOverHandler=null,Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(this,"dispose")},initializeTimer:function(e){e.set_interval(this._completionInterval),e.add_tick(this._tickHandler)},initializeTextBox:function(e){e.autocomplete="off",$addHandler(e,"focus",this._focusHandler),$addHandler(e,"blur",this._blurHandler),$addHandler(e,"keydown",this._keyDownHandler),$addHandler(e,"click",this._clickHandler)},initializeCompletionList:function(e){if(this._completionListCssClass)Sys.UI.DomElement.addCssClass(e,this._completionListCssClass);else{var t=e.style;t.textAlign="left",t.visibility="hidden",t.cursor="default",t.listStyle="none",t.padding="0px",t.margin="0px! important",Sys.Browser.agent===Sys.Browser.Safari?(t.border="solid 1px gray",t.backgroundColor="white",t.color="black"):(t.border="solid 1px buttonshadow",t.backgroundColor=this._textBackground,t.color=this._textColor)}$addHandler(e,"mousedown",this._mouseDownHandler),$addHandler(e,"mouseup",this._mouseUpHandler),$addHandler(e,"mouseover",this._mouseOverHandler),$addHandler(e,"blur",this._completionListBlurHandler),$addHandler(document.body,"click",this._bodyClickHandler)},_onInputClick:function(e){e||(e=window.event),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},_currentCompletionWord:function(){var e=this.get_element(),t=e.value,i=t;if(this.get_isMultiWord()){var s=this._getCurrentWordStartIndex(),n=this._getCurrentWordEndIndex(s);i=n<=s?t.substring(s):t.substring(s,n)}return i},_getCursorIndex:function(){return this.get_element().selectionStart},_getCurrentWordStartIndex:function(){for(var e=this.get_element(),t=e.value.substring(0,this._getCursorIndex()),i=0,s=-1,n=0;n<this._delimiterCharacters.length;++n){var o=t.lastIndexOf(this._delimiterCharacters.charAt(n));o>s&&(s=o)}return i=s,i>=this._getCursorIndex()&&(i=0),i<0?0:i+1},_getCurrentWordEndIndex:function(e){for(var t=this.get_element(),i=t.value.substring(e),s=0,n=0;n<this._delimiterCharacters.length;++n){var o=i.indexOf(this._delimiterCharacters.charAt(n));o>0&&(o<s||0==s)&&(s=o)}return s<=0?t.value.length:s+e},get_isMultiWord:function(){return null!=this._delimiterCharacters&&""!=this._delimiterCharacters},_getTextWithInsertedWord:function(e){var t=e,i=this.get_element(),s=i.value;if(this.get_isMultiWord()){var n=this._getCurrentWordStartIndex(),o=this._getCurrentWordEndIndex(n),r="",l="";n>0&&(r=s.substring(0,n)),o>n&&(l=s.substring(o)),t=r+e+l}return t},_hideCompletionList:function(){var e=new Sys.CancelEventArgs;this.raise_hiding(e),e.get_cancel()||this.hidePopup()},showPopup:function(){this._popupBehavior.show(),this.raise_shown(Sys.EventArgs.Empty)},hidePopup:function(){this._popupBehavior?this._popupBehavior.hide():this._popupHidden()},_popupHidden:function(){this._completionListElement.innerHTML="",this._selectIndex=-1,this._flyoutHasFocus=!1,this.raise_hidden(Sys.EventArgs.Empty)},_highlightItem:function(e){for(var t=this._completionListElement.childNodes,i=0;i<t.length;i++){var s=t[i];s._highlighted&&(this._completionListItemCssClass?(Sys.UI.DomElement.removeCssClass(s,this._highlightedItemCssClass),Sys.UI.DomElement.addCssClass(s,this._completionListItemCssClass)):Sys.Browser.agent===Sys.Browser.Safari?(s.style.backgroundColor="white",s.style.color="black"):(s.style.backgroundColor=this._textBackground,s.style.color=this._textColor),this.raise_itemOut(new Sys.Extended.UI.AutoCompleteItemEventArgs(s,s.firstChild.nodeValue,s._value)))}this._highlightedItemCssClass?(Sys.UI.DomElement.removeCssClass(e,this._completionListItemCssClass),Sys.UI.DomElement.addCssClass(e,this._highlightedItemCssClass)):Sys.Browser.agent===Sys.Browser.Safari?e.style.backgroundColor="lemonchiffon":(e.style.backgroundColor="highlight",e.style.color="highlighttext"),e._highlighted=!0,this.raise_itemOver(new Sys.Extended.UI.AutoCompleteItemEventArgs(e,e.firstChild.nodeValue,e._value))},_onCompletionListBlur:function(e){this._hideCompletionList()},_onListMouseDown:function(e){e.target!==this._completionListElement?(this._setText(e.target),this._flyoutHasFocus=!1):this._flyoutHasFocus=!0},_onListMouseUp:function(e){if(!this._flyoutHasFocus)try{this.get_element().focus()}catch(e){}},_onListMouseOver:function(e){var t=e.target;if(t!==this._completionListElement)for(var i=this._completionListElement.childNodes,s=0;s<i.length;++s)if(t===i[s]){this._highlightItem(t),this._selectIndex=s;break}},_onGotFocus:function(e){this._textBoxHasFocus=!0,this._flyoutHasFocus&&this._hideCompletionList(),0!=this._minimumPrefixLength||this.get_element().value||this._timer.set_enabled(!0)},_onKeyDown:function(e){this._textBoxHasFocus=!0,this._timer.set_enabled(!1);var t=e.keyCode?e.keyCode:e.rawEvent.keyCode;t===Sys.UI.Key.esc?(this._hideCompletionList(),e.preventDefault()):t===Sys.UI.Key.up?this._selectIndex>0&&(this._selectIndex--,this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex),this._highlightItem(this._completionListElement.childNodes[this._selectIndex]),e.stopPropagation(),e.preventDefault()):t===Sys.UI.Key.down?this._selectIndex<this._completionListElement.childNodes.length-1&&(this._selectIndex++,this._handleScroll(this._completionListElement.childNodes[this._selectIndex],this._selectIndex),this._highlightItem(this._completionListElement.childNodes[this._selectIndex]),e.stopPropagation(),e.preventDefault()):t===Sys.UI.Key.enter?this._selectIndex!==-1?(this._setText(this._completionListElement.childNodes[this._selectIndex]),e.preventDefault()):this.hidePopup():t===Sys.UI.Key.tab?this._selectIndex!==-1&&this._setText(this._completionListElement.childNodes[this._selectIndex]):this._timer.set_enabled(!0)},_handleScroll:function(e,t){var i=this._completionListElement,s=$common.getBounds(e),n=this._completionListElement.childNodes.length;s.height*t-(i.clientHeight+i.scrollTop)>=0&&(i.scrollTop+=s.height*t-(i.clientHeight+i.scrollTop)+s.height),s.height*(n-(t+1))-(i.scrollHeight-i.scrollTop)>=0&&(i.scrollTop-=s.height*(n-(t+1))-(i.scrollHeight-i.scrollTop)+s.height),i.scrollTop%s.height!==0&&(s.height*(t+1)-(i.clientHeight+i.scrollTop)>=0?i.scrollTop-=i.scrollTop%s.height:i.scrollTop+=s.height-i.scrollTop%s.height)},_handleFlyoutFocus:function(){this._textBoxHasFocus||this._flyoutHasFocus||(this._webRequest&&(this._webRequest.get_executor().abort(),this._webRequest=null),this._hideCompletionList())},_onLostFocus:function(){this._textBoxHasFocus=!1,this._timer.set_enabled(!1),window.setTimeout(Function.createDelegate(this,this._handleFlyoutFocus),500)},_onMethodComplete:function(e,t){this._webRequest=null,this._update(t,e,!0)},_onMethodFailed:function(e,t,i){this._webRequest=null},_onTimerTick:function(e,t){if(this._timer.set_enabled(!1),this._servicePath&&this._serviceMethod){var i=this._currentCompletionWord();if(i.trim().length<this._minimumPrefixLength)return this._currentPrefix=null,void this._update("",null,!1);if(this._currentPrefix!==i||""==i&&0==this._minimumPrefixLength){if(this._currentPrefix=i,""!=i&&this._cache&&this._cache[i])return void this._update(i,this._cache[i],!1);var t=new Sys.CancelEventArgs;if(this.raise_populating(t),t.get_cancel())return;var s={prefixText:this._currentPrefix,count:this._completionSetCount};this._useContextKey&&(s.contextKey=this._contextKey),this._webRequest&&(this._webRequest.get_executor().abort(),this._webRequest=null),this._webRequest=Sys.Net.WebServiceProxy.invoke(this.get_servicePath(),this.get_serviceMethod(),!1,s,Function.createDelegate(this,this._onMethodComplete),Function.createDelegate(this,this._onMethodFailed),i),$common.updateFormToRefreshATDeviceBuffer()}}},_setText:function(e){var t=e&&e.firstChild?e.firstChild.nodeValue:null;this._timer.set_enabled(!1);var i=this.get_element(),s=i.control,n=this._showOnlyCurrentWordInCompletionListItem?this._getTextWithInsertedWord(t):t;s&&s.set_text?s.set_text(n):i.value=n,($common.isMsBrowser()||$common.isAppleBrowser())&&$common.tryFireEvent(i,"change"),this.raise_itemSelected(new Sys.Extended.UI.AutoCompleteItemEventArgs(e,t,e?e._value:null)),this._currentPrefix=this._currentCompletionWord(),this._hideCompletionList()},_update:function(e,t,i){if(i&&this.get_enableCaching()&&(this._cache||(this._cache={}),this._cache[e]=t),!this._textBoxHasFocus||e!=this._currentCompletionWord())return void this._hideCompletionList();if(t&&t.length){this._completionListElement.innerHTML="",this._selectIndex=-1;for(var s=null,n=null,o=null,r=0;r<t.length;r++){var l=null;l=this._completionListElementID?document.createElement("div"):document.createElement("li"),null==s&&(s=l);try{var h=Sys.Serialization.JavaScriptSerializer.deserialize("("+t[r]+")");h&&h.First?(n=h.First,o=h.Second):(n=t[r],o=n)}catch(e){n=t[r],o=t[r]}var a=this._showOnlyCurrentWordInCompletionListItem?n:this._getTextWithInsertedWord(n);if(l.appendChild(document.createTextNode(a)),l._value=o,l.__item="",this._completionListItemCssClass)Sys.UI.DomElement.addCssClass(l,this._completionListItemCssClass);else{var d=l.style;d.padding="0px",d.textAlign="left",d.textOverflow="ellipsis",Sys.Browser.agent===Sys.Browser.Safari?(d.backgroundColor="white",d.color="black"):(d.backgroundColor=this._textBackground,d.color=this._textColor)}this._completionListElement.appendChild(l)}var _=$common.getBounds(this.get_element());this._completionListElement.style.width=Math.max(1,_.width-2)+"px",this._completionListElement.scrollTop=0,this.raise_populated(Sys.EventArgs.Empty);var u=new Sys.CancelEventArgs;this.raise_showing(u),u.get_cancel()||(this.showPopup(),this._firstRowSelected&&null!=s&&(this._highlightItem(s),this._selectIndex=0))}else this._hideCompletionList()},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(e){this._popupBehavior?this._popupBehavior.set_onShow(e):this._onShowJson=e,this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(e){this._popupBehavior?this._popupBehavior.set_onHide(e):this._onHideJson=e,this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_completionInterval:function(){return this._completionInterval},set_completionInterval:function(e){this._completionInterval!=e&&(this._completionInterval=e,this.raisePropertyChanged("completionInterval"))},get_completionList:function(){return this._completionListElement},set_completionList:function(e){this._completionListElement!=e&&(this._completionListElement=e,this.raisePropertyChanged("completionList"))},get_completionSetCount:function(){return this._completionSetCount},set_completionSetCount:function(e){this._completionSetCount!=e&&(this._completionSetCount=e,this.raisePropertyChanged("completionSetCount"))},get_minimumPrefixLength:function(){return this._minimumPrefixLength},set_minimumPrefixLength:function(e){this._minimumPrefixLength!=e&&(this._minimumPrefixLength=e,this.raisePropertyChanged("minimumPrefixLength"))},get_serviceMethod:function(){return this._serviceMethod},set_serviceMethod:function(e){this._serviceMethod!=e&&(this._serviceMethod=e,this.raisePropertyChanged("serviceMethod"))},get_servicePath:function(){return this._servicePath},set_servicePath:function(e){this._servicePath!=e&&(this._servicePath=e,this.raisePropertyChanged("servicePath"))},get_contextKey:function(){return this._contextKey},set_contextKey:function(e){this._contextKey!=e&&(this._contextKey=e,this.set_useContextKey(!0),this.raisePropertyChanged("contextKey"))},get_useContextKey:function(){return this._useContextKey},set_useContextKey:function(e){this._useContextKey!=e&&(this._useContextKey=e,this.raisePropertyChanged("useContextKey"))},get_enableCaching:function(){return this._enableCaching},set_enableCaching:function(e){this._enableCaching!=e&&(this._enableCaching=e,this.raisePropertyChanged("enableCaching"))},get_completionListElementID:function(){return this._completionListElementID},set_completionListElementID:function(e){this._completionListElementID!=e&&(this._completionListElementID=e,this.raisePropertyChanged("completionListElementID"))},get_completionListCssClass:function(){return this._completionListCssClass},set_completionListCssClass:function(e){this._completionListCssClass!=e&&(this._completionListCssClass=e,this.raisePropertyChanged("completionListCssClass"))},get_completionListItemCssClass:function(){return this._completionListItemCssClass},set_completionListItemCssClass:function(e){this._completionListItemCssClass!=e&&(this._completionListItemCssClass=e,this.raisePropertyChanged("completionListItemCssClass"))},get_highlightedItemCssClass:function(){return this._highlightedItemCssClass},set_highlightedItemCssClass:function(e){this._highlightedItemCssClass!=e&&(this._highlightedItemCssClass=e,this.raisePropertyChanged("highlightedItemCssClass"))},get_delimiterCharacters:function(){return this._delimiterCharacters},set_delimiterCharacters:function(e){this._delimiterCharacters!=e&&(this._delimiterCharacters=e,this.raisePropertyChanged("delimiterCharacters"))},get_firstRowSelected:function(){return this._firstRowSelected},set_firstRowSelected:function(e){this._firstRowSelected!=e&&(this._firstRowSelected=e,this.raisePropertyChanged("firstRowSelected"))},get_showOnlyCurrentWordInCompletionListItem:function(){return this._showOnlyCurrentWordInCompletionListItem},set_showOnlyCurrentWordInCompletionListItem:function(e){this._showOnlyCurrentWordInCompletionListItem!=e&&(this._showOnlyCurrentWordInCompletionListItem=e,this.raisePropertyChanged("showOnlyCurrentWordInCompletionListItem"))},add_populating:function(e){this.get_events().addHandler("populating",e)},remove_populating:function(e){this.get_events().removeHandler("populating",e)},raise_populating:function(e){var t=this.get_events().getHandler("populating");t&&t(this,e)},raisePopulating:function(e){Sys.Extended.Deprecated("raisePopulating(eventArgs)","raise_populating(eventArgs)"),this.raise_populating(e)},add_populated:function(e){this.get_events().addHandler("populated",e)},remove_populated:function(e){this.get_events().removeHandler("populated",e)},raise_populated:function(e){var t=this.get_events().getHandler("populated");t&&t(this,e)},raisePopulated:function(e){Sys.Extended.Deprecated("raisePopulated(eventArgs)","raise_populated(eventArgs)"),this.raise_populated(e)},add_showing:function(e){this.get_events().addHandler("showing",e)},remove_showing:function(e){this.get_events().removeHandler("showing",e)},raise_showing:function(e){var t=this.get_events().getHandler("showing");t&&t(this,e)},raiseShowing:function(e){Sys.Extended.Deprecated("raiseShowing(eventArgs)","raise_showing(eventArgs)"),this.raise_showing(e)},add_shown:function(e){this.get_events().addHandler("shown",e)},remove_shown:function(e){this.get_events().removeHandler("shown",e)},raise_shown:function(e){var t=this.get_events().getHandler("shown");t&&t(this,e)},raiseShown:function(e){Sys.Extended.Deprecated("raiseShown(eventArgs)","raise_shown(eventArgs)"),this.raise_shown(e)},add_hiding:function(e){this.get_events().addHandler("hiding",e)},remove_hiding:function(e){this.get_events().removeHandler("hiding",e)},raise_hiding:function(e){var t=this.get_events().getHandler("hiding");t&&t(this,e)},raiseHiding:function(e){Sys.Extended.Deprecated("raiseHiding(eventArgs)","raise_hiding(eventArgs)"),this.raise_hiding(e)},add_hidden:function(e){this.get_events().addHandler("hidden",e)},remove_hidden:function(e){this.get_events().removeHandler("hidden",e)},raise_hidden:function(e){var t=this.get_events().getHandler("hidden");t&&t(this,e)},raiseHidden:function(e){Sys.Extended.Deprecated("raiseHidden(eventArgs)","raise_hidden(eventArgs)"),this.raise_hidden(e)},add_itemSelected:function(e){this.get_events().addHandler("itemSelected",e)},remove_itemSelected:function(e){this.get_events().removeHandler("itemSelected",e)},raise_itemSelected:function(e){var t=this.get_events().getHandler("itemSelected");t&&t(this,e)},raiseItemSelected:function(e){Sys.Extended.Deprecated("raiseItemSelected(eventArgs)","raise_itemSelected(eventArgs)"),this.raise_itemSelected(e)},add_itemOver:function(e){this.get_events().addHandler("itemOver",e)},remove_itemOver:function(e){this.get_events().removeHandler("itemOver",e)},raise_itemOver:function(e){var t=this.get_events().getHandler("itemOver");t&&t(this,e)},raiseItemOver:function(e){Sys.Extended.Deprecated("raiseItemOver(eventArgs)","raise_itemOver(eventArgs)"),this.raise_itemOver(e)},add_itemOut:function(e){this.get_events().addHandler("itemOut",e)},remove_itemOut:function(e){this.get_events().removeHandler("itemOut",e)},raise_itemOut:function(e){var t=this.get_events().getHandler("itemOut");t&&t(this,e)},raiseItemOut:function(e){Sys.Extended.Deprecated("raiseItemOut(eventArgs)","raise_itemOut(eventArgs)"),this.raise_itemOut(e)}},Sys.Extended.UI.AutoCompleteBehavior.registerClass("Sys.Extended.UI.AutoCompleteBehavior",Sys.Extended.UI.BehaviorBase),Sys.Extended.UI.AutoCompleteItemEventArgs=function(e,t,i){Sys.Extended.UI.AutoCompleteItemEventArgs.initializeBase(this),this._item=e,this._text=t,this._value=void 0!==i?i:null},Sys.Extended.UI.AutoCompleteItemEventArgs.prototype={get_item:function(){return this._item},set_item:function(e){this._item=e},get_text:function(){return this._text},set_text:function(e){this._text=e},get_value:function(){return this._value},set_value:function(e){this._value=e}},Sys.Extended.UI.AutoCompleteItemEventArgs.registerClass("Sys.Extended.UI.AutoCompleteItemEventArgs",Sys.EventArgs);