string GetDataType(string DataType) { if (string.IsNullOrWhiteSpace(DataType)) { return("Any"); } string[] Parts = DataType.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); DocItem dcType; HtmlTagBuilder link; for (int i = 0; i < Parts.Length; i++) { Parts[i] = Parts[i].Trim(); dcType = Global.FlatList.FirstOrDefault((item) => { return(Parts[i].IsSameText(item.FullName)); }); if (dcType != null) { link = new HtmlTagBuilder("a"); link.Attributes["href"] = dcType.HRef; link.AddText(Parts[i]); Parts[i] = link.ToString(); } } return(string.Join(" | ", Parts)); //return string.Join("|", Parts); }
string GetLink(string HRef, string Title) { HtmlTagBuilder link = new HtmlTagBuilder("a"); link.Attributes["href"] = HRef; link.AddText(Title); return(link.ToString()); }
string GetDescription(string Description) { string Result = string.Empty; if (!string.IsNullOrWhiteSpace(Description)) { HtmlTagBuilder div = new HtmlTagBuilder("div"); div.AddCssClass("Description"); div.AddText(Description); Result = div.ToString(); int LastIndex = 0; int Index; while (true) { Index = Result.IndexOf(LinkTagStart, LastIndex); if (Index == -1) { break; } LastIndex = Index + 1; Result = ProcessInlineTagLink(Index, Result); } LastIndex = 0; while (true) { Index = Result.IndexOf(TutorialStartTag, LastIndex); if (Index == -1) { break; } LastIndex = Index + 1; Result = ProcessInlineTagTutorial(Index, Result); } } return(Result); }