Skip to content

Commit

Permalink
update:support query range list for management app
Browse files Browse the repository at this point in the history
  • Loading branch information
xengine-qyt committed Nov 1, 2022
1 parent 94eb67f commit bd790f3
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void CDialog_Serial::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_COMBO2, m_ComboNumber);
DDX_Control(pDX, IDC_EDIT1, m_EditSerialCount);
DDX_Control(pDX, IDC_EDIT2, m_EditHasTime);
DDX_Control(pDX, IDC_EDIT3, m_EditPosStart);
DDX_Control(pDX, IDC_EDIT7, m_EditPosEnd);
}


Expand Down Expand Up @@ -71,6 +73,9 @@ BOOL CDialog_Serial::OnInitDialog()
m_ComboNumber.InsertString(5, _T("9"));
m_ComboNumber.InsertString(6, _T("10"));

m_EditPosStart.SetWindowText("0");
m_EditPosEnd.SetWindowText("50");

m_ComboNumber.SetCurSel(0);
m_ComboSerialType.SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
Expand All @@ -85,10 +90,15 @@ void CDialog_Serial::OnBnClickedButton1()
CString m_StrIPAddr;
CString m_StrIPPort;
CString m_StrToken;
CString m_StrPosStart;
CString m_StrPosEnd;

CDialog_Config* pWnd = (CDialog_Config*)CDialog_Config::FromHandle(hConfigWnd);
pWnd->m_EditIPAddr.GetWindowText(m_StrIPAddr);
pWnd->m_EditIPPort.GetWindowText(m_StrIPPort);
pWnd->m_EditToken.GetWindowText(m_StrToken);
m_EditPosStart.GetWindowText(m_StrPosStart);
m_EditPosEnd.GetWindowText(m_StrPosEnd);

TCHAR tszUrlAddr[MAX_PATH];
memset(tszUrlAddr, '\0', MAX_PATH);
Expand All @@ -98,6 +108,8 @@ void CDialog_Serial::OnBnClickedButton1()
CHAR* ptszMsgBuffer = NULL;
Json::Value st_JsonRoot;
st_JsonRoot["xhToken"] = _ttoi64(m_StrToken.GetBuffer());
st_JsonRoot["PosStart"] = _ttoi(m_StrPosStart.GetBuffer());
st_JsonRoot["PosEnd"] = _ttoi(m_StrPosEnd.GetBuffer());
//是否加密
TCHAR tszPassBuffer[64];
memset(tszPassBuffer, '\0', sizeof(tszPassBuffer));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ class CDialog_Serial : public CDialogEx
afx_msg void OnBnClickedButton3();
afx_msg void OnBnClickedButton6();
afx_msg void OnBnClickedButton7();
CEdit m_EditPosStart;
CEdit m_EditPosEnd;
};
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void CDialog_User::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_EDIT1, m_EditFlushTime);
DDX_Control(pDX, IDC_CHECK2, m_CheckAuto);
DDX_Control(pDX, IDC_BUTTON4, m_BtnModifyClient);
DDX_Control(pDX, IDC_EDIT2, m_EditPosStart);
DDX_Control(pDX, IDC_EDIT3, m_EditPosEnd);
}


Expand Down Expand Up @@ -61,6 +63,8 @@ BOOL CDialog_User::OnInitDialog()
m_ListCtrlClient.SetExtendedStyle(LVS_EX_FULLROWSELECT);

m_EditFlushTime.SetWindowText("1");
m_EditPosStart.SetWindowText("0");
m_EditPosEnd.SetWindowText("50");
hUserWnd = m_hWnd;
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
Expand All @@ -75,12 +79,16 @@ void CDialog_User::OnBnClickedButton1()
TCHAR tszIPPort[MAX_PATH];
TCHAR tszToken[MAX_PATH];
TCHAR tszUrlAddr[MAX_PATH];
CString m_StrPosStart;
CString m_StrPosEnd;

memset(tszIPAddr, '\0', MAX_PATH);
memset(tszIPPort, '\0', MAX_PATH);
memset(tszToken, '\0', MAX_PATH);
memset(tszUrlAddr, '\0', MAX_PATH);

m_EditPosStart.GetWindowText(m_StrPosStart);
m_EditPosEnd.GetWindowText(m_StrPosEnd);
::GetWindowText(::GetDlgItem(hConfigWnd, IDC_EDIT1), tszIPAddr, MAX_PATH);
::GetWindowText(::GetDlgItem(hConfigWnd, IDC_EDIT2), tszIPPort, MAX_PATH);
::GetWindowText(::GetDlgItem(hConfigWnd, IDC_EDIT9), tszToken, MAX_PATH);
Expand All @@ -90,6 +98,8 @@ void CDialog_User::OnBnClickedButton1()
CHAR* ptszMsgBuffer = NULL;
Json::Value st_JsonRoot;
st_JsonRoot["xhToken"] = _ttoi64(tszToken);
st_JsonRoot["PosStart"] = _ttoi(m_StrPosStart.GetBuffer());
st_JsonRoot["PosEnd"] = _ttoi(m_StrPosEnd.GetBuffer());
if (BST_CHECKED == m_CheckOnlineList.GetCheck())
{
st_JsonRoot["Online"] = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ class CDialog_User : public CDialogEx
CButton m_CheckAuto;
CButton m_BtnModifyClient;
afx_msg void OnBnClickedButton5();
CEdit m_EditPosStart;
CEdit m_EditPosEnd;
};
Binary file not shown.
Binary file not shown.

0 comments on commit bd790f3

Please sign in to comment.