示例#1
0
    static int SendNotification(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                Framework.Core.View obj = (Framework.Core.View)ToLua.CheckObject <Framework.Core.View>(L, 1);
                string arg0             = ToLua.CheckString(L, 2);
                obj.SendNotification(arg0);
                return(0);
            }
            else if (count == 3)
            {
                Framework.Core.View obj = (Framework.Core.View)ToLua.CheckObject <Framework.Core.View>(L, 1);
                string arg0             = ToLua.CheckString(L, 2);
                object arg1             = ToLua.ToVarObject(L, 3);
                obj.SendNotification(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Framework.Core.View.SendNotification"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#2
0
 static int OnMessage(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Framework.Core.View obj = (Framework.Core.View)ToLua.CheckObject <Framework.Core.View>(L, 1);
         Framework.Interfaces.INotification arg0 = (Framework.Interfaces.INotification)ToLua.CheckObject <Framework.Interfaces.INotification>(L, 2);
         obj.OnMessage(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }