|
|
@@ -37,6 +37,10 @@ void CZhengcanPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
|
|
|
this->ClickTableAction();
|
|
|
}
|
|
|
+ else if (name == L"zhengcan_zhuantai_cancel")
|
|
|
+ {
|
|
|
+ this->CancelZhuanTai();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//处理option切换事件
|
|
|
@@ -92,6 +96,7 @@ void CZhengcanPageUI::HandleTextCapture(std::string content)
|
|
|
void CZhengcanPageUI::SetPos(RECT rc, bool bNeedInvalidate)
|
|
|
{
|
|
|
m_nPageWidth = rc.right - rc.left;
|
|
|
+ m_nPageHeight = rc.bottom - rc.top;
|
|
|
|
|
|
//更新分类位置
|
|
|
UpdateTabletypePos();
|
|
|
@@ -246,6 +251,8 @@ void CZhengcanPageUI::DoRefreshTable()
|
|
|
m_tableLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("zhengcan_tablelist")));
|
|
|
m_tableLayout->RemoveAll();
|
|
|
|
|
|
+ m_table_items.clear();
|
|
|
+
|
|
|
std::map<string, string> params;
|
|
|
|
|
|
if (m_cur_type_id == "all")
|
|
|
@@ -317,6 +324,8 @@ void CZhengcanPageUI::DoRefreshTable()
|
|
|
pItem->UpdateShow();
|
|
|
|
|
|
m_tableLayout->Add(pItem);
|
|
|
+
|
|
|
+ m_table_items.push_back(pItem);
|
|
|
|
|
|
m_table_num++;
|
|
|
}
|
|
|
@@ -329,6 +338,11 @@ void CZhengcanPageUI::DoRefreshTable()
|
|
|
m_table_mutex.unlock();
|
|
|
|
|
|
UpdateTablePos();
|
|
|
+
|
|
|
+ if (m_nModel == 2)
|
|
|
+ {
|
|
|
+ ShowZhuanTai();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void CZhengcanPageUI::UpdateTablePos()
|
|
|
@@ -386,6 +400,20 @@ void CZhengcanPageUI::UpdateTablePos()
|
|
|
pFenleiLayoutScroll->SetScrollPos(size);
|
|
|
|
|
|
m_table_mutex.unlock();
|
|
|
+
|
|
|
+ //更新转台操作栏的位置
|
|
|
+ CHorizontalLayoutUI* pZhuantaiLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuantai_layout")));
|
|
|
+
|
|
|
+ CHorizontalLayoutUI* pTypeLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuozi_type_layout")));
|
|
|
+ int nFenleiHeight = pTypeLayout->GetFixedHeight();
|
|
|
+
|
|
|
+ RECT rect;
|
|
|
+ rect.left = (nWidth - 700) / 2;
|
|
|
+ rect.right = rect.left + 700;
|
|
|
+ rect.top = m_nPageHeight - 80 - 30 - nFenleiHeight;
|
|
|
+ rect.bottom = rect.top + 80;
|
|
|
+
|
|
|
+ pZhuantaiLayout->SetPos(rect);
|
|
|
}
|
|
|
|
|
|
void CZhengcanPageUI::ClickTableAction()
|
|
|
@@ -513,4 +541,43 @@ void CZhengcanPageUI::SetModel(int nModel)
|
|
|
void CZhengcanPageUI::SetHuantaiTableId(std::string tableId)
|
|
|
{
|
|
|
m_HuantaiTableId = tableId;
|
|
|
+}
|
|
|
+
|
|
|
+void CZhengcanPageUI::ShowZhuanTai()
|
|
|
+{
|
|
|
+ if (m_nModel != 2)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (std::vector<CZhengcanTableItemUI*>::iterator it = m_table_items.begin(); it != m_table_items.end(); it++)
|
|
|
+ {
|
|
|
+ if ((*it)->GetTableId() == m_HuantaiTableId)
|
|
|
+ {
|
|
|
+ (*it)->ShowZhuanchu(true);
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ CHorizontalLayoutUI* pZhuantaiLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuantai_layout")));
|
|
|
+ pZhuantaiLayout->SetVisible(true);
|
|
|
+}
|
|
|
+
|
|
|
+void CZhengcanPageUI::CancelZhuanTai()
|
|
|
+{
|
|
|
+ m_nModel = 1;
|
|
|
+
|
|
|
+ for (std::vector<CZhengcanTableItemUI*>::iterator it = m_table_items.begin(); it != m_table_items.end(); it++)
|
|
|
+ {
|
|
|
+ if ((*it)->GetTableId() == m_HuantaiTableId)
|
|
|
+ {
|
|
|
+ (*it)->ShowZhuanchu(false);
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ CHorizontalLayoutUI* pZhuantaiLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("zhengcan_zhuantai_layout")));
|
|
|
+ pZhuantaiLayout->SetVisible(false);
|
|
|
}
|