// demoPNRPrivacyDlg.cpp : 实现文件
//

#include "stdafx.h"
#include "demoPNRPrivacyDlg.h"
#include "afxdialogex.h"
#include "HwmSdkAgent.h"
#include "demoTools.h"

// demoPNRPrivacyDlg 对话框

IMPLEMENT_DYNAMIC(demoPNRPrivacyDlg, CDialogEx)

demoPNRPrivacyDlg::demoPNRPrivacyDlg(CWnd* pParent /*=NULL*/)
    : CDialogEx(demoPNRPrivacyDlg::IDD, pParent)
{
}

demoPNRPrivacyDlg::~demoPNRPrivacyDlg()
{
}

void demoPNRPrivacyDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(demoPNRPrivacyDlg, CDialogEx)
    ON_BN_CLICKED(IDOK, &demoPNRPrivacyDlg::OnBnClickedButtonAgree)
    ON_BN_CLICKED(IDCANCEL, &demoPNRPrivacyDlg::OnBnClickedButtonDisAgree)
END_MESSAGE_MAP()


// demoPNRPrivacyDlg 消息处理程序
void demoPNRPrivacyDlg::OnBnClickedButtonAgree()
{
    hwmsdkagent::AgreeVoiceprintStatement(true);
    if (m_entry == hwmsdkagent::VOICEPRINT_STATEMENT_ENTRY_OPEN_NOISE_REDUCE)
    {
        hwmsdkagent::ShowVoiceprintRecordWindow(true);
    }
    CDialogEx::OnOK();
}

void demoPNRPrivacyDlg::OnBnClickedButtonDisAgree()
{
    hwmsdkagent::AgreeVoiceprintStatement(false);
    CDialogEx::OnCancel();
}
