chenluhua1980
2025-11-14 c928b27306747319c3692879ab30d2508ca00ffc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// CEDEventReportDlg.cpp: 实现文件
//
 
#include "pch.h"
#include "EAPSimulator.h"
#include "CEDEventReportDlg.h"
#include "afxdialogex.h"
#include <vector>
 
 
// CEDEventReportDlg 对话框
 
IMPLEMENT_DYNAMIC(CEDEventReportDlg, CDialogEx)
 
CEDEventReportDlg::CEDEventReportDlg(CWnd* pParent /*=nullptr*/)
    : CDialogEx(IDD_DIALOG_ED_EVENT_REPORT, pParent)
{
 
}
 
CEDEventReportDlg::~CEDEventReportDlg()
{
}
 
void CEDEventReportDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}
 
 
BEGIN_MESSAGE_MAP(CEDEventReportDlg, CDialogEx)
    ON_BN_CLICKED(IDC_BUTTON_SEND, &CEDEventReportDlg::OnBnClickedButtonSend)
END_MESSAGE_MAP()
 
 
// CEDEventReportDlg 消息处理程序
 
 
BOOL CEDEventReportDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();
 
    CButton* pButton = (CButton*)GetDlgItem(IDC_RADIO_ENABLE);
    pButton->SetCheck(BST_CHECKED);
 
 
    return TRUE;  // return TRUE unless you set the focus to a control
                  // 异常: OCX 属性页应返回 FALSE
}
 
void CEDEventReportDlg::OnBnClickedButtonSend()
{
    CButton* pButton = (CButton*)GetDlgItem(IDC_RADIO_ENABLE);
    bool bEnable = pButton->GetCheck() == BST_CHECKED;
 
    CString strText, strId;
    GetDlgItemText(IDC_EDIT_CEID, strText);
    std::vector<int> ids;
    if (!strText.IsEmpty()) {
        int i = 0;
        while (1) {
            if (!AfxExtractSubString(strId, (LPCTSTR)strText, i++, ',')) {
                break;
            }
            ids.push_back(atoi(strId));
        }
    }
 
 
    theApp.m_model.m_pHsmsActive->hsmsEDEventReport(bEnable, ids);
}