TrainParamsPage.cpp
上传用户:sanxfzhen
上传日期:2014-12-28
资源大小:2324k
文件大小:2k
- // TrainParamsPage.cpp : implementation file
- //
- #include "stdafx.h"
- #include "TextClassify.h"
- #include "TrainParamsPage.h"
- #include "WzdDrDlg.h"
- #include <direct.h>
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CTrainParamsPage property page
- IMPLEMENT_DYNCREATE(CTrainParamsPage, CPropertyPage)
- CTrainParamsPage::CTrainParamsPage() : CPropertyPage(CTrainParamsPage::IDD)
- {
- //{{AFX_DATA_INIT(CTrainParamsPage)
- m_txtResultDir = _T("");
- m_txtTrainDir = _T("");
- m_nFSMode = 0;
- m_nWordSize = 2000;
- m_nOpMode = -1;
- m_nSelMode = -1;
- m_bStem = FALSE;
- m_nLanguageType = 0;
- m_nWeightMode = -1;
- //}}AFX_DATA_INIT
- }
- CTrainParamsPage::~CTrainParamsPage()
- {
- }
- void CTrainParamsPage::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CTrainParamsPage)
- DDX_Radio(pDX, IDC_RADIO_FS_IG, m_nFSMode);
- DDX_Radio(pDX,IDC_RADIO_WEIGHT,m_nWeightMode);
- DDX_Text(pDX, IDC_TXT_RESULT, m_txtResultDir);
- DDX_Text(pDX, IDC_TXT_TRAIN_DIR, m_txtTrainDir);
- DDX_Text(pDX, IDC_TXT_WORD_SIZE, m_nWordSize);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CTrainParamsPage, CPropertyPage)
- //{{AFX_MSG_MAP(CTrainParamsPage)
- ON_BN_CLICKED(IDC_BTN_TRAIN, OnBtnTrain)
- ON_BN_CLICKED(IDC_BTN_RESULTS, OnBtnResults)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CTrainParamsPage message handlers
- void CTrainParamsPage::OnBtnTrain()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- CWzdDirDlg dlg;
- CString dir=dlg.GetDirectory(this);
- if(!dir.IsEmpty())
- {
- m_txtTrainDir=dir;
- UpdateData(FALSE);
- }
- }
- void CTrainParamsPage::OnBtnResults()
- {
- // TODO: Add your control notification handler code here
- UpdateData(true);
- CWzdDirDlg dlg;
- CString dir=dlg.GetDirectory(this);
- if(!dir.IsEmpty())
- {
- m_txtResultDir=dir;
- UpdateData(FALSE);
- }
- }
- BOOL CTrainParamsPage::OnInitDialog()
- {
- CPropertyPage::OnInitDialog();
- // ::EnableWindow((GetDlgItem(IDC_CHK_STEM))->m_hWnd,m_nLanguageType);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }