100 lines
2.4 KiB
C++
100 lines
2.4 KiB
C++
#include "stdafx.h"
|
|
#include "globalFunc.h"
|
|
#include "WellRepiarDlg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CWellRepiarDlg dialog
|
|
|
|
|
|
CWellRepiarDlg::CWellRepiarDlg(CWnd* pParent /*=NULL*/)
|
|
: CModelessDialog(CWellRepiarDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CWellRepiarDlg)
|
|
m_bRepiarLink = TRUE;
|
|
m_bRepiarWellDim2 = FALSE;
|
|
m_bRepiarWellDim1 = FALSE;
|
|
m_bRepiar = false;
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void CWellRepiarDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CModelessDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CWellRepiarDlg)
|
|
DDX_Control(pDX, IDC_CHECK3, m_wndRepiarWellDim2);
|
|
DDX_Control(pDX, IDC_CHECK2, m_wndRepiarWellDim1);
|
|
DDX_Control(pDX, IDC_CHECK1, m_wndRepiarLink);
|
|
DDX_Check(pDX, IDC_CHECK1, m_bRepiarLink);
|
|
DDX_Check(pDX, IDC_CHECK3, m_bRepiarWellDim2);
|
|
DDX_Check(pDX, IDC_CHECK2, m_bRepiarWellDim1);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CWellRepiarDlg, CModelessDialog)
|
|
//{{AFX_MSG_MAP(CWellRepiarDlg)
|
|
ON_BN_CLICKED(IDC_CHECK2, OnCheck2)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CWellRepiarDlg message handlers
|
|
|
|
BOOL CWellRepiarDlg::OnInitDialog()
|
|
{
|
|
CModelessDialog::OnInitDialog();
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void CWellRepiarDlg::OnCheck2()
|
|
{
|
|
UpdateData(TRUE);
|
|
if (m_bRepiarWellDim1)
|
|
{
|
|
m_bRepiarWellDim2 = FALSE;
|
|
m_wndRepiarWellDim2.EnableWindow(FALSE);
|
|
}
|
|
else
|
|
{
|
|
m_wndRepiarWellDim2.EnableWindow(TRUE);
|
|
}
|
|
UpdateData(FALSE);
|
|
}
|
|
|
|
void CWellRepiarDlg::OnCancel()
|
|
{
|
|
GlobalFunc::PostCommand(_T("\33"));
|
|
CModelessDialog::OnCancel();
|
|
}
|
|
|
|
void CWellRepiarDlg::OnOK()
|
|
{
|
|
UpdateData(TRUE);
|
|
m_bRepiar = true;
|
|
CModelessDialog::OnOK();
|
|
GlobalFunc::PostCommand(_T(" "));
|
|
}
|
|
|
|
BOOL CWellRepiarDlg::OnAmbientProperty(COleControlSite* pSite, DISPID dispid, VARIANT* pvar)
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
|
|
return CModelessDialog::OnAmbientProperty(pSite, dispid, pvar);
|
|
}
|
|
|
|
BOOL CWellRepiarDlg::OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult)
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
|
|
return CModelessDialog::OnChildNotify(message, wParam, lParam, pLResult);
|
|
}
|