string uid; // 全球唯一标示符 // WxPrinter的构造方法 public WxPrinter(HomeForm homeForm, string sUid) { myHomeForm = homeForm; myPrintServer = new PrintService(this); myImageTool = new ImageTool(this); uid = sUid; // 向服务器注册当前打印机 string code = HttpTool.sendPost(ADD_PRINTER_UID_URL, "uid=" + uid); Properties.Settings.Default.print_code = code; Properties.Settings.Default.Save(); }
//获取需要打印的照片的URL private string getTaskUrl() { string newTaskUrl = HttpTool.sendPost(WxPrinter.GET_TASK_IMAGE_URL, "print_code=" + Properties.Settings.Default.print_code); return(newTaskUrl); }