瀏覽代碼

准备开始调试duilib

zhangyang 4 年之前
父節點
當前提交
bbe0c789e8

+ 2 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml

@@ -58,6 +58,8 @@
 						<Label name="diandan_page_qudan_num" text="10" mouse="false" width="19" height="19" align="center" textcolor="#FFFFFFFF" bkimage="num_bkg.png" float="true" pos="85,450,104,469" bordercolor="#FFFF0000" bordersize="0"></Label>
 						
 						<Button name="btn_diandan_zhengdanbeizhu" width="90" height="38" padding="15,15,15,0" 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="btn_diandan_qianxiang" width="90" height="38" padding="15,50,15,0" 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'" />
 					</VerticalLayout>
 				</HorizontalLayout>
 				

+ 8 - 8
bin/Win32/Debug/zhipuzi_pos_windows/skin/member_login_dlg.xml

@@ -1,22 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Window size="700,369" caption="0,0,0,36" roundcorner="4,4" >
+<Window size="700,450" caption="0,0,0,44" roundcorner="4,4" >
 	<Font id="0" name="微软雅黑" size="26" />
 	<Font id="1" name="微软雅黑" size="32" />
 	
-	<VerticalLayout bkcolor="#FFFFFFFF">
-		<HorizontalLayout height="50" inset="10,2,10,0">
-			<Label name="memo_dlg_title" text="" align="center" valign="center" padding="0,20,0,0" font="0"/>
+	<VerticalLayout bkimage="shoukuan_bkg.png" >
+		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
+			<Label name="memo_dlg_title" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
+			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		
 		<Label name="name" text="请输入会员手机号"  height="30" width="150" padding="30,50,0,0" align="left"/>
 	
-		<Edit name="content" width="250" height="50" tipvalue="1111" padding="30,20,0,0" textcolor="0xFF3CB371" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" font="1"/>
+		<Edit name="content" width="300" height="50" tipvalue="1111" padding="30,30,0,0" textcolor="0xFF3CB371" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" font="1"/>
 		
-		<Label name="errinfo" text="哈哈哈哈"  height="60" width="250" float="true" pos="30,230,280,290" align="left" textcolor="#FFFF0000" visible="false"/>
+		<Label name="errinfo" text=""  height="60" width="250" float="true" pos="30,200,280,290" align="left" textcolor="#FFFF0000" visible="false"/>
 		
 		<HorizontalLayout height="56" valign="center" padding="30,80,0,20">
-			<Button name="quit" align="center" width="100" height="45" padding="0,20,0,0" 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="save" align="center" width="100" height="45" padding="20,20,90,0" 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="save" align="center" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="300" padding="0,0,0,0" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
 		</HorizontalLayout>
 	</VerticalLayout>
 </Window>

+ 10 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -1796,6 +1796,11 @@ void CDiandanPageUI::ClickDel()
 	{
 		this->UpdateDiandanOrderItemShow(nIndex);
 	}
+
+	if (m_cur_diandan_order.getItemNum() == 0)
+	{
+		ShowXuangouPage();
+	}
 }
 
 void CDiandanPageUI::ClickRemove()
@@ -1811,6 +1816,11 @@ void CDiandanPageUI::ClickRemove()
 	m_cur_diandan_order.Remove(nIndex);
 
 	this->DelDiandanOrderItemShow(nIndex);
+
+	if (m_cur_diandan_order.getItemNum() == 0)
+	{
+		ShowXuangouPage();
+	}
 }
 
 void CDiandanPageUI::ClickGuige()

+ 27 - 8
zhipuzi_pos_windows/wnd/CMemberLoginWnd.cpp

@@ -108,8 +108,6 @@ LRESULT CMemberLoginWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam,
 		CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
 		pContent->SetEnabled(true);
 
-		CButtonUI* pQuit = static_cast<CButtonUI*>(m_pm.FindControl(_T("quit")));
-		pQuit->SetEnabled(true);
 		CButtonUI* pSave = static_cast<CButtonUI*>(m_pm.FindControl(_T("save")));
 		pSave->SetEnabled(true);
 
@@ -157,7 +155,7 @@ void CMemberLoginWnd::Notify(TNotifyUI& msg)
 	{
 		DuiLib::CDuiString senderName = msg.pSender->GetName();
 
-		if (senderName == _T("quit"))
+		if (senderName == _T("closebtn"))
 		{
 			Close(IDCANCEL);
 			return;
@@ -171,8 +169,6 @@ void CMemberLoginWnd::Notify(TNotifyUI& msg)
 
 			pContent->SetEnabled(false);
 
-			CButtonUI* pQuit = static_cast<CButtonUI*>(m_pm.FindControl(_T("quit")));
-			pQuit->SetEnabled(false);
 			CButtonUI* pSave = static_cast<CButtonUI*>(m_pm.FindControl(_T("save")));
 			pSave->SetEnabled(false);
 
@@ -199,20 +195,43 @@ void CMemberLoginWnd::Notify(TNotifyUI& msg)
 
 					m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
 					m_pEdit->SetSel(strValue.length(), strValue.length());//ÖØÉè¸ø¹â±êÉèÖÃλÖÃ
-
+					
 					break;
 				}
 			}
 		}
 	}
+	else if (msg.sType == L"windowinit")
+	{
+		SetFocus(m_hWnd);
+
+		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
+
+		pFukuanEdit->SetFocus();
+
+		//RECT rect = pFukuanEdit->GetPos();
+
+		//::SendMessage(m_hWnd, WM_LBUTTONDOWN, NULL, MAKELONG(rect.left, rect.top));
+	}
+	else if (msg.sType == L"killfocus")
+	{
+		std::wstring name = msg.pSender->GetName();
+
+		LOG_INFO("killfocus:" << name.c_str());
+	}
+	else if (msg.sType == L"setfocus")
+	{
+		std::wstring name = msg.pSender->GetName();
+
+		LOG_INFO("setfocus:" << name.c_str());
+	}
 }
 
 void CMemberLoginWnd::Init()
 {
-
+	
 }
 
-
 std::string CMemberLoginWnd::getContent()
 {
 	return m_content;

+ 0 - 1
zhipuzi_pos_windows/wnd/CMemberLoginWnd.h

@@ -81,4 +81,3 @@ public:
 	std::string m_member_level;
 	std::string m_member_level_name;
 };
-