Procházet zdrojové kódy

修改项目工程

zhangyang před 6 roky
rodič
revize
4deb19b9ad
51 změnil soubory, kde provedl 9 přidání a 667 odebrání
  1. binární
      bin/Win32/Debug/zhipuzi_pos_windows/zhipuzi_pos_windows.exe
  2. binární
      dll/debug/DuiLib_ud.dll
  3. binární
      dll/debug/libcrypto-1_1.dll
  4. binární
      dll/debug/libcurl.dll
  5. binární
      dll/debug/libssl-1_1.dll
  6. binární
      dll/debug/log4cplusUD.dll
  7. binární
      dll/release/aliyun-mns.dll
  8. binární
      dll/release/libeay32.dll
  9. binární
      dll/release/log4cplusU.dll
  10. binární
      dll/release/mysqlcppconn-7-vs14.dll
  11. binární
      dll/release/mysqlcppconn8-1-vs14.dll
  12. binární
      dll/release/ssleay32.dll
  13. binární
      dll/release/zlib.dll
  14. 1 54
      lewaimai_dispatch/CGameFrameWnd.h
  15. 1 2
      lewaimai_dispatch/CLoginWnd.h
  16. 0 459
      lewaimai_dispatch/ControlEx.h
  17. 0 108
      lewaimai_dispatch/helper/CAliyunMNS.cpp
  18. 0 24
      lewaimai_dispatch/helper/CAliyunMNS.h
  19. 3 6
      lewaimai_dispatch/lewaimai_dispatch_windows.vcxproj
  20. 0 9
      lewaimai_dispatch/lewaimai_dispatch_windows.vcxproj.filters
  21. 1 1
      lewaimai_dispatch/network/CZhipuziHttpClient.cpp
  22. 3 4
      lewaimai_dispatch/pch/pch.h
  23. binární
      lib/debug/DuiLib_ud.lib
  24. binární
      lib/debug/libcurl.dll.a
  25. binární
      lib/debug/libcurl_debug.lib
  26. binární
      lib/debug/libeay32MTd.lib
  27. binární
      lib/debug/log4cplusUD.lib
  28. binární
      lib/debug/mnscpp.lib
  29. binární
      lib/debug/ssleay32MTd.lib
  30. binární
      lib/release/aliyun-mns.lib
  31. binární
      lib/release/grpc/address_sorting.lib
  32. binární
      lib/release/grpc/benchmark.lib
  33. binární
      lib/release/grpc/boringssl_gtest.lib
  34. binární
      lib/release/grpc/cares.lib
  35. binární
      lib/release/grpc/crypto.lib
  36. binární
      lib/release/grpc/gflags_nothreads_static.lib
  37. binární
      lib/release/grpc/gflags_static.lib
  38. binární
      lib/release/grpc/gpr.lib
  39. binární
      lib/release/grpc/grpc++.lib
  40. binární
      lib/release/grpc/grpc.lib
  41. binární
      lib/release/grpc/libprotobuf-lite.lib
  42. binární
      lib/release/grpc/libprotobuf.lib
  43. binární
      lib/release/grpc/libprotoc.lib
  44. binární
      lib/release/grpc/ssl.lib
  45. binární
      lib/release/grpc/zlib.lib
  46. binární
      lib/release/grpc/zlibstatic.lib
  47. binární
      lib/release/libcurl.lib
  48. binární
      lib/release/libeay32.lib
  49. binární
      lib/release/log4cplusU.exp
  50. binární
      lib/release/mysqlcppconn.lib
  51. binární
      lib/release/ssleay32.lib

binární
bin/Win32/Debug/zhipuzi_pos_windows/zhipuzi_pos_windows.exe


binární
dll/debug/DuiLib_ud.dll


binární
dll/debug/libcrypto-1_1.dll


binární
dll/debug/libcurl.dll


binární
dll/debug/libssl-1_1.dll


binární
dll/debug/log4cplusUD.dll


binární
dll/release/aliyun-mns.dll


binární
dll/release/libeay32.dll


binární
dll/release/log4cplusU.dll


binární
dll/release/mysqlcppconn-7-vs14.dll


binární
dll/release/mysqlcppconn8-1-vs14.dll


binární
dll/release/ssleay32.dll


binární
dll/release/zlib.dll


+ 1 - 54
lewaimai_dispatch/CGameFrameWnd.h

@@ -84,64 +84,12 @@ public:
 				CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
 				if (pControl && pControl->GetCurSel() != 0) pControl->SelectItem(0);
 			}
-			else if (name == _T("roomswitch")) {
-				CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
-				if (pControl && pControl->GetCurSel() != 1) {
-					pControl->SelectItem(1);
-					DeskListUI* pDeskList = static_cast<DeskListUI*>(m_pm.FindControl(_T("destlist")));
-					pDeskList->SetFocus();
-					CRichEditUI* pRichEdit = static_cast<CRichEditUI*>(m_pm.FindControl(_T("chatmsglist")));
-					if (pRichEdit) {
-						pRichEdit->SetText(_T("欢迎进入XXX游戏,祝游戏愉快!\n\n"));
-						long lSelBegin = 0, lSelEnd = 0;
-						CHARFORMAT2 cf;
-						ZeroMemory(&cf, sizeof(CHARFORMAT2));
-						cf.cbSize = sizeof(cf);
-						cf.dwReserved = 0;
-						cf.dwMask = CFM_COLOR;
-						cf.crTextColor = RGB(255, 0, 0);
-						lSelEnd = pRichEdit->GetTextLength();
-						pRichEdit->SetSel(lSelBegin, lSelEnd);
-						pRichEdit->SetSelectionCharFormat(cf);
-					}
-				}
-			}
 		}
 		else if (msg.sType == _T("itemclick")) {
-			GameListUI* pGameList = static_cast<GameListUI*>(m_pm.FindControl(_T("gamelist")));
-			if (pGameList->GetItemIndex(msg.pSender) != -1)
-			{
-				if (_tcscmp(msg.pSender->GetClass(), DUI_CTR_LISTLABELELEMENT) == 0) {
-					GameListUI::Node* node = (GameListUI::Node*)msg.pSender->GetTag();
 
-					POINT pt = { 0 };
-					::GetCursorPos(&pt);
-					::ScreenToClient(m_pm.GetPaintWindow(), &pt);
-					pt.x -= msg.pSender->GetX();
-					SIZE sz = pGameList->GetExpanderSizeX(node);
-					if (pt.x >= sz.cx && pt.x < sz.cy)
-						pGameList->ExpandNode(node, !node->data()._expand);
-				}
-			}
 		}
 		else if (msg.sType == _T("itemactivate")) {
-			GameListUI* pGameList = static_cast<GameListUI*>(m_pm.FindControl(_T("gamelist")));
-			if (pGameList->GetItemIndex(msg.pSender) != -1)
-			{
-				if (_tcscmp(msg.pSender->GetClass(), DUI_CTR_LISTLABELELEMENT) == 0) {
-					GameListUI::Node* node = (GameListUI::Node*)msg.pSender->GetTag();
-					pGameList->ExpandNode(node, !node->data()._expand);
-					if (node->data()._level == 3) {
-						COptionUI* pControl = static_cast<COptionUI*>(m_pm.FindControl(_T("roomswitch")));
-						if (pControl) {
-							pControl->SetVisible(true);
-							pControl->SetText(node->parent()->parent()->data()._text);
-							pControl->Activate();
 
-						}
-					}
-				}
-			}
 		}
 		else if (msg.sType == _T("itemselect")) {
 			if (msg.pSender->GetName() == _T("chatCombo")) {
@@ -160,9 +108,8 @@ public:
 
 		m_pm.Init(m_hWnd);
 		CDialogBuilder builder;
-		CDialogBuilderCallbackEx cb;
 
-		CControlUI* pRoot = builder.Create(_T("main.xml"), (UINT)0, &cb, &m_pm);
+		CControlUI* pRoot = builder.Create(_T("main.xml"), (UINT)0, NULL, &m_pm);
 		ASSERT(pRoot && "Failed to parse XML");
 
 		m_pm.AttachDialog(pRoot);

+ 1 - 2
lewaimai_dispatch/CLoginWnd.h

@@ -58,9 +58,8 @@ public:
 		m_pm.AddPreMessageFilter(this);
 
 		CDialogBuilder builder;
-		CDialogBuilderCallbackEx cb;
 
-		CControlUI* pRoot = builder.Create(_T("login.xml"), (UINT)0, &cb, &m_pm);
+		CControlUI* pRoot = builder.Create(_T("login.xml"), (UINT)0, NULL, &m_pm);
 		ASSERT(pRoot && "Failed to parse XML");
 
 		// 把这些控件绘制到本窗口上

+ 0 - 459
lewaimai_dispatch/ControlEx.h

@@ -1,459 +0,0 @@
-#ifndef __CONTROLEX_H__
-#define __CONTROLEX_H__
-
-#include <vector>
-#include <math.h>
-
-inline double CalculateDelay(double state) {
-	return pow(state, 2);
-}
-
-// category(0)->game(1)->server(2)->room(3)
-class GameListUI : public CListUI
-{
-public:
-	enum { SCROLL_TIMERID = 10 };
-
-	struct NodeData
-	{
-		int _level;
-		bool _expand;
-		CDuiString _text;
-		CListLabelElementUI* _pListElement;
-	};
-
-	class Node
-	{
-		typedef std::vector <Node*>	Children;
-		Children	_children;
-		Node*		_parent;
-		NodeData    _data;
-
-	private:
-		void set_parent(Node* parent) { _parent = parent; }
-
-	public:
-		Node() : _parent(NULL) {}
-		explicit Node(NodeData t) : _data(t), _parent(NULL) {}
-		Node(NodeData t, Node* parent) : _data(t), _parent(parent) {}
-		~Node()
-		{
-			for (int i = 0; i < num_children(); i++)
-				delete _children[i];
-		}
-		NodeData& data() { return _data; }
-		int num_children() const { return _children.size(); }
-		Node* child(int i) { return _children[i]; }
-		Node* parent() { return (_parent); }
-		bool has_children() const { return num_children() > 0; }
-		void add_child(Node* child)
-		{
-			child->set_parent(this);
-			_children.push_back(child);
-		}
-		void remove_child(Node* child)
-		{
-			Children::iterator iter = _children.begin();
-			for (; iter < _children.end(); ++iter)
-			{
-				if (*iter == child)
-				{
-					_children.erase(iter);
-					return;
-				}
-			}
-		}
-		Node* get_last_child()
-		{
-			if (has_children())
-			{
-				return child(num_children() - 1)->get_last_child();
-			}
-			else return this;
-		}
-	};
-
-	GameListUI() : _root(NULL), m_dwDelayDeltaY(0), m_dwDelayNum(0), m_dwDelayLeft(0)
-	{
-		SetItemShowHtml(true);
-
-		_root = new Node;
-		_root->data()._level = -1;
-		_root->data()._expand = true;
-		_root->data()._pListElement = NULL;
-	}
-
-	~GameListUI() { if (_root) delete _root; }
-
-	bool Add(CControlUI* pControl)
-	{
-		if (!pControl) return false;
-		if (_tcscmp(pControl->GetClass(), DUI_CTR_LISTLABELELEMENT) != 0) return false;
-		return CListUI::Add(pControl);
-	}
-
-	bool AddAt(CControlUI* pControl, int iIndex)
-	{
-		if (!pControl) return false;
-		if (_tcscmp(pControl->GetClass(), DUI_CTR_LISTLABELELEMENT) != 0) return false;
-		return CListUI::AddAt(pControl, iIndex);
-	}
-
-	bool Remove(CControlUI* pControl, bool bDoNotDestroy = false)
-	{
-		if (!pControl) return false;
-		if (_tcscmp(pControl->GetClass(), DUI_CTR_LISTLABELELEMENT) != 0) return false;
-
-		if (reinterpret_cast<Node*>(static_cast<CListLabelElementUI*>(pControl->GetInterface(DUI_CTR_LISTLABELELEMENT))->GetTag()) == NULL)
-			return CListUI::Remove(pControl, bDoNotDestroy);
-		else
-			return RemoveNode(reinterpret_cast<Node*>(static_cast<CListLabelElementUI*>(pControl->GetInterface(DUI_CTR_LISTLABELELEMENT))->GetTag()));
-	}
-
-	bool RemoveAt(int iIndex, bool bDoNotDestroy = false)
-	{
-		CControlUI* pControl = GetItemAt(iIndex);
-		if (!pControl) return false;
-		if (_tcscmp(pControl->GetClass(), DUI_CTR_LISTLABELELEMENT) != 0) return false;
-
-		if (reinterpret_cast<Node*>(static_cast<CListLabelElementUI*>(pControl->GetInterface(DUI_CTR_LISTLABELELEMENT))->GetTag()) == NULL)
-			return CListUI::RemoveAt(iIndex, bDoNotDestroy);
-		else
-			return RemoveNode(reinterpret_cast<Node*>(static_cast<CListLabelElementUI*>(pControl->GetInterface(DUI_CTR_LISTLABELELEMENT))->GetTag()));
-	}
-
-	void RemoveAll()
-	{
-		CListUI::RemoveAll();
-		for (int i = 0; i < _root->num_children(); ++i)
-		{
-			Node* child = _root->child(i);
-			RemoveNode(child);
-		}
-		delete _root;
-		_root = new Node;
-		_root->data()._level = -1;
-		_root->data()._expand = true;
-		_root->data()._pListElement = NULL;
-	}
-	void SetVisible(bool bVisible = true)
-	{
-		if (m_bVisible == bVisible) return;
-		CControlUI::SetVisible(bVisible);
-	}
-
-	void SetInternVisible(bool bVisible = true)
-	{
-		CControlUI::SetInternVisible(bVisible);
-	}
-
-	void DoEvent(TEventUI& event)
-	{
-		if (!IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND) {
-			if (m_pParent != NULL) m_pParent->DoEvent(event);
-			else CVerticalLayoutUI::DoEvent(event);
-			return;
-		}
-
-		if (event.Type == UIEVENT_TIMER && event.wParam == SCROLL_TIMERID) {
-			if (m_dwDelayLeft > 0) {
-				--m_dwDelayLeft;
-				SIZE sz = GetScrollPos();
-				LONG lDeltaY = (LONG)(CalculateDelay((double)m_dwDelayLeft / m_dwDelayNum) * m_dwDelayDeltaY);
-				if ((lDeltaY > 0 && sz.cy != 0) || (lDeltaY < 0 && sz.cy != GetScrollRange().cy)) {
-					sz.cy -= lDeltaY;
-					SetScrollPos(sz);
-					return;
-				}
-			}
-			m_dwDelayDeltaY = 0;
-			m_dwDelayNum = 0;
-			m_dwDelayLeft = 0;
-			m_pManager->KillTimer(this, SCROLL_TIMERID);
-			return;
-		}
-		if (event.Type == UIEVENT_SCROLLWHEEL) {
-			LONG lDeltaY = 0;
-			if (m_dwDelayNum > 0) lDeltaY = (LONG)(CalculateDelay((double)m_dwDelayLeft / m_dwDelayNum) * m_dwDelayDeltaY);
-			switch (LOWORD(event.wParam)) {
-			case SB_LINEUP:
-				if (m_dwDelayDeltaY >= 0) m_dwDelayDeltaY = lDeltaY + 8;
-				else m_dwDelayDeltaY = lDeltaY + 12;
-				break;
-			case SB_LINEDOWN:
-				if (m_dwDelayDeltaY <= 0) m_dwDelayDeltaY = lDeltaY - 8;
-				else m_dwDelayDeltaY = lDeltaY - 12;
-				break;
-			}
-			if (m_dwDelayDeltaY > 100) m_dwDelayDeltaY = 100;
-			else if (m_dwDelayDeltaY < -100) m_dwDelayDeltaY = -100;
-			m_dwDelayNum = (DWORD)sqrt((double)abs(m_dwDelayDeltaY)) * 5;
-			m_dwDelayLeft = m_dwDelayNum;
-			m_pManager->SetTimer(this, SCROLL_TIMERID, 50U);
-			return;
-		}
-
-		CListUI::DoEvent(event);
-	}
-
-	Node* GetRoot() { return _root; }
-
-	Node* AddNode(LPCTSTR text, Node* parent = NULL)
-	{
-		if (!parent) parent = _root;
-
-		CListLabelElementUI* pListElement = new CListLabelElementUI;
-		Node* node = new Node;
-		node->data()._level = parent->data()._level + 1;
-		if (node->data()._level == 0) node->data()._expand = true;
-		else node->data()._expand = false;
-		node->data()._text = text;
-		node->data()._pListElement = pListElement;
-
-		if (parent != _root) {
-			if (!(parent->data()._expand && parent->data()._pListElement->IsVisible()))
-				pListElement->SetInternVisible(false);
-		}
-
-		CDuiString html_text;
-		html_text += _T("<x 6>");
-		for (int i = 0; i < node->data()._level; ++i) {
-			html_text += _T("<x 24>");
-		}
-		if (node->data()._level < 3) {
-			if (node->data()._expand) html_text += _T("<v center><a><i tree_expand.png 2 1></a></v>");
-			else html_text += _T("<v center><a><i tree_expand.png 2 0></a></v>");
-		}
-		html_text += node->data()._text;
-		pListElement->SetText(html_text);
-		//if( node->data()._level == 0 ) pListElement->SetFixedHeight(28);
-		//else pListElement->SetFixedHeight(24);
-		pListElement->SetTag((UINT_PTR)node);
-		if (node->data()._level == 0) {
-			pListElement->SetBkImage(_T("file='tree_top.png' corner='2,1,2,1' fade='100'"));
-		}
-
-		int index = 0;
-		if (parent->has_children()) {
-			Node* prev = parent->get_last_child();
-			index = prev->data()._pListElement->GetIndex() + 1;
-		}
-		else {
-			if (parent == _root) index = 0;
-			else index = parent->data()._pListElement->GetIndex() + 1;
-		}
-		if (!CListUI::AddAt(pListElement, index)) {
-			delete pListElement;
-			delete node;
-			node = NULL;
-		}
-		parent->add_child(node);
-		return node;
-	}
-
-	bool RemoveNode(Node* node)
-	{
-		if (!node || node == _root) return false;
-		for (int i = 0; i < node->num_children(); ++i) {
-			Node* child = node->child(i);
-			RemoveNode(child);
-		}
-		CListUI::Remove(node->data()._pListElement);
-		node->parent()->remove_child(node);
-		delete node;
-		return true;
-	}
-
-	void ExpandNode(Node* node, bool expand)
-	{
-		if (!node || node == _root) return;
-
-		if (node->data()._expand == expand) return;
-		node->data()._expand = expand;
-
-		CDuiString html_text;
-		html_text += _T("<x 6>");
-		for (int i = 0; i < node->data()._level; ++i) {
-			html_text += _T("<x 24>");
-		}
-		if (node->data()._level < 3) {
-			if (node->data()._expand) html_text += _T("<v center><a><i tree_expand.png 2 1></a></v>");
-			else html_text += _T("<v center><a><i tree_expand.png 2 0></a></v>");
-		}
-		html_text += node->data()._text;
-		node->data()._pListElement->SetText(html_text);
-
-		if (!node->data()._pListElement->IsVisible()) return;
-		if (!node->has_children()) return;
-
-		Node* begin = node->child(0);
-		Node* end = node->get_last_child();
-		for (int i = begin->data()._pListElement->GetIndex(); i <= end->data()._pListElement->GetIndex(); ++i) {
-			CControlUI* control = GetItemAt(i);
-			if (_tcscmp(control->GetClass(), DUI_CTR_LISTLABELELEMENT) == 0) {
-				Node* local_parent = ((GameListUI::Node*)control->GetTag())->parent();
-				control->SetInternVisible(local_parent->data()._expand && local_parent->data()._pListElement->IsVisible());
-			}
-		}
-		NeedUpdate();
-	}
-
-	SIZE GetExpanderSizeX(Node* node) const
-	{
-		if (!node || node == _root) return CDuiSize();
-		if (node->data()._level >= 3) return CDuiSize();
-
-		SIZE szExpander = { 0 };
-		szExpander.cx = 6 + 24 * node->data()._level - 4/*适当放大一点*/;
-		szExpander.cy = szExpander.cx + 16 + 8/*适当放大一点*/;
-		return szExpander;
-	}
-
-private:
-	Node* _root;
-
-	LONG m_dwDelayDeltaY;
-	DWORD m_dwDelayNum;
-	DWORD m_dwDelayLeft;
-};
-
-class DeskListUI : public CTileLayoutUI
-{
-public:
-	enum { SCROLL_TIMERID = 10 };
-
-	DeskListUI() : m_uButtonState(0), m_dwDelayDeltaY(0), m_dwDelayNum(0), m_dwDelayLeft(0)
-	{
-		SetItemSize(CDuiSize(182, 152));
-		CDialogBuilder builder;
-		CContainerUI* pDesk = static_cast<CContainerUI*>(builder.Create(_T("desk.xml"), (UINT)0));
-		if (pDesk != NULL) {
-			for (int i = 0; i < 500; ++i)
-			{
-				if (pDesk == NULL) pDesk = static_cast<CContainerUI*>(builder.Create());
-				if (pDesk != NULL) {
-					this->Add(pDesk);
-					TCHAR indexBuffer[16];
-					CDuiString strIndexString = _T("- ");
-					strIndexString += _itot(i + 1, indexBuffer, 10);
-					strIndexString += _T(" -");
-					pDesk->GetItemAt(3)->SetText(strIndexString);
-					pDesk = NULL;
-				}
-				else {
-					this->RemoveAll();
-					return;
-				}
-			}
-		}
-	}
-
-	void DoEvent(TEventUI& event)
-	{
-		if (!IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND) {
-			if (m_pParent != NULL) m_pParent->DoEvent(event);
-			else CTileLayoutUI::DoEvent(event);
-			return;
-		}
-
-		if (event.Type == UIEVENT_TIMER && event.wParam == SCROLL_TIMERID)
-		{
-			if ((m_uButtonState & UISTATE_CAPTURED) != 0) {
-				POINT pt = m_pManager->GetMousePos();
-				LONG cy = (pt.y - m_ptLastMouse.y);
-				m_ptLastMouse = pt;
-				SIZE sz = GetScrollPos();
-				sz.cy -= cy;
-				SetScrollPos(sz);
-				return;
-			}
-			else if (m_dwDelayLeft > 0) {
-				--m_dwDelayLeft;
-				SIZE sz = GetScrollPos();
-				LONG lDeltaY = (LONG)(CalculateDelay((double)m_dwDelayLeft / m_dwDelayNum) * m_dwDelayDeltaY);
-				if ((lDeltaY > 0 && sz.cy != 0) || (lDeltaY < 0 && sz.cy != GetScrollRange().cy)) {
-					sz.cy -= lDeltaY;
-					SetScrollPos(sz);
-					return;
-				}
-			}
-			m_dwDelayDeltaY = 0;
-			m_dwDelayNum = 0;
-			m_dwDelayLeft = 0;
-			m_pManager->KillTimer(this, SCROLL_TIMERID);
-			return;
-		}
-		if (event.Type == UIEVENT_BUTTONDOWN && IsEnabled())
-		{
-			m_uButtonState |= UISTATE_CAPTURED;
-			m_ptLastMouse = event.ptMouse;
-			m_dwDelayDeltaY = 0;
-			m_dwDelayNum = 0;
-			m_dwDelayLeft = 0;
-			::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_HAND)));
-			m_pManager->SetTimer(this, SCROLL_TIMERID, 50U);
-			return;
-		}
-		if (event.Type == UIEVENT_BUTTONUP)
-		{
-			if ((m_uButtonState & UISTATE_CAPTURED) != 0) {
-				m_uButtonState &= ~UISTATE_CAPTURED;
-				::SetCursor(::LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)));
-				if (m_ptLastMouse.y != event.ptMouse.y) {
-					m_dwDelayDeltaY = (event.ptMouse.y - m_ptLastMouse.y);
-					if (m_dwDelayDeltaY > 120) m_dwDelayDeltaY = 120;
-					else if (m_dwDelayDeltaY < -120) m_dwDelayDeltaY = -120;
-					m_dwDelayNum = (DWORD)sqrt((double)abs(m_dwDelayDeltaY)) * 5;
-					m_dwDelayLeft = m_dwDelayNum;
-				}
-				else
-					m_pManager->KillTimer(this, SCROLL_TIMERID);
-			}
-			return;
-		}
-		if (event.Type == UIEVENT_SCROLLWHEEL)
-		{
-			LONG lDeltaY = 0;
-			if (m_dwDelayNum > 0) lDeltaY = (LONG)(CalculateDelay((double)m_dwDelayLeft / m_dwDelayNum) * m_dwDelayDeltaY);
-			switch (LOWORD(event.wParam)) {
-			case SB_LINEUP:
-				if (m_dwDelayDeltaY >= 0) m_dwDelayDeltaY = lDeltaY + 8;
-				else m_dwDelayDeltaY = lDeltaY + 12;
-				break;
-			case SB_LINEDOWN:
-				if (m_dwDelayDeltaY <= 0) m_dwDelayDeltaY = lDeltaY - 8;
-				else m_dwDelayDeltaY = lDeltaY - 12;
-				break;
-			}
-			if (m_dwDelayDeltaY > 100) m_dwDelayDeltaY = 100;
-			else if (m_dwDelayDeltaY < -100) m_dwDelayDeltaY = -100;
-			m_dwDelayNum = (DWORD)sqrt((double)abs(m_dwDelayDeltaY)) * 5;
-			m_dwDelayLeft = m_dwDelayNum;
-			m_pManager->SetTimer(this, SCROLL_TIMERID, 50U);
-			return;
-		}
-		CTileLayoutUI::DoEvent(event);
-	}
-
-private:
-	UINT m_uButtonState;
-	POINT m_ptLastMouse;
-	LONG m_dwDelayDeltaY;
-	DWORD m_dwDelayNum;
-	DWORD m_dwDelayLeft;
-};
-
-
-class CDialogBuilderCallbackEx : public IDialogBuilderCallback
-{
-public:
-	CControlUI* CreateControl(LPCTSTR pstrClass)
-	{
-		if (_tcscmp(pstrClass, _T("GameList")) == 0) return new GameListUI;
-		else if (_tcscmp(pstrClass, _T("DeskList")) == 0) return new DeskListUI;
-		return NULL;
-	}
-};
-
-
-#endif __CONTROLEX_H__

+ 0 - 108
lewaimai_dispatch/helper/CAliyunMNS.cpp

@@ -1,108 +0,0 @@
-#include "../pch/pch.h"
-#include "CAliyunMNS.h"
-
-CAliyunMNS::CAliyunMNS(std::string queueName)
-{
-	string endpoint;
-	string accessId;
-	string accessKey;
-	string stsToken;
-
-	endpoint = CConfigReader::getConfigValue("mns.accountendpoint");
-	accessId = CConfigReader::getConfigValue("mns.accesskeyid");
-	accessKey = CConfigReader::getConfigValue("mns.accesskeysecret");
-	stsToken = "";
-
-	m_mnsClient = new MNSClient(endpoint, accessId, accessKey, stsToken);	
-
-	try
-	{
-		queue = m_mnsClient->getQueueRef(queueName.c_str());
-
-		//LOG_ERROR("queueName:" << queueName.c_str());
-		//LOG_ERROR("endpoint:" << endpoint.c_str());
-		//LOG_ERROR("accessId:" << accessId.c_str());
-		//LOG_ERROR("accessKey:" << accessKey.c_str());
-		//LOG_ERROR("stsToken:" << stsToken.c_str());
-
-		is_init = true;
-	}
-	catch (MNSServerException& me)
-	{
-		//cout << "Request Failed: " << me.GetErrorCode().c_str() << endl;
-		LOG_INFO("Request Failed: " << me.GetErrorCode().c_str());
-		is_init = false;
-
-		return;
-	}
-	catch (MNSExceptionBase& mb)
-	{
-		//cout << "Request Failed: " << mb.ToString().c_str() << endl;
-		LOG_INFO("Request Failed: " << mb.ToString().c_str());
-		is_init = false;
-
-		return;
-	}
-}
-
-
-CAliyunMNS::~CAliyunMNS()
-{
-	if (m_mnsClient)
-	{
-		delete m_mnsClient;
-	}
-}
-
-std::string CAliyunMNS::getMessage()
-{
-	if (is_init == false)
-	{
-		return "error!";
-	}
-
-	try
-	{
-		Message message;
-		queue->receiveMessage(30, message);
-
-		std::string newMessage;
-		bool res = CLewaimaiString::base64_decode(message.getMessageBody(), &newMessage);
-		if (res == false)
-		{
-			LOG_INFO("base64解码失败!");
-			return "error!";
-		}
-
-		queue->deleteMessage(message.getReceiptHandle());
-
-		return newMessage;
-	}
-	catch (MNSServerException& me)
-	{
-		//cout << "Request Failed: " << me.GetErrorCode().c_str() << endl;
-		LOG_DEBUG("Request Failed: "<<me.GetErrorCode().c_str());
-		return "error!";
-	}
-	catch (MNSExceptionBase& mb)
-	{
-		//cout << "Request Failed: " << mb.ToString().c_str() << endl;
-		LOG_DEBUG("Request Failed: "<<mb.ToString().c_str());
-		return "error!";
-	}
-}
-
-void CAliyunMNS::sendMessage(std::string message)
-{
-	std::string newMessage;
-	
-	CLewaimaiString::base64_encode(message, &newMessage);
-
-	SendMessageResponse smResp;
-	queue->sendMessage(newMessage.c_str(), smResp);
-}
-
-bool CAliyunMNS::getIsInit()
-{
-	return is_init;
-}

+ 0 - 24
lewaimai_dispatch/helper/CAliyunMNS.h

@@ -1,24 +0,0 @@
-#pragma once
-
-#include "mns/mns_client.h"
-
-using namespace std;
-using namespace mns::sdk;
-
-class CAliyunMNS
-{
-private:
-	MNSClient* m_mnsClient = NULL;
-	QueuePtr queue;
-
-	bool is_init = false;
-public:
-	CAliyunMNS(std::string queueName);
-	~CAliyunMNS();
-
-	std::string getMessage();
-	void sendMessage(std::string message);
-
-	bool getIsInit();
-};
-

+ 3 - 6
lewaimai_dispatch/lewaimai_dispatch_windows.vcxproj

@@ -122,17 +122,17 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <SDLCheck>true</SDLCheck>
-      <PreprocessorDefinitions>_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x600;LOG4CPLUS_DISABLE_DLL_RUNTIME_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
       <AdditionalIncludeDirectories>$(SolutionDir)include;$(ProjectDir)pch</AdditionalIncludeDirectories>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <AdditionalLibraryDirectories>$(SolutionDir)lib\debug</AdditionalLibraryDirectories>
-      <AdditionalDependencies>DuiLib_ud.lib;libcurl_debug.lib;libeay32MTd.lib;mnscpp.lib;ssleay32MTd.lib;dbghelp.lib;log4cplusUD.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>DuiLib_ud.lib;log4cplusUD.lib;dbghelp.lib;libcurl.dll.a;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
     </Link>
     <PostBuildEvent>
@@ -195,11 +195,9 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
   <ItemGroup>
     <ClInclude Include="CGameFrameWnd.h" />
     <ClInclude Include="CLoginWnd.h" />
-    <ClInclude Include="ControlEx.h" />
     <ClInclude Include="helper\MD5.h" />
     <ClInclude Include="network\CZhipuziHttpClient.h" />
     <ClInclude Include="helper\CConfigReader.h" />
-    <ClInclude Include="helper\CAliyunMNS.h" />
     <ClInclude Include="helper\CLewaimaiString.h" />
     <ClInclude Include="helper\CRandomHelper.h" />
     <ClInclude Include="helper\define.h" />
@@ -218,7 +216,6 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClCompile Include="helper\MD5.cpp" />
     <ClCompile Include="network\CZhipuziHttpClient.cpp" />
     <ClCompile Include="helper\CConfigReader.cpp" />
-    <ClCompile Include="helper\CAliyunMNS.cpp" />
     <ClCompile Include="helper\CLewaimaiString.cpp" />
     <ClCompile Include="helper\CRandomHelper.cpp" />
     <ClCompile Include="helper\CSystem.cpp" />

+ 0 - 9
lewaimai_dispatch/lewaimai_dispatch_windows.vcxproj.filters

@@ -15,9 +15,6 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="helper\CAliyunMNS.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="pch\pch.h">
       <Filter>头文件</Filter>
     </ClInclude>
@@ -51,9 +48,6 @@
     <ClInclude Include="CLoginWnd.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="ControlEx.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="MiniDumper.h">
       <Filter>头文件</Filter>
     </ClInclude>
@@ -77,9 +71,6 @@
     <ClCompile Include="lewaimai_dispatch_windows.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="helper\CAliyunMNS.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
     <ClCompile Include="pch\pch.cpp">
       <Filter>源文件</Filter>
     </ClCompile>

+ 1 - 1
lewaimai_dispatch/network/CZhipuziHttpClient.cpp

@@ -55,7 +55,7 @@ bool CZhipuziHttpClient::Login(std::string& errmsg)
 
 	rapidjson::Value& v_errcode = document["errcode"];
 	int errcode = v_errcode.GetInt();
-	if (errcode > 0)
+	if (errcode == -1)
 	{
 		LOG_INFO("login failed! message:" << document["errmsg"].GetString());
 		errmsg = std::string(document["errmsg"].GetString());

+ 3 - 4
lewaimai_dispatch/pch/pch.h

@@ -19,6 +19,9 @@
 #include <sys/sysinfo.h>
 #endif
 
+//资源文件
+#include "../resource.h"
+
  /*
  标准库头文件
  */
@@ -71,9 +74,5 @@ using namespace DuiLib;
 #include <exdisp.h>
 #include <comdef.h>
 
-#include "../ControlEx.h"
-
-#include "../resource.h"
-
 #endif //PCH_H
 

binární
lib/debug/DuiLib_ud.lib


binární
lib/debug/libcurl.dll.a


binární
lib/debug/libcurl_debug.lib


binární
lib/debug/libeay32MTd.lib


binární
lib/debug/log4cplusUD.lib


binární
lib/debug/mnscpp.lib


binární
lib/debug/ssleay32MTd.lib


binární
lib/release/aliyun-mns.lib


binární
lib/release/grpc/address_sorting.lib


binární
lib/release/grpc/benchmark.lib


binární
lib/release/grpc/boringssl_gtest.lib


binární
lib/release/grpc/cares.lib


binární
lib/release/grpc/crypto.lib


binární
lib/release/grpc/gflags_nothreads_static.lib


binární
lib/release/grpc/gflags_static.lib


binární
lib/release/grpc/gpr.lib


binární
lib/release/grpc/grpc++.lib


binární
lib/release/grpc/grpc.lib


binární
lib/release/grpc/libprotobuf-lite.lib


binární
lib/release/grpc/libprotobuf.lib


binární
lib/release/grpc/libprotoc.lib


binární
lib/release/grpc/ssl.lib


binární
lib/release/grpc/zlib.lib


binární
lib/release/grpc/zlibstatic.lib


binární
lib/release/libcurl.lib


binární
lib/release/libeay32.lib


binární
lib/release/log4cplusU.exp


binární
lib/release/mysqlcppconn.lib


binární
lib/release/ssleay32.lib