static IEnumerable <BootstrapSearchResult> GetRes(List <string[]> requests, BootstrapDemoPageModelBase demo, BootstrapDemoSectionModel section, string text) { var results = new List <BootstrapSearchResult>(); var rank = CalculateRank(requests, demo, section); if (rank > -1) { var sr = new BootstrapSearchResult(demo, section, rank); sr.Text = text; results.Add(sr); } return(results); }
static void RegisterCurrentDemo(string groupKey, string demoKey) { BootstrapDemoPageModelBase demo = null; BootstrapDemoGroupPageModel group = BootstrapDemosModel.Instance.FindGroup(groupKey); if (group != null) { demo = group.FindDemo(demoKey); if (demo == null) { demo = group; } } Context.Items[Utils.CurrentDemoKey] = demo; DevExpress.Web.Internal.DemoUtils.RegisterDemo("Bootstrap", groupKey, demoKey); }
public static string GenerateDemoPageUrl(BootstrapDemoPageModelBase demo) { StringBuilder stb = new StringBuilder(); stb.Append("~/"); if (demo is BootstrapDemoGroupPageModel) { stb.Append(demo.Key); stb.Append("/Default.aspx"); } else if (demo is BootstrapDemoPageModel) { var group = ((BootstrapDemoPageModel)demo).Group; if (group != null) { stb.Append(group.Key + "/"); } stb.Append(demo.Key + ".aspx"); } return(stb.ToString()); }
public BootstrapSearchResult(BootstrapDemoPageModelBase demo, BootstrapDemoSectionModel section, int rank) { Demo = demo; Rank = rank; Section = section; }