Browse Source

自动更新,差不多做好了

zhangyang 6 years ago
parent
commit
982de58585

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


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/progress_back.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/progress_fore.png


+ 33 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/update.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Window size="520,410" caption="0,0,0,36" roundcorner="4,4" >
+	<Font shared="true" id="0" name="微软雅黑" size="20" />
+	<VerticalLayout bkimage="file='Dialog_BG2.png' corner='4,48,4,4'" >
+		<HorizontalLayout height="44">
+			<Label text="自动更新" width="200" height="44" valign="center" padding="10,0,0,0" textcolor="#FFFFFFFF"/>
+			<Control />
+			<Button name="closebtn" width="42" height="18" padding="0,6,0,0" tooltip="退出软件" normalimage="file='frame_btn_close_normal.bmp' mask='#FFFF00FF'" hotimage="file='frame_btn_close_hot.bmp' mask='#FFFF00FF'" pushedimage="file='frame_btn_close_down.bmp' mask='#FFFF00FF'"/>
+		</HorizontalLayout>
+		
+		<HorizontalLayout height="80">
+			<Control></Control>
+			<HorizontalLayout bkimage="file='logo_guanwang.png'" width="202" height="43" padding="0,18,0,0"></HorizontalLayout>
+			<Control></Control>
+		</HorizontalLayout>
+		
+		<Control height="60" />
+	
+		<HorizontalLayout height="50">
+			<Control></Control>
+			<Progress name="update_progress" width="400" height="7" foreimage="file='progress_fore.png'" bkimage="file='progress_back.png'" min="0" max="100" value="0" maxheight="7" maxwidth="400"/>
+			<Control></Control>
+		</HorizontalLayout>
+		
+		<Label text="正在下载最新版本安装包..." align="center" padding="0,10,0,0"/>
+		
+		<HorizontalLayout padding="0,0,0,15">
+			<Control></Control>
+			<Button name="guanwang" text="{u}www.zhipuzi.com{/u}" showhtml="true" width="200" align="center"/>
+			<Control></Control>
+		</HorizontalLayout>
+    </VerticalLayout>
+</Window>

BIN
bin/Win32/Debug/zhipuzi_pos_windows/zhipuzi_pos_windows.exe


+ 2 - 0
zhipuzi_pos_windows/helper/define.h

@@ -6,5 +6,7 @@
 #define WM_LOGIN_ERROR 10003
 #define WM_LOGIN_SUCCESS 10004
 #define WM_NEED_UPDATE 10005
+#define WM_UPDATEPROGRESS 10006
+#define WM_DOWNLOAD_FINISH 10007
 
 

+ 0 - 19
zhipuzi_pos_windows/network/CUpdateCheck.cpp

@@ -1,19 +0,0 @@
-#include "CUpdateCheck.h"
-
-CUpdateCheck::CUpdateCheck()
-{
-	
-}
-
-
-CUpdateCheck::~CUpdateCheck()
-{
-}
-
-/*
- *źě˛éĘǡńĐčŇŞ¸üĐÂ
- **/
-bool CUpdateCheck::StartCheck()
-{
-	return true;	
-}

+ 0 - 13
zhipuzi_pos_windows/network/CUpdateCheck.h

@@ -1,13 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-
-class CUpdateCheck
-{
-public:
-	CUpdateCheck();
-	~CUpdateCheck();
-
-	bool StartCheck();
-};
-

+ 1 - 0
zhipuzi_pos_windows/pch/pch.h

@@ -46,6 +46,7 @@ using namespace std;
 #ifdef _WIN32
 #include <windows.h>
 #include<io.h>
+#include <ShellAPI.h>
 #else
 #include <unistd.h>
 #include <sys/sysinfo.h>

+ 24 - 0
zhipuzi_pos_windows/wnd/CLoginWnd.cpp

@@ -1,5 +1,6 @@
 #include "../pch/pch.h"
 #include "CLoginWnd.h"
+#include "CUpdateWnd.h"
 
 void CLoginWnd::Init()
 {
@@ -327,7 +328,9 @@ LRESULT CLoginWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool&
 	{
 		//说明需要升级了
 
+		Update();
 
+		return true;
 	}
 
     return false;
@@ -494,3 +497,24 @@ void CLoginWnd::LoginError()
 	pLoginResultLabel->SetVisible(true);
 }
 
+void CLoginWnd::Update()
+{
+	CUpdateWnd* pFrame = new CUpdateWnd();
+	if (pFrame == NULL)
+	{
+		return;
+	}
+
+	std::string url = "http://down10d.zol.com.cn/zoldownload_os/nsis3.04setup@81_262627.exe";
+	std::string filename = "C:\\Users\\张洋\\Desktop\\";
+	pFrame->InitData(url, filename);
+
+	pFrame->SetIcon(IDI_ICON_DUILIB);
+	pFrame->Create(NULL, _T("自动更新"), UI_WNDSTYLE_DIALOG, 0, 0, 0, 0, 0, NULL);
+	pFrame->CenterWindow();
+
+	::ShowWindow(*pFrame, SW_SHOWNORMAL);
+
+	Close();
+}
+

+ 2 - 0
zhipuzi_pos_windows/wnd/CLoginWnd.h

@@ -59,6 +59,8 @@ public:
 
 	void LoginError();
 
+	void Update();
+
 public:
     CPaintManagerUI m_pm;
 };

+ 0 - 2
zhipuzi_pos_windows/wnd/CMainWnd.h

@@ -6,8 +6,6 @@
 #include "../order/CWaimaiOrder.h"
 #include "../tool/CPosPrinter.h"
 
-#include <ShellAPI.h>
-
 class CMessagePush;
 
 class CMainWnd : public CWindowWnd, public INotifyUI

+ 416 - 0
zhipuzi_pos_windows/wnd/CUpdateWnd.cpp

@@ -0,0 +1,416 @@
+#include "../pch/pch.h"
+#include "CUpdateWnd.h"
+
+double CUpdateWnd::m_Percent;
+
+void CUpdateWnd::Init()
+{
+    std::thread(&CUpdateWnd::Run, this).detach();
+}
+
+void CUpdateWnd::Notify(TNotifyUI& msg)
+{
+    if(msg.sType == _T("click"))
+    {
+        if(msg.pSender->GetName() == _T("closebtn"))
+        {
+            PostQuitMessage(0);
+            return;
+        }
+
+        else if(msg.pSender->GetName() == _T("guanwang"))
+        {
+            ShellExecute(NULL, _T("open"), _T("explorer.exe"), _T("https://www.zhipuzi.com"), NULL, SW_SHOW);
+        }
+    }
+
+    else if(msg.sType == _T("itemselect"))
+    {
+        CDuiString name = msg.pSender->GetName();
+
+        if(name == _T("accountcombo"))
+        {
+            CComboUI* pCom = static_cast<CComboUI*>(m_pm.FindControl(_T("accountcombo")));
+
+            std::wstring name = pCom->GetItemAt(pCom->GetCurSel())->GetText();
+            std::string password = CSetting::GetUser(CLewaimaiString::UnicodeToUTF8(name));
+            std::wstring wspassword = CLewaimaiString::UTF8ToUnicode(password);
+
+            CEditUI* pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("accountedit")));
+            pEdit->SetText(name.c_str());
+
+            CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("pwdedit")));
+            pPassword->SetText(wspassword.c_str());
+        }
+    }
+}
+
+LRESULT CUpdateWnd::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("update.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 CUpdateWnd::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+    bHandled = FALSE;
+    return 0;
+}
+
+/*
+ *这个是窗口被销毁的时候调用的
+ **/
+LRESULT CUpdateWnd::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+    bHandled = FALSE;
+    return 0;
+}
+
+LRESULT CUpdateWnd::OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+    if(::IsIconic(*this))
+    {
+        bHandled = FALSE;
+    }
+
+    return (wParam == 0) ? TRUE : FALSE;
+}
+
+LRESULT CUpdateWnd::OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+    return 0;
+}
+
+LRESULT CUpdateWnd::OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+    //在这里设置焦点才有用
+    CEditUI* pAccountEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("accountedit")));
+
+    if(pAccountEdit)
+    {
+        pAccountEdit->SetFocus();
+    }
+
+    return 0;
+}
+
+LRESULT CUpdateWnd::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 CUpdateWnd::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 CUpdateWnd::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_CLOSE:
+        lRes = OnClose(uMsg, wParam, lParam, bHandled);
+        break;
+
+    case WM_DESTROY:
+        lRes = OnDestroy(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;
+
+    case WM_UPDATEPROGRESS:
+        lRes = OnRefresh(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 CUpdateWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
+{
+    if(uMsg == WM_DOWNLOAD_FINISH)
+    {
+		//执行下载的安装包
+
+		HINSTANCE hNewExe = ShellExecuteA(NULL, "open", m_filepath.c_str(), NULL, NULL, SW_SHOW);
+
+		PostQuitMessage(0);
+    }
+
+    return false;
+}
+
+std::string CUpdateWnd::GetFileNameFormUrl(std::string url)
+{
+	char fileName[512] = { 0 };
+
+	int urlLen = strlen(url.c_str());
+	char mUrl[512] = { 0 };
+	char fName[256] = { 0 };
+	strcpy(mUrl, url.c_str());
+	int cutIndex = 0;
+	int i = urlLen - 1, j = 0;
+	while (mUrl[--i] != '/');
+	i++;
+	while (mUrl[i] != '\0' && mUrl[i] != '?' &&mUrl[i] != '&')
+	{
+		fName[j++] = mUrl[i++];
+	}
+	fName[j] = '\0';
+	strcpy(fileName, fName);
+
+	return fileName;
+}
+
+double CUpdateWnd::getDownloadFileLength(std::string url)
+{
+    CURL *easy_handle = NULL;
+    int ret = CURLE_OK;
+    double size = -1;
+
+    do
+    {
+        easy_handle = curl_easy_init();
+
+        if(!easy_handle)
+        {
+            break;
+        }
+
+        // Only get the header data
+        ret = curl_easy_setopt(easy_handle, CURLOPT_URL, url.c_str());
+        ret |= curl_easy_setopt(easy_handle, CURLOPT_HEADER, 1L);
+        ret |= curl_easy_setopt(easy_handle, CURLOPT_NOBODY, 1L);
+        ret |= curl_easy_setopt(easy_handle, CURLOPT_WRITEFUNCTION, nousecb);    // libcurl_a.lib will return error code 23 without this sentence on windows
+
+        if(ret != CURLE_OK)
+        {
+            break;
+        }
+
+        ret = curl_easy_perform(easy_handle);
+
+
+        if(ret != CURLE_OK)
+        {
+            char s[100] = { 0 };
+            sprintf_s(s, sizeof(s), "error:%d:%s", ret, curl_easy_strerror(static_cast<CURLcode>(ret)));
+
+            break;
+        }
+
+        // size = -1 if no Content-Length return or Content-Length=0
+        ret = curl_easy_getinfo(easy_handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &size);
+
+        if(ret != CURLE_OK)
+        {
+            break;
+        }
+
+    }
+    while(0);
+
+    curl_easy_cleanup(easy_handle);
+
+    return size;
+}
+
+void CUpdateWnd::Run()
+{
+	m_filepath = m_dir + GetFileNameFormUrl(m_url);
+
+    CURLcode res;
+
+    m_curl = curl_easy_init();
+
+    if(m_curl)
+    {
+
+        m_resumeByte = 0;
+
+        m_downloadFileLength = getDownloadFileLength(m_url);
+
+        if(m_resumeByte >= (int)m_downloadFileLength)
+        {
+            return;
+        }
+
+        m_outfile = fopen(m_filepath.c_str(), "ab+");
+
+        curl_easy_setopt(m_curl, CURLOPT_URL, m_url.c_str());//在此要注意,此url必须是多字节
+        curl_easy_setopt(m_curl, CURLOPT_TIMEOUT, 0);
+        curl_easy_setopt(m_curl, CURLOPT_WRITEDATA, m_outfile);
+        curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, my_write_func);
+        curl_easy_setopt(m_curl, CURLOPT_NOPROGRESS, FALSE);
+        curl_easy_setopt(m_curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
+        curl_easy_setopt(m_curl, CURLOPT_PROGRESSDATA, NULL);//给下载进度回调函数传参数,在此是指针
+
+        res = curl_easy_perform(m_curl);
+
+        fclose(m_outfile);
+
+        curl_easy_cleanup(m_curl);
+    }
+
+	//走到这里,下载完成了
+	HWND hWnd = FindWindow(NULL, L"智铺子收银软件更新下载...");
+
+	if (hWnd)
+	{
+		::PostMessage(hWnd, WM_DOWNLOAD_FINISH, 0, 0);
+	}
+}
+size_t CUpdateWnd::my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+    size_t nWrite = fwrite(ptr, size, nmemb, stream);
+
+    if(nWrite == 0)
+    {
+        return CURL_WRITEFUNC_PAUSE;
+    }
+
+    else
+    {
+        return nWrite;
+    }
+}
+
+int CUpdateWnd::my_progress_func(void *progress_data,
+                                 double t, /* dltotal */
+                                 double d, /* dlnow */
+                                 double ultotal,
+                                 double ulnow)
+{
+	if (t > 0)
+	{
+		CUpdateWnd::m_Percent = d * 100.0 / t;
+	}
+	else
+	{
+		CUpdateWnd::m_Percent = 0;
+	}
+
+    HWND hWnd = FindWindow(NULL, L"自动更新");
+
+    if(hWnd)
+    {
+        ::PostMessage(hWnd, WM_UPDATEPROGRESS, 0, 0);
+    }
+
+    return 0;
+}
+
+size_t CUpdateWnd::nousecb(char *buffer, size_t x, size_t y, void *userdata)
+{
+    (void)buffer;
+    (void)userdata;
+    return x * y;
+}
+
+LRESULT CUpdateWnd::OnRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+    CProgressUI* pProgress = static_cast<CProgressUI*>(m_pm.FindControl(_T("update_progress")));
+
+    if(pProgress)
+    {
+        pProgress->SetValue((int)m_Percent);
+    }
+
+    return 0;
+}
+

+ 92 - 0
zhipuzi_pos_windows/wnd/CUpdateWnd.h

@@ -0,0 +1,92 @@
+#pragma once
+
+#include "../pch/pch.h"
+
+#include <curl/curl.h>
+
+class CUpdateWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
+{
+public:
+
+    LPCTSTR GetWindowClassName() const
+    {
+        return _T("UIUpdateFrame");
+    };
+
+    UINT GetClassStyle() const
+    {
+        return UI_CLASSSTYLE_DIALOG;
+    };
+
+    void OnFinalMessage(HWND /*hWnd*/)
+    {
+        //m_pm.RemovePreMessageFilter(this);
+        delete this;
+    };
+
+	void InitData(std::string url, std::string dir)
+	{
+		m_url = url;
+		m_dir = dir;
+	}
+
+    void Init();
+
+    void Notify(TNotifyUI& msg);
+
+    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 HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+    LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
+
+    LRESULT OnRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+
+	std::string GetFileNameFormUrl(std::string url);
+
+	static size_t nousecb(char *buffer, size_t x, size_t y, void *userdata);
+
+    double getDownloadFileLength(std::string url);
+
+    void Run();
+
+    static size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream);
+
+    static int my_progress_func(void *progress_data,
+                         double t, /* dltotal */
+                         double d, /* dlnow */
+                         double ultotal,
+                         double ulnow);
+public:
+    CPaintManagerUI m_pm;
+
+    string m_dir;//目录名
+	std::string m_filepath; //完成文件在本地的路径名
+
+	CURL* m_curl;//libcurl句柄
+
+    double m_downloadFileLength;//服务器文件长度
+
+    int m_resumeByte;//本地已下载的文件长度
+
+    FILE* m_outfile;//文件指针
+
+    std::string m_url;//下载地址
+
+    static double m_Percent;
+};
+

+ 0 - 1
zhipuzi_pos_windows/zhipuzi_pos_windows.cpp

@@ -1,7 +1,6 @@
 #include "pch/pch.h"
 
 #include "wnd/CLoginWnd.h"
-#include "network/CUpdateCheck.h"
 
 int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                       _In_opt_ HINSTANCE hPrevInstance,

+ 2 - 2
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj

@@ -202,7 +202,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClInclude Include="network\CUpdateCheck.h" />
+    <ClInclude Include="wnd\CUpdateWnd.h" />
     <ClInclude Include="wnd\CWaimaiOrderFailReasonWnd.h" />
     <ClInclude Include="network\PosMessage.h" />
     <ClInclude Include="wnd\CChufangSettingWnd.h" />
@@ -231,7 +231,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClInclude Include="control\OrderListUI.h" />
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="network\CUpdateCheck.cpp" />
+    <ClCompile Include="wnd\CUpdateWnd.cpp" />
     <ClCompile Include="wnd\CWaimaiOrderFailReasonWnd.cpp" />
     <ClCompile Include="wnd\CChufangSettingWnd.cpp" />
     <ClCompile Include="control\CWaimaiOrderInfoUI.cpp" />

+ 2 - 2
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj.filters

@@ -93,7 +93,7 @@
     <ClInclude Include="wnd\CWaimaiOrderFailReasonWnd.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="network\CUpdateCheck.h">
+    <ClInclude Include="wnd\CUpdateWnd.h">
       <Filter>头文件</Filter>
     </ClInclude>
   </ItemGroup>
@@ -167,7 +167,7 @@
     <ClCompile Include="wnd\CWaimaiOrderFailReasonWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="network\CUpdateCheck.cpp">
+    <ClCompile Include="wnd\CUpdateWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
   </ItemGroup>