www.pudn.com > jia.zip > 10KV.cpp
// 10KV.cpp : implementation file
//
#include "stdafx.h"
#include "jia.h"
#include "10KV.h"
#include "jiaDoc.h"
#include "jiaView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// C10KV dialog
C10KV::C10KV(CWnd* pParent /*=NULL*/)
: CDialog(C10KV::IDD, pParent)
{
//{{AFX_DATA_INIT(C10KV)
m_nuncontinue= 0.0f ;
m_nsure= 0.0f ;
m_nlength =18955740.0f;
m_nfinal= 0.0f ;
m_nfinallength = 0.0f;
m_ntime = 0.8f;
m_nminstyle = 0.0f;
m_nmaxstyle = 0.0f;
m_nload = 0.0f;
m_ncurrent = 0.0f;
m_nline = 0.0f;
//}}AFX_DATA_INIT
}
void C10KV::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(C10KV)
DDX_Text(pDX, IDC_EDIT6, m_nuncontinue);
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);
DDX_Text(pDX, IDC_EDIT4, m_ntime);
DDX_Text(pDX, IDC_EDIT3, m_nminstyle);
DDX_Text(pDX, IDC_EDIT2, m_nmaxstyle);
DDX_Text(pDX, IDC_EDIT1, m_nload);
DDX_Text(pDX, IDC_EDIT8, m_ncurrent);
DDX_Text(pDX, IDC_EDIT5, m_nline);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(C10KV, CDialog)
//{{AFX_MSG_MAP(C10KV)
ON_BN_CLICKED(IDjisuan, Onjisuan)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// C10KV message handlers
void C10KV::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*10);
m_nsure = (0.866*1000000/(1.732*11*(m_nline+m_nminstyle)))/m_ncurrent;
m_nuncontinue = 1.25*1000000/((m_nline+m_nmaxstyle)*11*1.732);
m_nlength = 100*(0.866*54986/m_nuncontinue-m_nminstyle)/m_nline;
m_nfinal = 0.866*54986/(m_nfinallength*m_nline/100+m_nminstyle);
UpdateData(FALSE);
/*
CJiaDoc* pDoc = CJiaView::GetDocument();
ASSERT_VALID(pDoc);
pDoc->m_nlength10=m_nlength;
pDoc->m_ncurrent10=m_ncurrent;
pDoc->m_nload10=m_nload;
pDoc->m_nline10=m_nline;
pDoc->m_nminstyle10=m_nminstyle;
pDoc->m_nmaxstyle10=m_nmaxstyle;
pDoc->m_nuncontinue10=m_nuncontinue;
pDoc->m_nsure10=m_nsure;
pDoc->m_ntime10=m_ntime;
*/
}