Code39码和扩展的Code39码C#源码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.IO;
using System.Drawing.Imaging;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization;
using System.Drawing.Printing;
namespace JHEMR.MRCATALOGWS
{
public partial class frmBarCodePrint : Form
{
PrinterSettings printerSet;
PageSettings pageSet;
Barcode b = new Barcode();
public string m_nPatient_id = "";
public string m_nVisit_id = "";
public string m_strInp_N0 = "";
public string m_strName = "";
int m_nPrintCount = 2;
public int m_nAutoPrint = 0;
string m_strWidth = "600";
string m_strHeight = "300";
public frmBarCodePrint()
{
InitializeComponent();
}
public void InitData(string InpNo, string strName)
{
m_strInp_N0 = InpNo;
m_strName = strName;
}
public void printBar()
{
txtInp_No.Text = m_strInp_N0;
txtName.Text = m_strName;
this.txtPrintCount.Text = "2";
Bitmap temp = new Bitmap(1, 1);
temp.SetPixel(0, 0, this.BackColor);
barcode.Image = (Image)temp;
int W = Convert.ToInt32(m_strWidth);
int H = Convert.ToInt32(m_strHeight);
try
{
b.IncludeLabel = true;
b.m_strName = this.txtName.Text;
if (MRCatalogDAL.CommonJudge("20150527HL001"))
{
barcode.Image = b.Encode("Code 39", m_nPatient_id + m_nVisit_id, Color.Black, Color.White, W, H);
}
else
{
barcode.Image = b.Encode("Code 39", this.txtInp_No.Text.Trim(), Color.Black, Color.White, W, H);
}
barcode.Width = barcode.Image.Width;
barcode.Height = barcode.Image.Height;
barcode.Location = new Point((this.groupBox1.Location.X + this.groupBox2.Width / 2) - barcode.Width / 2, (this.groupBox2.Location.Y + this.groupBox2.Height / 2) - barcode.Height / 2);
button1_Click(this, null);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void frmBarCodePrint_Load(object sender, EventArgs e)
{
txtInp_No.Text = m_strInp_N0;
txtName.Text = m_strName;
if (m_strName.Trim() == "" || m_strInp_N0.Trim() == "")
return;
btnEncode_Click(this, null);
}
private void btnEncode_Click(object sender, EventArgs e)//生成按钮
{
if (!MRCatalogDAL.getSqlLimt(groupBox1))
return;
if (txtInp_No.Text.Trim() != "")
{
string strSQL = "SELECT NAME FROM PAT_MASTER_INDEX WHERE INP_NO='" + txtInp_No.Text.Trim() + "'";
object objTemp = JHEMR.EmrSysDAL.DALUse.GetSingle(strSQL);
if (objTemp != null && objTemp.ToString() != "")
{
txtName.Text = objTemp.ToString();
}
else
{
MessageBox.Show("没有该病案号");
txtName.Text = "";
return;
}
}
m_nPrintCount = Int32.Parse(txtPrintCount.Text);
int W = Convert.ToInt32(m_strWidth);
int H = Convert.ToInt32(m_strHeight);
try{
b.IncludeLabel = true;
b.m_strName = this.txtName.Text;
if (MRCatalogDAL.CommonJudge("20150527HL001"))
{
barcode.Image = b.Encode("Code 39", m_nPatient_id+m_nVisit_id, Color.Black, Color.White, W, H);
}
else
{
barcode.Image = b.Encode("Code 39", this.txtInp_No.Text.Trim(), Color.Black, Color.White, W, H);
}
barcode.Width = barcode.Image.Width;
barcode.Height = barcode.Image.Height;
barcode.Location = new Point((this.groupBox1.Location.X + this.groupBox2.Width / 2) - barcode.Width / 2, (this.groupBox2.Location.Y + this.groupBox2.Height / 2) - barcode.Height / 2);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void button1_Click(object sender, EventArgs e)
{
m_nPrintCount = Int32.Parse(txtPrintCount.Text);
PrintDocument pd = new PrintDocument();
PrintSet myObj = new PrintSet();
string strPath = System.AppDomain.CurrentDomain.BaseDirectory;
PageSetupDialog psDlg = new PageSetupDialog();
PrintDialog pdi = new PrintDialog();
PrintSet obj = null;
if (pageSet == null)
{
try
{
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream(strPath + "BarPrintSetting.bin", FileMode.Open,
FileAccess.Read, FileShare.Read);
obj = (PrintSet)formatter.Deserialize(stream);
stream.Close();
pageSet = obj.PageSet;
printerSet = obj.PrinterSet;
}
catch
{
}
}
if (pageSet == null)
{
try
{
pd.PrinterSettings.Copies = 1;
psDlg.Document = pd;
psDlg.PageSettings = pd.DefaultPageSettings;
psDlg.PrinterSettings = pd.PrinterSettings;
psDlg.PageSettings.Margins.Top = 0;
if (psDlg.ShowDialog() == DialogResult.OK)
{
pd.DefaultPageSettings = psDlg.PageSettings;
pd.PrinterSettings = psDlg.PrinterSettings;
pageSet = psDlg.PageSettings;
printerSet = psDlg.PrinterSettings;
try
{
myObj.PrinterSet = printerSet;
myObj.PageSet = pageSet;
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream(strPath + "BarPrintSetting.bin", FileMode.Create,
FileAccess.Write, FileShare.None);
formatter.Serialize(stream, myObj);
stream.Close();
}
catch
{
return;
}
}
else
{
return;
}
}
catch (System.Drawing.Printing.InvalidPrinterException ed)
{
MessageBox.Show("未安装打印机,请进入系统控制面版添加打印机!", "打印", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "打印", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
if (printerSet == null)
{
try
{
printerSet = obj.PrinterSet;
pageSet = obj.PageSet;
}
catch
{
}
}
if (printerSet == null)
{
return;
}
else
{
pd.PrinterSettings = printerSet;
pd.DefaultPageSettings = pageSet;
pd.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("custum", (int)printerSet.DefaultPageSettings.PrintableArea.Width + 1, (int)printerSet.DefaultPageSettings.PrintableArea.Height + 1);
}
pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
try
{
int index=0;
for(index=0;indexcatch (Exception ex)
{
MessageBox.Show(ex.Message, "打印出错", MessageBoxButtons.OK, MessageBoxIcon.Error);
pd.PrintController.OnEndPrint(pd, new PrintEventArgs());
}
}
private void pd_PrintPage(object sender, PrintPageEventArgs e)
{
int x = e.MarginBounds.X;
int y = e.MarginBounds.Y;
int width = barcode.Image.Width;
int height = barcode.Image.Height;
Rectangle destRect = new Rectangle(x, y, width, height);
e.Graphics.DrawImage(barcode.Image, destRect, 0, 0, barcode.Image.Width, barcode.Image.Height, System.Drawing.GraphicsUnit.Pixel);
}
private void txtInp_No_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode==Keys.Enter)
{
if (txtInp_No.Text.Trim() != "")
{
string strSQL = "SELECT NAME FROM PAT_MASTER_INDEX WHERE INP_NO='" + txtInp_No.Text.Trim() + "'";
object objTemp = JHEMR.EmrSysDAL.DALUse.GetSingle(strSQL);
if (objTemp != null && objTemp.ToString() != "")
{
txtName.Text = objTemp.ToString();
btnEncode.Focus();
}
else
{
MessageBox.Show("没有该病案号");
txtName.Text = "";
}
}
}
}
}
class Code39 : BarcodeCommon, IBarcode
{
private System.Collections.Hashtable C39_Code = new System.Collections.Hashtable();
private System.Collections.Hashtable ExtC39_Translation = new System.Collections.Hashtable();
private bool _AllowExtended = false;
public Code39(string input)
{
Raw_Data = input;
}
public Code39(string input, bool AllowExtended)
{
Raw_Data = input;
_AllowExtended = AllowExtended;
}
private string Encode_Code39()
{
this.init_Code39();
this.init_ExtendedCode39();
string strFormattedData = "*" + Raw_Data.Replace("*", "") + "*";
if (_AllowExtended)
InsertExtendedCharsIfNeeded(ref strFormattedData);
this.FormattedData = strFormattedData;
string result = "";
foreach (char c in this.FormattedData)
{
try
{
result += C39_Code[c].ToString();
result += "0";
}
catch
{
if (_AllowExtended)
throw new Exception("EC39-1: Invalid data.");
else
throw new Exception("EC39-1: Invalid data. (Try using Extended Code39)");
}
}
result = result.Substring(0, result.Length - 1);
this.C39_Code.Clear();
return result;
}
private void init_Code39()
{
C39_Code.Clear();
C39_Code.Add('0', "101001101101");
C39_Code.Add('1', "110100101011");
C39_Code.Add('2', "101100101011");
C39_Code.Add('3', "110110010101");
C39_Code.Add('4', "101001101011");
C39_Code.Add('5', "110100110101");
C39_Code.Add('6', "101100110101");
C39_Code.Add('7', "101001011011");
C39_Code.Add('8', "110100101101");
C39_Code.Add('9', "101100101101");
C39_Code.Add('A', "110101001011");
C39_Code.Add('B', "101101001011");
C39_Code.Add('C', "110110100101");
C39_Code.Add('D', "101011001011");
C39_Code.Add('E', "110101100101");
C39_Code.Add('F', "101101100101");
C39_Code.Add('G', "101010011011");
C39_Code.Add('H', "110101001101");
C39_Code.Add('I', "101101001101");
C39_Code.Add('J', "101011001101");
C39_Code.Add('K', "110101010011");
C39_Code.Add('L', "101101010011");
C39_Code.Add('M', "110110101001");
C39_Code.Add('N', "101011010011");
C39_Code.Add('O', "110101101001");
C39_Code.Add('P', "101101101001");
C39_Code.Add('Q', "101010110011");
C39_Code.Add('R', "110101011001");
C39_Code.Add('S', "101101011001");
C39_Code.Add('T', "101011011001");
C39_Code.Add('U', "110010101011");
C39_Code.Add('V', "100110101011");
C39_Code.Add('W', "110011010101");
C39_Code.Add('X', "100101101011");
C39_Code.Add('Y', "110010110101");
C39_Code.Add('Z', "100110110101");
C39_Code.Add('-', "100101011011");
C39_Code.Add('.', "110010101101");
C39_Code.Add(' ', "100110101101");
C39_Code.Add('$', "100100100101");
C39_Code.Add('/', "100100101001");
C39_Code.Add('+', "100101001001");
C39_Code.Add('%', "101001001001");
C39_Code.Add('*', "100101101101");
}
private void init_ExtendedCode39()
{
ExtC39_Translation.Clear();
ExtC39_Translation.Add(Convert.ToChar(0).ToString(), "%U");
ExtC39_Translation.Add(Convert.ToChar(1).ToString(), "$A");
ExtC39_Translation.Add(Convert.ToChar(2).ToString(), "$B");
ExtC39_Translation.Add(Convert.ToChar(3).ToString(), "$C");
ExtC39_Translation.Add(Convert.ToChar(4).ToString(), "$D");
ExtC39_Translation.Add(Convert.ToChar(5).ToString(), "$E");
ExtC39_Translation.Add(Convert.ToChar(6).ToString(), "$F");
ExtC39_Translation.Add(Convert.ToChar(7).ToString(), "$G");
ExtC39_Translation.Add(Convert.ToChar(8).ToString(), "$H");
ExtC39_Translation.Add(Convert.ToChar(9).ToString(), "$I");
ExtC39_Translation.Add(Convert.ToChar(10).ToString(), "$J");
ExtC39_Translation.Add(Convert.ToChar(11).ToString(), "$K");
ExtC39_Translation.Add(Convert.ToChar(12).ToString(), "$L");
ExtC39_Translation.Add(Convert.ToChar(13).ToString(), "$M");
ExtC39_Translation.Add(Convert.ToChar(14).ToString(), "$N");
ExtC39_Translation.Add(Convert.ToChar(15).ToString(), "$O");
ExtC39_Translation.Add(Convert.ToChar(16).ToString(), "$P");
ExtC39_Translation.Add(Convert.ToChar(17).ToString(), "$Q");
ExtC39_Translation.Add(Convert.ToChar(18).ToString(), "$R");
ExtC39_Translation.Add(Convert.ToChar(19).ToString(), "$S");
ExtC39_Translation.Add(Convert.ToChar(20).ToString(), "$T");
ExtC39_Translation.Add(Convert.ToChar(21).ToString(), "$U");
ExtC39_Translation.Add(Convert.ToChar(22).ToString(), "$V");
ExtC39_Translation.Add(Convert.ToChar(23).ToString(), "$W");
ExtC39_Translation.Add(Convert.ToChar(24).ToString(), "$X");
ExtC39_Translation.Add(Convert.ToChar(25).ToString(), "$Y");
ExtC39_Translation.Add(Convert.ToChar(26).ToString(), "$Z");
ExtC39_Translation.Add(Convert.ToChar(27).ToString(), "%A");
ExtC39_Translation.Add(Convert.ToChar(28).ToString(), "%B");
ExtC39_Translation.Add(Convert.ToChar(29).ToString(), "%C");
ExtC39_Translation.Add(Convert.ToChar(30).ToString(), "%D");
ExtC39_Translation.Add(Convert.ToChar(31).ToString(), "%E");
ExtC39_Translation.Add("!", "/A");
ExtC39_Translation.Add("\"", "/B");
ExtC39_Translation.Add("#", "/C");
ExtC39_Translation.Add("$", "/D");
ExtC39_Translation.Add("%", "/E");
ExtC39_Translation.Add("&", "/F");
ExtC39_Translation.Add("'", "/G");
ExtC39_Translation.Add("(", "/H");
ExtC39_Translation.Add(")", "/I");
ExtC39_Translation.Add("*", "/J");
ExtC39_Translation.Add("+", "/K");
ExtC39_Translation.Add(",", "/L");
ExtC39_Translation.Add("/", "/O");
ExtC39_Translation.Add(":", "/Z");
ExtC39_Translation.Add(";", "%F");
ExtC39_Translation.Add("<", "%G");
ExtC39_Translation.Add("=", "%H");
ExtC39_Translation.Add(">", "%I");
ExtC39_Translation.Add("?", "%J");
ExtC39_Translation.Add("[", "%K");
ExtC39_Translation.Add("\\", "%L");
ExtC39_Translation.Add("]", "%M");
ExtC39_Translation.Add("^", "%N");
ExtC39_Translation.Add("_", "%O");
ExtC39_Translation.Add("{", "%P");
ExtC39_Translation.Add("|", "%Q");
ExtC39_Translation.Add("}", "%R");
ExtC39_Translation.Add("~", "%S");
ExtC39_Translation.Add("`", "%W");
ExtC39_Translation.Add("@", "%V");
ExtC39_Translation.Add("a", "+A");
ExtC39_Translation.Add("b", "+B");
ExtC39_Translation.Add("c", "+C");
ExtC39_Translation.Add("d", "+D");
ExtC39_Translation.Add("e", "+E");
ExtC39_Translation.Add("f", "+F");
ExtC39_Translation.Add("g", "+G");
ExtC39_Translation.Add("h", "+H");
ExtC39_Translation.Add("i", "+I");
ExtC39_Translation.Add("j", "+J");
ExtC39_Translation.Add("k", "+K");
ExtC39_Translation.Add("l", "+L");
ExtC39_Translation.Add("m", "+M");
ExtC39_Translation.Add("n", "+N");
ExtC39_Translation.Add("o", "+O");
ExtC39_Translation.Add("p", "+P");
ExtC39_Translation.Add("q", "+Q");
ExtC39_Translation.Add("r", "+R");
ExtC39_Translation.Add("s", "+S");
ExtC39_Translation.Add("t", "+T");
ExtC39_Translation.Add("u", "+U");
ExtC39_Translation.Add("v", "+V");
ExtC39_Translation.Add("w", "+W");
ExtC39_Translation.Add("x", "+X");
ExtC39_Translation.Add("y", "+Y");
ExtC39_Translation.Add("z", "+Z");
ExtC39_Translation.Add(Convert.ToChar(127).ToString(), "%T");
}
private void InsertExtendedCharsIfNeeded(ref string FormattedData)
{
string output = "";
foreach (char c in Raw_Data)
{
try
{
string s = C39_Code[c].ToString();
output += c;
}
catch
{
object oTrans = ExtC39_Translation[c.ToString()];
output += oTrans.ToString();
}
}
FormattedData = output;
}
#region IBarcode Members
public string Encoded_Value
{
get { return Encode_Code39(); }
}
#endregion
}
abstract class BarcodeCommon
{
protected string Raw_Data = "";
protected string Formatted_Data = "";
public string RawData
{
get { return this.Raw_Data; }
}
public string FormattedData
{
get { return this.Formatted_Data; }
set { this.Formatted_Data = value; }
}
}
public class Barcode : IDisposable
{
public string m_strName = "";
#region Variables
private string Raw_Data = "";
private string Formatted_Data = "";
private string Encoded_Value = "";
private string _Country_Assigning_Manufacturer_Code = "N/A";
private string Encoded_Type = "Code 39";
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 _IncludeLabel = false;
private double _EncodingTime = 0;
#endregion
#region Constructors
public Barcode()
{
}
public Barcode(string data)
{
this.Raw_Data = data;
}
public Barcode(string data, string iType)
{
this.Raw_Data = data;
this.Encoded_Type = iType;
}
#endregion
#region Properties
public string FormattedData
{
get { return Formatted_Data; }
}
public string RawData
{
get { return Raw_Data; }
set { Raw_Data = value; }
}
public string EncodedValue
{
get { return Encoded_Value; }
}
public string Country_Assigning_Manufacturer_Code
{
get { return _Country_Assigning_Manufacturer_Code; }
}
public string EncodedType
{
set { Encoded_Type = value; }
get { return Encoded_Type; }
}
public Image EncodedImage
{
get
{
return _Encoded_Image;
}
}
public Color ForeColor
{
get { return this._ForeColor; }
set { this._ForeColor = value; }
}
public Color BackColor
{
get { return this._BackColor; }
set { this._BackColor = value; }
}
public int Width
{
get { return _Width; }
set { _Width = value; }
}
public int Height
{
get { return _Height; }
set { _Height = value; }
}
public bool IncludeLabel
{
set { this._IncludeLabel = value; }
get { return this._IncludeLabel; }
}
public double EncodingTime
{
get { return _EncodingTime; }
set { _EncodingTime = value; }
}
#endregion
#region Functions
#region General Encode
public Image Encode(string iType, string StringToEncode, int Width, int Height)
{
this.Width = Width;
this.Height = Height;
return Encode(iType, StringToEncode);
}
public Image Encode(string iType, string StringToEncode, Color ForeColor, Color BackColor, int Width, int Height)
{
this.Width = Width;
this.Height = Height;
return Encode(iType, StringToEncode, ForeColor, BackColor);
}
public Image Encode(string iType, string StringToEncode, Color ForeColor, Color BackColor)
{
this.BackColor = BackColor;
this.ForeColor = ForeColor;
return Encode(iType, StringToEncode);
}
public Image Encode(string iType, string StringToEncode)
{
Raw_Data = StringToEncode;
return Encode(iType);
}
internal Image Encode(string iType)
{
Encoded_Type = iType;
return Encode();
}
internal Image Encode()
{
DateTime dtStartTime = DateTime.Now;
if (Raw_Data.Trim() == "")
throw new Exception("EENCODE-1: Input data not allowed to be blank.");
this.Encoded_Value = "";
this._Country_Assigning_Manufacturer_Code = "N/A";
IBarcode ibarcode;
ibarcode = new Code39(Raw_Data);
this.Encoded_Value = ibarcode.Encoded_Value;
this.Raw_Data = ibarcode.RawData;
this.Formatted_Data = ibarcode.FormattedData;
this._EncodingTime = ((TimeSpan)(DateTime.Now - dtStartTime)).TotalMilliseconds;
_Encoded_Image = (Image)Generate_Image();
return EncodedImage;
}
#endregion
#region Image Functions
private Bitmap Generate_Image()
{
if (Encoded_Value == "") throw new Exception("EGENERATE_IMAGE-1: Must be encoded first.");
Bitmap b = null;
b = new Bitmap(Width, Height);
int iBarWidth = 1;
int shiftAdjustment = (Width % Encoded_Value.Length) / 2;
if (iBarWidth <= 0)
throw new Exception("EGENERATE_IMAGE-2: Image size specified not large enough to draw image. (Bar size determined to be less than 1 pixel)");
int pos = 0;
using (Graphics g = Graphics.FromImage(b))
{
g.Clear(BackColor);
Pen pen = new Pen(ForeColor, iBarWidth);
pen.Alignment = PenAlignment.Right;
while (pos < Encoded_Value.Length)
{
if (Encoded_Value[pos] == '1')
g.DrawLine(pen, new Point(pos * iBarWidth + 170, 90), new Point(pos * iBarWidth + 170, 110));
pos++;
}
}
if (IncludeLabel)
Label_Generic((Image)b);
return b;
}
#endregion
#region Label Generation
private Image Label_Generic(Image img)
{
try
{
System.Drawing.Font font = new Font("Microsoft Sans Serif", 56, FontStyle.Bold);
System.Drawing.Font font1 = new Font("Microsoft Sans Serif", 15, FontStyle.Regular);
using (Graphics g = Graphics.FromImage(img))
{
g.DrawImage(img, (float)0, (float)0);
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
g.FillRectangle(new SolidBrush(this.BackColor), new Rectangle(0, img.Height - 16, img.Width, 16));
StringFormat f = new StringFormat();
f.Alignment = StringAlignment.Center;
int iBarWidth = iBarWidth = Width / Encoded_Value.Length;
int shiftAdjustment = (Width % Encoded_Value.Length) / 2;
string strLabelText = (this.FormattedData.Trim() != "") ? this.FormattedData : this.RawData;
strLabelText = strLabelText.Replace("*", "");
g.DrawString(strLabelText, font, new SolidBrush(this.ForeColor), (float)(img.Width /2), 10, f);
g.DrawString(m_strName, font1, new SolidBrush(this.ForeColor), (float)(90), 90, f);
g.Save();
}
return img;
}
catch (Exception ex)
{
throw new Exception("ELABEL_GENERIC-1: " + ex.Message);
}
}
private Image Label_GenericUp(Image img)
{
try
{
System.Drawing.Font font = new Font("Microsoft Sans Serif", 10, FontStyle.Bold);
using (Graphics g = Graphics.FromImage(img))
{
g.DrawImage(img, (float)0, (float)0);
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
g.FillRectangle(new SolidBrush(this.BackColor), new Rectangle(0, 0, img.Width, 16));
StringFormat f = new StringFormat();
f.Alignment = StringAlignment.Center;
string strLabelText = (this.FormattedData.Trim() != "") ? this.FormattedData : this.RawData;
g.DrawString("woshiwo", font, new SolidBrush(this.ForeColor), (float)(img.Width / 2), img.Height - 16, f);
g.Save();
}
return img;
}
catch (Exception ex)
{
throw new Exception("ELABEL_GENERIC-1: " + ex.Message);
}
}
#endregion
#endregion
#region IDisposable Members
public void Dispose()
{
try
{
}
catch (Exception ex)
{
throw new Exception("EDISPOSE-1: " + ex.Message);
}
}
#endregion
}
interface IBarcode
{
string Encoded_Value
{
get;
}
string RawData
{
get;
}
string FormattedData
{
get;
}
}
[Serializable]
class PrintSet
{
PrinterSettings printerSet;
public PrinterSettings PrinterSet
{
get { return printerSet; }
set { printerSet = value; }
}
PageSettings pageSet;
public PageSettings PageSet
{
get { return pageSet; }
set { pageSet = value; }
}
}
}