예제 #1
0
파일: Search.cs 프로젝트: tckhanh/Vilas103
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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());
        }
예제 #4
0
파일: Search.cs 프로젝트: tckhanh/Vilas103
 public BootstrapSearchResult(BootstrapDemoPageModelBase demo, BootstrapDemoSectionModel section, int rank)
 {
     Demo    = demo;
     Rank    = rank;
     Section = section;
 }