示例#1
0
        private void btSTextOut_Click(object sender, EventArgs e)
        {
            if ((txbSTextOut.Text == null) || ("".Equals(txbSTextOut.Text)))
            {
                return;
            }

            int nFontStyle = 0;

            for (int i = 0; i <= 6; i++)
            {
                if (chkedlbSFontStyle.GetItemChecked(i))
                {
                    if (i == 0)
                    {
                        nFontStyle |= 1 << 3;
                    }
                    else
                    {
                        nFontStyle |= 1 << (i + 6);
                    }
                }
            }

            POSDLL.POS_S_TextOut(txbSTextOut.Text + "\n", Convert.ToInt32(numSTextOutOrgx.Value), Convert.ToInt32(numSWidthTimes.Value),
                                 Convert.ToInt32(numSHeightTimes.Value), cbSTextOutFontType.SelectedIndex, nFontStyle);
        }
示例#2
0
 private void btWrite_Click(object sender, EventArgs e)
 {
     byte[] data;
     if ((posPtr == IntPtr.Zero) || (txbContent.Text == null) || ("".Equals(txbContent.Text)))
     {
         return;
     }
     data = Encoding.Default.GetBytes(txbContent.Text + "\n");
     POSDLL.POS_WriteFile(posPtr, data, data.Length);
 }
示例#3
0
 private void btSetBarcode_Click(object sender, EventArgs e)
 {
     if ((txbSBarcode.Text == null) || ("".Equals(txbSBarcode.Text)))
     {
         return;
     }
     POSDLL.POS_S_SetBarcode(txbSBarcode.Text, Convert.ToInt32(numSBarcodeOrgx.Value), cbSBarcodeType.SelectedIndex + 0x41,
                             Convert.ToInt32(numSBarcodeUnitWidth.Value), Convert.ToInt32(numSBarcodeHeight.Value),
                             cbSBarcodeFontType.SelectedIndex, cbSBarcodeHriFontPosition.SelectedIndex, txbSBarcode.Text.Length);
 }
示例#4
0
        private void btSDownloadAndPrintBmp_Click(object sender, EventArgs e)
        {
            int nMode = cbSPrintBmpMode.SelectedIndex;

            if (nMode == 2)
            {
                nMode = 0x20;
            }
            else if (nMode == 3)
            {
                nMode = 0x21;
            }
            POSDLL.POS_S_DownloadAndPrintBmp("Kitty.bmp", Convert.ToInt32(numSDownloadAndPrintBmpOrgx.Value), nMode);
        }
示例#5
0
 private void btEndDoc_Click(object sender, EventArgs e)
 {
     POSDLL.POS_EndDoc();
 }
示例#6
0
 private void btStartDoc_Click(object sender, EventArgs e)
 {
     POSDLL.POS_StartDoc();
 }
示例#7
0
        private void btClose_Click(object sender, EventArgs e)
        {
            int ret;

            ret = POSDLL.POS_Close();
        }
示例#8
0
 private void btPreDownloadBmpsToFlash_Click(object sender, EventArgs e)
 {
     ret = POSDLL.POS_PreDownloadBmpsToFlash(new string[] { "Kitty.bmp" }, 1);
 }
示例#9
0
 private void btSetCharSetAndCodePage_Click(object sender, EventArgs e)
 {
     POSDLL.POS_SetCharSetAndCodePage(cbCharSet.SelectedIndex, cbCodePage.SelectedIndex);
 }
示例#10
0
 private void btSetMode_Click(object sender, EventArgs e)
 {
     POSDLL.POS_SetMode(cbPrintMode.SelectedIndex);
 }
示例#11
0
 private void btSetAreaWidth_Click(object sender, EventArgs e)
 {
     POSDLL.POS_S_SetAreaWidth(Convert.ToInt32(numSTextOutAreaWidth.Value));
 }
示例#12
0
 private void btCutPaper_Click(object sender, EventArgs e)
 {
     POSDLL.POS_CutPaper(cbCutPaperMode.SelectedIndex, Convert.ToInt32(numCutPaperDistance.Value));
 }
示例#13
0
 private void btRTQueryStatus_Click(object sender, EventArgs e)
 {
     byte[] buf = new byte[1];
     POSDLL.POS_RTQueryStatus(buf);
 }
示例#14
0
 private void btKickOutDrawer_Click(object sender, EventArgs e)
 {
     POSDLL.POS_KickOutDrawer(cbDrawerPin.SelectedIndex, Convert.ToInt32(numDrawerOnTimes.Value), Convert.ToInt32(numDrawerOffTimes.Value));
 }
示例#15
0
 private void btReset_Click(object sender, EventArgs e)
 {
     POSDLL.POS_Reset();
 }
示例#16
0
 private void btFeedLine_Click(object sender, EventArgs e)
 {
     POSDLL.POS_FeedLine();
 }
示例#17
0
 private void btOpen_Click(object sender, EventArgs e)
 {
     posPtr = POSDLL.POS_Open("COM1", 9600, 8, 0, 0, 0x01);
 }
示例#18
0
 private void btSetMotionUnit_Click(object sender, EventArgs e)
 {
     POSDLL.POS_SetMotionUnit(Convert.ToInt32(numMotionUnitH.Value), Convert.ToInt32(numMotionUnitV.Value));
 }
示例#19
0
 private void btPrintBmpInFlash_Click(object sender, EventArgs e)
 {
     POSDLL.POS_S_PrintBmpInFlash(Convert.ToInt32(numSOrgxPrintBmpInFlash.Value), Convert.ToInt32(numSOrgxPrintBmpInFlash.Value), cbSModePrintBmpInFlash.SelectedIndex);
 }
示例#20
0
 private void btSetRightSpacing_Click(object sender, EventArgs e)
 {
     POSDLL.POS_SetRightSpacing(Convert.ToInt32(numRightSpacing.Value));
 }
示例#21
0
 private void btPreDownloadBmpToRAM_Click(object sender, EventArgs e)
 {
     POSDLL.POS_PreDownloadBmpToRAM("Kitty.bmp", Convert.ToInt32(numBmpIDinRAM.Value));
 }