public static ElementBuilder CreateURL(string url, string title, string text)
 {
     ElementBuilder aTag = new ElementBuilder("a");
     aTag.AddAttribute("href", url);
     aTag.AddAttribute("title", title);
     aTag.AddContent(text);
     return aTag;
 }
Exemplo n.º 2
0
 public static string CreateURL(string url, string title, string text)
 {
     ElementBuilder a = new ElementBuilder("a");
     a.AddAtribute("href", url);
     a.AddAtribute("title", title);
     a.AddContent(text);
     return a.ToString();
 }
Exemplo n.º 3
0
 public static string CreateURL(string url, string title, string text)
 {
     ElementBuilder eb = new ElementBuilder("a");
     eb.AddAttribute("href", url);
     eb.AddAttribute("title", title);
     eb.AddContent(text);
     return eb.Element;
 }
Exemplo n.º 4
0
        public static ElementBuilder CreateURL(string url, string text)
        {
            var element = new ElementBuilder("a");

            element.AddAttribute("href", url);
            element.AddContent(text);

            return element;
        }
Exemplo n.º 5
0
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder elem = new ElementBuilder("input");
            elem.AddAttribute("type", type);
            elem.AddAttribute("name", name);
            elem.AddContent(value);

            return elem.ToString();
        }
Exemplo n.º 6
0
        public static ElementBuilder CreateUrl(string url, string title, string text)
        {
            ElementBuilder link = new ElementBuilder("a");
            link.AddAttribute("href", url);
            link.AddAttribute("title", title);
            link.AddContent(text);

            return link;
        }
Exemplo n.º 7
0
        public static ElementBuilder CreateImageURL(string href, string title, string text)
        {
            var a = new ElementBuilder("a", true);
            a.AddAttribute("href", href);
            a.AddAttribute("title", title);
            a.AddContent(text);

            return a;
        }
Exemplo n.º 8
0
       public static string CreateURL(string url, string title, string text)
       {
           ElementBuilder anchor=new ElementBuilder("a");
           anchor.AddAttribute("url", url);
           anchor.AddAttribute("title", title);
           anchor.AddContent(text);

           return anchor.ToString();
       }
Exemplo n.º 9
0
        public static string CreateInput(string inputType, string name, string text)
        {
            ElementBuilder input = new ElementBuilder("input");

            input.AddAttribute("type", inputType);
            input.AddAttribute("name", name);
            input.AddContent(text);

            return input.ToString();
        }
Exemplo n.º 10
0
 static void Main()
 {
     ElementBuilder div = new ElementBuilder("div");
     div.AddAttribute("id", "page");
     div.AddAttribute("class", "big");
     div.AddContent("<p>Hello</p>");
     Console.WriteLine(div * 2 +
         HTMLDispatcher.CreateImage("img.jpg", "alt", "title") +
         HTMLDispatcher.CreateURL("www.softuni.bg", "title", "text") +
         HTMLDispatcher.CreateInput("type", "name", "value"));
 }
 static void Main()
 {
     ElementBuilder div = new ElementBuilder("div");
     div.CloseTag(true);
     div.AddAttribute("id", "page");
     div.AddAttribute("class", "big");
     div.AddContent("<p>Hello</p>");
     Console.WriteLine(div * 3);
    
     Console.WriteLine(HTMLDispatcher.CreateImage("imageS.jpg", "test s", "selfi"));
     Console.WriteLine(HTMLDispatcher.CreateInput("submit", "Submit", "text"));
     Console.WriteLine(HTMLDispatcher.CreateURL("https://softuni.bg/", "www.softuni.bg", "softuni.bg"));
 }
Exemplo n.º 12
0
    static void Main()
    {
        ElementBuilder a = new ElementBuilder("a");
        a.AddAtribute("href", "#");
        a.AddAtribute("class", "link");
        a.AddContent("abv.bg");
        //a.CloseSelf(true);
        Console.WriteLine(a);
        Console.WriteLine(a*2);
        Console.WriteLine();

        Console.WriteLine(HTMLDispecher.CreateImage("image1.jpg", "test image", "test image"));
        Console.WriteLine(HTMLDispecher.CreateInput("submit", "submit", "Submit"));
        Console.WriteLine(HTMLDispecher.CreateURL("http://www.w3schools.com", "www.w3schools.com", "w3schools.com"));
    }
Exemplo n.º 13
0
        static void Main() 
        {
            ElementBuilder asd = new ElementBuilder("div");
            Console.WriteLine(asd);
            asd.AddAtribute("class", "asd");
            Console.WriteLine(asd);
            asd.AddContent("<p>Hello></p>");
            Console.WriteLine(asd);
            asd.AddAtribute("id", "main");
            Console.WriteLine(asd);
            asd.AddContent("<h1>My world></h1>");
            Console.WriteLine(asd);

            Console.WriteLine(asd * 2);

            string myImage = HTMLDispatcher.CreateImage("../img/mnoo_qk.jpg", "selfi", "me on the beech");
            Console.WriteLine(myImage);

            string myLink = HTMLDispatcher.CreateURL("http://www.w3schools.com/html/", "this is my title", "Visit our HTML tutorial");
            Console.WriteLine(myLink);

            string myInput = HTMLDispatcher.CreateInput("number", "quantity", "230");
            Console.WriteLine(myInput);
        }
Exemplo n.º 14
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"));
 }
Exemplo n.º 15
0
    static void Main(string[] args)
    {
        ElementBuilder a = new ElementBuilder("a");

        a.AddAtribute("href", "#");
        a.AddAtribute("class", "link");
        a.AddContent("abv.bg");

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

        Console.WriteLine(HTMLDispecher.CreateImage("image1.jpg", "test image", "test image"));
        Console.WriteLine(HTMLDispecher.CreateInput("submit", "submit", "Submit"));
        Console.WriteLine(HTMLDispecher.CreateURL("http://www.w3schools.com", "www.w3schools.com", "w3schools.com"));
    }
Exemplo n.º 16
0
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");
            div.AddAttribute("id", "page");
            div.AddAttribute("class", "big");
            div.AddContent("<p>Hello</p>");

            System.Console.WriteLine(div * 2);

            string img = HTMLDispatcher.CreateImage("smiley.jpg", "Smiley Face", "Title");
            System.Console.WriteLine(img);

            string url = HTMLDispatcher.CreateURL("www.google.bg", "google", "GOOGLE");
            System.Console.WriteLine(url);

            string input = HTMLDispatcher.CreateInput("button", "hi", "HELLO");
            System.Console.WriteLine(input);
        }
    static void Main(string[] args)
    {
        ElementBuilder div = new ElementBuilder("div");

        div.AddAtribute("id", "page");
        div.AddAtribute("class", "big");
        div.AddContent("<p>Hello</p>");
        Console.WriteLine(div * 2);

        var test = HTMLDispatcher.CreateImage("smiley.gif", "Smiley face", "Smiling :)");

        Console.WriteLine(test);

        test = HTMLDispatcher.CreateURL("http://www.w3schools.com", "Click to visit site!", "Visit W3Schools.com!");
        Console.WriteLine(test);

        test = HTMLDispatcher.CreateInput("submit", "SubmitForm", "Submit");
        Console.WriteLine(test);
    }
Exemplo n.º 18
0
    static void Main(string[] args)
    {
        ElementBuilder div = new ElementBuilder("div");

        div.AddAtribute("id", "page");
        div.AddAtribute("class", "big");
        div.AddContent("<p>Hello</p>");
        Console.WriteLine(div * 2);

        ElementBuilder span = new ElementBuilder("span");

        span.AddAtribute("class", "first");
        Console.WriteLine(span);

        ElementBuilder li = new ElementBuilder("li");

        li.AddAtribute("type", "disk");
        li.AddContent("I am list");
        Console.WriteLine(li * 3);

        HTMLDispatcher.CreateImage("stickman.gif", "Stickman", "Biggest image");
        HTMLDispatcher.CreateURL("http://www.softuni.bg", "Software University", "Visit as!");
        HTMLDispatcher.CreateInput("submit", "sub-button", "submit");
    }