public HomeForm() { InitializeComponent(); //设置二维码 setQrCodeImage(); // 初始化微信打印机 string uuid = Properties.Settings.Default.uid; if (uuid == null || uuid == "") { uuid = Guid.NewGuid().ToString(); Properties.Settings.Default.uid = uuid; Properties.Settings.Default.Save(); } wxPrinter = new WxPrinter(this,uuid); codeLabel.Text = Properties.Settings.Default.print_code; //开始监测打印任务 wxPrinter.startCheckTask(); CheckForIllegalCrossThreadCalls = false; switchToFullScreen(); }
public HomeForm() { InitializeComponent(); //设置二维码 setQrCodeImage(); // 初始化微信打印机 string uuid = Properties.Settings.Default.uid; if (uuid == null || uuid == "") { uuid = Guid.NewGuid().ToString(); Properties.Settings.Default.uid = uuid; Properties.Settings.Default.Save(); } wxPrinter = new WxPrinter(this, uuid); codeLabel.Text = Properties.Settings.Default.print_code; //开始监测打印任务 wxPrinter.startCheckTask(); CheckForIllegalCrossThreadCalls = false; switchToFullScreen(); }
public HomeForm() { InitializeComponent(); //设置二维码 setQrCodeImage(); wxPrinter = new WxPrinter(this); //重置打印码 ResetPrintCode(); //开始监测打印任务 wxPrinter.startCheckTask(); }
public PrintService(WxPrinter wxPrinter) { myWxPrinter = wxPrinter; }
//构造方法,持有HomeForm的引用 public ImageTool(WxPrinter wxPrinter) { myWxPrinter = wxPrinter; checkImageWorker = new System.ComponentModel.BackgroundWorker(); checkImageWorker.DoWork += new DoWorkEventHandler(checkImageWorker_DoWork); }