Exemple #1
0
        private void GetFileInfo(string propertyNode)
        {
            int nCount = 0;

            try
            {
                // get a number of properties
                m_objMPFile.PropsGetCount(propertyNode, out nCount);
            }
            catch (Exception) { }
            for (int i = 0; i < nCount; i++)
            {
                string sName;
                string sValue;
                int    bNode = 0;
                m_objMPFile.PropsGetByIndex(propertyNode, i, out sName, out sValue, out bNode);
                // bNode flag indicates whether there are internal properties
                // to collect a full node name we should separated it with "::", e.g. "info::video.0"
                string sRelName = propertyNode.Length > 0 ? propertyNode + "::" + sName : sName;
                if (bNode != 0)
                {
                    GetFileInfo(sRelName); // call the method recursively in case of sub-nodes
                }
                else
                {
                    fileInfo += sRelName + " = " + sValue + Environment.NewLine;
                    propsList_lsb.Items.Add(sValue);
                }
            }
        }