#if USE_UNI_LUA using LuaAPI = UniLua.Lua; using RealStatePtr = UniLua.ILuaState; using LuaCSFunction = UniLua.CSharpFunctionDelegate; #else using LuaAPI = XLua.LuaDLL.Lua; using RealStatePtr = System.IntPtr; using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; #endif using XLua; using System.Collections.Generic; namespace XLua.CSObjectWrap { using Utils = XLua.Utils; public class SysNotifyMgrWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(SysNotifyMgr); Utils.BeginObjectRegister(type, L, translator, 0, 6, 0, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReceiveNotifyCode", _m_ReceiveNotifyCode); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RegisterCondition", _m_RegisterCondition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowTip", _m_ShowTip); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Compare", _m_Compare); Utils.RegisterFunc(L, Utils.METHOD_IDX, "sysNotifyEvent", _e_sysNotifyEvent); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnSystemNotifyEvent", _e_OnSystemNotifyEvent); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 2, 1, 1); Utils.RegisterFunc(L, Utils.CLS_IDX, "OnSysTipEvent", _e_OnSysTipEvent); Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "s_UserDataSpaceRegex", _g_get_s_UserDataSpaceRegex); Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "s_UserDataSpaceRegex", _s_set_s_UserDataSpaceRegex); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if(LuaAPI.lua_gettop(L) == 1) { SysNotifyMgr gen_ret = new SysNotifyMgr(); 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 SysNotifyMgr constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ReceiveNotifyCode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); SysNotifyMgr gen_to_be_invoked = (SysNotifyMgr)translator.FastGetCSObj(L, 1); { H0212_tagNotifyCode _vNetData = (H0212_tagNotifyCode)translator.GetObject(L, 2, typeof(H0212_tagNotifyCode)); gen_to_be_invoked.ReceiveNotifyCode( _vNetData ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RegisterCondition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); SysNotifyMgr gen_to_be_invoked = (SysNotifyMgr)translator.FastGetCSObj(L, 1); { string _key = LuaAPI.lua_tostring(L, 2); System.Func _condition = translator.GetDelegate>(L, 3); gen_to_be_invoked.RegisterCondition( _key, _condition ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ShowTip(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); SysNotifyMgr gen_to_be_invoked = (SysNotifyMgr)translator.FastGetCSObj(L, 1); { string _key = LuaAPI.lua_tostring(L, 2); object[] _msg = translator.GetParams(L, 3); gen_to_be_invoked.ShowTip( _key, _msg ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Compare(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); SysNotifyMgr gen_to_be_invoked = (SysNotifyMgr)translator.FastGetCSObj(L, 1); { SystemHintData _x = (SystemHintData)translator.GetObject(L, 2, typeof(SystemHintData)); SystemHintData _y = (SystemHintData)translator.GetObject(L, 3, typeof(SystemHintData)); int gen_ret = gen_to_be_invoked.Compare( _x, _y ); LuaAPI.xlua_pushinteger(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_s_UserDataSpaceRegex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); translator.Push(L, SysNotifyMgr.s_UserDataSpaceRegex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_s_UserDataSpaceRegex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); SysNotifyMgr.s_UserDataSpaceRegex = (System.Text.RegularExpressions.Regex)translator.GetObject(L, 1, typeof(System.Text.RegularExpressions.Regex)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_sysNotifyEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); SysNotifyMgr gen_to_be_invoked = (SysNotifyMgr)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate>(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.sysNotifyEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.sysNotifyEvent -= gen_delegate; return 0; } } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } LuaAPI.luaL_error(L, "invalid arguments to SysNotifyMgr.sysNotifyEvent!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnSystemNotifyEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); SysNotifyMgr gen_to_be_invoked = (SysNotifyMgr)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate>(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.OnSystemNotifyEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnSystemNotifyEvent -= gen_delegate; return 0; } } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } LuaAPI.luaL_error(L, "invalid arguments to SysNotifyMgr.OnSystemNotifyEvent!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnSysTipEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); System.Action gen_delegate = translator.GetDelegate>(L, 2); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#2 need System.Action!"); } if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) { SysNotifyMgr.OnSysTipEvent += gen_delegate; return 0; } if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) { SysNotifyMgr.OnSysTipEvent -= gen_delegate; return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to SysNotifyMgr.OnSysTipEvent!"); } } }