public ActionResult ButtonsExample()
        {
            var html  = System.IO.File.ReadAllText(Server.MapPath(@"~/App_Data/Buttons/ButtonsHtml.txt"));
            var code  = System.IO.File.ReadAllText(Server.MapPath(@"~/App_Data/Buttons/ButtonsCode.txt"));
            var model = new ExampleTemplate()
            {
                HtmlView = html,
                CodeView = code
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult InputGroupsExample()
        {
            var html  = System.IO.File.ReadAllText(Server.MapPath(@"~/App_Data/InputGroups/InputGroupsHtml.txt"));
            var code  = System.IO.File.ReadAllText(Server.MapPath(@"~/App_Data/InputGroups/InputGroupsCode.txt"));
            var model = new ExampleTemplate()
            {
                HtmlView   = html,
                CodeView   = code,
                ResultView = "~/Views/InputGroups/Bs4InputGroupsViewPartial.cshtml"
            };

            return(View(model));
        }
        /// <summary>
        /// 绘制用于Example创建的UI
        /// </summary>
        private void DrawExampleCreatorEditor()
        {
            if (m_ExamplePropertyTree == null)
            {
                if (m_ExampleTemplate == null)
                {
                    m_ExampleTemplate = new ExampleTemplate();
                }

                m_ExamplePropertyTree = PropertyTree.Create(m_ExampleTemplate);
            }

            GUILayout.Label("自动生成OverViewExample代码", SirenixGUIStyles.SectionHeader, new GUILayoutOption[0]);

            SirenixEditorGUI.DrawThickHorizontalSeparator(4f, 10f);
            m_ExamplePropertyTree.Draw(false);
        }