Beispiel #1
0
    static int InitScrollView(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            LoopGrid obj = (LoopGrid)ToLua.CheckObject(L, 1, typeof(LoopGrid));
            LoopGrid.DelegateHandler arg0 = null;
            LuaTypes funcType2            = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (LoopGrid.DelegateHandler)ToLua.CheckObject(L, 2, typeof(LoopGrid.DelegateHandler));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(LoopGrid.DelegateHandler), func) as LoopGrid.DelegateHandler;
            }

            obj.InitScrollView(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
    static int set_OnItemInit(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoopGrid obj = (LoopGrid)o;
            LoopGrid.DelegateHandler arg0 = null;
            LuaTypes funcType2            = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (LoopGrid.DelegateHandler)ToLua.CheckObject(L, 2, typeof(LoopGrid.DelegateHandler));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(LoopGrid.DelegateHandler), func) as LoopGrid.DelegateHandler;
            }

            obj.OnItemInit = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnItemInit on a nil value" : e.Message));
        }
    }
Beispiel #3
0
    static int get_OnItemInit(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoopGrid obj = (LoopGrid)o;
            LoopGrid.DelegateHandler ret = obj.OnItemInit;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnItemInit on a nil value" : e.Message));
        }
    }