www.pudn.com > jia.zip > 35KV.cpp
// 35KV.cpp : implementation file
//
#include "stdafx.h"
#include "jia.h"
#include "35KV.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// C35KV dialog
C35KV::C35KV(CWnd* pParent /*=NULL*/)
: CDialog(C35KV::IDD, pParent)
{
//{{AFX_DATA_INIT(C35KV)
m_ntime = 0.7f;
m_nload = 0.0f;
m_nmaxstyle = 0.0f;
m_nminstyle = 0.0f;
m_ncurrent = 0.0f;
m_nuncontinue = 0.0f;
m_nline = 0.0f;
m_nsure = 0.0f;
m_nlength = 0.0f;
m_nfinal = 0.0f;
m_nfinallength = 0.0f;
//}}AFX_DATA_INIT
}
void C35KV::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(C35KV)
DDX_Text(pDX, IDC_EDIT1, m_ntime);
DDX_Text(pDX, IDC_EDIT2, m_nload);
DDX_Text(pDX, IDC_EDIT3, m_nmaxstyle);
DDX_Text(pDX, IDC_EDIT4, m_nminstyle);
DDX_Text(pDX, IDC_EDIT5, m_ncurrent);
DDX_Text(pDX, IDC_EDIT6, m_nuncontinue);
DDX_Text(pDX, IDC_EDIT8, m_nline);
DDX_Text(pDX, IDC_EDIT7, m_nsure);
DDX_Text(pDX, IDC_EDIT9, m_nlength);
DDX_Text(pDX, IDC_EDIT10, m_nfinal);
DDX_Text(pDX, IDC_EDIT11, m_nfinallength);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(C35KV, CDialog)
//{{AFX_MSG_MAP(C35KV)
ON_BN_CLICKED(IDjisuan, Onjisuan)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// C35KV message handlers
void C35KV::Onjisuan()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_ncurrent = (1.25*1.3*m_ntime*m_nload)/(0.85*1.732*35);
m_nsure = (0.866*1000000/(1.732*37*(m_nline+m_nminstyle)))/m_ncurrent;
m_nuncontinue = 1.25*1000000/((m_nline+m_nmaxstyle)*37*1.732);
m_nlength = 100*(((0.866*15600)/m_nuncontinue)-m_nminstyle)/m_nline;
m_nfinal = 0.866*15600/(m_nfinallength*m_nline/100+m_nminstyle);
UpdateData(FALSE);
}