public string Read() { byte[] byteArray = new byte[2048]; string RetData = ""; int RetryNo = 3; int CurNo = 0; while (true) { if (EZioApi.RcvBuf(byteArray, byteArray.GetUpperBound(0)) == 0) { CurNo++; } else { CurNo = 0; string[] temp = Encoding.Default.GetString(byteArray).Split('\0'); RetData += temp[0]; } Array.Clear(byteArray, 0, byteArray.GetUpperBound(0)); if (CurNo >= RetryNo) { break; } } return(RetData); }
public string GetDllVersion() { byte[] version = new byte[100]; Array.Clear(version, 0, version.Length); EZioApi.GetDllVersion(version); return(System.Text.Encoding.ASCII.GetString(version)); }
public void UploadText(int FontHeight, string FontName, string Data, int TextWidth, FontWeight Dark, RotateMode Rotate, string Name) { // Delete Image EZioApi.sendcommand("~MDELG," + Name); // Upload Text Image EZioApi.ecTextDownLoad(FontHeight, FontName, Data, TextWidth, (int)Dark, (int)Rotate, Name); }
public void UploadImage_FullColor(string Filename, string DisplayName, int nRotate) { // Delete Image EZioApi.sendcommand("~MDELG," + DisplayName); // Upload Image EZioApi.downloadimage(Filename, nRotate, DisplayName); }
public int PrintText_EZPL_TTF( string FontName, int PosX, int PosY, string Data) { return(EZioApi.TrueTypeFont_TextOut_S(FontName, PosX, PosY, Data)); }
public int PrintText_EZPL_Bitmapped( string FontName, int PosX, int PosY, string Data) { return(EZioApi.DownloadFont_TextOut_S(FontName, PosX, PosY, Data)); }
public int PrintText_EZPL_Internal( string FontType, int PosX, int PosY, string Data) { return(EZioApi.InternalFont_TextOut_S(FontType, PosX, PosY, Data)); }
public void Setup(int LabelLength, int Darkness, int Speed, int LabelMode, int LabelGap, int BlackTop) { EZioApi.setup(LabelLength, Darkness, Speed, LabelMode, LabelGap, BlackTop); }
public void LabelMode(PaperMode nMode, int nLabelHeight, int nGapFeed) { if (nMode == PaperMode.GapLabel) { EZioApi.sendcommand("^Q" + nLabelHeight.ToString() + "," + nGapFeed.ToString()); } else { EZioApi.sendcommand("^Q" + nLabelHeight.ToString() + ",0," + nGapFeed.ToString()); } }
public void Open(string PortName) { if (PortName.Contains("COM") == true) { EZioApi.OpenUSB(PortName); } else { EZioApi.OpenDriver(PortName); } }
public int PrintText_EZPL_Bitmapped( string FontName, int PosX, int PosY, int Mul_X, int Mul_Y, int Gap, string RotationInverse, string Data) { return(EZioApi.DownloadFont_TextOut(FontName, PosX, PosY, Mul_X, Mul_Y, Gap, RotationInverse, Data)); }
public int PrintText_EZPL_Internal( string FontType, int PosX, int PosY, int Mul_X, int Mul_Y, int Gap, string RotationInverse, string Data) { return(EZioApi.InternalFont_TextOut(FontType, PosX, PosY, Mul_X, Mul_Y, Gap, RotationInverse, Data)); }
public int PrintText_EZPL_TTF( string FontName, int PosX, int PosY, int Font_W, int Font_H, int SpaceChar, string RotationInverse, string TTFTable, int WidthMode, string Data) { return(EZioApi.TrueTypeFont_TextOut(FontName, PosX, PosY, Font_W, Font_H, SpaceChar, RotationInverse, TTFTable, WidthMode, Data)); }
public void UploadImage_Ext(string Filename, string DisplayName, Image_Type mType) { string strType; if (mType == Image_Type.BMP) { strType = "bmp"; } else { strType = "pcx"; } // Delete Image EZioApi.sendcommand("~MDELG," + DisplayName); // Upload Image EZioApi.extloadimage(Filename, DisplayName, strType); }
public int SetBaudrate(int nBaud) { return(EZioApi.setbaudrate(nBaud)); }
public void Open(string strIP, int nPort) { EZioApi.OpenNet(strIP, nPort.ToString()); }
public void Open(PortType mPortType) { EZioApi.openport(((int)mPortType).ToString()); }
public void CopyNo(int nCopyNo) { EZioApi.sendcommand("^C" + nCopyNo.ToString()); }
public void PageNo(int nPageNo) { EZioApi.sendcommand("^P" + nPageNo.ToString()); }
public int DrawEllipse(int PosX, int PosY, int Ellipse_W, int Ellipse_H, int PenWidth) { return(EZioApi.DrawEllipse(PosX, PosY, Ellipse_W, Ellipse_H, PenWidth)); }
public void Dark(int nDark) { EZioApi.sendcommand("^H" + nDark.ToString()); }
public void LabelWidth(int nWidth) { EZioApi.sendcommand("^W" + nWidth.ToString()); }
public int FillRec(int PosX, int PosY, int Rec_W, int Rec_H) { return(EZioApi.FillRec(PosX, PosY, Rec_W, Rec_H)); }
public int DrawDiamond(int PosX, int PosY, int Rec_W, int Rec_H, int PenWidth) { return(EZioApi.DrawDiamond(PosX, PosY, Rec_W, Rec_H, PenWidth)); }
public int DrawRec(int PosX, int PosY, int Rec_W, int Rec_H, int lrw, int ubw) { return(EZioApi.DrawRec(PosX, PosY, Rec_W, Rec_H, lrw, ubw)); }
public int DrawRoundRec(int PosX, int PosY, int Rec_W, int Rec_H, int Arc_W, int Arc_H, int PenWidth) { return(EZioApi.DrawRoundRec(PosX, PosY, Rec_W, Rec_H, Arc_W, Arc_H, PenWidth)); }
public void Close() { EZioApi.closeport(); }
public void Speed(int nSpeed) { EZioApi.sendcommand("^S" + nSpeed.ToString()); }
public int DrawTriangle(int PosX1, int PosY1, int PosX2, int PosY2, int PosX3, int PosY3, int PenWidth) { return(EZioApi.DrawTriangle(PosX1, PosY1, PosX2, PosY2, PosX3, PosY3, PenWidth)); }
public int DrawOblique(int PosX1, int PosY1, int Thick, int PosX2, int PosY2) { return(EZioApi.DrawOblique(PosX1, PosY1, Thick, PosX2, PosY2)); }