Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var div = new ElementBuilder("div");

            div.AddAttribute("id", "page");
            div.AddAttribute("class", "big");
            div.AddContent("<p>Hello</p>");

            string image          = HTMLDispatcher.CreateImage("about:blank", null, "alt", "title").ToString();
            string imageWithClass = HTMLDispatcher.CreateImage("about:blank", "image", "alt", "title").ToString();
            string emptyUrl       = HTMLDispatcher.CreateUrl("about:blank", null, "title", "text").ToString();
            string contentUrl     = HTMLDispatcher.CreateUrl("about:blank", "url", "title", "text", "<p>Hello</p>").ToString();
            string emptyInput     = HTMLDispatcher.CreateInput(HTMLDispatcher.InputType.button, null, "name", "value").ToString();
            string contentInput   = HTMLDispatcher.CreateInput(HTMLDispatcher.InputType.button, "input", "name", "value", "BUTTON").ToString();

            var elements = new string[]
            {
                image,
                imageWithClass,
                emptyUrl,
                contentUrl,
                emptyInput,
                contentInput
            };

            Console.WriteLine(div * 2);

            foreach (var element in elements)
            {
                Console.WriteLine(element);
            }
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            ElementBuilder div =
                new ElementBuilder("div");

            div.AddAttribute("id", "page");
            div.AddAttribute("class", "big");
            div.AddContent("<p>Hello</p>");

            Console.WriteLine(div * 2);
            Console.WriteLine();
            Console.WriteLine(HTMLDispatcher.CreateImage("http://softuni.bg/design/logo.png", "Logo", "Test"));
            Console.WriteLine();
            Console.WriteLine(HTMLDispatcher.CreateImageURL("http://abv.bg", "bla", "WTF"));
            Console.WriteLine();
            Console.WriteLine(HTMLDispatcher.CreateInput("text", "bla", "WTF"));
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");

            div.AddAttribute("id", "page");
            div.AddAttribute("class", "big");
            div.AddContent("<p>Hello</p>");

            Console.WriteLine(div);
            Console.WriteLine();
            Console.WriteLine(div * 2);
            Console.WriteLine();

            Console.WriteLine(HTMLDispatcher.CreateImage("www.pesho.com/party.jpg", "pesho's image", "this is Pesho"));
            Console.WriteLine();

            string url = HTMLDispatcher.CreateURL("www.pesho.com", "Pesho's website", "This is Pesho's Blog");

            Console.WriteLine(url);
            Console.WriteLine();

            Console.WriteLine(HTMLDispatcher.CreateInput("text", "CustComment", "Enter your comment here"));
            Console.WriteLine();
        }