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: ImageViewController.cs
View license
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;
        }

2. Example

Project: Beer-Drinkin
Source File: ImagePage.xaml.cs
View license
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;
        }

3. Example

Project: Beer-Drinkin
Source File: ImageActivity.cs
View license
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);
        }

4. Example

Project: Beer-Drinkin
Source File: ImageViewController.cs
View license
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;
        }

5. Example

Project: ZXing.Net.Mobile
Source File: ImagePage.xaml.cs
View license
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;
        }

6. Example

View license
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: ImageActivity.cs
View license
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);
        }

8. Example

Project: ZXing.Net.Mobile
Source File: ImagePage.xaml.cs
View license
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

View license
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;
            });
        }