Csharp/C#教程:打开/关闭抽屉的C#代码并同时打印收据?分享


打开/关闭抽屉的C#代码并同时打印收据?

有没有人知道如何创建一个C#应用程序,可以打开连接到计算机的抽屉并同时打印收据?

抽屉名称:PCD-354电子现金抽屉

现金收据打印机:Epson TM-T88v

using System; using System.Collections.Generic; using System.Text; using Microsoft.PointOfService; namespace POS { public class CashDrawerClass { CashDrawer myCashDrawer; PosExplorer explorer; public CashDrawerClass() { explorer = new PosExplorer(this); DeviceInfo ObjDevicesInfo = explorer.GetDevice("CashDrawer"); myCashDrawer = explorer.CreateInstance(ObjDevicesInfo); } public void OpenCashDrawer() { myCashDrawer.Open(); myCashDrawer.Claim(1000); myCashDrawer.DeviceEnabled = true; myCashDrawer.OpenDrawer(); myCashDrawer.DeviceEnabled = false; myCashDrawer.Release(); myCashDrawer.Close(); } } } 

试试看。 也许它会帮助你对事情有所了解

尝试使用这个链接哥们,它会帮助.. https://social.msdn.microsoft.com/Forums/en/posfordotnet/thread/968d7d90-9376-4fee-9838-b79ec0e630e3

上述就是C#学习教程:打开/关闭抽屉的C#代码并同时打印收据?分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/1273247.html

(0)
上一篇 2022年11月28日
下一篇 2022年11月28日

精彩推荐