|
|
@@ -17,6 +17,9 @@ void CMainWnd::Init()
|
|
|
m_pRestoreBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("restorebtn")));
|
|
|
m_pMinBtn = static_cast<CButtonUI*>(m_pm.FindControl(_T("minbtn")));
|
|
|
|
|
|
+ CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
|
|
|
+ pControl->SelectItem(3);
|
|
|
+
|
|
|
OrderListUI* orderlist = static_cast<OrderListUI*>(m_pm.FindControl(_T("orderlist")));
|
|
|
orderlist->Refresh();
|
|
|
|
|
|
@@ -46,9 +49,6 @@ LRESULT CMainWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandl
|
|
|
|
|
|
void CMainWnd::Notify(TNotifyUI& msg)
|
|
|
{
|
|
|
- CDuiString name = msg.pSender->GetName();
|
|
|
- //::MessageBoxW(NULL, name, NULL, MB_OK);
|
|
|
-
|
|
|
if(msg.sType == _T("windowinit"))
|
|
|
{
|
|
|
OnPrepare();
|
|
|
@@ -851,8 +851,36 @@ void CMainWnd::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
{
|
|
|
CDuiString name = msg.pSender->GetName();
|
|
|
|
|
|
+ //先判断主页面的tab
|
|
|
+ if(name == _T("main_waimai"))
|
|
|
+ {
|
|
|
+ CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
|
|
|
+
|
|
|
+ if(pControl && pControl->GetCurSel() != 0)
|
|
|
+ {
|
|
|
+ pControl->SelectItem(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(name == _T("main_setting"))
|
|
|
+ {
|
|
|
+ CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
|
|
|
+
|
|
|
+ if(pControl && pControl->GetCurSel() != 2)
|
|
|
+ {
|
|
|
+ pControl->SelectItem(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(name == _T("main_diandan"))
|
|
|
+ {
|
|
|
+ CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
|
|
|
+
|
|
|
+ if(pControl && pControl->GetCurSel() != 3)
|
|
|
+ {
|
|
|
+ pControl->SelectItem(3);
|
|
|
+ }
|
|
|
+ }
|
|
|
//判断外卖的tab
|
|
|
- if(name == _T("waimai_open_switch") || name == _T("waimai_confirmed_switch") || name == _T("waimai_delivery_switch") || name == _T("waimai_success_switch") || name == _T("waimai_fail_switch") || name == _T("waimai_cancel_switch") || name == _T("waimai_refund_switch"))
|
|
|
+ else if(name == _T("waimai_open_switch") || name == _T("waimai_confirmed_switch") || name == _T("waimai_delivery_switch") || name == _T("waimai_success_switch") || name == _T("waimai_fail_switch") || name == _T("waimai_cancel_switch") || name == _T("waimai_refund_switch"))
|
|
|
{
|
|
|
OrderListUI* orderlist = static_cast<OrderListUI*>(m_pm.FindControl(_T("orderlist")));
|
|
|
//切换状态全部重新开始从第1页
|
|
|
@@ -920,29 +948,8 @@ void CMainWnd::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("setting_switch")));
|
|
|
pControl->SelectItem(5);
|
|
|
}
|
|
|
- if (name == _T("main_waimai"))
|
|
|
- {
|
|
|
- CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
|
|
|
-
|
|
|
- if (pControl && pControl->GetCurSel() != 0)
|
|
|
- {
|
|
|
- pControl->SelectItem(0);
|
|
|
- }
|
|
|
- }
|
|
|
- else if (name == _T("main_setting"))
|
|
|
- {
|
|
|
- CTabLayoutUI* pControl = static_cast<CTabLayoutUI*>(m_pm.FindControl(_T("switch")));
|
|
|
-
|
|
|
- if (pControl && pControl->GetCurSel() != 2)
|
|
|
- {
|
|
|
- pControl->SelectItem(2);
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- *用于下拉框和radio
|
|
|
- **/
|
|
|
void CMainWnd::HandleItemSelectMsg(TNotifyUI& msg)
|
|
|
{
|
|
|
CDuiString name = msg.pSender->GetName();
|