Ejemplo n.º 1
0
        public void sms_should_add_unused_params()
        {
            var number = "01601234567";

            var generator = new PayloadGenerator.SMS(number);

            generator.ToString().ShouldBe("sms:01601234567?body=");
        }
Ejemplo n.º 2
0
        public void sms_should_build_type_SMSTO()
        {
            var number   = "01601234567";
            var message  = "A small SMS";
            var encoding = PayloadGenerator.SMS.SMSEncoding.SMSTO;

            var generator = new PayloadGenerator.SMS(number, message, encoding);

            generator.ToString().ShouldBe("SMSTO:01601234567:A small SMS");
        }
Ejemplo n.º 3
0
        public void sms_should_build_type_SMS_iOS()
        {
            var number   = "01601234567";
            var message  = "A small SMS";
            var encoding = PayloadGenerator.SMS.SMSEncoding.SMS_iOS;

            var generator = new PayloadGenerator.SMS(number, message, encoding);

            generator.ToString().ShouldBe("sms:01601234567;body=A%20small%20SMS");
        }
Ejemplo n.º 4
0
        // use SMS payload (compose a message)
        private void button8_Click(object sender, EventArgs e)
        {
            var payload = new PayloadGenerator.SMS("054-5555555", "Some Message...");

            var qrCodeData  = new QRCodeGenerator().CreateQrCode(payload, QRCodeGenerator.ECCLevel.Q);
            var qrCode      = new QRCode(qrCodeData);
            var qrCodeImage = qrCode.GetGraphic(20);

            qrCodeImage.Save(string.Format(QR_OUTPUT_TEMPLATE, "8"), ImageFormat.Jpeg);
            pictureBox1.Image = qrCodeImage;
        }
Ejemplo n.º 5
0
        private void GenerateSMSQRCode()
        {
            var    generator = new PayloadGenerator.SMS("+989391648703", SerialNo);
            string payload   = generator.ToString();

            QRCodeGenerator qrGenerator = new QRCodeGenerator();
            QRCodeData      qrCodeData  = qrGenerator.CreateQrCode(payload, QRCodeGenerator.ECCLevel.Q);
            QRCode          qrCode      = new QRCode(qrCodeData);

            SMSQRCode = qrCode.GetGraphic(20, System.Drawing.Color.White, System.Drawing.Color.Transparent, false).ToBitmapImage();
        }