Esempio n. 1
0
        public void bookmark_should_build()
        {
            var url   = "http://code-bude.net";
            var title = "A nerd's blog";

            var generator = new PayloadGenerator.Bookmark(url, title);

            generator.ToString().ShouldBe("MEBKM:TITLE:A nerd's blog;URL:http\\://code-bude.net;;");
        }
Esempio n. 2
0
        public void bookmark_should_escape_input()
        {
            var url   = "http://code-bude.net/fake,url.html";
            var title = "A nerd's blog: \\All;the;things\\";

            var generator = new PayloadGenerator.Bookmark(url, title);

            generator.ToString().ShouldBe("MEBKM:TITLE:A nerd's blog\\: \\\\All\\;the\\;things\\\\;URL:http\\://code-bude.net/fake\\,url.html;;");
        }
Esempio n. 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            PayloadGenerator.Bookmark bookmark = new PayloadGenerator.Bookmark("http://saitorhan.com", "Sait ORHAN Web Sayfası");
            string s = bookmark.ToString();

            QRCodeGenerator qrCodeGenerator = new QRCodeGenerator();
            QRCodeData      data            = qrCodeGenerator.CreateQrCode(s, QRCodeGenerator.ECCLevel.Q);
            QRCode          qrCode          = new QRCode(data);

            pictureBox1.Image = qrCode.GetGraphic(20);
        }