Example #1
0
        public Element.Element Load(ElementType type, string name, string path = "")
        {
            string pth = path;
            Element.Element elem;
            if(pth == "") { pth = Path; }

            switch (type)
            {
                case ElementType.Button:
                    elem = new Element.Button(R, pth + "elements/button.html", name);
                    break;

                case ElementType.List:
                    elem = new Element.List(R, pth + "elements/list.html", name);
                    break;

                case ElementType.Panel:
                    elem = new Element.Panel(R, pth + "elements/panel.html", name);
                    break;

                case ElementType.Textbox:
                    elem = new Element.Textbox(R, pth + "elements/textbox.html", name);
                    break;

                default:
                    elem = new Element.Element(R, pth, name);
                    break;
            }

            return elem;
        }
Example #2
0
        public Element.Element Load(ElementType type, string name, string path = "")
        {
            string pth = path;

            Element.Element elem;
            if (pth == "")
            {
                pth = Path;
            }

            switch (type)
            {
            case ElementType.Button:
                elem = new Element.Button(R, pth + "elements/button.html", name);
                break;

            case ElementType.List:
                elem = new Element.List(R, pth + "elements/list.html", name);
                break;

            case ElementType.Panel:
                elem = new Element.Panel(R, pth + "elements/panel.html", name);
                break;

            case ElementType.Textbox:
                elem = new Element.Textbox(R, pth + "elements/textbox.html", name);
                break;

            default:
                elem = new Element.Element(R, pth, name);
                break;
            }

            return(elem);
        }