BarcodeLib/BarcodeLib.cs
(开头部分) 31KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Data;
using System.IO;
/* Barcode Library
*
* Written by: Brad Barnhill
* Date: September 21, 2007
*
* This library was designed to give developers an easy class to use when they need
* to generate barcode images from a string of data.
*/
namespace BarcodeLib
{
#region Enums
public enum TYPE : int { UNSPECIFIED, UPCA, UPCE, UPC_SUPPLEMENTAL_2DIGIT, UPC_SUPPLEMENTAL_5DIGIT, EAN13, EAN8, Interleaved2of5, Standard2of5, Industrial2of5, CODE39, CODE39Extended, Codabar, PostNet, BOOKLAND, ISBN, JAN13, MSI_Mod10, MSI_2Mod10, MSI_Mod11, MSI_Mod11_Mod10, Modified_Plessey, CODE11, USD8, UCC12, UCC13, LOGMARS, CODE128, CODE128A, CODE128B, CODE128C, ITF14, CODE93 };
public enum SaveTypes : int { JPG, BMP, PNG, GIF, TIFF, UNSPECIFIED };
#endregion
/// <summary>
/// This class was designed to give developers and easy way to generate a barcode image from a string of data.
/// </summary>
public class Barcode
{
#region Variables
private string Raw_Data = "";
private string Formatted_Data = "";
private string Encoded_Value = "";
private string _Country_Assigning_Manufacturer_Code = "N/A";
private TYPE Encoded_Type = TYPE.UNSPECIFIED;
private Image Encoded_Image = null;
private Color _ForeColor = Color.Black;
private Color _BackColor = Color.White;
private int _Width = 300;
private int _Height = 150;
private bool bEncoded = false;
private bool _IncludeLabel = false;
#endregion
#region Constructors
/// <summary>
/// Default constructor. Does not populate the raw data. MUST be done via the RawData property before encoding.
/// </summary>
public Barcode()
{
//constructor
}//Barcode
/// <summary>
/// Constructor. Populates the raw data. No whitespace will be added before or after the barcode.
/// </summary>
/// <param name="data">String to be encoded.</param>
public Barcode(string data)
{
//constructor
this.Raw_Data = data;
}//Barcode
后面还有 669 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。