|
|
@@ -0,0 +1,120 @@
|
|
|
+#include "pch.h"
|
|
|
+#include "CShangpinPiliangluruPageUI.h"
|
|
|
+
|
|
|
+#include "../control/ControlEx.h"
|
|
|
+
|
|
|
+#include "../tool/CSqlite3.h"
|
|
|
+
|
|
|
+#include "../wnd/CMainWnd.h"
|
|
|
+#include "../wnd/CShangpinNewTypeWnd.h"
|
|
|
+
|
|
|
+CShangpinPiliangluruPageUI::CShangpinPiliangluruPageUI()
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+CShangpinPiliangluruPageUI::~CShangpinPiliangluruPageUI()
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
+void CShangpinPiliangluruPageUI::InitControl()
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
|
|
|
+void CShangpinPiliangluruPageUI::InitShow()
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void CShangpinPiliangluruPageUI::RefreshShow()
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//处理按钮点击类事件
|
|
|
+void CShangpinPiliangluruPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
+{
|
|
|
+ CDuiString name = msg.pSender->GetName();
|
|
|
+
|
|
|
+ if (name == L"shangpin_piliangluru_page_return_btn")
|
|
|
+ {
|
|
|
+ m_pMainWnd->SwitchPage(CMainWnd::SHANGPIN, false);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//处理option切换事件
|
|
|
+void CShangpinPiliangluruPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
+{
|
|
|
+ CDuiString name = msg.pSender->GetName();
|
|
|
+
|
|
|
+ COptionUI* curOption = static_cast<COptionUI*>(msg.pSender);
|
|
|
+ std::wstring groupname = curOption->GetGroup();
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//处理下拉框、radio的切换事件
|
|
|
+void CShangpinPiliangluruPageUI::HandleItemSelectMsg(TNotifyUI& msg)
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//处理编辑框输入内容改变事件
|
|
|
+void CShangpinPiliangluruPageUI::HandleTextChangedMsg(TNotifyUI& msg)
|
|
|
+{
|
|
|
+ CDuiString name = msg.pSender->GetName();
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//处理扫码枪捕捉到的扫码信息
|
|
|
+void CShangpinPiliangluruPageUI::HandleTextCapture(std::string content)
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void CShangpinPiliangluruPageUI::SetPos(RECT rc, bool bNeedInvalidate)
|
|
|
+{
|
|
|
+ m_nPageWidth = rc.right - rc.left;
|
|
|
+
|
|
|
+ CContainerUI::SetPos(rc, bNeedInvalidate);
|
|
|
+}
|
|
|
+
|
|
|
+void CShangpinPiliangluruPageUI::ShowNewtype()
|
|
|
+{
|
|
|
+ if (m_is_show_modal_wnd == true)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ CShangpinNewTypeWnd* pMemoDlg = new CShangpinNewTypeWnd();
|
|
|
+
|
|
|
+ if (pMemoDlg != NULL)
|
|
|
+ {
|
|
|
+ m_is_show_modal_wnd = true;
|
|
|
+ m_curModalWnd = pMemoDlg;
|
|
|
+
|
|
|
+ pMemoDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
|
|
|
+ pMemoDlg->SetIcon(IDI_ICON_DUILIB);
|
|
|
+ pMemoDlg->CenterWindow();
|
|
|
+
|
|
|
+ UINT ret = pMemoDlg->ShowModal();
|
|
|
+
|
|
|
+ if (ret == IDOK)
|
|
|
+ {
|
|
|
+ //这里表示添加分类成功了,刷新分类显示
|
|
|
+
|
|
|
+ m_is_show_modal_wnd = false;
|
|
|
+ delete pMemoDlg;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_is_show_modal_wnd = false;
|
|
|
+ delete pMemoDlg;
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|