Exemplo n.º 1
0
        private void OnNodeDoubleClick(object S, TreeNodeMouseClickEventArgs E)
        {
            LuaStateViewer.BeginUpdate();
            E.Node.Nodes.Clear();

            List <string> FullPath = new List <string>();

            GetFullPath(FullPath, E.Node);

            L.GetTable(GLua.LUA_GLOBALSINDEX);
            for (int i = 0; i < FullPath.Count; i++)
            {
                L.GetField(-1, FullPath[i]);
                L.Remove(-2);
            }

            if (L.GetLuaType() == LuaType.Table)
            {
                L.PushNil();
                while (L.Next(-2) != 0)
                {
                    E.Node.Nodes.Add(L.LuaBase.GetString(-2));
                    L.Pop();
                }
            }

            LuaStateViewer.EndUpdate();
        }