📄 nxqjjdfx.cpp
字号:
// Nxqjjdfx.cpp: implementation of the CNxqjjdfx class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "cvenus.h"
#include "Nxqjjdfx.h"
#include "IPRCal.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CNxqjjdfx::CNxqjjdfx()
{
}
CNxqjjdfx::~CNxqjjdfx()
{
}
void CNxqjjdfx::Computer()
{
float fSheet1[22], fSheet2[19], fSheet3[12], fSheet4[20], fSheet6[3][7];
BOOL bAnalSelect[4];
int iCombo1, iCombo2;
int iSheet6Count;
CF1Book* m_pGrid;
m_pGrid = &(((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_grid);
int i, j;
CString str;
for(i=1; i<23; i++)
{
str = m_pGrid->GetTextRC(i, 5);
fSheet1[i-1] = atof(str);
}
for(i=23; i<42; i++)
{
str = m_pGrid->GetTextRC(i, 5);
fSheet2[i-23] = atof(str);
}
fSheet2[4] += 273.15;
fSheet2[5] += 273.15;
fSheet2[8] /= 1000;
fSheet2[9] /= 1000;
fSheet2[10] /= 1000;
for(i=42; i<54; i++)
{
str = m_pGrid->GetTextRC(i, 5);
fSheet3[i-42] = atof(str);
}
for(i=54; i<74; i++)
{
str = m_pGrid->GetTextRC(i, 5);
fSheet4[i-54] = atof(str);
}
for(int m=5; m<10; m++)
fSheet4[m] /= 1000;
for( j = 0; j<7; j++)
for(i=0; i<3; i++)
{
str = m_pGrid->GetTextRC(74+j*3+i, 5);
if(str.IsEmpty())
{
goto Out;
}
fSheet6[i][j] = atof(str);
}
Out:
iSheet6Count = j;
bAnalSelect[0] = ((CButton*)((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_Page16.GetDlgItem(IDC_CHECK1))->GetCheck();
bAnalSelect[1] = ((CButton*)((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_Page16.GetDlgItem(IDC_CHECK2))->GetCheck();
bAnalSelect[2] = ((CButton*)((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_Page16.GetDlgItem(IDC_CHECK3))->GetCheck();
bAnalSelect[3] = ((CButton*)((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_Page16.GetDlgItem(IDC_CHECK4))->GetCheck();
iCombo1 = ((CComboBox*)((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_Page16.GetDlgItem(IDC_COMBO1))->GetCurSel();
iCombo2 = ((CComboBox*)((CCVenusApp*)AfxGetApp())->m_pMainDlg->m_Page16.GetDlgItem(IDC_COMBO2))->GetCurSel();
GCWACalculate( fSheet1, fSheet2, bAnalSelect, fSheet3,
iSheet6Count, fSheet6[0], fSheet6[1], fSheet6[2],
iCombo1, iCombo2, fSheet4);
//int GCWACalculate( float *pfComposition, float *pfBasePara, BOOL* pbAnalSelect, float* pfIPRCoeff,
// int iSatNum, float* pfSg, float* pfKro, float* pfKrg, int iIPRSelect,
// int iTPRSelect, float *pfAnalPara )
//pfComposition对应Sheet1
//pfBasePara对应Sheet2
//pbAnalSelect,iIPRSelect,iTPRSelect对应于Sheet5
//pfIPRCoeff对应Sheet3
//iSateNum,pfSg,pfKro,pfKrg对应Sheet6
//pfAnalPara对应Sheet4
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -