Ejemplo n.º 1
0
        private void RecvNode(IntPtr ptr)
        {
            SubTdirTreeNode node = (SubTdirTreeNode)Marshal.PtrToStructure(ptr, typeof(SubTdirTreeNode));
            TdirTreeNode    item = new TdirTreeNode {
                userRoleInfo = new List <TdirUserRoleInfo>(),
                nodeID       = node.nodeID,
                parentID     = node.parentID,
                flag         = node.flag,
                name         = node.name,
                status       = node.status,
                nodeType     = node.nodeType,
                svrFlag      = node.svrFlag,
                staticInfo   = node.staticInfo,
                dynamicInfo  = node.dynamicInfo
            };

            if (this.m_treeRoleInfoDic.ContainsKey(item.nodeID))
            {
                item.userRoleInfo = this.m_treeRoleInfoDic[item.nodeID];
                string introduced2 = Convert.ToString(item.nodeID);
                this.TdirLog(string.Format("the size of node ID[{0}]'s user role info is [{1}]", introduced2, item.userRoleInfo.Count));
            }
            else
            {
                this.TdirLog(string.Format("node ID[{0}]'s user role info is empty", Convert.ToString(item.nodeID)));
            }
            this.m_treenodes.Add(item);
        }
Ejemplo n.º 2
0
        private void RecvNode(IntPtr ptr)
        {
            SubTdirTreeNode subTdirTreeNode = (SubTdirTreeNode)Marshal.PtrToStructure(ptr, typeof(SubTdirTreeNode));
            TdirTreeNode    tdirTreeNode    = default(TdirTreeNode);

            tdirTreeNode.userRoleInfo = new List <TdirUserRoleInfo>();
            tdirTreeNode.nodeID       = subTdirTreeNode.nodeID;
            tdirTreeNode.parentID     = subTdirTreeNode.parentID;
            tdirTreeNode.flag         = subTdirTreeNode.flag;
            tdirTreeNode.name         = subTdirTreeNode.name;
            tdirTreeNode.status       = subTdirTreeNode.status;
            tdirTreeNode.nodeType     = subTdirTreeNode.nodeType;
            tdirTreeNode.svrFlag      = subTdirTreeNode.svrFlag;
            tdirTreeNode.staticInfo   = subTdirTreeNode.staticInfo;
            tdirTreeNode.dynamicInfo  = subTdirTreeNode.dynamicInfo;
            if (this.m_treeRoleInfoDic.ContainsKey(tdirTreeNode.nodeID))
            {
                tdirTreeNode.userRoleInfo = this.m_treeRoleInfoDic[tdirTreeNode.nodeID];
                this.TdirLog(string.Format("the size of node ID[{0}]'s user role info is [{1}]", Convert.ToString(tdirTreeNode.nodeID), tdirTreeNode.userRoleInfo.get_Count()));
            }
            else
            {
                this.TdirLog(string.Format("node ID[{0}]'s user role info is empty", Convert.ToString(tdirTreeNode.nodeID)));
            }
            this.m_treenodes.Add(tdirTreeNode);
        }