예제 #1
0
        public 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);
            Console.WriteLine();

            ElementBuilder li = new ElementBuilder("li");

            li.AddAttribute("class", "nav");
            li.AddAttribute("id", "one");
            li.AddContent("Hello OOP");

            Console.WriteLine(li * 3);
            Console.WriteLine();

            string image = HTMLDispatcher.CreateImage("img.png", "sample img", "sample");
            string url = HTMLDispatcher.CreateURL("https:\\\\softuni.bg", "SoftUni", "SoftUni website");
            string input = HTMLDispatcher.CreateInput("text", "username", "student");

            Console.WriteLine(image);
            Console.WriteLine(url);
            Console.WriteLine(input);
        }
예제 #2
0
 static void Main(string[] args)
 {
     ElementBuilder element = new ElementBuilder("div");
     element.AddAttribute("id", "page");
     element.AddAttribute("class", "big");
     element.AddContent("<p>Hello</p>");
     Console.WriteLine(element);
     Console.WriteLine(element * 2);
 }
예제 #3
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;
        }
예제 #4
0
        public static string CreateURL(string url, string title, string text)
        {
            ElementBuilder a = new ElementBuilder("a");
            a.AddAtributes("href", url);
            a.AddAtributes("title", title);
            a.AddContent(text);

            return a.ToString();
        }
예제 #5
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 * 2);

        }
예제 #6
0
        public static ElementBuilder CreateURL(string url, string title, string text)
        {
            ElementBuilder urlTag = new ElementBuilder("a");

            urlTag.AddAttribute("href", url);
            urlTag.AddAttribute("title", title);
            urlTag.AddContent(text);

            return urlTag;
        }
예제 #7
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 * 2);
     Console.WriteLine(HTMLDispatcher.CreateImage("abv.bg", "abv"));
     Console.WriteLine(HTMLDispatcher.CreateUrl("abv.bg", "abv", "go to abv"));
     Console.WriteLine(HTMLDispatcher.CreateInput());
 }
예제 #8
0
 static void Main()
 {
     ElementBuilder b = new ElementBuilder("b");
     //div.Attributes.Add("id", "header");
     Console.WriteLine(b);
     Console.WriteLine(b*2);
     b.AddAttributes("id", "header");
     Console.WriteLine(b);
     b.AddAttributes("class", "menu");
     Console.WriteLine(b);
     b.AddContent("Text");
     Console.WriteLine(b);
 }
예제 #9
0
        public 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);

            Console.WriteLine();

            Console.WriteLine(HTMLDispatcher.CreateImage("MyDocuments/Pictures", "Beach", "California"));
            Console.WriteLine(HTMLDispatcher.CreateURL("www.metallica.com", "Metallica", "Official Metallica Website"));
            Console.WriteLine(HTMLDispatcher.CreateInput("button", "login", "Enter"));
        }
예제 #10
0
        static void Main()
        {
            ElementBuilder div = new ElementBuilder("div");

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

            Console.WriteLine();

            Console.WriteLine(HTMLDispatcher.CreateImage("D:\\Picture\\image.jpg", "Preview not available", "Snimka"));
            Console.WriteLine(HTMLDispatcher.CreateInput("text", "inputText", "This is some text"));
            Console.WriteLine(HTMLDispatcher.CreateURL("www.abv.bg", "ABV mail", "Some text"));
        }
예제 #11
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);

            Console.WriteLine(HTMLDispatcher.CreateImage("https://softuni.bg/Content/images/software-university-logo.png",
                "SoftUni Logo", "THIS ... IS ... SOFTWARE UNIVERSITYYYYYY !!!!"));
            Console.WriteLine();

            string url = HTMLDispatcher.CreateURL("https://softuni.bg/", "SoftUni website", "Welcome to SoftUni");
            Console.WriteLine(url);
            Console.WriteLine();

            Console.WriteLine(HTMLDispatcher.CreateInput("comment", "StudentComment", "Enter your comment here"));
        }
예제 #12
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();

            ElementBuilder image = HTMLDispatcher.CreateImage("https://softuni.bg/Content/design/logo.png", "Software University", "Software University");
            ElementBuilder url = HTMLDispatcher.CreateURL("https://softuni.bg", "Software University", "SoftUni");
            ElementBuilder input = HTMLDispatcher.CreateInput("text", "name", "1");

            Console.WriteLine(image);
            Console.WriteLine(url);
            Console.WriteLine(input);
        }
예제 #13
0
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");
            ElementBuilder a = new ElementBuilder("a");
            ElementBuilder li = new ElementBuilder("li");

            div.AddAtributes("class", "softuni");
            div.AddAtributes("onclick", "highlight();");

            a.AddAtributes("href", "http://softuni.bg");
            a.AddContent("Software University");
            div.AddContent(a.ToString());

            Console.WriteLine(div);

            Console.WriteLine(li * 2);

            Console.WriteLine(HTMLDispatcher.CreateImage("http://softuni.bg/img/logo.png", "softuni-logo", "logo"));
            Console.WriteLine(HTMLDispatcher.CreateURL("http://softuni.bg", "Software University", "The best university in Bulgaria"));
            Console.WriteLine(HTMLDispatcher.CreateInput("text", "address", "Sofia bul. Vasil Kynchew 26"));
        }
        public 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);

            Console.WriteLine();


            ElementBuilder li = new ElementBuilder("li");

            li.AddAttribute("class", "nav");

            li.AddAttribute("id", "one");

            li.AddContent("Hello OOP");


            Console.WriteLine(li * 3);

            Console.WriteLine();

            string image = HTMLDispatcher.CreateImage("img.png", "sample img", "sample");

            string url = HTMLDispatcher.CreateURL("https:\\\\softuni.bg", "SoftUni", "SoftUni website");

            string input = HTMLDispatcher.CreateInput("text", "username", "student");

            Console.WriteLine(image);

            Console.WriteLine(url);

            Console.WriteLine(input);
        }
예제 #15
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();


            ElementBuilder image = HTMLDispatcher.CreateImage("https://softuni.bg/Content/design/logo.png", "Software University", "Software University");
            ElementBuilder url   = HTMLDispatcher.CreateURL("https://softuni.bg", "Software University", "SoftUni");
            ElementBuilder input = HTMLDispatcher.CreateInput("text", "name", "1");

            Console.WriteLine(image);
            Console.WriteLine(url);
            Console.WriteLine(input);
        }
예제 #16
0
파일: TestProgram.cs 프로젝트: dpetrova/OOP
        static void Main()
        {
            //test html element builder
            ElementBuilder div = new ElementBuilder("div");

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


            //test html dispatcher
            string myImage = HTMLDispatcher.CreateImage("image1.jpg", "test image", "test image");

            Console.WriteLine(myImage);
            string myLink = HTMLDispatcher.CreateURL("http://www.softuni.bg", "www.softuni.bg", "www.softuni.bg");

            Console.WriteLine(myLink);
            string myInput = HTMLDispatcher.CreateInput("submit", "submit", "Submit");

            Console.WriteLine(myInput);
        }