Пример #1
0
        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);
        }
Пример #2
0
 public string GetDllVersion()
 {
     byte[] version = new byte[100];
     Array.Clear(version, 0, version.Length);
     EZioApi.GetDllVersion(version);
     return(System.Text.Encoding.ASCII.GetString(version));
 }
Пример #3
0
        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);
        }
Пример #4
0
        public void UploadImage_FullColor(string Filename, string DisplayName, int nRotate)
        {
            // Delete Image
            EZioApi.sendcommand("~MDELG," + DisplayName);

            // Upload Image
            EZioApi.downloadimage(Filename, nRotate, DisplayName);
        }
Пример #5
0
 public int PrintText_EZPL_TTF(
     string FontName,
     int PosX,
     int PosY,
     string Data)
 {
     return(EZioApi.TrueTypeFont_TextOut_S(FontName, PosX, PosY, Data));
 }
Пример #6
0
 public int PrintText_EZPL_Bitmapped(
     string FontName,
     int PosX,
     int PosY,
     string Data)
 {
     return(EZioApi.DownloadFont_TextOut_S(FontName, PosX, PosY, Data));
 }
Пример #7
0
 public int PrintText_EZPL_Internal(
     string FontType,
     int PosX,
     int PosY,
     string Data)
 {
     return(EZioApi.InternalFont_TextOut_S(FontType, PosX, PosY, Data));
 }
Пример #8
0
 public void Setup(int LabelLength,
                   int Darkness,
                   int Speed,
                   int LabelMode,
                   int LabelGap,
                   int BlackTop)
 {
     EZioApi.setup(LabelLength, Darkness, Speed, LabelMode, LabelGap, BlackTop);
 }
Пример #9
0
 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());
     }
 }
Пример #10
0
 public void Open(string PortName)
 {
     if (PortName.Contains("COM") == true)
     {
         EZioApi.OpenUSB(PortName);
     }
     else
     {
         EZioApi.OpenDriver(PortName);
     }
 }
Пример #11
0
 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));
 }
Пример #12
0
 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));
 }
Пример #13
0
 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));
 }
Пример #14
0
        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);
        }
Пример #15
0
 public int SetBaudrate(int nBaud)
 {
     return(EZioApi.setbaudrate(nBaud));
 }
Пример #16
0
 public void Open(string strIP, int nPort)
 {
     EZioApi.OpenNet(strIP, nPort.ToString());
 }
Пример #17
0
 public void Open(PortType mPortType)
 {
     EZioApi.openport(((int)mPortType).ToString());
 }
Пример #18
0
 public void CopyNo(int nCopyNo)
 {
     EZioApi.sendcommand("^C" + nCopyNo.ToString());
 }
Пример #19
0
 public void PageNo(int nPageNo)
 {
     EZioApi.sendcommand("^P" + nPageNo.ToString());
 }
Пример #20
0
 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));
 }
Пример #21
0
 public void Dark(int nDark)
 {
     EZioApi.sendcommand("^H" + nDark.ToString());
 }
Пример #22
0
 public void LabelWidth(int nWidth)
 {
     EZioApi.sendcommand("^W" + nWidth.ToString());
 }
Пример #23
0
 public int FillRec(int PosX, int PosY, int Rec_W, int Rec_H)
 {
     return(EZioApi.FillRec(PosX, PosY, Rec_W, Rec_H));
 }
Пример #24
0
 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));
 }
Пример #25
0
 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));
 }
Пример #26
0
 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));
 }
Пример #27
0
 public void Close()
 {
     EZioApi.closeport();
 }
Пример #28
0
 public void Speed(int nSpeed)
 {
     EZioApi.sendcommand("^S" + nSpeed.ToString());
 }
Пример #29
0
 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));
 }
Пример #30
0
 public int DrawOblique(int PosX1, int PosY1, int Thick, int PosX2, int PosY2)
 {
     return(EZioApi.DrawOblique(PosX1, PosY1, Thick, PosX2, PosY2));
 }