private void OnMenuItemClick(string Value) { TimButtonMenu.MenuItemEventHandler Handle = (TimButtonMenu.MenuItemEventHandler)base.Events[TimButtonMenu.EventMenuItemClick]; bool flag = Handle != null; if (flag) { Handle(this, Value); } }
IEnumerable <ScriptDescriptor> IScriptControl.GetScriptDescriptors() { ScriptControlDescriptor descriptor = new ScriptControlDescriptor("TIM.T_WEBCTRL.TimButtonMenu", this.ClientID); descriptor.AddProperty("uniqueID", this.UniqueID); descriptor.AddProperty("serverID", this.ID); descriptor.AddProperty("buttonType", this.ButtonType.ToString()); descriptor.AddProperty("onClientClick", this.OnClientClick); descriptor.AddProperty("onMenuItemClientClick", this.OnMenuItemClientClick); bool flag = this.ButtonType > ButtonMenuType.Button; if (flag) { descriptor.AddProperty("showDropDown", this.ShowDropDown); } string menuItemJSON = this.MenuItem2JSON(); bool flag2 = menuItemJSON != "[{}]"; if (flag2) { descriptor.AddProperty("menuItemJSON", menuItemJSON); } else { descriptor.AddProperty("menuItemJSON", ""); } EventHandler clickHandler = (EventHandler)base.Events[TimButtonMenu.EventClick]; bool flag3 = clickHandler != null; if (flag3) { descriptor.AddProperty("clickCallBack", true); } else { descriptor.AddProperty("clickCallBack", false); } EventHandler dropDownHandler = (EventHandler)base.Events[TimButtonMenu.EventDropDown]; bool flag4 = dropDownHandler != null; if (flag4) { descriptor.AddProperty("dropDownCallBack", true); } else { descriptor.AddProperty("dropDownCallBack", false); } TimButtonMenu.MenuItemEventHandler menuItemClickHandler = (TimButtonMenu.MenuItemEventHandler)base.Events[TimButtonMenu.EventMenuItemClick]; bool flag5 = menuItemClickHandler != null; if (flag5) { descriptor.AddProperty("menuClickCallBack", true); } else { descriptor.AddProperty("menuClickCallBack", false); } return(new ScriptControlDescriptor[] { descriptor }); }