static int _m_AddItemAt(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); FairyGUI.PopupMenu gen_to_be_invoked = (FairyGUI.PopupMenu)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <FairyGUI.EventCallback0>(L, 4)) { string _caption = LuaAPI.lua_tostring(L, 2); int _index = LuaAPI.xlua_tointeger(L, 3); FairyGUI.EventCallback0 _callback = translator.GetDelegate <FairyGUI.EventCallback0>(L, 4); FairyGUI.GButton gen_ret = gen_to_be_invoked.AddItemAt( _caption, _index, _callback); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && translator.Assignable <FairyGUI.EventCallback1>(L, 4)) { string _caption = LuaAPI.lua_tostring(L, 2); int _index = LuaAPI.xlua_tointeger(L, 3); FairyGUI.EventCallback1 _callback = translator.GetDelegate <FairyGUI.EventCallback1>(L, 4); FairyGUI.GButton gen_ret = gen_to_be_invoked.AddItemAt( _caption, _index, _callback); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to FairyGUI.PopupMenu.AddItemAt!")); }
static StackObject *AddItemAt_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); FairyGUI.EventCallback1 @callback = (FairyGUI.EventCallback1) typeof(FairyGUI.EventCallback1).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Int32 @index = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.String @caption = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 4); FairyGUI.PopupMenu instance_of_this_method = (FairyGUI.PopupMenu) typeof(FairyGUI.PopupMenu).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.AddItemAt(@caption, @index, @callback); object obj_result_of_this_method = result_of_this_method; if (obj_result_of_this_method is CrossBindingAdaptorType) { return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance)); } return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }