📄 monidoc.cpp
字号:
// moniDoc.cpp : implementation of the CMoniDoc class
//
#include "stdafx.h"
#include "moni.h"
#include "moniDoc.h"
#include"ParaInput.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMoniDoc
IMPLEMENT_DYNCREATE(CMoniDoc, CDocument)
BEGIN_MESSAGE_MAP(CMoniDoc, CDocument)
//{{AFX_MSG_MAP(CMoniDoc)
ON_COMMAND(ID_run, Onrun)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMoniDoc construction/destruction
CMoniDoc::CMoniDoc()
{
// TODO: add one-time construction code here
for (int i=0;i<1024;i++)
{
Data[i]=0;
TotalChannel=1024;
Scale = 5000;
Expleft=200;
Expright=700;
Cursor = 400;
}
}
CMoniDoc::~CMoniDoc()
{
}
BOOL CMoniDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMoniDoc serialization
void CMoniDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CMoniDoc diagnostics
#ifdef _DEBUG
void CMoniDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CMoniDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMoniDoc commands
void CMoniDoc::Onrun()
{
// TODO: Add your command handler code here
CParaInput para;
int i;
int signn;
signn=para.signn;
if (para.DoModal())
{
if(para.signn==1)
{
for(i=0;i<2048;i++)
{
Data[i]=para.num1[i];
}
TotalChannel=2048;
}
else
{
for(i=0; i<1024; i++)
{
Data[i]=para.num[i];
}
TotalChannel=1024;
}
}
UpdateAllViews(NULL);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -