📄 maincal.cpp
字号:
// MAINCAL.cpp : implementation file
//
#include "stdafx.h"
#include "CALIBRATE.h"
#include "MAINCAL.h"
#include "CurveDisp.h"
#include "CalInit.h"
#include "Dll.h"
#include "TableOperation.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern float EnginHigh[4];
extern float EnginLow[4];
extern CString m_pSerName;
CString YqName;
int YqNo;
extern TableOperation m_pTableOperation;
/////////////////////////////////////////////////////////////////////////////
// MAINCAL dialog
MAINCAL::MAINCAL(CWnd* pParent /*=NULL*/)
: CDialog(MAINCAL::IDD, pParent)
{
//{{AFX_DATA_INIT(MAINCAL)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void MAINCAL::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(MAINCAL)
DDX_Control(pDX, IDC_OPERATION, m_pOperation);
DDX_Control(pDX, IDC_YQ_LIST, m_pYqList);
DDX_Control(pDX, IDC_INS_NAME, m_pInsName);
DDX_Control(pDX, IDC_SER, m_pSer);
DDX_Control(pDX, IDC_ASSET, m_pAsset);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(MAINCAL, CDialog)
//{{AFX_MSG_MAP(MAINCAL)
ON_BN_CLICKED(IDC_SAMPLE, OnSample)
ON_BN_CLICKED(IDC_SAM_VALID, OnSamValid)
ON_BN_CLICKED(IDC_OK, OnOk)
ON_BN_CLICKED(IDC_EXIT, OnExit)
ON_BN_CLICKED(IDC_CDIST, OnCdist)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// MAINCAL message handlers
void MAINCAL::OnSample()
{
//发送与硬件打交道的命令
}
void MAINCAL::OnSamValid()
{
}
void MAINCAL::OnOk()
{
}
void MAINCAL::OnExit()
{
}
void MAINCAL::OnCdist()
{
}
BOOL MAINCAL::OnInitDialog()
{
CDialog::OnInitDialog();
CRect rect;
m_pInsName.SetWindowText(YqName); //仪器名
m_pSer.SetWindowText(m_pSerName); //服务表名
CString str;
str.Format("%d",YqNo); //仪器号
m_pAsset.SetWindowText(str);
GetDlgItem(IDC_CAL_ROLL)->GetWindowRect(rect) ; //初始化曲线滚动显示控件
ScreenToClient(rect) ;
m_CurDis.SetDispMode(1);
m_CurDis.Create(WS_VISIBLE | WS_CHILD, rect, this,NULL) ;
int rgb[6][3]={{255,255,0},{0,255,0},{255,0,0},{255,110,0},{0,0,255},{0,255,255}};
if(YqName=="DLL3")
{
CDll dll;
for (int i=0;i<4;i++)
{
m_CurDis.SetSerie(i,dll.Measure[i].curve,TRUE,RGB(rgb[i][0],rgb[i][1],rgb[i][2]),
PS_SOLID,m_pTableOperation.MCTBL[i].LOW,m_pTableOperation.MCTBL[i].HIGH,
m_pTableOperation.MCTBL[i].LOW,m_pTableOperation.MCTBL[i].HIGH);
};
m_pYqList.InsertString(-1,"双侧向"); //添加仪器选择列表框的内容
m_pYqList.InsertString(-1,"深侧向");
m_pYqList.InsertString(-1,"浅侧向");
m_pOperation.AddString( "高刻" ); //添加选择操作组合框的内容
m_pOperation.AddString( "低刻" );
};
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -