AvalonGUIConfig.SkinInfo.readMediaPortalDirs C# (CSharp) Method

readMediaPortalDirs() private method

private readMediaPortalDirs ( ) : void
return void
        void readMediaPortalDirs()
        {
            // Check if user MediaPortalDirs.xml exists in Personal Directory
            string PersonalFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            string fMPdirs = Path.Combine(PersonalFolder, @"Team MediaPortal\MediaPortalDirs.xml");

            if (!File.Exists(fMPdirs))
                fMPdirs = mpPaths.sMPbaseDir + "\\MediaPortalDirs.xml";

            XmlDocument doc = new XmlDocument();
            if (!File.Exists(fMPdirs))
            {
                MessageBox.Show("Can't find MediaPortalDirs.xml \r\r" + fMPdirs);
                return;
            }
            doc.Load(fMPdirs);
            XmlNodeList nodeList = doc.DocumentElement.SelectNodes("/Config/Dir");
            foreach (XmlNode node in nodeList)
            {
                XmlNode innerNode = node.Attributes.GetNamedItem("id");
                // get the Skin base path
                if (innerNode.InnerText == "Skin")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.skinBasePath = GetMediaPortalDir(path.InnerText);
                    }
                }
                // get the Cache base path
                if (innerNode.InnerText == "Cache")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.cacheBasePath = GetMediaPortalDir(path.InnerText);
                    }
                }
                // get the Config base path
                if (innerNode.InnerText == "Config")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.configBasePath = GetMediaPortalDir(path.InnerText);
                    }
                }
                // get the Plugin base path
                if (innerNode.InnerText == "Plugins")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.pluginPath = GetMediaPortalDir(path.InnerText);
                    }
                }

                // get the Thumbs base path
                if (innerNode.InnerText == "Thumbs")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.thumbsPath = GetMediaPortalDir(path.InnerText);
                    }
                }

                // get the Languages base path
                if (innerNode.InnerText == "Language")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.langBasePath = GetMediaPortalDir(path.InnerText);
                    }
                }
                // get the Database base path
                if (innerNode.InnerText == "Database")
                {
                    XmlNode path = node.SelectSingleNode("Path");
                    if (path != null)
                    {
                        mpPaths.databasePath = GetMediaPortalDir(path.InnerText);
                    }
                }
            }
            mpPaths.AvalonPath = mpPaths.skinBasePath + configuredSkin + "\\";
        }