Exemple #1
0
        static void RegisterCurrentDemo(string groupKey, string demoKey)
        {
            DemoModel demo = null;

            if (IsIntroPage(groupKey, demoKey))
            {
                demo = DemosModel.Current.Intro;
            }
            else if (IsOverviewPage(demoKey) && String.IsNullOrEmpty(groupKey))
            {
                demo = DemosModel.Current.Overview;
            }
            else if (IsErrorPage(demoKey))
            {
                demo = CreateErrorPageDemoModel();
            }
            else
            {
                DemoGroupModel group = DemosModel.Current.FindGroup(groupKey);
                if (group != null)
                {
                    demo = group.FindDemo(demoKey);
                }
            }

            if (demo == null)
            {
                demo = CreateBogusDemoModel();
            }

            Context.Items[CurrentDemoKey] = demo;
            DevExpress.Web.Internal.DemoUtils.RegisterDemo(DemosModel.Current.Key, groupKey, demoKey);
        }
Exemple #2
0
        static void RegisterCurrentDemo(string groupKey, string demoKey)
        {
            DemoModel      demo  = null;
            DemoGroupModel group = DemosModel.Current.FindGroup(groupKey);

            if (group != null)
            {
                demo = group.FindDemo(demoKey);
            }

            if (demo == null)
            {
                demo = CreateBogusDemoModel();
            }

            Context.Items[CurrentDemoKey] = demo;
        }