zhangyang 6 лет назад
Родитель
Сommit
4fabe24493

BIN
bin/Win32/Debug/lewaimai_pos_windows/db/pos.db


BIN
bin/Win32/Debug/lewaimai_pos_windows/lewaimai_pos_windows.exe


+ 1 - 1
bin/Win32/Debug/lewaimai_pos_windows/skin/update.xml

@@ -10,7 +10,7 @@
 		
 		<HorizontalLayout height="80">
 			<Control></Control>
-			<HorizontalLayout bkimage="file='logo_guanwang.png'" width="202" height="43" padding="0,18,0,0"></HorizontalLayout>
+			<HorizontalLayout bkimage="file='logo_guanwang.png'" width="179" height="55" padding="0,18,0,0"></HorizontalLayout>
 			<Control></Control>
 		</HorizontalLayout>
 		

+ 1 - 1
bin/Win32/Debug/lewaimai_pos_windows/skin/waimai_order_item.xml

@@ -14,7 +14,7 @@
 			
 			<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_delivery_date" text="配送时间:" pos="10,156,282,186" />
 			
 			<Label float="true" name="waimai_order_list_refund_status" text="退款状态:" pos="350,156,800,186" />
 			

BIN
bin/Win32/Release/lewaimai_pos_windows/lewaimai_pos_windows.exe


BIN
bin/Win32/Release/lewaimai_pos_windows/skin/skin.lwm


BIN
bin/Win32/Release/setup/lewaimai_pos_windows_setup_1.0.0.4.exe


+ 1 - 1
bin/Win32/Release/setup/乐外卖接单软件安装脚本.nsi

@@ -2,7 +2,7 @@
 
 ; HM NIS Edit Wizard helper defines
 !define PRODUCT_NAME "乐外卖接单软件"
-!define PRODUCT_VERSION "1.0.0.4"
+!define PRODUCT_VERSION "1.0.0.5"
 !define PRODUCT_PUBLISHER "深圳市迅享科技有限公司"
 !define PRODUCT_WEB_SITE "https://www.lewaimai.com"
 !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}.exe"

+ 1 - 1
lewaimai_pos_windows/control/CWaimaiOrderInfoUI.cpp

@@ -493,7 +493,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 	}
 
 	//如果是平台专送模式,商家不能设为成功和失败
-	if (order.m_delivery_mode == "1")
+	if (order.m_is_selftake == "0" && order.m_delivery_mode == "1")
 	{
 		success_button->SetVisible(false);
 		fail_button->SetVisible(false);

+ 1 - 1
lewaimai_pos_windows/control/CWaimaiOrderItemUI.cpp

@@ -189,7 +189,7 @@ void CWaimaiOrderItemUI::SetData(rapidjson::Value& orderinfo)
 	}
 
 	//如果是平台专送的,商家不能设为成功和失败
-	if (m_delivery_mode == "1")
+	if (m_is_selftake == "0" && m_delivery_mode == "1")
 	{
 		this->FindSubControl(L"waimai_order_list_success")->SetVisible(false);
 		this->FindSubControl(L"waimai_order_list_fail")->SetVisible(false);

+ 34 - 8
lewaimai_pos_windows/helper/CSystem.h

@@ -13,16 +13,16 @@ public:
     //程序休眠X秒
     static void my_sleep(int second);
 
-	static std::wstring getExePath()
-	{
-		wchar_t exeFullPath[MAX_PATH]; // Full path
-		std::wstring strPath = L"";
+    static std::wstring getExePath()
+    {
+        wchar_t exeFullPath[MAX_PATH]; // Full path
+        std::wstring strPath = L"";
 
-		GetModuleFileName(NULL, exeFullPath, MAX_PATH);
-		strPath = (wstring)exeFullPath;    // Get full path of the file
+        GetModuleFileName(NULL, exeFullPath, MAX_PATH);
+        strPath = (wstring)exeFullPath;    // Get full path of the file
 
-		return strPath;
-	}
+        return strPath;
+    }
 
     static std::wstring GetProgramDir()
     {
@@ -79,6 +79,32 @@ public:
         }
     }
 
+    static bool IsAutoStart()
+    {
+        HKEY hKey;
+        wstring strRegPath = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
+
+        //1、找到系统的启动项
+        if(RegOpenKeyEx(HKEY_CURRENT_USER, strRegPath.c_str(), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)
+        {
+            char dwValue[256];
+            DWORD dwSzType = REG_SZ;
+            DWORD dwSize = sizeof(dwValue);
+
+            if(::RegQueryValueEx(hKey, _T("乐外卖接单软件"), 0, &dwSzType, (LPBYTE)&dwValue, &dwSize) != ERROR_SUCCESS)
+            {
+                return false;
+            }
+
+            //关闭注册表
+            RegCloseKey(hKey);
+
+            return true;
+        }
+
+        return false;
+    }
+
     // 判断文件是否存在
     static BOOL IsFileExist(const wstring& csFile)
     {

BIN
lewaimai_pos_windows/resource/lewaimai_pos_windows.aps


BIN
lewaimai_pos_windows/resource/lewaimai_pos_windows.rc


+ 5 - 1
lewaimai_pos_windows/tool/CSetting.cpp

@@ -170,10 +170,14 @@ void CSetting::Init()
 
 	//ϵͳÉèÖõIJÎÊý
 	std::string setting_is_auto_start = "setting_is_auto_start";
-	if (m_paramsMap.find(setting_is_auto_start) == m_paramsMap.end())
+	if (CSystem::IsAutoStart() == true)
 	{
 		m_paramsMap[setting_is_auto_start] = "1";
 	}
+	else
+	{
+		m_paramsMap[setting_is_auto_start] = "0";
+	}
 
 	std::string setting_is_auto_login = "setting_is_auto_login";
 	if (m_paramsMap.find(setting_is_auto_login) == m_paramsMap.end())