コード例 #1
0
ファイル: HTMLDispatcher.cs プロジェクト: petar-rusev/OOP
 public static string CreateInput(string type, string name, string value)
 {
     ElementBuilder input = new ElementBuilder("input");
     input.AddAttribute("type",type);
     input.AddAttribute("name",name);
     input.AddAttribute("value", value);
     input.Close = null;
     return input.ToString();
 }
コード例 #2
0
ファイル: HTMLDispatcher.cs プロジェクト: petar-rusev/OOP
 public static string CreateImage(string source, string alt, string title)
 {
    
     ElementBuilder img = new ElementBuilder("img");
     img.AddAttribute("source",source);
     img.AddAttribute("alt",alt);
     img.AddAttribute("title",title);
     img.Close = null;
     return img.ToString();
 }
コード例 #3
0
        public static string CreateImage(string source, string alt, string title)
        {
            ElementBuilder img = new ElementBuilder("img");

            img.AddAttribute("source", source);
            img.AddAttribute("alt", alt);
            img.AddAttribute("title", title);
            img.Close = null;
            return(img.ToString());
        }
コード例 #4
0
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder input = new ElementBuilder("input");

            input.AddAttribute("type", type);
            input.AddAttribute("name", name);
            input.AddAttribute("value", value);
            input.Close = null;
            return(input.ToString());
        }
コード例 #5
0
ファイル: HTMLDispatcher.cs プロジェクト: petar-rusev/OOP
 public static string CreateURL(string url, string title, string text)
 {
     ElementBuilder URL = new ElementBuilder("a");
     URL.AddAttribute(url,title);
     URL.AddContent(text);
     return URL.ToString();
 }
コード例 #6
0
        public static string CreateURL(string url, string title, string text)
        {
            ElementBuilder URL = new ElementBuilder("a");

            URL.AddAttribute(url, title);
            URL.AddContent(text);
            return(URL.ToString());
        }
コード例 #7
0
ファイル: Test.cs プロジェクト: petar-rusev/OOP
        static void Main()
        {
            //Created with the method CreatedImage in class HTMLDispatcher
            string testOne = HTMLDispatcher.CreateImage("picture.jpg", "Softuni Dudes", "picture One");
            Console.WriteLine(testOne);

            //Created with the Elementbuilder class directly
            ElementBuilder testTwo = new ElementBuilder("div");
            testTwo.AddAttribute("class", "big");
            Console.WriteLine(testTwo);
            

            //Created with the method CreatedImage in class HTMLDispatcher
            string testThree = HTMLDispatcher.CreateURL("href", "http://www.w3schools.com/html/", "Visit our HTML tutorial");
            Console.WriteLine(testThree);

            //Created with the method CreatedImage in class HTMLDispatcher
            string testFour = HTMLDispatcher.CreateInput("text","fname", "Submit");
            Console.WriteLine(testFour);
        }
コード例 #8
0
ファイル: Test.cs プロジェクト: petar-rusev/OOP
        static void Main()
        {
            //Created with the method CreatedImage in class HTMLDispatcher
            string testOne = HTMLDispatcher.CreateImage("picture.jpg", "Softuni Dudes", "picture One");

            Console.WriteLine(testOne);

            //Created with the Elementbuilder class directly
            ElementBuilder testTwo = new ElementBuilder("div");

            testTwo.AddAttribute("class", "big");
            Console.WriteLine(testTwo);


            //Created with the method CreatedImage in class HTMLDispatcher
            string testThree = HTMLDispatcher.CreateURL("href", "http://www.w3schools.com/html/", "Visit our HTML tutorial");

            Console.WriteLine(testThree);

            //Created with the method CreatedImage in class HTMLDispatcher
            string testFour = HTMLDispatcher.CreateInput("text", "fname", "Submit");

            Console.WriteLine(testFour);
        }