Пример #1
0
        public string MakeImageUrlParams()
        {
            int  barcodeWidth  = this.BarcodeWidth;
            int  barcodeHeight = this.BarcodeHeight;
            bool isBarWidth    = false;

            if (this._barWidth > 0)
            {
                barcodeWidth = this._barWidth;
                isBarWidth   = true;
            }
            if (barcodeWidth <= 0)
            {
                barcodeWidth = 1;
            }
            this._barcode.Font = FontFromFontInfo(base.Font, 9f);
            NameValueCollection values  = BarcodeWeb.MakeHttpQueryString(this._barcode, this._imageFormat, barcodeWidth, barcodeHeight, isBarWidth, this._transparent, null);
            StringBuilder       builder = new StringBuilder();

            for (int i = 0; i < values.Count; i++)
            {
                if (i != 0)
                {
                    builder.Append("&");
                }
                builder.Append(values.GetKey(i));
                builder.Append("=");
                builder.Append(HttpUtility.UrlEncode(values.Get(i)));
            }
            return(builder.ToString());
        }
Пример #2
0
 public void ProcessRequest(HttpContext context)
 {
     BarcodeWeb.Render(context.Request, context.Response);
 }