zhangyang 5 лет назад
Родитель
Сommit
dc253b7d1d
39 измененных файлов с 2388 добавлено и 5162 удалено
  1. 0 55
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/chufang_printer_setting.xml
  2. 0 8
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/chufang_printer_setting_fenlei_select.xml
  3. BIN
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_bingkou.png
  4. BIN
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_chuankou.png
  5. 56 0
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_setting.xml
  6. BIN
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_usb.png
  7. BIN
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_wangkou.png
  8. 0 90
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/main.xml
  9. 0 170
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/setting.xml
  10. 0 22
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/setting_chufang_printer_item.xml
  11. 8 1
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/system_setting.xml
  12. 0 24
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimai_order_fail_reason_dlg.xml
  13. 0 11
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimai_order_info_page_listitem.xml
  14. 0 37
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimai_order_item.xml
  15. 0 89
      bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimaiorder_info.xml
  16. 568 0
      include/qrencode/qrencode.h
  17. 99 0
      zhipuzi_pay_plugin/helper/CBitmapHelper.cpp
  18. 35 0
      zhipuzi_pay_plugin/helper/CBitmapHelper.h
  19. 0 47
      zhipuzi_pay_plugin/network/CMessagePush.cpp
  20. 0 3
      zhipuzi_pay_plugin/network/CMessagePush.h
  21. 9 13
      zhipuzi_pay_plugin/pch/pch.h
  22. 493 723
      zhipuzi_pay_plugin/tool/CPosPrinter.cpp
  23. 61 44
      zhipuzi_pay_plugin/tool/CPosPrinter.h
  24. 23 213
      zhipuzi_pay_plugin/tool/CSetting.cpp
  25. 0 55
      zhipuzi_pay_plugin/tool/CSetting.h
  26. 0 122
      zhipuzi_pay_plugin/tool/CSqlite3.cpp
  27. 0 2
      zhipuzi_pay_plugin/tool/CSqlite3.h
  28. 0 103
      zhipuzi_pay_plugin/wnd/CChufangSettingWnd.cpp
  29. 0 347
      zhipuzi_pay_plugin/wnd/CChufangSettingWnd.h
  30. 0 1
      zhipuzi_pay_plugin/wnd/CLoginWnd.h
  31. 0 2026
      zhipuzi_pay_plugin/wnd/CMainWnd.cpp
  32. 0 93
      zhipuzi_pay_plugin/wnd/CMainWnd.h
  33. 0 1
      zhipuzi_pay_plugin/wnd/CMessageboxWnd.h
  34. 1028 842
      zhipuzi_pay_plugin/wnd/CSystemSettingWnd.cpp
  35. 4 1
      zhipuzi_pay_plugin/wnd/CSystemSettingWnd.h
  36. 2 0
      zhipuzi_pay_plugin/wnd/CValueWnd.cpp
  37. 0 1
      zhipuzi_pay_plugin/wnd/CWaimaiOrderFailReasonWnd.h
  38. 2 6
      zhipuzi_pay_plugin/zhipuzi_pay_plugin.vcxproj
  39. 0 12
      zhipuzi_pay_plugin/zhipuzi_pay_plugin.vcxproj.filters

+ 0 - 55
bin/Win32/Debug/zhipuzi_pay_plugin/skin/chufang_printer_setting.xml

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window size="800,600" caption="0,0,0,36" roundcorner="4,4" >
-	<VerticalLayout bkimage="file='Dialog_BG1.png' corner='4,50,4,4'">
-		<HorizontalLayout height="40" inset="10,2,10,0">
-			<Label name="chufang_setting_title" text="新建厨房打印机" width="100" />
-			<Control />
-			<Button name="chufang_setting_closebtn" padding="0,4,0,0" width="22" height="22" tooltip="关闭" normalimage="file='Login_TopBar_Close_Btn.png'" hotimage="file='Login_TopBar_Close_Btn_Hover.png'" pushedimage="file='Login_TopBar_Close_Btn_Click.png'"/>
-		</HorizontalLayout>
-		<VerticalLayout inset="15,0,15,15" vscrollbar="true" >
-			<Control height="20" />
-
-			<HorizontalLayout height="56">
-				<Label text="厨房打印机名字" width="160"/>
-				<Edit name="chufang_setting_name" width="150" height="32" padding="0,12,0,12" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="56" valign="center">
-				<Label text="IP地址" width="160" />
-				<Edit name="chufang_setting_ip" width="150" height="32" padding="0,12,0,12" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
-				<Label name="chufang_setting_ip_error" text="IP地址格式不正确" padding="20,0,0,0" textcolor="#FFFF0000" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="56" valign="center">
-				<Label text="打印机规格" width="160" />
-				<Combo name="chufang_setting_guige" padding="0,12,0,12" width="140" height="32" tooltip="请点击这里选择您的打印机纸张宽度规格" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-					<ListLabelElement text="58mm" selected="true" />
-					<ListLabelElement text="80mm" />
-				</Combo>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="56" valign="center">
-				<Label text="分单打印" width="160" />
-				<CheckBox name="chufang_setting_fendan" padding="0,5,0,5" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="56" valign="center">
-				<Label text="分类打印" width="160" />
-				<CheckBox name="chufang_setting_fenlei" padding="0,5,0,5" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-			
-			<VerticalLayout name="chufang_setting_fenlei_xuanze">
-				<Label text="请在下面勾选需要打印的商品分类" height="30"/>
-				<VerticalLayout name="chufang_setting_fenlei_xuanze_area">
-					
-				</VerticalLayout>
-			</VerticalLayout>
-		</VerticalLayout>
-		
-		<HorizontalLayout height="56" valign="center" padding="0,30,0,20">
-			<Control />
-			<Button name="chufang_setting_save" align="center" width="280" height="44" text="保存" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-			<Control />
-		</HorizontalLayout>
-	</VerticalLayout>
-</Window>

+ 0 - 8
bin/Win32/Debug/zhipuzi_pay_plugin/skin/chufang_printer_setting_fenlei_select.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<Window> 
-	<HorizontalLayout height="30">
-		<CheckBox name="chufang_setting_fenleli_xuanze_checkbox" padding="0,7,0,7" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-		<Label name="chufang_setting_fenleli_xuanze_name" text="" width="300" padding="10,0,0,0"/>
-	</HorizontalLayout>
-</Window>

BIN
bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_bingkou.png


BIN
bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_chuankou.png


Разница между файлами не показана из-за своего большого размера
+ 56 - 0
bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_setting.xml


BIN
bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_usb.png


BIN
bin/Win32/Debug/zhipuzi_pay_plugin/skin/dayinji_wangkou.png


Разница между файлами не показана из-за своего большого размера
+ 0 - 90
bin/Win32/Debug/zhipuzi_pay_plugin/skin/main.xml


+ 0 - 170
bin/Win32/Debug/zhipuzi_pay_plugin/skin/setting.xml

@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window>
-	<Setting name="setting_page" bkcolor="#FFEFF6EE">
-		<HorizontalLayout>
-			<HorizontalLayout width="250" padding="20,20,20,0">
-				<VerticalLayout height="400" bkcolor="#FFFFFFFF" childpadding="15" inset="20,20,20,0">
-					<Option name="setting_waimai_order_switch" selected="true" text="外卖接单设置" group="setting_switch" align="center" height="38" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="setting_printer_switch" text="小票打印设置" group="setting_switch" align="center" height="38" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="setting_chufang_printer_switch" text="厨房打印设置" group="setting_switch" align="center" height="38" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="setting_system_switch" text="系统设置" group="setting_switch" align="center" height="38" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="setting_system_about" text="关于" group="setting_switch" align="center" height="38" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-
-					<Button name="setting_logout" padding="0,50,0,0" width="300" height="38" text="退出登陆" textcolor="#FFFFFFFF" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<TabLayout name="setting_switch">
-				<VerticalLayout bkcolor="#FFFFFFFF" padding="0,20,20,20" inset="15,15,15,15">
-					<HorizontalLayout height="44">
-						<Label text="新订单语音通知" width="260" />
-						<CheckBox name="setting_is_new_waimai_voice" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="新订单自动接单" width="260"/>
-						<CheckBox name="setting_is_new_waimai_autoconfirm" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44" visible="false">
-						<Label text="新订单右下角弹框提醒" width="260"/>
-						<CheckBox name="setting_is_new_waimai_dialog" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-
-				<VerticalLayout bkcolor="#FFFFFFFF" padding="0,20,20,20" inset="15,15,15,15" vscrollbar="true">
-					<HorizontalLayout height="44">
-						<Label text="新订单自动打印" width="260" />
-						<CheckBox name="setting_is_new_waimai_printer" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="打印机规格" width="260"/>
-						<Combo name="setting_printer_guige" padding="0,9,0,0" width="140" height="26" tooltip="请点击这里选择您的打印机纸张宽度规格" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-							<ListLabelElement text="58mm" selected="true" />
-							<ListLabelElement text="80mm" />
-						</Combo>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="打印联数" width="260"/>
-						<Combo name="setting_printer_lianshu" padding="0,9,0,0" width="140" height="26" tooltip="请点击这里选择您的打印机打印小票联数" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-							<ListLabelElement text="1联" selected="true" />
-							<ListLabelElement text="2联" />
-							<ListLabelElement text="3联" />
-							<ListLabelElement text="4联" />
-						</Combo>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="打印机接口类型" width="260"/>
-						<Combo name="setting_printer_leixing" padding="0,9,0,0" width="140" height="26" tooltip="请点击这里选择您的打印机接口类型" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-							<ListLabelElement text="智能识别模式" selected="true" />
-							<ListLabelElement text="usb" />
-							<ListLabelElement text="并口" />
-							<ListLabelElement text="串口" />
-							<ListLabelElement text="网口" />
-						</Combo>
-					</HorizontalLayout>
-					<HorizontalLayout height="44" name="setting_printer_usb_layout">
-						<Label text="usb打印设备选择" width="260"/>
-						<Combo name="setting_printer_usb" padding="0,9,0,0" width="800" height="26" tooltip="请点击这里选择您的打印机接口类型" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-						</Combo>
-					</HorizontalLayout>
-					<HorizontalLayout height="56" name="setting_printer_wangkou_layout">
-						<Label text="网口IP地址" width="260"/>
-						<Edit name="setting_printer_wangkou_ip" width="200" height="32" padding="0,12,0,12" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
-
-						<Button name="setting_printer_wangkouk_save_btn" align="center" width="100" height="38" padding="20,8,0,3" text="保存" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-					</HorizontalLayout>
-					<HorizontalLayout height="44" padding="0,20,0,0">
-						<Label text="小票格式设置" width="260" />
-					</HorizontalLayout>
-					<Control height="1" bkcolor="#FF708090" />
-					<HorizontalLayout height="44">
-						<Label text="取货方式大号字体" width="260" />
-						<CheckBox name="setting_printer_quhuo_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="订单号大号字体" width="260" />
-						<CheckBox name="setting_printer_dingdanhao_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="下单时间大号字体" width="260" />
-						<CheckBox name="setting_printer_xiadanshijian_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="配送(自取)时间大号字体" width="260" />
-						<CheckBox name="setting_printer_peisongshijian_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="姓名大号字体" width="260" />
-						<CheckBox name="setting_printer_name_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="电话大号字体" width="260" />
-						<CheckBox name="setting_printer_phone_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="地址大号字体" width="260" />
-						<CheckBox name="setting_printer_address_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="商品大号字体" width="260" />
-						<CheckBox name="setting_printer_shangpin_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="备注大号字体" width="260" />
-						<CheckBox name="setting_printer_memo_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="价格大号字体" width="260" />
-						<CheckBox name="setting_printer_price_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="付款方式大号字体" width="260" />
-						<CheckBox name="setting_printer_pay_big" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-
-				<VerticalLayout bkcolor="#FFFFFFFF" padding="0,20,20,20" inset="15,15,15,15">
-					<HorizontalLayout height="44">
-						<Label text="新订单自动厨房打印" width="260" />
-						<CheckBox name="setting_is_new_waimai_chufang_printer" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44" padding="0,30,0,20">
-						<Button name="setting_new_chufang_printer_btn" align="center" width="200" height="38" padding="0,3,0,3" text="新建厨房打印机" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-					</HorizontalLayout>
-					<List name="setting_chufang_printer_list" bordersize="1" bordercolor="#FF000000" itemlinecolor="#FF000000" vscroll="true">
-						<ListHeader />
-						<ListHeaderItem text="打印机名称" width="200" align="center" />
-						<ListHeaderItem text="IP地址" width="200" align="center" />
-						<ListHeaderItem text="打印机规格" width="100" align="center" />
-						<ListHeaderItem text="商品分单打印" width="100" align="center" />
-						<ListHeaderItem text="按商品分类打印" width="200" align="center" />
-						<ListHeaderItem text="关联商品分类" width="200" align="center" />
-						<ListHeaderItem text="操作" align="center" />
-					</List> 
-				</VerticalLayout>
-
-				<VerticalLayout bkcolor="#FFFFFFFF" padding="0,20,20,20" inset="15,15,15,15">
-					<HorizontalLayout height="44">
-						<Label text="开机自动启动" width="260" />
-						<CheckBox name="setting_is_auto_start" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="启动时自动登录" width="260" />
-						<CheckBox name="setting_is_auto_login" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-					<HorizontalLayout height="44">
-						<Label text="点击关闭时,最小化到系统托盘" width="260" />
-						<CheckBox name="setting_is_close_min" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-
-				<VerticalLayout bkcolor="#FFFFFFFF" padding="0,20,20,20" inset="15,15,15,15">
-					<Control height="300" />
-					<Label text="智铺子收银插件" align="center">
-					</Label>
-					<Label name="setting_version" text="版本号:1.0.0.1" align="center">
-					</Label>
-				</VerticalLayout>
-			</TabLayout>
-		</HorizontalLayout>
-	</Setting>
-</Window>

+ 0 - 22
bin/Win32/Debug/zhipuzi_pay_plugin/skin/setting_chufang_printer_item.xml

@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<Window> 
-	<ListContainerElement name="setting_chufang_printer_item" height="80"> 
-		<HorizontalLayout> 
-			<Label name="setting_chufang_printer_item_name" width="200" align="center"/> 
-			<Label name="setting_chufang_printer_item_ip" width="200" align="center"/> 
-			<Label name="setting_chufang_printer_guige" width="100" align="center"/>
-			<Label name="setting_chufang_printer_fendan" width="100" align="center"/> 
-			<Label name="setting_chufang_printer_item_fenlei" width="200" align="center"/> 
-			<HorizontalLayout width="300" height="80" valign="center">
-				<Label name="setting_chufang_printer_item_fenlei_ids" width="300" multiline="true" align="center" valign="center"/> 
-			</HorizontalLayout>
-			<HorizontalLayout name="setting_chufang_printer_caozuo" align="center">
-				<Control></Control>
-				<Button name="setting_chufang_printer_item_update_btn" align="center" width="26" height="27" padding="20,25,0,0" normalimage="file='Setting_Btn.png'" hotimage="file='Setting_Btn_Hover.png'" pushedimage="file='Setting_Btn_Active.png'" />
-				<Button name="setting_chufang_printer_item_delete_btn" align="center" width="18" height="18" padding="20,29,0,0" normalimage="file='Delete_Members_Icon.png'" hotimage="file='Delete_Members_Icon_Hover.png'" pushedimage="file='Delete_Members_Icon_Click.png'" />
-				<Control></Control>
-			</HorizontalLayout>
-		</HorizontalLayout> 
-	</ListContainerElement> 
-</Window>

+ 8 - 1
bin/Win32/Debug/zhipuzi_pay_plugin/skin/system_setting.xml

@@ -12,13 +12,16 @@
 		<HorizontalLayout>
 			<VerticalLayout width="160" bkcolor="0xFFF8F8F8">			
 				<Control bkimage="shop_logo.png" width="70" height="70" padding="48,20,0,10"></Control>
-				<Label name="system_setting_shopname" text="店铺名字店铺" font="0" width="140" padding="10,0,10,0" align="center" multiline="true" ></Label>
+				<Label name="system_setting_shopname" text="店铺名字店铺" font="0" width="140" height="60" padding="10,0,10,0" align="center" multiline="true" ></Label>
 				
 				<Control width="160" height="1" bkcolor="#FFE0E0E6" padding="0,25,0,25"></Control>
 				
 				<Option name="system_setting_option_zhuaqu" text="金额抓取" font="0" group="system_setting_item" selected="true" height="40" hotimage="tab_hot.bmp" selectedimage="setting_tab_bkg.png" selectedtextcolor="0xFFFFFFFF"/>
+				<Option name="system_setting_option_dayinji" text="打印机" font="0" group="system_setting_item" height="40" hotimage="tab_hot.bmp" selectedimage="setting_tab_bkg.png" selectedtextcolor="0xFFFFFFFF"/>
 				<Option name="system_setting_option_kuaijiejian" text="快捷键" font="0" group="system_setting_item" height="40" hotimage="tab_hot.bmp" selectedimage="setting_tab_bkg.png" selectedtextcolor="0XFFFFFFFF"/>
 				<Option name="system_setting_option_about" text="关于" font="0" group="system_setting_item" height="40" hotimage="tab_hot.bmp" selectedimage="setting_tab_bkg.png" selectedtextcolor="0XFFFFFFFF"/>
+				
+				<Control></Control>
    			</VerticalLayout>
 			
 			<TabLayout name="switch">
@@ -27,6 +30,10 @@
 				</HorizontalLayout>
 				
 				<HorizontalLayout vscrollbar="true">
+					<Include source="dayinji_setting.xml" />
+				</HorizontalLayout>
+				
+				<HorizontalLayout vscrollbar="true">
 					<Include source="kuaijiejian_setting.xml" />
 				</HorizontalLayout>
 				

+ 0 - 24
bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimai_order_fail_reason_dlg.xml

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window size="600,300" caption="0,0,0,36" roundcorner="4,4" >
-	<VerticalLayout bkimage="file='Dialog_BG1.png' corner='4,50,4,4'">
-		<HorizontalLayout height="40" inset="10,2,10,0">
-			<Label name="waimai_order_fail_dlg_title" text="填写订单失败原因" width="150" />
-			<Control />
-			<Button name="waimai_order_fail_dlg_closebtn" padding="0,4,0,0" width="22" height="22" tooltip="关闭" normalimage="file='Login_TopBar_Close_Btn.png'" hotimage="file='Login_TopBar_Close_Btn_Hover.png'" pushedimage="file='Login_TopBar_Close_Btn_Click.png'"/>
-		</HorizontalLayout>
-		<VerticalLayout inset="15,0,15,15" vscrollbar="true" >
-			<Control height="20" />
-
-			<HorizontalLayout height="56">
-				<Label text="订单失败原因" width="160"/>
-				<Edit name="waimai_order_fail_dlg_reason" width="400" height="32" padding="0,12,0,12" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
-			</HorizontalLayout>
-		</VerticalLayout>
-		
-		<HorizontalLayout height="56" valign="center" padding="0,30,0,20">
-			<Control />
-			<Button name="waimai_order_fail_dlg_save" align="center" width="280" height="44" text="保存" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-			<Control />
-		</HorizontalLayout>
-	</VerticalLayout>
-</Window>

+ 0 - 11
bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimai_order_info_page_listitem.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<Window> 
-	<ListContainerElement name="waimai_order_info_page_listitem" height="30" minheight="30"> 
-		<HorizontalLayout height="38"> 
-			<Label name="waimai_order_info_page_listitem_foodname" /> 
-			<Label name="waimai_order_info_page_listitem_quantity" width="200" align="center"/> 
-			<Label name="waimai_order_info_page_listitem_price" width="200" align="center"/> 
-		</HorizontalLayout> 
-	</ListContainerElement> 
-</Window>

+ 0 - 37
bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimai_order_item.xml

@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window>
-	<WaimaiOrderItem height="200" bkcolor="#FFFFFFFF" padding="0,20,20,0">
-		<HorizontalLayout>
-			<Label float="true" name="waimai_order_list_order_no" text="订单号:" pos="10,6,320,36" />
-			<Label float="true" name="waimai_order_list_from" text="订单来源:" pos="350,6,582,36" />
-			
-			<Label float="true" name="waimai_order_list_name" text="姓名:" pos="10,36,182,66" />
-			<Label float="true" name="waimai_order_list_phone" text="电话:" pos="350,36,600,66" />
-			<Label float="true" name="waimai_order_list_address" text="地址:" pos="10,66,550,96" />
-			
-			<Label float="true" name="waimai_order_list_init_date" text="下单时间:" pos="10,96,220,126" />
-			<Label float="true" name="waimai_order_list_price" text="价格:" pos="350,96,500,126" />
-			
-			<Label float="true" name="waimai_order_list_type" text="配送方式:" pos="10,126,400,156" />
-			
-			<Label float="true" name="waimai_order_list_delivery_date" text="配送时间:" pos="10,156,182,186" />
-			
-			<Label float="true" name="waimai_order_list_refund_status" text="退款状态:" pos="350,156,800,186" />
-			
-			<Control name="waimai_order_list_yuyue" bkimage="yuyue.png" float="true" pos="250,120,362,190" />
-			<Control name="waimai_order_list_ziqu" bkimage="ziti.png" float="true" pos="400,120,512,190" />
-		</HorizontalLayout>
-		
-		<HorizontalLayout width="200">
-			<Button name="waimai_order_list_info" float="true" pos="100,6,180,44" text="详情" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'"/>
-			<Button name="waimai_order_list_print" float="true" pos="100,54,180,92" text="打印" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'"/>
-			
-			<Button name="waimai_order_list_confirme" float="true" pos="100,112,180,150" text="确认" textcolor="#FFFFFFFF"/>
-			<Button name="waimai_order_list_success" float="true" pos="100,112,180,150" text="设为成功" textcolor="#FFFFFFFF"/>
-			<Button name="waimai_order_list_fail" float="true" pos="100,160,180,198" text="设为失败" textcolor="#FFFFFFFF" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'"/>
-			
-			<Button name="waimai_order_list_agree" float="true" pos="100,112,180,150" text="同意退款" textcolor="#FFFFFFFF"/>
-			<Button name="waimai_order_list_disagree" float="true" pos="100,160,180,198" text="拒绝退款" textcolor="#FFFFFFFF" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'"/>
-		</HorizontalLayout>
-	</WaimaiOrderItem>
-</Window>

+ 0 - 89
bin/Win32/Debug/zhipuzi_pay_plugin/skin/waimaiorder_info.xml

@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window>
-	<WaimaiOrderInfo name="waimaiorder_info_page" bkcolor="#FFEFF6EE">
-		<HorizontalLayout height="44" bkcolor="#FFFFFFFF" padding="0,0,0,0">
-			<Button name="waimai_order_info_page_return" float="true" pos="20,3,120,41" text="返回" textcolor="#FFFFFFFF"/>
-		</HorizontalLayout>
-
-		<HorizontalLayout>
-			<VerticalLayout name="waimai_order_info_page_orderlayout" padding="20,20,20,20" vscrollbar="true">
-				<VerticalLayout name="waimai_order_info_page_layout_1" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<HorizontalLayout height="50">
-						<Label float="true" name="waimai_order_info_page_liushuihao" text="#1" pos="10, 10, 60, 40" />
-						<Label float="true" name="waimai_order_info_page_order_no" text="订单号:" pos="80, 10, 500, 40" />
-					</HorizontalLayout>
-
-					<Control height="1" bkcolor="#FF708090" />
-
-					<List name="waimai_order_info_page_foodlist">
-						<ListHeader />
-						<ListHeaderItem text="商品" align="left" />
-						<ListHeaderItem text="数量" width="200" align="center" />
-						<ListHeaderItem text="单价" width="200" align="center" />
-					</List>  
-
-					<Control height="10" />
-
-					<Label name="waimaorder_info_page_memo" minheight="30" multiline="true" text="备注:" />
-
-					<Control height="1" bkcolor="#FF708090" />
-
-					<VerticalLayout name="waimai_order_info_page_fees">				
-
-					</VerticalLayout>
-					
-					<Control name="waimai_order_info_page_fees_line" height="1" bkcolor="#FF708090" />
-					
-					<Label name="waimai_order_info_page_totalprice" height="40" padding="0,0,30,0" align="right" text="总计:" />
-				</VerticalLayout>
-
-				<VerticalLayout name="waimai_order_info_page_layout_2" height="150" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<Label text="顾客信息" height="30" />
-					<Control height="1" bkcolor="#FF708090" />
-					<Label name="waimai_order_info_page_name" text="姓名:" height="30" />
-					<Label name="waimai_order_info_page_phone" text="电话:" height="30" />
-					<Label name="waimai_order_info_page_address" text="地址:" height="30" />
-					<Label name="waimai_order_info_page_init_date" text="下单时间:" height="30" />
-				</VerticalLayout>
-					
-				<VerticalLayout name="waimai_order_info_page_qishouinfo" height="120" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<Label text="骑手信息" height="30" />
-					<Control height="1" bkcolor="#FF708090" />
-					<Label name="waimai_order_info_page_qishou_name" text="骑手姓名:" height="30" />
-					<Label name="waimai_order_info_page_qishou_phone" text="骑手电话:" height="30" />
-					<Label name="waimai_order_info_page_qishou_type" text="骑手类型:" height="30" />
-				</VerticalLayout>				
-				
-				<VerticalLayout name="waimai_order_info_page_layout_3" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<Label text="订单信息" height="30" />
-					<Control height="1" bkcolor="#FF708090" />
-					<Label name="waimai_order_info_page_status" height="30" text="订单状态:" />
-					<Label name="waimai_order_info_page_type" height="30" text="订单来源:" />
-					<Label name="waimai_order_info_page_pay_type" height="30" text="付款方式:" />
-					<VerticalLayout name="waimai_order_info_page_field">
-
-					</VerticalLayout>
-					<Label name="waimai_order_info_page_delivery_type" height="30" text="配送方式:" />
-					<Label name="waimai_order_info_page_delivery_time" height="30" text="配送时间:" />
-					<Label name="waimai_order_info_page_refund_status" height="30" text="退款状态:" />
-					<Label name="waimai_order_info_page_configmemo" height="30" text="商家备注:" />
-					
-					<Control name="waimai_order_info_page_huodaofukuan" bkimage="huodaofukuan.png" float="true" pos="200,70,312,140" />
-				</VerticalLayout>
-			</VerticalLayout>
-
-			<HorizontalLayout width="250" height="400" bkcolor="#FFFFFFFF" padding="0,20,20,0">
-				<Button name="waimai_order_info_page_print" float="true" pos="50,60,200,98" text="打印" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-				
-				<Button name="waimai_order_info_page_confirme" float="true" pos="50,108,200,146" text="确认" textcolor="#FFFF0FFFF" />
-				<Button name="waimai_order_info_page_success" float="true" pos="50,108,200,146" text="设为成功" textcolor="#FFFF0FFFF" />
-				<Button name="waimai_order_info_page_fail" float="true" pos="50,156,200,192" text="设为失败" textcolor="#FFFFFFFF" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
-				
-				<Button name="waimai_order_info_page_agree" float="true" pos="50,108,200,146" text="同意退款" textcolor="#FFFF0FFFF" />
-				<Button name="waimai_order_info_page_disagree" float="true" pos="50,156,200,192" text="拒绝退款" textcolor="#FFFFFFFF" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
-				
-				<Button name="waimai_order_info_page_refund" float="true" pos="50,108,200,146" text="退款" textcolor="#FFFFFFFF" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
-			</HorizontalLayout>
-		</HorizontalLayout>
-	</WaimaiOrderInfo>
-</Window>

+ 568 - 0
include/qrencode/qrencode.h

@@ -0,0 +1,568 @@
+/**
+ * qrencode - QR Code encoder
+ *
+ * Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/** \mainpage
+ * Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D
+ * symbology.
+ *
+ * \section encoding Encoding
+ *
+ * There are two methods to encode data: <b>encoding a string/data</b> or
+ * <b>encoding a structured data</b>.
+ *
+ * \subsection encoding-string Encoding a string/data
+ * You can encode a string by calling QRcode_encodeString().
+ * The given string is parsed automatically and encoded. If you want to encode
+ * data that can be represented as a C string style (NUL terminated), you can
+ * simply use this way.
+ *
+ * If the input data contains Kanji (Shift-JIS) characters and you want to
+ * encode them as Kanji in QR Code, you should give QR_MODE_KANJI as a hint.
+ * Otherwise, all of non-alphanumeric characters are encoded as 8 bit data.
+ * If you want to encode a whole string in 8 bit mode, you can use
+ * QRcode_encodeString8bit() instead.
+ *
+ * Please note that a C string can not contain NUL characters. If your data
+ * contains NUL, you must use QRcode_encodeData().
+ *
+ * \subsection encoding-input Encoding a structured data
+ * You can construct a structured input data manually. If the structure of the
+ * input data is known, you can use this way.
+ * At first, create a ::QRinput object by QRinput_new(). Then add input data
+ * to the QRinput object by QRinput_append(). Finally call QRcode_encodeInput()
+ * to encode the QRinput data.
+ * You can reuse the QRinput data again to encode it in other symbols with
+ * different parameters.
+ *
+ * \section result Result
+ * The encoded symbol is resulted as a ::QRcode object. It will contain
+ * its version number, width of the symbol and an array represents the symbol.
+ * See ::QRcode for the details. You can free the object by QRcode_free().
+ *
+ * Please note that the version of the result may be larger than specified.
+ * In such cases, the input data would be too large to be encoded in a
+ * symbol of the specified version.
+ *
+ * \section structured Structured append
+ * Libqrencode can generate "Structured-appended" symbols that enables to split
+ * a large data set into mulitple QR codes. A QR code reader concatenates
+ * multiple QR code symbols into a string.
+ * Just like QRcode_encodeString(), you can use QRcode_encodeStringStructured()
+ * to generate structured-appended symbols. This functions returns an instance
+ * of ::QRcode_List. The returned list is a singly-linked list of QRcode: you
+ * can retrieve each QR code in this way:
+ *
+ * \code
+ * QRcode_List *qrcodes;
+ * QRcode_List *entry;
+ * QRcode *qrcode;
+ *
+ * qrcodes = QRcode_encodeStringStructured(...);
+ * entry = qrcodes;
+ * while(entry != NULL) {
+ *     qrcode = entry->code;
+ *     // do something
+ *     entry = entry->next;
+ * }
+ * QRcode_List_free(entry);
+ * \endcode
+ *
+ * Instead of using auto-parsing functions, you can construct your own
+ * structured input. At first, instantiate an object of ::QRinput_Struct
+ * by calling QRinput_Struct_new(). This object can hold multiple ::QRinput,
+ * and one QR code is generated for a ::QRinput.
+ * QRinput_Struct_appendInput() appends a ::QRinput to a ::QRinput_Struct
+ * object. In order to generate structured-appended symbols, it is required to
+ * embed headers to each symbol. You can use
+ * QRinput_Struct_insertStructuredAppendHeaders() to insert appropriate
+ * headers to each symbol. You should call this function just once before
+ * encoding symbols.
+ */
+
+#ifndef QRENCODE_H
+#define QRENCODE_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/**
+ * Encoding mode.
+ */
+typedef enum {
+	QR_MODE_NUL = -1,   ///< Terminator (NUL character). Internal use only
+	QR_MODE_NUM = 0,    ///< Numeric mode
+	QR_MODE_AN,         ///< Alphabet-numeric mode
+	QR_MODE_8,          ///< 8-bit data mode
+	QR_MODE_KANJI,      ///< Kanji (shift-jis) mode
+	QR_MODE_STRUCTURE,  ///< Internal use only
+	QR_MODE_ECI,        ///< ECI mode
+	QR_MODE_FNC1FIRST,  ///< FNC1, first position
+	QR_MODE_FNC1SECOND, ///< FNC1, second position
+} QRencodeMode;
+
+/**
+ * Level of error correction.
+ */
+typedef enum {
+	QR_ECLEVEL_L = 0, ///< lowest
+	QR_ECLEVEL_M,
+	QR_ECLEVEL_Q,
+	QR_ECLEVEL_H      ///< highest
+} QRecLevel;
+
+/**
+ * Maximum version (size) of QR-code symbol.
+ */
+#define QRSPEC_VERSION_MAX 40
+
+/**
+ * Maximum version (size) of QR-code symbol.
+ */
+#define MQRSPEC_VERSION_MAX 4
+
+
+/******************************************************************************
+ * Input data (qrinput.c)
+ *****************************************************************************/
+
+/**
+ * Singly linked list to contain input strings. An instance of this class
+ * contains its version and error correction level too. It is required to
+ * set them by QRinput_setVersion() and QRinput_setErrorCorrectionLevel(),
+ * or use QRinput_new2() to instantiate an object.
+ */
+typedef struct _QRinput QRinput;
+
+/**
+ * Instantiate an input data object. The version is set to 0 (auto-select)
+ * and the error correction level is set to QR_ECLEVEL_L.
+ * @return an input object (initialized). On error, NULL is returned and errno
+ *         is set to indicate the error.
+ * @throw ENOMEM unable to allocate memory.
+ */
+extern QRinput *QRinput_new(void);
+
+/**
+ * Instantiate an input data object.
+ * @param version version number.
+ * @param level Error correction level.
+ * @return an input object (initialized). On error, NULL is returned and errno
+ *         is set to indicate the error.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ * @throw EINVAL invalid arguments.
+ */
+extern QRinput *QRinput_new2(int version, QRecLevel level);
+
+/**
+ * Instantiate an input data object. Object's Micro QR Code flag is set.
+ * Unlike with full-sized QR Code, version number must be specified (>0).
+ * @param version version number (1--4).
+ * @param level Error correction level.
+ * @return an input object (initialized). On error, NULL is returned and errno
+ *         is set to indicate the error.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ * @throw EINVAL invalid arguments.
+ */
+extern QRinput *QRinput_newMQR(int version, QRecLevel level);
+
+/**
+ * Append data to an input object.
+ * The data is copied and appended to the input object.
+ * @param input input object.
+ * @param mode encoding mode.
+ * @param size size of data (byte).
+ * @param data a pointer to the memory area of the input data.
+ * @retval 0 success.
+ * @retval -1 an error occurred and errno is set to indeicate the error.
+ *            See Execptions for the details.
+ * @throw ENOMEM unable to allocate memory.
+ * @throw EINVAL input data is invalid.
+ *
+ */
+extern int QRinput_append(QRinput *input, QRencodeMode mode, int size, const unsigned char *data);
+
+/**
+ * Append ECI header.
+ * @param input input object.
+ * @param ecinum ECI indicator number (0 - 999999)
+ * @retval 0 success.
+ * @retval -1 an error occurred and errno is set to indeicate the error.
+ *            See Execptions for the details.
+ * @throw ENOMEM unable to allocate memory.
+ * @throw EINVAL input data is invalid.
+ *
+ */
+extern int QRinput_appendECIheader(QRinput *input, unsigned int ecinum);
+
+/**
+ * Get current version.
+ * @param input input object.
+ * @return current version.
+ */
+extern int QRinput_getVersion(QRinput *input);
+
+/**
+ * Set version of the QR code that is to be encoded.
+ * This function cannot be applied to Micro QR Code.
+ * @param input input object.
+ * @param version version number (0 = auto)
+ * @retval 0 success.
+ * @retval -1 invalid argument.
+ */
+extern int QRinput_setVersion(QRinput *input, int version);
+
+/**
+ * Get current error correction level.
+ * @param input input object.
+ * @return Current error correcntion level.
+ */
+extern QRecLevel QRinput_getErrorCorrectionLevel(QRinput *input);
+
+/**
+ * Set error correction level of the QR code that is to be encoded.
+ * This function cannot be applied to Micro QR Code.
+ * @param input input object.
+ * @param level Error correction level.
+ * @retval 0 success.
+ * @retval -1 invalid argument.
+ */
+extern int QRinput_setErrorCorrectionLevel(QRinput *input, QRecLevel level);
+
+/**
+ * Set version and error correction level of the QR code at once.
+ * This function is recommened for Micro QR Code.
+ * @param input input object.
+ * @param version version number (0 = auto)
+ * @param level Error correction level.
+ * @retval 0 success.
+ * @retval -1 invalid argument.
+ */
+extern int QRinput_setVersionAndErrorCorrectionLevel(QRinput *input, int version, QRecLevel level);
+
+/**
+ * Free the input object.
+ * All of data chunks in the input object are freed too.
+ * @param input input object.
+ */
+extern void QRinput_free(QRinput *input);
+
+/**
+ * Validate the input data.
+ * @param mode encoding mode.
+ * @param size size of data (byte).
+ * @param data a pointer to the memory area of the input data.
+ * @retval 0 success.
+ * @retval -1 invalid arguments.
+ */
+extern int QRinput_check(QRencodeMode mode, int size, const unsigned char *data);
+
+/**
+ * Set of QRinput for structured symbols.
+ */
+typedef struct _QRinput_Struct QRinput_Struct;
+
+/**
+ * Instantiate a set of input data object.
+ * @return an instance of QRinput_Struct. On error, NULL is returned and errno
+ *         is set to indicate the error.
+ * @throw ENOMEM unable to allocate memory.
+ */
+extern QRinput_Struct *QRinput_Struct_new(void);
+
+/**
+ * Set parity of structured symbols.
+ * @param s structured input object.
+ * @param parity parity of s.
+ */
+extern void QRinput_Struct_setParity(QRinput_Struct *s, unsigned char parity);
+
+/**
+ * Append a QRinput object to the set. QRinput created by QRinput_newMQR()
+ * will be rejected.
+ * @warning never append the same QRinput object twice or more.
+ * @param s structured input object.
+ * @param input an input object.
+ * @retval >0 number of input objects in the structure.
+ * @retval -1 an error occurred. See Exceptions for the details.
+ * @throw ENOMEM unable to allocate memory.
+ * @throw EINVAL invalid arguments.
+ */
+extern int QRinput_Struct_appendInput(QRinput_Struct *s, QRinput *input);
+
+/**
+ * Free all of QRinput in the set.
+ * @param s a structured input object.
+ */
+extern void QRinput_Struct_free(QRinput_Struct *s);
+
+/**
+ * Split a QRinput to QRinput_Struct. It calculates a parity, set it, then
+ * insert structured-append headers. QRinput created by QRinput_newMQR() will
+ * be rejected.
+ * @param input input object. Version number and error correction level must be
+ *        set.
+ * @return a set of input data. On error, NULL is returned, and errno is set
+ *         to indicate the error. See Exceptions for the details.
+ * @throw ERANGE input data is too large.
+ * @throw EINVAL invalid input data.
+ * @throw ENOMEM unable to allocate memory.
+ */
+extern QRinput_Struct *QRinput_splitQRinputToStruct(QRinput *input);
+
+/**
+ * Insert structured-append headers to the input structure. It calculates
+ * a parity and set it if the parity is not set yet.
+ * @param s input structure
+ * @retval 0 success.
+ * @retval -1 an error occurred and errno is set to indeicate the error.
+ *            See Execptions for the details.
+ * @throw EINVAL invalid input object.
+ * @throw ENOMEM unable to allocate memory.
+ */
+extern int QRinput_Struct_insertStructuredAppendHeaders(QRinput_Struct *s);
+
+/**
+ * Set FNC1-1st position flag.
+ */
+extern int QRinput_setFNC1First(QRinput *input);
+
+/**
+ * Set FNC1-2nd position flag and application identifier.
+ */
+extern int QRinput_setFNC1Second(QRinput *input, unsigned char appid);
+
+/******************************************************************************
+ * QRcode output (qrencode.c)
+ *****************************************************************************/
+
+/**
+ * QRcode class.
+ * Symbol data is represented as an array contains width*width uchars.
+ * Each uchar represents a module (dot). If the less significant bit of
+ * the uchar is 1, the corresponding module is black. The other bits are
+ * meaningless for usual applications, but here its specification is described.
+ *
+ * @verbatim
+   MSB 76543210 LSB
+       |||||||`- 1=black/0=white
+       ||||||`-- data and ecc code area
+       |||||`--- format information
+       ||||`---- version information
+       |||`----- timing pattern
+       ||`------ alignment pattern
+       |`------- finder pattern and separator
+       `-------- non-data modules (format, timing, etc.)
+   @endverbatim
+ */
+typedef struct {
+	int version;         ///< version of the symbol
+	int width;           ///< width of the symbol
+	unsigned char *data; ///< symbol data
+} QRcode;
+
+/**
+ * Singly-linked list of QRcode. Used to represent a structured symbols.
+ * A list is terminated with NULL.
+ */
+typedef struct _QRcode_List {
+	QRcode *code;
+	struct _QRcode_List *next;
+} QRcode_List;
+
+/**
+ * Create a symbol from the input data.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ * @param input input data.
+ * @return an instance of QRcode class. The version of the result QRcode may
+ *         be larger than the designated version. On error, NULL is returned,
+ *         and errno is set to indicate the error. See Exceptions for the
+ *         details.
+ * @throw EINVAL invalid input object.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ */
+extern QRcode *QRcode_encodeInput(QRinput *input);
+
+/**
+ * Create a symbol from the string. The library automatically parses the input
+ * string and encodes in a QR Code symbol.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ * @param string input string. It must be NUL terminated.
+ * @param version version of the symbol. If 0, the library chooses the minimum
+ *                version for the given input data.
+ * @param level error correction level.
+ * @param hint tell the library how Japanese Kanji characters should be
+ *             encoded. If QR_MODE_KANJI is given, the library assumes that the
+ *             given string contains Shift-JIS characters and encodes them in
+ *             Kanji-mode. If QR_MODE_8 is given, all of non-alphanumerical
+ *             characters will be encoded as is. If you want to embed UTF-8
+ *             string, choose this. Other mode will cause EINVAL error.
+ * @param casesensitive case-sensitive(1) or not(0).
+ * @return an instance of QRcode class. The version of the result QRcode may
+ *         be larger than the designated version. On error, NULL is returned,
+ *         and errno is set to indicate the error. See Exceptions for the
+ *         details.
+ * @throw EINVAL invalid input object.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ * @throw ERANGE input data is too large.
+ */
+extern QRcode *QRcode_encodeString(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive);
+
+/**
+ * Same to QRcode_encodeString(), but encode whole data in 8-bit mode.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ */
+extern QRcode *QRcode_encodeString8bit(const char *string, int version, QRecLevel level);
+
+/**
+ * Micro QR Code version of QRcode_encodeString().
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ */
+extern QRcode *QRcode_encodeStringMQR(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive);
+
+/**
+ * Micro QR Code version of QRcode_encodeString8bit().
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ */
+extern QRcode *QRcode_encodeString8bitMQR(const char *string, int version, QRecLevel level);
+
+/**
+ * Encode byte stream (may include '\0') in 8-bit mode.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ * @param size size of the input data.
+ * @param data input data.
+ * @param version version of the symbol. If 0, the library chooses the minimum
+ *                version for the given input data.
+ * @param level error correction level.
+ * @throw EINVAL invalid input object.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ * @throw ERANGE input data is too large.
+ */
+extern QRcode *QRcode_encodeData(int size, const unsigned char *data, int version, QRecLevel level);
+
+/**
+ * Micro QR Code version of QRcode_encodeData().
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ */
+extern QRcode *QRcode_encodeDataMQR(int size, const unsigned char *data, int version, QRecLevel level);
+
+/**
+ * Free the instance of QRcode class.
+ * @param qrcode an instance of QRcode class.
+ */
+extern void QRcode_free(QRcode *qrcode);
+
+/**
+ * Create structured symbols from the input data.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ * @param s input data, structured.
+ * @return a singly-linked list of QRcode.
+ */
+extern QRcode_List *QRcode_encodeInputStructured(QRinput_Struct *s);
+
+/**
+ * Create structured symbols from the string. The library automatically parses
+ * the input string and encodes in a QR Code symbol.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ * @param string input string. It must be NUL terminated.
+ * @param version version of the symbol.
+ * @param level error correction level.
+ * @param hint tell the library how Japanese Kanji characters should be
+ *             encoded. If QR_MODE_KANJI is given, the library assumes that the
+ *             given string contains Shift-JIS characters and encodes them in
+ *             Kanji-mode. If QR_MODE_8 is given, all of non-alphanumerical
+ *             characters will be encoded as is. If you want to embed UTF-8
+ *             string, choose this. Other mode will cause EINVAL error.
+ * @param casesensitive case-sensitive(1) or not(0).
+ * @return a singly-linked list of QRcode. On error, NULL is returned, and
+ *         errno is set to indicate the error. See Exceptions for the details.
+ * @throw EINVAL invalid input object.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ */
+extern QRcode_List *QRcode_encodeStringStructured(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive);
+
+/**
+ * Same to QRcode_encodeStringStructured(), but encode whole data in 8-bit mode.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ */
+extern QRcode_List *QRcode_encodeString8bitStructured(const char *string, int version, QRecLevel level);
+
+/**
+ * Create structured symbols from byte stream (may include '\0'). Wholde data
+ * are encoded in 8-bit mode.
+ * @warning This function is THREAD UNSAFE when pthread is disabled.
+ * @param size size of the input data.
+ * @param data input dat.
+ * @param version version of the symbol.
+ * @param level error correction level.
+ * @return a singly-linked list of QRcode. On error, NULL is returned, and
+ *         errno is set to indicate the error. See Exceptions for the details.
+ * @throw EINVAL invalid input object.
+ * @throw ENOMEM unable to allocate memory for input objects.
+ */
+extern QRcode_List *QRcode_encodeDataStructured(int size, const unsigned char *data, int version, QRecLevel level);
+
+/**
+ * Return the number of symbols included in a QRcode_List.
+ * @param qrlist a head entry of a QRcode_List.
+ * @return number of symbols in the list.
+ */
+extern int QRcode_List_size(QRcode_List *qrlist);
+
+/**
+ * Free the QRcode_List.
+ * @param qrlist a head entry of a QRcode_List.
+ */
+extern void QRcode_List_free(QRcode_List *qrlist);
+
+
+/******************************************************************************
+ * System utilities
+ *****************************************************************************/
+
+/**
+ * Return a string that identifies the library version.
+ * @param major_version major version number
+ * @param minor_version minor version number
+ * @param micro_version micro version number
+ */
+extern void QRcode_APIVersion(int *major_version, int *minor_version, int *micro_version);
+
+/**
+ * Return a string that identifies the library version.
+ * @return a string identifies the library version. The string is held by the
+ * library. Do NOT free it.
+ */
+extern char *QRcode_APIVersionString(void);
+
+/**
+ * @deprecated
+ */
+#ifndef _MSC_VER
+extern void QRcode_clearCache(void) __attribute__ ((deprecated));
+#else
+extern void QRcode_clearCache(void);
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* QRENCODE_H */

+ 99 - 0
zhipuzi_pay_plugin/helper/CBitmapHelper.cpp

@@ -9,6 +9,105 @@ CBitmapHelper::CBitmapHelper()
 
 CBitmapHelper::~CBitmapHelper()
 {
+	if (m_bmp != NULL)
+	{
+		delete m_bmp;
+	}
+}
+
+void CBitmapHelper::LockBitmap(Gdiplus::Bitmap *bmp, BitmapData *data)
+{
+	Gdiplus::Rect r(0, 0, bmp->GetWidth(), bmp->GetHeight());
+	bmp->LockBits(&r, ImageLockModeRead | ImageLockModeWrite,
+		PixelFormat32bppARGB, data);
+}
+
+void CBitmapHelper::UnlockBitmap(Gdiplus::Bitmap *bmp, BitmapData *data)
+{
+	bmp->UnlockBits(data);
+}
+
+void CBitmapHelper::Gray(BitmapData *data)
+{
+	PARGBQuad p = (PARGBQuad)data->Scan0;
+	INT offset = data->Stride - data->Width * sizeof(ARGBQuad);
+
+	for (UINT y = 0; y < data->Height; y++, p = (PARGBQuad)((BYTE*)p + offset))
+	{
+		for (UINT x = 0; x < data->Width; x++, p++)
+			p->Blue = p->Green = p->Red =
+			(UINT)(p->Blue * 29 + p->Green * 150 + p->Red * 77 + 128) >> 8;
+
+	}
+}
+
+void CBitmapHelper::GrayAnd2Values(BitmapData *data)
+{
+	PARGBQuad p = (PARGBQuad)data->Scan0;
+	INT offset = data->Stride - data->Width * sizeof(ARGBQuad);
+
+	for (UINT y = 0; y < data->Height; y++, p = (PARGBQuad)((BYTE*)p + offset))
+	{
+		for (UINT x = 0; x < data->Width; x++, p++)
+		{
+			if (((p->Blue * 29 + p->Green * 150 + p->Red * 77 + 128) >> 8) < m_threshold)
+			{
+				//灰度值不够,就变为黑色
+				p->Color &= 0xff000000;
+			}
+			else
+			{
+				//灰度值高,就是白色
+				p->Color |= 0x00ffffff;
+			}
+		}
+	}
+}
+
+/*
+ *加载一张图片,并保存为二值图的格式
+ **/
+void CBitmapHelper::Image2Values()
+{
+	BitmapData data;
+	LockBitmap(m_bmp, &data);
+
+	GrayAnd2Values(&data);
+
+	UnlockBitmap(m_bmp, &data);
+}
+
+Gdiplus::Bitmap* CBitmapHelper::getBmp()
+{
+	return m_bmp;
+}
+
+void CBitmapHelper::ScaleBitmap(UINT nWidth, UINT nHeight)
+{
+	Bitmap * pTemp = new Bitmap(nWidth, nHeight, m_bmp->GetPixelFormat());
+
+	if (pTemp)
+	{
+		Graphics * g = Graphics::FromImage(pTemp);
+
+		if (g)
+		{
+			g->SetInterpolationMode(InterpolationModeHighQualityBicubic);
+
+			g->DrawImage(m_bmp, 0, 0, nWidth, nHeight);
+
+			delete g;
+		}
+	}
+
+	delete m_bmp;
+
+	m_bmp = pTemp;
+}
+
+void CBitmapHelper::LoadImage(std::wstring wsPath)
+{
+	m_bmp = new Gdiplus::Bitmap(wsPath.c_str());
 }
 
 int CBitmapHelper::SaveBitmapToFile(HBITMAP  hBitmap, LPCWSTR  lpFileName)   //hBitmap   为刚才的屏幕位图句柄

+ 35 - 0
zhipuzi_pay_plugin/helper/CBitmapHelper.h

@@ -2,12 +2,42 @@
 
 #include "../pch/pch.h"
 
+typedef union
+{
+	ARGB Color;
+	struct
+	{
+		BYTE Blue;
+		BYTE Green;
+		BYTE Red;
+		BYTE Alpha;
+	};
+} ARGBQuad, *PARGBQuad;
+
 class CBitmapHelper
 {
 public:
 	CBitmapHelper();
 	~CBitmapHelper();
 
+	void LockBitmap(Gdiplus::Bitmap *bmp, BitmapData *data);
+
+	void UnlockBitmap(Gdiplus::Bitmap *bmp, BitmapData *data);
+
+	//ת³É»Ò¶Èͼ
+	void Gray(BitmapData *data);
+
+	//ת³É¶þֵͼ
+	void GrayAnd2Values(BitmapData *data);
+
+	void Image2Values();
+
+	Gdiplus::Bitmap* getBmp();
+
+	void ScaleBitmap(UINT nWidth, UINT nHeight);
+
+	void LoadImage(std::wstring wsPath);
+
 	int SaveBitmapToFile(HBITMAP  hBitmap, LPCWSTR  lpFileName);
 
 	HBITMAP Scale(HBITMAP srcBitmap, int MaxWidth, int MaxHeight);
@@ -15,5 +45,10 @@ public:
 	HBITMAP CopyScreenToBitmap(LPRECT  lpRect);
 
 	bool OcrRect(tesseract::TessBaseAPI& tess, LPRECT lpRect, std::string& result);
+
+private:
+	Gdiplus::Bitmap* m_bmp = NULL;
+
+	int m_threshold = 200;
 };
 

+ 0 - 47
zhipuzi_pay_plugin/network/CMessagePush.cpp

@@ -36,9 +36,6 @@ void CMessagePush::Start()
 
     //处理收银打印
     std::thread(&CMessagePush::HandleShouyinPrinter, this).detach();
-
-    //处理厨房打印
-    std::thread(&CMessagePush::HandleChufangPrinter, this).detach();
 }
 
 void CMessagePush::Stop()
@@ -322,15 +319,6 @@ void CMessagePush::AddShouyinPrinter(CWaimaiOrder order)
     m_shouyin_printer_mutex.unlock();
 }
 
-void CMessagePush::AddChufangPrinter(CWaimaiOrder order)
-{
-    m_chufang_printer_mutex.lock();
-
-    m_chufang_printer_queue.push(order);
-
-    m_chufang_printer_mutex.unlock();
-}
-
 void CMessagePush::HandleVoice()
 {
     while(m_is_work)
@@ -446,12 +434,6 @@ void CMessagePush::HandlePrinter()
             {
                 AddShouyinPrinter(order);
             }
-
-            //判断是否进行自动的厨房打印
-            if(CSetting::GetParam("setting_is_new_waimai_chufang_printer") == "1")
-            {
-                AddChufangPrinter(order);
-            }
         }
         else
         {
@@ -464,8 +446,6 @@ void CMessagePush::HandlePrinter()
             }
 
             AddShouyinPrinter(order);
-
-            AddChufangPrinter(order);
         }
     }
 
@@ -499,33 +479,6 @@ void CMessagePush::HandleShouyinPrinter()
     AddStopNum();
 }
 
-void CMessagePush::HandleChufangPrinter()
-{
-    while(m_is_work)
-    {
-        m_chufang_printer_mutex.lock();
-
-        if(m_chufang_printer_queue.empty())
-        {
-            m_chufang_printer_mutex.unlock();
-
-            CSystem::my_sleep(1);
-            continue;
-        }
-
-        CWaimaiOrder order = m_chufang_printer_queue.front();
-
-        m_chufang_printer_queue.pop();
-
-        m_chufang_printer_mutex.unlock();
-
-        CPosPrinter printer;
-        printer.PrintWaimaiOrderChufang(order);
-    }
-
-    AddStopNum();
-}
-
 void CMessagePush::AddStopNum()
 {
     m_nStopNumMutex.lock();

+ 0 - 3
zhipuzi_pay_plugin/network/CMessagePush.h

@@ -51,14 +51,11 @@ public:
     void HandleConfirm();
     void HandlePrinter();
     void HandleShouyinPrinter();
-    void HandleChufangPrinter();
-
 
     void AddVoice(int voice_type);
     void AddConfirm(std::string order_id);
     void AddPinter(std::string order_id, std::string order_no, int print_type);
     void AddShouyinPrinter(CWaimaiOrder order);
-    void AddChufangPrinter(CWaimaiOrder order);
 
 private:
     void AddStopNum();

+ 9 - 13
zhipuzi_pay_plugin/pch/pch.h

@@ -44,30 +44,26 @@
 #include <tesseract/baseapi.h>
 #include <leptonica/allheaders.h>
 
-/*
- *操作系统相关的头文件
- **/
-#ifdef _WIN32
+ //windows库
 #include <windows.h>
-#include<io.h>
+#include <io.h>
 #include <ShellAPI.h>
-#else
-#include <unistd.h>
-#include <sys/sysinfo.h>
-#endif
-
 #include <atltypes.h>
 #include <objbase.h>
 #include <zmouse.h>
 #include <exdisp.h>
 #include <comdef.h>
+#include <winioctl.h>
+#include <setupapi.h>
 
- /*
-  *UI库用到的一些东西
-  **/
+//UI库
 #include <DuiLib/UIlib.h>
 using namespace DuiLib;
 
+//gdi+
+#include <gdiplus.h>
+using namespace Gdiplus;
+
 #include "../resource/resource.h"
 
 //json库

Разница между файлами не показана из-за своего большого размера
+ 493 - 723
zhipuzi_pay_plugin/tool/CPosPrinter.cpp


+ 61 - 44
zhipuzi_pay_plugin/tool/CPosPrinter.h

@@ -4,21 +4,20 @@
 #include "../order/CWaimaiOrder.h"
 
 //SetupDiGetInterfaceDeviceDetail所需要的输出长度,定义足够大
-#define INTERFACE_DETAIL_SIZE	1024
+#define INTERFACE_DETAIL_SIZE 1024
 
 //设备数量上限,假设16台上限
 #define MAX_DEVICE 16
 
-//USB类的GUID
-//const GUID USB_GUID = {0xa5dcbf10, 0x6530, 0x11d2, {0x90, 0x1f, 0x00, 0xc0, 0x4f, 0xb9, 0x51, 0xed}};
-const GUID USB_GUID = { 0x28d78fad, 0x5a12, 0x11d1, {0xae, 0x5b, 0x00, 0x00, 0xf8, 0x03, 0xa8, 0xc2 } };
+//USB类的GUID,通过这个去找USB打印机
+const GUID USB_GUID = {0x28d78fad, 0x5a12, 0x11d1, {0xae, 0x5b, 0x00, 0x00, 0xf8, 0x03, 0xa8, 0xc2 }};
 
 //存储打印端口句柄的结构
 class PrinterHandle
 {
 public:
-    HANDLE hPort;
-    int type; //句柄类型 1:usb 2:并口 3:串口
+	HANDLE hPort;
+	int type; //句柄类型 1:usb 2:并口 3:串口
 };
 
 class CPosPrinter
@@ -28,61 +27,79 @@ public:
     ~CPosPrinter();
 
     void PrintWaimaiOrderShouyin(CWaimaiOrder& order);
-    void PrintWaimaiOrderChufang(CWaimaiOrder& order);
 
-    void InitUsb();
-    std::vector<std::wstring> getUsbDevices();
+	//usb打印机的类型 1:收银小票打印机 2:标签打印机
+	void InitUsb(int usbType = 1);
+	std::vector<std::wstring> getUsbDevices();
 
 private:
-    void InitBingkou();
-    void InitCom();
+	bool InitBingkou();
+	void InitCom();
 
-    void InitShouyin();
+	void InitShouyin();
 
-    void InitOneUsb(wstring usb_path);
+	//打开某一个指定的usb端口
+	bool InitOneUsb(wstring usb_path);
 
-    int GetDevicePath(LPGUID lpGuid);
-    int GetPrinterType(wstring vid, wstring pid);
+	//usb打印机的类型 1:收银小票打印机 2:标签打印机
+	int GetDevicePath(LPGUID lpGuid, int usbType);
 
-    int WriteData(string meg);
-    int WriteBuf(const char* buf, int len);
+	//判断usb打印机是小票打印机还是标签打印机
+	int GetPrinterType(wstring vid, wstring pid);
 
-    bool PortTest(HANDLE hPort);
+	int WriteData(string meg);
+	int WriteBuf(const unsigned char* buf, int len);
 
-    int POS_Reset(void);
-    int POS_FeedLine(void);
-    int POS_Feed(void);
-    int POS_SetMotionUnit(int x, int y);
+	//端口连通性测试
+	bool PortTest(HANDLE hPort);
 
-    //设置横向跳格位置
-    int POS_SET_MOVE_X();
-    int POS_MOVE_X();
-    int POS_SET_ABS_X(int x, int y);
-    int POS_SET_PRINT_AREA(int x, int y);
+	//小票打印机和厨房打印的处理方法
+	int POS_Reset(void);
+	int POS_FeedLine(void);
+	int POS_Feed(void);
+	int POS_SetMotionUnit(int x, int y);
 
-    int POS_TextOut(string abc, bool is_double_width = false, bool is_double_height = false, int align_type = 0);
+	int POS_SET_MOVE_X();
+	int POS_MOVE_X();
+	int POS_SET_ABS_X(int x, int y);
+	int POS_SET_PRINT_AREA(int x, int y);
 
-    int POS_CutPaper();
-    int POS_OutQRCode();
+	int POS_TextOut(string abc, bool is_double_width = false, bool is_double_height = false, int align_type = 0);
+	int POS_CutPaper();
+	void POS_OutQRCode(std::string dataString);
+	void POS_OutBmp(std::wstring ImagePath);
 
-    //字符空格计算的辅助函数
-    void CalWord(string s, int& nHanzi, int& nZimu);
+	//标签打印机的处理方法
+	void BIAOQIAN_Reset();
+	void BIAOQIAN_FORMFEED();
+	void BIAOQIAN_TEXTOUT(std::string content, int x, int y, int x_multiplication, int y_multiplication);
+	std::string BIAOQIAN_TEXTGet(std::string content, int x, int y, int x_multiplication, int y_multiplication);
+	void BIAOQIAN_PRINT();
+	void BIAOQIAN_CLS();
 
-    //对名字进行换行处理
-    std::vector<std::string> HandleFoodname(std::string oldname, int guige = 1);
-    std::string HandleFoodItemPrice(std::string oldprice, int guige = 1);
-    std::string HandleFoodQuantity(std::string oldquantity, int guige = 1);
-    std::string HandleFoodTotalPrice(std::string oldprice, int guige = 1);
+	//字符空格计算的辅助函数
+	void CalWord(string s,  int& nHanzi, int& nZimu);
+
+	//对小票打印和厨房打印的名字进行换行处理
+	std::vector<std::string> HandleFoodname(std::string oldname, int guige = 1);
+	std::string HandleFoodItemPrice(std::string oldprice, int guige = 1);
+	std::string HandleFoodQuantity(std::string oldquantity, int guige = 1);
+	std::string HandleFoodTotalPrice(std::string oldprice, int guige = 1);
+
+	//对标签打印的名字进行换行处理
+	std::vector<std::string> HandleBiaoqianFoodname(std::string oldname);
 
 private:
-    std::vector<PrinterHandle> m_hPorts;
+	//收银小票打印的句柄组合
+	std::vector<PrinterHandle> m_hPorts;
 
-    boost::asio::io_service m_io;
-    boost::asio::ip::tcp::socket m_socket;
+	//用于厨房打印机和网口类型的收银小票打印
+	boost::asio::io_service m_io;
+	boost::asio::ip::tcp::socket m_socket;
 
-    //这个是当前的输出模式,是收银模式还是厨房打印模式
-    int m_type;
+	//这个是当前的输出模式,是CreateFile模式,还是socket模式
+	int m_type;
 
-    //usb打印机的描述
-    std::vector<std::wstring> m_usb_devices;
+	//usb打印机的描述
+	std::vector<std::wstring> m_usb_devices;
 };

+ 23 - 213
zhipuzi_pay_plugin/tool/CSetting.cpp

@@ -4,10 +4,7 @@
 #include "CSqlite3.h"
 
 std::map<std::string, std::string> CSetting::m_paramsMap;
-std::vector<ChufangPrinter> CSetting::m_chufang_printers;
 std::mutex CSetting::m_mutex;
-std::vector<FoodType> CSetting::m_foodtypes;
-std::map<std::string, std::string> CSetting::m_foodtype_id_name;
 std::map<string, string> CSetting::m_users;
 std::string CSetting::m_username;
 std::string CSetting::m_password;
@@ -46,80 +43,6 @@ std::string CSetting::GetParam(std::string name)
     return value;
 }
 
-void CSetting::AddChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave)
-{
-    ChufangPrinter newPrinter;
-
-    newPrinter.date = date;
-    newPrinter.name = name;
-    newPrinter.ip = ip;
-    newPrinter.guige = guige;
-    newPrinter.fendan = fendan;
-    newPrinter.fenlei = fenlei;
-    newPrinter.fenlei_ids = fenlei_ids;
-
-    m_chufang_printers.push_back(newPrinter);
-
-    if(isSave)
-    {
-        SaveChufangPrinter();
-    }
-}
-
-void CSetting::UpdateChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave)
-{
-    for(std::vector<ChufangPrinter>::iterator it = m_chufang_printers.begin(); it != m_chufang_printers.end(); it++)
-    {
-        if((*it).date == date)
-        {
-            (*it).name = name;
-            (*it).ip = ip;
-            (*it).guige = guige;
-            (*it).fendan = fendan;
-            (*it).fenlei = fenlei;
-            (*it).fenlei_ids = fenlei_ids;
-
-            break;
-        }
-    }
-
-    if(isSave)
-    {
-        SaveChufangPrinter();
-    }
-}
-
-/*
- *删除厨房打印机,默认会同步到数据库
- **/
-void CSetting::DelChufangPrinter(std::string date)
-{
-    for(std::vector<ChufangPrinter>::iterator it = m_chufang_printers.begin(); it != m_chufang_printers.end(); it++)
-    {
-        if((*it).date == date)
-        {
-            m_chufang_printers.erase(it);
-
-            break;
-        }
-    }
-
-    SaveChufangPrinter();
-}
-
-ChufangPrinter CSetting::GetChufangPrinter(std::string date)
-{
-    for(std::vector<ChufangPrinter>::iterator it = m_chufang_printers.begin(); it != m_chufang_printers.end(); it++)
-    {
-        if((*it).date == date)
-        {
-            return (*it);
-        }
-    }
-
-    return ChufangPrinter();
-}
-
 void CSetting::Init()
 {
     //先读取数据库的数据
@@ -129,135 +52,6 @@ void CSetting::Init()
     //再对数据进行初始化,如果没有记录的就加上默认设置
     m_mutex.lock();
 
-    //外卖设置参数
-    std::string setting_is_new_waimai_voice = "setting_is_new_waimai_voice";
-    if(m_paramsMap.find(setting_is_new_waimai_voice) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_is_new_waimai_voice] = "1";
-    }
-
-    std::string setting_is_new_waimai_autoconfirm = "setting_is_new_waimai_autoconfirm";
-    if(m_paramsMap.find(setting_is_new_waimai_autoconfirm) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_is_new_waimai_autoconfirm] = "1";
-    }
-
-    std::string setting_is_new_waimai_dialog = "setting_is_new_waimai_dialog";
-    if(m_paramsMap.find(setting_is_new_waimai_dialog) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_is_new_waimai_dialog] = "1";
-    }
-
-    //新订单打印设置参数
-    std::string setting_is_new_waimai_printer = "setting_is_new_waimai_printer";
-    if(m_paramsMap.find(setting_is_new_waimai_printer) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_is_new_waimai_printer] = "1";
-    }
-
-    std::string setting_printer_guige = "setting_printer_guige";
-    if(m_paramsMap.find(setting_printer_guige) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_guige] = "58";
-    }
-
-    std::string setting_printer_lianshu = "setting_printer_lianshu";
-    if(m_paramsMap.find(setting_printer_lianshu) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_lianshu] = "1";
-    }
-
-	std::string setting_printer_leixing = "setting_printer_leixing";
-	if (m_paramsMap.find(setting_printer_leixing) == m_paramsMap.end())
-	{
-		m_paramsMap[setting_printer_leixing] = "auto";
-	}
-
-	std::string setting_printer_usb = "setting_printer_usb";
-	if (m_paramsMap.find(setting_printer_usb) == m_paramsMap.end())
-	{
-		m_paramsMap[setting_printer_usb] = "";
-	}
-
-	std::string setting_printer_wangkou_ip = "setting_printer_wangkou_ip";
-	if (m_paramsMap.find(setting_printer_wangkou_ip) == m_paramsMap.end())
-	{
-		m_paramsMap[setting_printer_wangkou_ip] = "";
-	}
-
-    std::string setting_printer_quhuo_big = "setting_printer_quhuo_big";
-    if(m_paramsMap.find(setting_printer_quhuo_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_quhuo_big] = "0";
-    }
-
-    std::string setting_printer_dingdanhao_big = "setting_printer_dingdanhao_big";
-    if(m_paramsMap.find(setting_printer_dingdanhao_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_dingdanhao_big] = "0";
-    }
-
-    std::string setting_printer_xiadanshijian_big = "setting_printer_xiadanshijian_big";
-    if(m_paramsMap.find(setting_printer_xiadanshijian_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_xiadanshijian_big] = "0";
-    }
-
-    std::string setting_printer_peisongshijian_big = "setting_printer_peisongshijian_big";
-    if(m_paramsMap.find(setting_printer_peisongshijian_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_peisongshijian_big] = "0";
-    }
-
-    std::string setting_printer_name_big = "setting_printer_name_big";
-    if(m_paramsMap.find(setting_printer_name_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_name_big] = "0";
-    }
-
-    std::string setting_printer_phone_big = "setting_printer_phone_big";
-    if(m_paramsMap.find(setting_printer_phone_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_phone_big] = "0";
-    }
-
-    std::string setting_printer_address_big = "setting_printer_address_big";
-    if(m_paramsMap.find(setting_printer_address_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_address_big] = "0";
-    }
-
-    std::string setting_printer_shangpin_big = "setting_printer_shangpin_big";
-    if(m_paramsMap.find(setting_printer_shangpin_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_shangpin_big] = "0";
-    }
-
-    std::string setting_printer_memo_big = "setting_printer_memo_big";
-    if(m_paramsMap.find(setting_printer_memo_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_memo_big] = "0";
-    }
-
-    std::string setting_printer_price_big = "setting_printer_price_big";
-    if(m_paramsMap.find(setting_printer_price_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_price_big] = "0";
-    }
-
-    std::string setting_printer_pay_big = "setting_printer_pay_big";
-    if(m_paramsMap.find(setting_printer_pay_big) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_printer_pay_big] = "0";
-    }
-
-    //厨房打印的默认参数
-    std::string setting_is_new_waimai_chufang_printer = "setting_is_new_waimai_chufang_printer";
-    if(m_paramsMap.find(setting_is_new_waimai_chufang_printer) == m_paramsMap.end())
-    {
-        m_paramsMap[setting_is_new_waimai_chufang_printer] = "1";
-    }
-
     //系统设置的参数
     std::string setting_is_auto_start = "setting_is_auto_start";
     if(CSystem::IsAutoStart() == true)
@@ -287,7 +81,9 @@ void CSetting::Init()
         m_paramsMap[setting_is_close_min] = "1";
     }
 
-	//系统设置的内容
+	//从这里开始是插件系统设置的内容
+
+	/*金额抓取相关的设置*/
 
 	//抓取类型
 	std::string system_setting_jinezhuaqu_setting_type = "system_setting_jinezhuaqu_setting_type";
@@ -385,6 +181,26 @@ void CSetting::Init()
 		m_paramsMap[system_setting_kuaijiejian_shoukuan_vk] = "68";
 	}
 
+	/*打印机相关的设置*/
+	//打印类型
+	std::string system_setting_dayinji_setting_type = "system_setting_dayinji_setting_type";
+	if (m_paramsMap.find(system_setting_dayinji_setting_type) == m_paramsMap.end())
+	{
+		m_paramsMap[system_setting_dayinji_setting_type] = "1";
+	}
+
+	std::string system_setting_dayinji_usb_port = "system_setting_dayinji_usb_port";
+	if (m_paramsMap.find(system_setting_dayinji_usb_port) == m_paramsMap.end())
+	{
+		m_paramsMap[system_setting_dayinji_usb_port] = "";
+	}
+
+	std::string system_setting_dayinji_wangkou_ip = "system_setting_dayinji_wangkou_ip";
+	if (m_paramsMap.find(system_setting_dayinji_wangkou_ip) == m_paramsMap.end())
+	{
+		m_paramsMap[system_setting_dayinji_wangkou_ip] = "";
+	}
+
     m_mutex.unlock();
 
     //设置好默认参数之后,将默认参数写回到数据库
@@ -397,12 +213,6 @@ void CSetting::SaveParams()
     sqllite.SaveParams(m_paramsMap);
 }
 
-void CSetting::SaveChufangPrinter()
-{
-    CSqlite3 sqllite;
-    sqllite.SaveChufangPrinter(m_chufang_printers);
-}
-
 void CSetting::SaveUsers()
 {
     CSqlite3 sqllite;

+ 0 - 55
zhipuzi_pay_plugin/tool/CSetting.h

@@ -31,13 +31,6 @@ public:
     static void SetParam(std::string name, std::string value, bool isSave = true);
     static std::string GetParam(std::string name);
 
-    //厨房打印机相关的参数配置
-    static void AddChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave = true);
-    static void UpdateChufangPrinter(std::string date, std::string name, std::string ip, std::string guige, std::string fendan, std::string fenlei, std::string fenlei_ids, bool isSave = true);
-    static void DelChufangPrinter(std::string date);
-
-    static ChufangPrinter GetChufangPrinter(std::string date);
-
     static void SetUser(std::string name, std::string password, bool isSave = true)
     {
         m_users[name] = password;
@@ -71,43 +64,6 @@ public:
         return m_paramsMap[name];
     }
 
-    static ChufangPrinter getLastChufangPrinter()
-    {
-        return m_chufang_printers.back();
-    }
-
-    static std::vector<ChufangPrinter>& getChufangPrints()
-    {
-        return m_chufang_printers;
-    }
-
-    static void AddFoodtype(std::string name, std::string type_id)
-    {
-        FoodType newFoodType;
-        newFoodType.name = name;
-        newFoodType.type_id = type_id;
-
-        m_foodtypes.push_back(newFoodType);
-
-        m_foodtype_id_name[type_id] = name;
-    }
-
-    static std::vector<FoodType>& GetFoodtype()
-    {
-        return m_foodtypes;
-    }
-
-    static std::string getFoodtypeName(std::string type_id)
-    {
-        if(m_foodtype_id_name.find(type_id) != m_foodtype_id_name.end())
-        {
-            return m_foodtype_id_name[type_id];
-        }
-
-        //返回这个表示没找到这个分类
-        return "zhipuzi_not_found_xxx";
-    }
-
     static void SetLoginInfo(std::string username, std::string password)
     {
         m_username = username;
@@ -129,24 +85,13 @@ public:
      **/
     static void SaveParams();
 
-    /*
-     *把内存中的厨房打印机信息,存到数据库
-     **/
-    static void SaveChufangPrinter();
-
     static void SaveUsers();
 
 private:
     static std::map<std::string, std::string> m_paramsMap;
-    static std::vector<ChufangPrinter> m_chufang_printers;
 
     static std::mutex m_mutex;
 
-    static std::vector<FoodType> m_foodtypes;
-
-    //从商品分类的id到name的映射
-    static std::map<std::string, std::string> m_foodtype_id_name;
-
     static std::map<string, string> m_users;
 
     static std::string m_username;

+ 0 - 122
zhipuzi_pay_plugin/tool/CSqlite3.cpp

@@ -137,95 +137,6 @@ bool CSqlite3::InitConfig()
         return false;
     }
 
-    sql = "SELECT COUNT(*) FROM sqlite_master where type = 'table' and name = 'pos_chufang_printer';";
-
-    //读取厨房打印机的参数
-    if(sqlite3_prepare_v2(m_db, sql.c_str(), -1, &stmt, NULL) == SQLITE_OK)
-    {
-        if(sqlite3_step(stmt) == SQLITE_ROW)
-        {
-            int count = sqlite3_column_int(stmt, 0);
-
-            if(count == 0)
-            {
-                //说明没找到这个表,那么这个时候新建这个表,先释放前面的stmt
-                sqlite3_finalize(stmt);
-                stmt = NULL;
-
-                sql = "CREATE TABLE pos_chufang_printer("  \
-                      "id         INTEGER          PRIMARY KEY AUTOINCREMENT,"\
-                      "date       CHAR(100)        NOT NULL," \
-                      "name       CHAR(100)        NOT NULL," \
-                      "ip         CHAR(100)        NOT NULL," \
-                      "guige      CHAR(100)        NOT NULL," \
-                      "fendan     CHAR(100)        NOT NULL," \
-                      "fenlei     CHAR(100)        NOT NULL," \
-                      "fenlei_ids CHAR(2000)              );";
-
-                if(sqlite3_prepare_v2(m_db, sql.c_str(), -1, &stmt, NULL) == SQLITE_OK)
-                {
-                    //执行该语句
-                    if(sqlite3_step(stmt) != SQLITE_DONE)
-                    {
-                        std::string err = sqlite3_errmsg(m_db);
-                        LOG_INFO("create table fail: " << err.c_str());
-
-                        sqlite3_finalize(stmt);
-                        return false;
-                    }
-
-                    //走到这里就是表创建成功了
-                    LOG_INFO("create table success");
-                    sqlite3_finalize(stmt);
-                }
-
-                else
-                {
-                    LOG_INFO("create table prepare fail: " << sqlite3_errmsg(m_db));
-
-                    sqlite3_finalize(stmt);
-
-                    return false;
-                }
-            }
-
-            else
-            {
-                //说明已经有这个表了,就不用再创建了
-                sqlite3_finalize(stmt);
-            }
-
-            std::string sql = "SELECT * FROM pos_chufang_printer;";
-            sqlite3_stmt* stmt = NULL;
-
-            if(sqlite3_prepare_v2(m_db, sql.c_str(), -1, &stmt, NULL) == SQLITE_OK)
-            {
-                while(sqlite3_step(stmt) == SQLITE_ROW)
-                {
-                    std::string date = (char*)sqlite3_column_text(stmt, 1);
-                    std::string name = (char*)sqlite3_column_text(stmt, 2);
-                    std::string ip = (char*)sqlite3_column_text(stmt, 3);
-                    std::string guige = (char*)sqlite3_column_text(stmt, 4);
-                    std::string fendan = (char*)sqlite3_column_text(stmt, 5);
-                    std::string fenlei = (char*)sqlite3_column_text(stmt, 6);
-                    std::string fenlei_ids = (char*)sqlite3_column_text(stmt, 7);
-
-                    //这里仅仅是把数据库内容读到内存,所以之类用false
-                    CSetting::AddChufangPrinter(date, name, ip, guige, fendan, fenlei, fenlei_ids, false);
-                }
-
-                sqlite3_finalize(stmt);
-            }
-
-            else
-            {
-                //异常情况
-                sqlite3_finalize(stmt);
-                return false;
-            }
-        }
-    }
-
     sql = "SELECT COUNT(*) FROM sqlite_master where type = 'table' and name = 'pos_user';";
 
     //读取厨房打印机的参数
@@ -336,39 +247,6 @@ bool CSqlite3::SaveParams(std::map<std::string, std::string>& params)
     return false;
 }
 
-bool CSqlite3::SaveChufangPrinter(std::vector<ChufangPrinter>& printers)
-{
-    int result = sqlite3_exec(m_db, "BEGIN;", 0, 0, 0);
-
-    std::string sql = "delete from pos_chufang_printer;";
-    result = sqlite3_exec(m_db, sql.c_str(), 0, 0, 0);
-
-    for(std::vector<ChufangPrinter>::iterator it = printers.begin(); it != printers.end(); it++)
-    {
-        std::string date = (*it).date;
-        std::string name = (*it).name;
-        std::string ip = (*it).ip;
-        std::string guige = (*it).guige;
-        std::string fendan = (*it).fendan;
-        std::string fenlei = (*it).fenlei;
-        std::string fenlei_ids = (*it).fenlei_ids;
-
-        sql = "INSERT INTO pos_chufang_printer (date, name, ip, guige, fendan, fenlei, fenlei_ids) VALUES ('" + date + "' ,'" + name + "','" + ip + "','" + guige + "','" + fendan + "','" + fenlei + "','" + fenlei_ids + "')";
-        result = sqlite3_exec(m_db, sql.c_str(), 0, 0, 0);
-    }
-
-    result = sqlite3_exec(m_db, "COMMIT;", 0, 0, 0);
-
-    if(result == SQLITE_OK)
-    {
-        LOG_INFO("save params success");
-        return true;
-    }
-
-    LOG_INFO("save params fail");
-    return false;
-}
-
 bool CSqlite3::SaveUsers(std::map<string, string> users)
 {
     int result = sqlite3_exec(m_db, "BEGIN;", 0, 0, 0);

+ 0 - 2
zhipuzi_pay_plugin/tool/CSqlite3.h

@@ -15,8 +15,6 @@ public:
 
     bool SaveParams(std::map<std::string, std::string>& params);
 
-    bool SaveChufangPrinter(std::vector<ChufangPrinter>& printers);
-
     bool SaveUsers(std::map<string, string> users);
 
     void Close()

+ 0 - 103
zhipuzi_pay_plugin/wnd/CChufangSettingWnd.cpp

@@ -1,103 +0,0 @@
-#include "../pch/pch.h"
-#include "CChufangSettingWnd.h"
-
-LRESULT CChufangSettingWnd::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-    POINT pt;
-    pt.x = GET_X_LPARAM(lParam);
-    pt.y = GET_Y_LPARAM(lParam);
-    ::ScreenToClient(*this, &pt);
-
-    RECT rcClient;
-    ::GetClientRect(*this, &rcClient);
-
-    RECT rcCaption = m_pm.GetCaptionRect();
-    if(pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
-            && pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
-    {
-        CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
-        if(pControl && _tcscmp(pControl->GetClass(), DUI_CTR_BUTTON) != 0)
-        {
-            return HTCAPTION;
-        }
-    }
-
-    return HTCLIENT;
-}
-
-LRESULT CChufangSettingWnd::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-    SIZE szRoundCorner = m_pm.GetRoundCorner();
-    if(!::IsIconic(*this) && (szRoundCorner.cx != 0 || szRoundCorner.cy != 0))
-    {
-        CDuiRect rcWnd;
-        ::GetWindowRect(*this, &rcWnd);
-        rcWnd.Offset(-rcWnd.left, -rcWnd.top);
-        rcWnd.right++;
-        rcWnd.bottom++;
-        HRGN hRgn = ::CreateRoundRectRgn(rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom, szRoundCorner.cx, szRoundCorner.cy);
-        ::SetWindowRgn(*this, hRgn, TRUE);
-        ::DeleteObject(hRgn);
-    }
-
-    bHandled = FALSE;
-    return 0;
-}
-
-LRESULT CChufangSettingWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-    LRESULT lRes = 0;
-    BOOL bHandled = TRUE;
-    switch(uMsg)
-    {
-    case WM_CREATE:
-        lRes = OnCreate(uMsg, wParam, lParam, bHandled);
-        break;
-    case WM_NCACTIVATE:
-        lRes = OnNcActivate(uMsg, wParam, lParam, bHandled);
-        break;
-    case WM_NCCALCSIZE:
-        lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled);
-        break;
-    case WM_NCPAINT:
-        lRes = OnNcPaint(uMsg, wParam, lParam, bHandled);
-        break;
-    case WM_NCHITTEST:
-        lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled);
-        break;
-    case WM_SIZE:
-        lRes = OnSize(uMsg, wParam, lParam, bHandled);
-        break;
-    default:
-        bHandled = FALSE;
-    }
-    if(bHandled)
-    {
-        return lRes;
-    }
-    if(m_pm.MessageHandler(uMsg, wParam, lParam, lRes))
-    {
-        return lRes;
-    }
-    return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
-}
-
-LRESULT CChufangSettingWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
-{
-    if(uMsg == WM_KEYDOWN)
-    {
-        if(wParam == VK_RETURN)
-        {
-            return true;
-        }
-        else if(wParam == VK_ESCAPE)
-        {
-            return true;
-        }
-    }
-    return false;
-}
-
-
-
-

+ 0 - 347
zhipuzi_pay_plugin/wnd/CChufangSettingWnd.h

@@ -1,347 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-#include "CMainWnd.h"
-
-class CChufangSettingWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
-{
-public:
-    CChufangSettingWnd(int mode)
-    {
-        m_mode = mode;
-    }
-
-    void SetPrinterDate(std::string date)
-    {
-        m_printer_date = date;
-    }
-
-    LPCTSTR GetWindowClassName() const
-    {
-        return _T("UIChufangSettingFrame");
-    };
-
-    UINT GetClassStyle() const
-    {
-        return UI_CLASSSTYLE_DIALOG;
-    };
-
-    void OnFinalMessage(HWND /*hWnd*/)
-    {
-        //WindowImplBase::OnFinalMessage(hWnd);
-        m_pm.RemovePreMessageFilter(this);
-        delete this;
-    };
-
-    void Init()
-    {
-        CLabelUI* ip_error = static_cast<CLabelUI*>(m_pm.FindControl(_T("chufang_setting_ip_error")));
-        ip_error->SetVisible(false);
-
-        CLabelUI* title = static_cast<CLabelUI*>(m_pm.FindControl(_T("chufang_setting_title")));
-        if(m_mode == 1)
-        {
-            title->SetText(L"新建厨房打印机");
-        }
-        else
-        {
-            title->SetText(L"修改厨房打印机");
-        }
-
-        CEditUI* name = static_cast<CEditUI*>(m_pm.FindControl(_T("chufang_setting_name")));
-        if(m_mode == 1)
-        {
-            name->SetText(L"");
-        }
-        else
-        {
-            ChufangPrinter updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-            name->SetText(CLewaimaiString::UTF8ToUnicode(updatePrinter.name).c_str());
-        }
-
-
-        CEditUI* ip = static_cast<CEditUI*>(m_pm.FindControl(_T("chufang_setting_ip")));
-        if(m_mode == 1)
-        {
-            ip->SetText(L"");
-        }
-        else
-        {
-            ChufangPrinter updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-            ip->SetText(CLewaimaiString::UTF8ToUnicode(updatePrinter.ip).c_str());
-        }
-
-
-        CComboUI* com = static_cast<CComboUI*>(m_pm.FindControl(_T("chufang_setting_guige")));
-        if(m_mode == 1)
-        {
-            com->SelectItem(0, false, false);
-        }
-        else
-        {
-            ChufangPrinter updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-            if(updatePrinter.guige == "58")
-            {
-                com->SetInternVisible(true);
-                com->SelectItem(0, false, false);
-            }
-
-            else
-            {
-                com->SetInternVisible(true);
-                com->SelectItem(1, false, false);
-            }
-        }
-
-        CCheckBoxUI* fendan = static_cast<CCheckBoxUI*>(m_pm.FindControl(_T("chufang_setting_fendan")));
-        if(m_mode == 1)
-        {
-            fendan->Selected(false, false);
-        }
-        else
-        {
-            ChufangPrinter updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-            if(updatePrinter.fendan == "1")
-            {
-                fendan->Selected(true, false);
-            }
-            else
-            {
-                fendan->Selected(false, false);
-            }
-        }
-
-        CCheckBoxUI* fenlei = static_cast<CCheckBoxUI*>(m_pm.FindControl(_T("chufang_setting_fenlei")));
-        if(m_mode == 1)
-        {
-            fenlei->Selected(false, false);
-        }
-        else
-        {
-            ChufangPrinter updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-            if(updatePrinter.fenlei == "1")
-            {
-                fenlei->Selected(true, false);
-            }
-            else
-            {
-                fenlei->Selected(false, false);
-            }
-        }
-
-        //把所有分类显示出来
-        CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("chufang_setting_fenlei_xuanze_area")));
-        pLayout->RemoveAll();
-
-        ChufangPrinter updatePrinter;
-
-        //这个map用于后面判断每个分类ID是否被选中
-        std::map<string, bool> ids_map;
-
-        if(m_mode == 2)
-        {
-            updatePrinter = CSetting::GetChufangPrinter(m_printer_date);
-            std::string foodtype_ids = updatePrinter.fenlei_ids;
-            std::vector<string> ids = CLewaimaiString::Split(foodtype_ids, ",");
-            for(std::vector<string>::iterator it = ids.begin(); it != ids.end(); it++)
-            {
-                ids_map[(*it)] = true;
-            }
-        }
-
-        std::vector<FoodType> foodtypes = CSetting::GetFoodtype();
-        for(std::vector<FoodType>::iterator it = foodtypes.begin(); it != foodtypes.end(); it++)
-        {
-            CDialogBuilder builder;
-            CListContainerElementUI* pEle = static_cast<CListContainerElementUI*>(builder.Create(_T("chufang_printer_setting_fenlei_select.xml"), (UINT)0, NULL, &m_pm));
-
-            CCheckBoxUI* pCheck = static_cast<CCheckBoxUI*>(pEle->FindSubControl(_T("chufang_setting_fenleli_xuanze_checkbox")));
-            pCheck->AddCustomAttribute(L"type_id", CLewaimaiString::UTF8ToUnicode((*it).type_id).c_str());
-
-            if(m_mode == 2)
-            {
-                if(ids_map.find((*it).type_id) != ids_map.end())
-                {
-                    pCheck->Selected(true, false);
-                }
-            }
-
-            CLabelUI* pName = static_cast<CLabelUI*>(pEle->FindSubControl(_T("chufang_setting_fenleli_xuanze_name")));
-            pName->SetText(CLewaimaiString::UTF8ToUnicode((*it).name).c_str());
-
-            pLayout->Add(pEle);
-        }
-
-        CVerticalLayoutUI* pOutLayout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("chufang_setting_fenlei_xuanze")));
-        pOutLayout->SetFixedHeight(foodtypes.size() * 30 + 30);
-    }
-
-    void Notify(TNotifyUI& msg)
-    {
-        if(msg.sType == _T("click"))
-        {
-            DuiLib::CDuiString senderName = msg.pSender->GetName();
-
-            if(senderName == _T("chufang_setting_closebtn"))
-            {
-                Close(IDCANCEL);
-                return;
-            }
-            else if(senderName == _T("chufang_setting_save"))
-            {
-                //开始保存厨房打印机的数据
-                CEditUI* pName = static_cast<CEditUI*>(m_pm.FindControl(_T("chufang_setting_name")));
-                wstring wsName = pName->GetText();
-
-                CEditUI* pIP = static_cast<CEditUI*>(m_pm.FindControl(_T("chufang_setting_ip")));
-                wstring wsIP = pIP->GetText();
-
-                //判断IP的格式是否合法
-                if(CLewaimaiString::isIPAddressValid(CLewaimaiString::UnicodeToUTF8(wsIP).c_str()) == false)
-                {
-                    //如果IP格式不合法,就提示
-                    CLabelUI* ip_error = static_cast<CLabelUI*>(m_pm.FindControl(_T("chufang_setting_ip_error")));
-                    ip_error->SetVisible(true);
-
-                    return;
-                }
-
-                CComboUI* com = static_cast<CComboUI*>(m_pm.FindControl(_T("chufang_setting_guige")));
-                wstring wsGuige;
-                if(com->GetCurSel() == 0)
-                {
-                    wsGuige = L"58";
-                }
-                else
-                {
-                    wsGuige = L"80";
-                }
-
-                CCheckBoxUI* pFendan = static_cast<CCheckBoxUI*>(m_pm.FindControl(_T("chufang_setting_fendan")));
-                wstring wsFendan;
-                if(pFendan->IsSelected())
-                {
-                    wsFendan = L"1";
-                }
-                else
-                {
-                    wsFendan = L"0";
-                }
-
-                CCheckBoxUI* pFenlei = static_cast<CCheckBoxUI*>(m_pm.FindControl(_T("chufang_setting_fenlei")));
-                wstring wsFenlei;
-                if(pFenlei->IsSelected())
-                {
-                    wsFenlei = L"1";
-                }
-                else
-                {
-                    wsFenlei = L"0";
-                }
-
-                std::string fenlei_ids = "";
-
-                CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("chufang_setting_fenlei_xuanze_area")));
-                CDuiPtrArray* pArray = m_pm.FindSubControlsByClass(pLayout, _T("CheckBox"));
-                int size = pArray->GetSize();
-                for(int i = 0; i < size; i++)
-                {
-                    CCheckBoxUI* pBox = static_cast<CCheckBoxUI*>(pArray->GetAt(i));
-
-                    if(pBox->IsSelected())
-                    {
-                        std::wstring ws_type_id = pBox->GetCustomAttribute(_T("type_id"));
-                        std::string type_id = CLewaimaiString::UnicodeToUTF8(ws_type_id);
-
-                        fenlei_ids += type_id + ",";
-                    }
-                }
-
-                fenlei_ids = fenlei_ids.substr(0, fenlei_ids.size() - 1);
-
-                //保存数据到数据库
-
-                std::string date = to_string(time(NULL));
-
-                std::string name = CLewaimaiString::UnicodeToUTF8(wsName);
-                std::string ip = CLewaimaiString::UnicodeToUTF8(wsIP);
-                std::string guige = CLewaimaiString::UnicodeToUTF8(wsGuige);
-                std::string fendan = CLewaimaiString::UnicodeToUTF8(wsFendan);
-                std::string fenlei = CLewaimaiString::UnicodeToUTF8(wsFenlei);
-
-                if(m_mode == 1)
-                {
-                    CSetting::AddChufangPrinter(date, name, ip, guige, fendan, fenlei, fenlei_ids, true);
-                }
-                else
-                {
-                    CSetting::UpdateChufangPrinter(m_printer_date, name, ip, guige, fendan, fenlei, fenlei_ids, true);
-                }
-
-                Close(IDOK);
-                return;
-            }
-        }
-    }
-
-    LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-    {
-        LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);
-        styleValue &= ~WS_CAPTION;
-        ::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
-
-        // 把自己的窗口句柄与窗口绘制管理器挂接在一起
-        m_pm.Init(m_hWnd);
-
-        m_pm.AddPreMessageFilter(this);
-
-        CDialogBuilder builder;
-
-        CControlUI* pRoot = builder.Create(_T("chufang_printer_setting.xml"), (UINT)0, NULL, &m_pm);
-        ASSERT(pRoot && "Failed to parse XML");
-
-        // 把这些控件绘制到本窗口上
-        m_pm.AttachDialog(pRoot);
-
-        // 把自己加入到CPaintManagerUI的m_aNotifiers数组中,用于处理Notify函数
-        m_pm.AddNotifier(this);
-
-        Init();
-
-        return 0;
-    }
-
-    LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-    {
-        if(::IsIconic(*this))
-        {
-            bHandled = FALSE;
-        }
-        return (wParam == 0) ? TRUE : FALSE;
-    }
-
-    LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-    {
-        return 0;
-    }
-
-    LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-    {
-        return 0;
-    }
-
-    LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
-
-    LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
-
-public:
-    CPaintManagerUI m_pm;
-
-    int m_mode; //为1表示新建,为2表示修改
-    std::string m_printer_date; //修改模式下的打印机的日期
-};
-

+ 0 - 1
zhipuzi_pay_plugin/wnd/CLoginWnd.h

@@ -1,7 +1,6 @@
 #pragma once
 
 #include "../pch/pch.h"
-#include "CMainWnd.h"
 
 class CLoginWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
 {

Разница между файлами не показана из-за своего большого размера
+ 0 - 2026
zhipuzi_pay_plugin/wnd/CMainWnd.cpp


+ 0 - 93
zhipuzi_pay_plugin/wnd/CMainWnd.h

@@ -1,93 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-
-#include "../control/CWaimaiOrderItemUI.h"
-#include "../order/CWaimaiOrder.h"
-#include "../tool/CPosPrinter.h"
-
-class CMessagePush;
-
-class CMainWnd : public CWindowWnd, public INotifyUI
-{
-public:
-    CMainWnd() { };
-
-    LPCTSTR GetWindowClassName() const
-    {
-        return _T("UIMainFrame");
-    };
-
-    UINT GetClassStyle() const
-    {
-        return CS_DBLCLKS;
-    };
-
-    void OnFinalMessage(HWND /*hWnd*/)
-    {
-        delete this;
-    };
-
-    void Init();
-
-    void OnPrepare()
-    {
-
-    }
-
-    void Notify(TNotifyUI& msg);
-
-    void HandleClickMsg(TNotifyUI& msg);
-    void HandleSelectChangeMsg(TNotifyUI& msg);
-    void HandleItemSelectMsg(TNotifyUI& msg);
-
-    void InitSettingStatus();
-
-    LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
-
-    LRESULT OnOrderlistRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    LRESULT OnLoginOut(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    //添加托盘图标(初始化)
-    void AddTrayIcon();
-
-    //处理托盘图标上的事件
-    LRESULT OnTrayIcon(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-    void LoginOut(int mode);
-
-public:
-    CPaintManagerUI m_pm;
-
-private:
-    CButtonUI* m_pCloseBtn;
-    CButtonUI* m_pMaxBtn;
-    CButtonUI* m_pRestoreBtn;
-    CButtonUI* m_pMinBtn;
-
-    //定义托盘图标对象
-    NOTIFYICONDATA m_trayIcon;
-
-    CMessagePush* m_push = NULL;
-};

+ 0 - 1
zhipuzi_pay_plugin/wnd/CMessageboxWnd.h

@@ -1,7 +1,6 @@
 #pragma once
 
 #include "../pch/pch.h"
-#include "CMainWnd.h"
 
 class CMessageboxWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
 {

Разница между файлами не показана из-за своего большого размера
+ 1028 - 842
zhipuzi_pay_plugin/wnd/CSystemSettingWnd.cpp


+ 4 - 1
zhipuzi_pay_plugin/wnd/CSystemSettingWnd.h

@@ -89,8 +89,12 @@ public:
 private:
 	CValueWnd* m_valueWnd;
 
+	//金额抓取的类型
 	int m_nType = 1;
 
+	//打印机模式
+	int m_nDayinType = 1;
+
 	HWND m_DingweiWnd = NULL;
 
 	RECT m_ocrRect;
@@ -102,6 +106,5 @@ private:
 
 	bool m_is_kuaijiepan_page = false;
 	int m_kuaijiejian_type = 0;
-
 };
 

+ 2 - 0
zhipuzi_pay_plugin/wnd/CValueWnd.cpp

@@ -7,6 +7,8 @@
 
 #include "../helper/CBitmapHelper.h"
 
+#include <atltypes.h>
+
 void CValueWnd::Notify(TNotifyUI& msg)
 {
     if(msg.sType == _T("click"))

+ 0 - 1
zhipuzi_pay_plugin/wnd/CWaimaiOrderFailReasonWnd.h

@@ -1,7 +1,6 @@
 #pragma once
 
 #include "../pch/pch.h"
-#include "CMainWnd.h"
 
 class CWaimaiOrderFailReasonWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
 {

+ 2 - 6
zhipuzi_pay_plugin/zhipuzi_pay_plugin.vcxproj

@@ -136,7 +136,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <AdditionalLibraryDirectories>$(SolutionDir)lib\debug</AdditionalLibraryDirectories>
-      <AdditionalDependencies>dbghelp.lib;winmm.lib;version.lib;ws2_32.lib;setupapi.lib;AdvAPI32.lib;wldap32.lib;crypt32.lib;sapi.lib;Shell32.lib;user32.lib;kernel32.lib;Gdi32.lib;libboost_date_time-vc141-mt-sgd-x32-1_70.lib;libboost_regex-vc141-mt-sgd-x32-1_70.lib;sqlite3.lib;DuiLib_ud.lib;log4cplusUD.lib;zpzDll.lib;libcurl.lib;liblept171.lib;libtesseract304.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>dbghelp.lib;winmm.lib;version.lib;ws2_32.lib;setupapi.lib;AdvAPI32.lib;wldap32.lib;crypt32.lib;sapi.lib;Shell32.lib;user32.lib;kernel32.lib;Gdi32.lib;libboost_date_time-vc141-mt-sgd-x32-1_70.lib;libboost_regex-vc141-mt-sgd-x32-1_70.lib;sqlite3.lib;DuiLib_ud.lib;log4cplusUD.lib;zpzDll.lib;libcurl.lib;liblept171.lib;libtesseract304.lib;libqrencode.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>
       </IgnoreSpecificDefaultLibraries>
       <Version>
@@ -178,7 +178,7 @@ copy $(SolutionDir)res\icon\ $(SolutionDir)bin\$(Platform)\$(Configuration)\$(Pr
       <OptimizeReferences>true</OptimizeReferences>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <AdditionalLibraryDirectories>$(SolutionDir)lib\release</AdditionalLibraryDirectories>
-      <AdditionalDependencies>dbghelp.lib;winmm.lib;setupapi.lib;AdvAPI32.lib;Shell32.lib;user32.lib;kernel32.lib;Gdi32.lib;sqlite3.lib;libcurl.lib;DuiLib_u.lib;log4cplusU.lib;version.lib;libboost_date_time-vc141-mt-s-x32-1_70.lib;libboost_regex-vc141-mt-s-x32-1_70.lib;liblept171.lib;libtesseract304.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>dbghelp.lib;winmm.lib;setupapi.lib;AdvAPI32.lib;Shell32.lib;user32.lib;kernel32.lib;Gdi32.lib;sqlite3.lib;libcurl.lib;DuiLib_u.lib;log4cplusU.lib;version.lib;libboost_date_time-vc141-mt-s-x32-1_70.lib;libboost_regex-vc141-mt-s-x32-1_70.lib;liblept171.lib;libtesseract304.lib;libqrencode.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <PostBuildEvent>
       <Command>mkdir $(SolutionDir)bin\$(Platform)\$(Configuration)\$(ProjectName)\
@@ -244,7 +244,6 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClInclude Include="wnd\CUpdateWnd.h" />
     <ClInclude Include="wnd\CWaimaiOrderFailReasonWnd.h" />
     <ClInclude Include="network\PosMessage.h" />
-    <ClInclude Include="wnd\CChufangSettingWnd.h" />
     <ClInclude Include="control\CWaimaiOrderInfoUI.h" />
     <ClInclude Include="control\CSettingUI.h" />
     <ClInclude Include="tool\CSetting.h" />
@@ -253,7 +252,6 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClInclude Include="order\CWaimaiOrder.h" />
     <ClInclude Include="tool\CPosPrinter.h" />
     <ClInclude Include="control\CWaimaiOrderItemUI.h" />
-    <ClInclude Include="wnd\CMainWnd.h" />
     <ClInclude Include="wnd\CLoginWnd.h" />
     <ClInclude Include="helper\MD5.h" />
     <ClInclude Include="network\CZhipuziHttpClient.h" />
@@ -290,7 +288,6 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClCompile Include="wnd\CMessageboxWnd.cpp" />
     <ClCompile Include="wnd\CUpdateWnd.cpp" />
     <ClCompile Include="wnd\CWaimaiOrderFailReasonWnd.cpp" />
-    <ClCompile Include="wnd\CChufangSettingWnd.cpp" />
     <ClCompile Include="control\CWaimaiOrderInfoUI.cpp" />
     <ClCompile Include="control\CSettingUI.cpp" />
     <ClCompile Include="tool\CSetting.cpp" />
@@ -299,7 +296,6 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClCompile Include="order\CWaimaiOrder.cpp" />
     <ClCompile Include="tool\CPosPrinter.cpp" />
     <ClCompile Include="control\CWaimaiOrderItemUI.cpp" />
-    <ClCompile Include="wnd\CMainWnd.cpp" />
     <ClCompile Include="wnd\CLoginWnd.cpp" />
     <ClCompile Include="helper\MD5.cpp" />
     <ClCompile Include="network\CZhipuziHttpClient.cpp" />

+ 0 - 12
zhipuzi_pay_plugin/zhipuzi_pay_plugin.vcxproj.filters

@@ -60,9 +60,6 @@
     <ClInclude Include="network\CMessagePush.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="wnd\CMainWnd.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="control\ControlEx.h">
       <Filter>头文件</Filter>
     </ClInclude>
@@ -84,9 +81,6 @@
     <ClInclude Include="tool\CSetting.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="wnd\CChufangSettingWnd.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="network\PosMessage.h">
       <Filter>头文件</Filter>
     </ClInclude>
@@ -194,9 +188,6 @@
     <ClCompile Include="zhipuzi_pay_plugin.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="wnd\CMainWnd.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
     <ClCompile Include="control\CWaimaiOrderInfoUI.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
@@ -215,9 +206,6 @@
     <ClCompile Include="tool\CSetting.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="wnd\CChufangSettingWnd.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
     <ClCompile Include="wnd\CWaimaiOrderFailReasonWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>