コード例 #1
0
ファイル: HTMLDispatcher.cs プロジェクト: nchebishev/CSharp
       public static string CreateInput(string type, string name, string value)
       {
           ElementBuilder inp = new ElementBuilder("input",true);
           inp.AddAttribute("type", type);
           inp.AddAttribute("name", name);
           inp.AddAttribute("value", value);

           return inp.ToString();
       }
コード例 #2
0
ファイル: HTMLDispatcher.cs プロジェクト: nchebishev/CSharp
       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();
       }
コード例 #3
0
ファイル: HTMLDispatcher.cs プロジェクト: nchebishev/CSharp
       public static string CreateImage(string imgSrc, string alt, string title){

           ElementBuilder img = new ElementBuilder("img", true);
           img.AddAttribute("src", imgSrc);
           img.AddAttribute("alt", alt);
           img.AddAttribute("title", title);

           return img.ToString();
       }
コード例 #4
0
ファイル: HTMLDispatcher.cs プロジェクト: nchebishev/CSharp
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder inp = new ElementBuilder("input", true);

            inp.AddAttribute("type", type);
            inp.AddAttribute("name", name);
            inp.AddAttribute("value", value);

            return(inp.ToString());
        }
コード例 #5
0
ファイル: HTMLDispatcher.cs プロジェクト: nchebishev/CSharp
        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());
        }
コード例 #6
0
ファイル: HTMLDispatcher.cs プロジェクト: nchebishev/CSharp
        public static string CreateImage(string imgSrc, string alt, string title)
        {
            ElementBuilder img = new ElementBuilder("img", true);

            img.AddAttribute("src", imgSrc);
            img.AddAttribute("alt", alt);
            img.AddAttribute("title", title);

            return(img.ToString());
        }
コード例 #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 * 3);
            Console.WriteLine(div);
        }
コード例 #8
0
ファイル: HTMLDispatch.cs プロジェクト: hristolilov/CSharp
        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 * 3);
            Console.WriteLine(div);



        }
コード例 #9
0
ファイル: HTMLDispatch.cs プロジェクト: ttitto/CSharp
        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(div * 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);
        }
コード例 #10
0
ファイル: HTMLDispatch.cs プロジェクト: dbonev91/CSharp-1
        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(div * 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);
        }