static int set_treeNodeWillExpand(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.TreeView obj = (FairyGUI.TreeView)o; FairyGUI.TreeView.TreeNodeWillExpandDelegate arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (FairyGUI.TreeView.TreeNodeWillExpandDelegate)ToLua.CheckObject(L, 2, typeof(FairyGUI.TreeView.TreeNodeWillExpandDelegate)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TreeView.TreeNodeWillExpandDelegate), func) as FairyGUI.TreeView.TreeNodeWillExpandDelegate; } obj.treeNodeWillExpand = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index treeNodeWillExpand on a nil value" : e.Message)); } }
static int get_treeNodeWillExpand(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.TreeView obj = (FairyGUI.TreeView)o; FairyGUI.TreeView.TreeNodeWillExpandDelegate ret = obj.treeNodeWillExpand; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index treeNodeWillExpand on a nil value" : e.Message)); } }
public static Delegate FairyGUI_TreeView_TreeNodeWillExpandDelegate(LuaFunction func, LuaTable self, bool flag) { if (func == null) { FairyGUI.TreeView.TreeNodeWillExpandDelegate fn = delegate(FairyGUI.TreeNode param0, bool param1) { }; return(fn); } if (!flag) { FairyGUI.TreeView.TreeNodeWillExpandDelegate d = (new FairyGUI_TreeView_TreeNodeWillExpandDelegate_Event(func)).Call; return(d); } else { FairyGUI.TreeView.TreeNodeWillExpandDelegate d = (new FairyGUI_TreeView_TreeNodeWillExpandDelegate_Event(func, self)).CallWithSelf; return(d); } }
static internal int checkDelegate(IntPtr l, int p, out FairyGUI.TreeView.TreeNodeWillExpandDelegate ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, p)) { ua = null; return(op); } else if (LuaDLL.lua_isuserdata(l, p) == 1) { ua = (FairyGUI.TreeView.TreeNodeWillExpandDelegate)checkObj(l, p); return(op); } LuaDelegate ld; checkType(l, -1, out ld); if (ld.d != null) { ua = (FairyGUI.TreeView.TreeNodeWillExpandDelegate)ld.d; return(op); } LuaDLL.lua_pop(l, 1); l = LuaState.get(l).L; ua = (FairyGUI.TreeNode a1, bool a2) => { int error = pushTry(l); pushValue(l, a1); pushValue(l, a2); ld.pcall(2, error); LuaDLL.lua_settop(l, error - 1); }; ld.d = ua; return(op); }