At.Okr.OKrBook.Auter.Main.LoadDescription C# (CSharp) Method

LoadDescription() private method

private LoadDescription ( ) : String
return String
        private String LoadDescription()
        {
            //String introPath = this.rootPath + "\\" + "intro.txt";

            //if (!File.Exists(introPath))
            //{
            //    MessageBox.Show("不是有效的目录");
            //    return String.Empty;
            //}
            //this.description = File.ReadAllText(introPath, Encoding.UTF8);

            //return this.description;

            String introPath = this.rootPath + "\\" + "app.config";

            if (!File.Exists(introPath))
            {
                MessageBox.Show("不是有效的目录");
                return String.Empty;
            }

            Uri uriResource = new Uri(introPath, UriKind.RelativeOrAbsolute);
            XElement element = XElement.Load(introPath);

            // Load the app from config
            XElement appElement = element.Element("okrbook");
            this.description = appElement.Element("intro").Value;

            return this.description;
        }