ZXing.BarcodeWriter.Write(string)

Here are the examples of the csharp api class ZXing.BarcodeWriter.Write(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

9 Examples 7

1. Example

Project: Beer-Drinkin
Source File: ImageActivity.cs
protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.ImageActivity);

            imageBarcode = FindViewById<ImageView> (Resource.Id.imageBarcode);

            var barcodeWriter = new ZXing.Mobile.BarcodeWriter {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions {
                    Width = 300,
                    Height = 300
                }
            };
            var barcode = barcodeWriter.Write ("ZXing.Net.Mobile");

            imageBarcode.SetImageBitmap (barcode);
        }

2. Example

Project: Beer-Drinkin
Source File: ImageViewController.cs
public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();

            NavigationItem.Title = "Generate Barcode";
            View.BackgroundColor = UIColor.White;

            imageBarcode = new UIImageView (new CGRect (20, 80, View.Frame.Width - 40, View.Frame.Height - 120));

            View.AddSubview (imageBarcode);

            var barcodeWriter = new BarcodeWriter {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions {
                    Width = 300,
                    Height = 300,
                    Margin = 30
                }
            };

            var barcode = barcodeWriter.Write ("ZXing.Net.Mobile");

            imageBarcode.Image = barcode;
        }

3. Example

Project: Beer-Drinkin
Source File: ImageViewController.cs
public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();

            NavigationItem.Title = "Generate Barcode";
            View.BackgroundColor = UIColor.White;

            imageBarcode = new UIImageView (new CGRect (20, 80, View.Frame.Width - 40, View.Frame.Height - 120));

            View.AddSubview (imageBarcode);

            var barcodeWriter = new BarcodeWriter {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions {
                    Width = 300,
                    Height = 300,
                    Margin = 30
                }
            };

            var barcode = barcodeWriter.Write ("ZXing.Net.Mobile");

            imageBarcode.Image = barcode;
        }

4. Example

Project: Beer-Drinkin
Source File: ImagePage.xaml.cs
protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            var barcodeWriter = new BarcodeWriter
            {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions
                {
                    Width = 300,
                    Height = 300,
                    Margin = 30
                }
            };

            var image = barcodeWriter.Write("ZXing.Net.Mobile");

            imageBarcode.Source = image;
        }

5. Example

Project: ZXing.Net.Mobile
Source File: ImageActivity.cs
protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.ImageActivity);

            imageBarcode = FindViewById<ImageView> (Resource.Id.imageBarcode);

            var barcodeWriter = new ZXing.Mobile.BarcodeWriter {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions {
                    Width = 300,
                    Height = 300
                }
            };
            var barcode = barcodeWriter.Write ("ZXing.Net.Mobile");

            imageBarcode.SetImageBitmap (barcode);
        }

6. Example

Project: ZXing.Net.Mobile
Source File: ImageViewController.cs
public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();

            NavigationItem.Title = "Generate Barcode";
            View.BackgroundColor = UIColor.White;

            imageBarcode = new UIImageView (new CGRect (20, 80, View.Frame.Width - 40, View.Frame.Height - 120));

            View.AddSubview (imageBarcode);

            var barcodeWriter = new BarcodeWriter {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions {
                    Width = 300,
                    Height = 300,
                    Margin = 30
                }
            };

            var barcode = barcodeWriter.Write ("ZXing.Net.Mobile");

            imageBarcode.Image = barcode;
        }

7. Example

Project: ZXing.Net.Mobile
Source File: ImagePage.xaml.cs
protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            var barcodeWriter = new BarcodeWriter
            {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions
                {
                    Width = 300,
                    Height = 300,
                    Margin = 30
                }
            };

            var image = barcodeWriter.Write("ZXing.Net.Mobile");

            imageBarcode.Source = image;
        }

8. Example

Project: ZXing.Net.Mobile
Source File: ImagePage.xaml.cs
protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            var barcodeWriter = new BarcodeWriter
            {
                Format = ZXing.BarcodeFormat.QR_CODE,
                Options = new ZXing.Common.EncodingOptions
                {
                    Width = 300,
                    Height = 300,
                    Margin = 30
                }
            };

            var image = barcodeWriter.Write("ZXing.Net.Mobile");

            imageBarcode.Source = image;
        }

9. Example

Project: sensus
Source File: AndroidSensusServiceHelper.cs
public override Xamarin.Forms.ImageSource GetQrCodeImageSource(string contents)
        {
            return Xamarin.Forms.ImageSource.FromStream(() =>
            {
                Bitmap bitmap = BarcodeWriter.Write(contents);
                MemoryStream ms = new MemoryStream();
                bitmap.Compress(Bitmap.CompressFormat.Png, 100, ms);
                ms.Seek(0, SeekOrigin.Begin);
                return ms;
            });
        }