📄 inspector.cpp
字号:
// Copyright (C) 1991 - 1999 Rational Software Corporation
#include "stdafx.h"
#include "Display.h"
#include "Inspector.h"
#include "CrossDisplay.h"
/////////////////////////////////////////////////////////////////////
CInspector* CInspector::_instance = 0;
/////////////////////////////////////////////////////////////////////
void CInspector::Start()
{
// TODO: Add your specialized code here.
}
/////////////////////////////////////////////////////////////////////
void CInspector::end()
{
// TODO: Add your specialized code here.
}
/////////////////////////////////////////////////////////////////////
CCrossDisplay* CInspector::CreateForceWaveDisplay(CRect& pos, CWnd * pParent)
{
// TODO: Add your specialized code here.
m_FWaveView = new CCrossDisplay;
m_FWaveView->set_BackGroundColor(RGB(110,200,100));
m_FWaveView->SetX_AxlLength(X_length);//10*PNTNUM); //
m_FWaveView->SetX_Scale(X_Scale); //
m_FWaveView->SetY_AxlLength(FY_length);//5000
m_FWaveView->SetY_Scale(FY_Scale); //100
m_FWaveView->SetXUnit(X_Unit); //小格长度
m_FWaveView->SetYUnit(FY_Unit);//100
// m_WaveView->setx_Axl_Txt(CString("y轴(um)"));
m_FWaveView->setx_Axl_Txt(CString("作用力(N)"));
m_FWaveView->sety_Axl_Txt(CString("时间(s)"));
m_FWaveView->Create(pos,pParent);
return (CCrossDisplay*)m_FWaveView;
}
/////////////////////////////////////////////////////////////////////
CCrossDisplay* CInspector::CreateDisplaceWaveDisplay(CRect& pos, CWnd * pParent)
{
// TODO: Add your specialized code here.
// TODO: Add your specialized code here.
m_DWaveView = new CCrossDisplay;
m_DWaveView->set_BackGroundColor(RGB(255,220,200));
m_DWaveView->SetX_AxlLength(X_length);//10*PNTNUM); //
m_DWaveView->SetX_Scale( X_Scale); //
m_DWaveView->SetY_AxlLength(DY_length);//1200
m_DWaveView->SetY_Scale(DY_Scale); // 10 //
m_DWaveView->SetXUnit(X_Unit); //小格长度
m_DWaveView->SetYUnit(DY_Unit);//20
// m_DWaveView->setx_Axl_Txt(CString("时间(s)"));
m_DWaveView->setx_Axl_Txt(CString("位移(mm)"));
m_DWaveView->sety_Axl_Txt(CString("时间(s)"));
m_DWaveView->Create(pos,pParent);
return (CCrossDisplay*)m_DWaveView;
/*
m_CirView = new CCrossDisplay;
m_CirView->set_BackGroundColor(RGB(177,245,166));
m_CirView->SetCenterPos(CENTER);
m_CirView->SetX_AxlLength(1000);
m_CirView->SetX_Scale(200);
m_CirView->SetY_AxlLength(1000);
m_CirView->SetY_Scale(200);
m_CirView->SetXUnit(20);
m_CirView->SetYUnit(20);
m_CirView->setx_Axl_Txt(CString("x轴(um)"));
m_CirView->sety_Axl_Txt(CString("y轴(um)"));
m_CirView->Create(pos,pParent);
return (CCrossDisplay*)0;
*/
}
/////////////////////////////////////////////////////////////////////
CInspector* CInspector::Instance()
{
// TODO: Add your specialized code here.
if(_instance == NULL)
_instance = new CInspector;
return _instance;
}
/////////////////////////////////////////////////////////////////////
CCrossDisplay* CInspector::get_DWaveView() const
{
return m_DWaveView;
}
/////////////////////////////////////////////////////////////////////
CCrossDisplay* CInspector::get_FWaveView() const
{
return m_FWaveView;
}
/////////////////////////////////////////////////////////////////////
CInspector::CInspector()
{
X_length=0;
X_Unit=0;
X_Scale=0;
DY_length=0;
DY_Unit=0;
DY_Scale=0;
FY_length=0;
FY_Unit=0;
FY_Scale=0;
// ToDo: Add your specialized code here and/or call the base class
}
/////////////////////////////////////////////////////////////////////
CInspector::~CInspector()
{
// ToDo: Add your specialized code here and/or call the base class
m_FWaveView->DestroyWindow();
if(m_FWaveView != NULL)
delete m_FWaveView;
m_DWaveView->DestroyWindow();
if(m_DWaveView != NULL)
delete m_DWaveView;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -