コード例 #1
0
        private string GetSpecialDescription()
        {
            /*
             * 1. look for the CategoryNode
             * 2. if found: look for the SubCategoryNode in the Childnodes
             * 3. get the description
             */
            XMLHelper xmlHelper = XMLHelper.getInstance;

            return(xmlHelper.GetSpecialShortDescription(SInter.GetCategory(), SInter.GetSubCategory()));
        }
コード例 #2
0
        //TODO: Load Image box
        private void FillFormWithXML(DescForm newForm, string subCategory)
        {
            /*
             * If the XML does contains that special SmartArt
             * ask the "XMLHelper" and fill the form with the content
             */

            string category = xmlHelper.GetCategoryFromSubCategory(subCategory);

            string[] longDescParts = Regex.Split(xmlHelper.GetSpecialLongDescription(category, subCategory), ";");
            newForm.SetCategory(category);
            newForm.SetSubCategory(subCategory);
            newForm.SetFoundDescription(true);
            //descType have to be one of that: "startDescription", "longDesciption", "MainPointDescription", "SubPointDescription"
            newForm.SetLongDescPlaceholder(xmlHelper.GetListOfPlaceholderWithInfo(category, "shortDesciption"));
            newForm.SetLongDescPlaceholder(xmlHelper.GetListOfPlaceholderWithInfo(category, "longDesciption"));
            newForm.SetMainPointDescPlaceholder(xmlHelper.GetListOfPlaceholderWithInfo(category, "MainPointDescription"));
            newForm.SetSubPointDescPlaceholder(xmlHelper.GetListOfPlaceholderWithInfo(category, "SubPointDescription"));

            string startDescription = xmlHelper.GetStartDescription();

            startDescription = startDescription.Replace("#Kategorie#", category);
            startDescription = startDescription.Replace("#Unterkategorie#", subCategory);
            newForm.SetStartDescription(startDescription);

            // shortDesc Tab ------------------------------
            newForm.SetShortDescription(xmlHelper.GetSpecialShortDescription(category, subCategory));

            // longDesc Tab -------------------------------
            if (longDescParts.Length == 3)
            {
                newForm.SetLongDescription(longDescParts[0]);
                newForm.SetMainPointDescription(longDescParts[1]);
                newForm.SetSubPointDescription(longDescParts[2]);
            }
        }