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();
 }
 public static string CreateInput(string type, string name, string value)
 {
     ElementBuilder a = new ElementBuilder("a");
     a.AddAtribute("type", type);
     a.AddAtribute("name", name);
     a.AddAtribute("value", value);
     return a.ToString();
 }
 public static string CreateImage(string src, string alt, string title)
 {
     ElementBuilder img = new ElementBuilder("img");
     img.AddAtribute("src", src);
     img.AddAtribute("alt", alt);
     img.AddAtribute("title", title);
     img.CloseSelf(true);
     return img.ToString();
 }
Exemple #4
0
    public static string CreateInput(string type, string name, string value)
    {
        ElementBuilder a = new ElementBuilder("a");

        a.AddAtribute("type", type);
        a.AddAtribute("name", name);
        a.AddAtribute("value", value);
        return(a.ToString());
    }
Exemple #5
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());
    }
Exemple #6
0
        public static string CreateInput(string inputType, string name, string value)
        {
            ElementBuilder input = new ElementBuilder("input");

            input.AddAtribute("type", inputType);
            input.AddAtribute("name", name);
            input.AddAtribute("value", value);

            return(input.ToString());
        }
        public static string CreateImage(string src, string alt, string title)
        {
            ElementBuilder image = new ElementBuilder("img", false);

            image.AddAtribute("src", src);
            image.AddAtribute("alt", alt);
            image.AddAtribute("title", title);

            return image.ToString();
        }
    public static ElementBuilder CreateImage(string source, string alt, string title)
    {
        ElementBuilder image = new ElementBuilder("img");

        image.AddAtribute("src", source);
        image.AddAtribute("alt", alt);
        image.AddAtribute("title", title);

        return(image);
    }
    public static ElementBuilder CreateInput(string input, string name, string value)
    {
        ElementBuilder inputTag = new ElementBuilder("input");

        inputTag.AddAtribute("type", input);
        inputTag.AddAtribute("name", name);
        inputTag.AddAtribute("value", value);

        return(inputTag);
    }
    public static ElementBuilder CreateURL(string url, string title, string text)
    {
        ElementBuilder aTag = new ElementBuilder("a");

        aTag.AddAtribute("href", url);
        aTag.AddAtribute("title", title);
        aTag.AddContent(text);

        return(aTag);
    }
Exemple #11
0
        public static string CreateImage(string imageSource, string alt, string title)
        {
            ElementBuilder img = new ElementBuilder("img");

            img.AddAtribute("src", imageSource);
            img.AddAtribute("alt", alt);
            img.AddAtribute("title", title);

            return(img.ToString());
        }
Exemple #12
0
    public static string CreateImage(string src, string alt, string title)
    {
        ElementBuilder img = new ElementBuilder("img");

        img.AddAtribute("src", src);
        img.AddAtribute("alt", alt);
        img.AddAtribute("title", title);
        img.CloseSelf(true);
        return(img.ToString());
    }
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder input = new ElementBuilder("input", false);

            input.AddAtribute("type", type);
            input.AddAtribute("name", name);
            input.AddAtribute("value", value);

            return input.ToString();
        }
Exemple #14
0
 static void Main()
 {
     try
     {
         ElementBuilder div = new ElementBuilder("div");
         div.AddAtribute("id", "page");
         div.AddAtribute("class", "big");
         div.AddContent("<p>Hello</p>");
     }
     catch (ArgumentNullException)
     {
         return;
     }
 }
Exemple #15
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"));
    }
Exemple #16
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"));
    }
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");
            div.AddAtribute("class", "div's");
            div.AddAtribute("id", "wrapper");
            div.AddContent = "<a href='google.bg'>Google</a>";
            Console.WriteLine(div * 3);

            HTMLDispatcher.CreateImage("Desctop/C#.png", "Image Not Found", "C#");
            Console.WriteLine(HTMLDispatcher.GetImage);

            HTMLDispatcher.CreateURL("http://softuni.bg", "Google", "Google");
            Console.WriteLine(HTMLDispatcher.GetURL);

            HTMLDispatcher.CreateInput("text", "homework", "C#");
            Console.WriteLine(HTMLDispatcher.GetInput);
        }
    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);
    }
Exemple #19
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");
    }
        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);
        }