private void FillForm(DescForm newForm, string category, string subCategory) { /* * If the XML does not contains that special SmartArt */ newForm.SetCategory(category); newForm.SetSubCategory(subCategory); newForm.SetFoundDescription(false); //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); }
//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]); } }