⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlg_common.cpp

📁 数据分析系统主要研究大量的数据
💻 CPP
字号:
// Dlg_common.cpp : implementation file
//

#include "stdafx.h"
#include "dataanalisis.h"
#include "Dlg_common.h"
#include "Dlg_cum.h"
#include "Dlg_zhishu.h"
#include "Dlg_moveavg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlg_common dialog


CDlg_common::CDlg_common(CWnd* pParent /*=NULL*/)
	: CDialog(CDlg_common::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlg_common)
	//}}AFX_DATA_INIT
}


void CDlg_common::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlg_common)
	DDX_Control(pDX, IDC_EDIT13, m_frm5);
	DDX_Control(pDX, IDC_EDIT12, m_data5);
	DDX_Control(pDX, IDC_EDIT11, m_frm4);
	DDX_Control(pDX, IDC_EDIT10, m_data4);
	DDX_Control(pDX, IDC_EDIT9, m_frm3);
	DDX_Control(pDX, IDC_EDIT8, m_data3);
	DDX_Control(pDX, IDC_EDIT7, m_frm2);
	DDX_Control(pDX, IDC_EDIT6, m_data2);
	DDX_Control(pDX, IDC_EDIT5, m_frm1);
	DDX_Control(pDX, IDC_EDIT4, m_data1);
	DDX_Control(pDX, IDC_EDIT3, m_zhongweishu);
	DDX_Control(pDX, IDC_EDIT2, m_fangcha);
	DDX_Control(pDX, IDC_EDIT1, m_average);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlg_common, CDialog)
	//{{AFX_MSG_MAP(CDlg_common)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlg_common message handlers

void CDlg_common::OnOK() 
{
	// TODO: Add extra validation here
	extern double yp[],py[];
	extern double DX,DY;
	extern double averagex,averagey;
	extern double middata;

	char cResult[10];
	/////显示均值/////
    _gcvt(averagex,10,cResult);
	GetDlgItem(IDC_EDIT1)->SetWindowText(cResult);
	_gcvt(averagey,10,cResult);
	GetDlgItem(IDC_EDIT14)->SetWindowText(cResult);
	UpdateData(FALSE);
    /////显示方差/////
	_gcvt(DX,10,cResult);
	GetDlgItem(IDC_EDIT2)->SetWindowText(cResult);
	_gcvt(DY,10,cResult);
	GetDlgItem(IDC_EDIT15)->SetWindowText(cResult);
	UpdateData(FALSE);
    /////显示中位数/////
	_gcvt(middata,10,cResult);
	GetDlgItem(IDC_EDIT16)->SetWindowText(cResult);
	UpdateData(FALSE);
    /////显示频率/////
	_gcvt(yp[0],10,cResult);
	GetDlgItem(IDC_EDIT2)->SetWindowText(cResult);
	_gcvt(py[0],10,cResult);
	GetDlgItem(IDC_EDIT5)->SetWindowText(cResult);
	UpdateData(FALSE);

	_gcvt(yp[1],10,cResult);
	GetDlgItem(IDC_EDIT2)->SetWindowText(cResult);
	_gcvt(py[1],10,cResult);
	GetDlgItem(IDC_EDIT7)->SetWindowText(cResult);
	UpdateData(FALSE);

	_gcvt(yp[2],10,cResult);
	GetDlgItem(IDC_EDIT2)->SetWindowText(cResult);
	_gcvt(py[2],10,cResult);
	GetDlgItem(IDC_EDIT9)->SetWindowText(cResult);
	UpdateData(FALSE);

	_gcvt(yp[3],10,cResult);
	GetDlgItem(IDC_EDIT2)->SetWindowText(cResult);
	_gcvt(py[3],10,cResult);
	GetDlgItem(IDC_EDIT11)->SetWindowText(cResult);
	UpdateData(FALSE);

	_gcvt(yp[4],10,cResult);
	GetDlgItem(IDC_EDIT2)->SetWindowText(cResult);
	_gcvt(py[4],10,cResult);
	GetDlgItem(IDC_EDIT13)->SetWindowText(cResult);
	UpdateData(FALSE);


	CDialog::OnOK();
}

void CDlg_common::OnButton1() 
{
	// TODO: Add your control notification handler code here
	CDlg_cum cum;
	cum.DoModal();
	
}

void CDlg_common::OnButton2() 
{
	// TODO: Add your control notification handler code here
	CDlg_zhishu zhishu;
	zhishu.DoModal();
}

void CDlg_common::OnButton3() 
{
	// TODO: Add your control notification handler code here
	CDlg_moveavg moveavg;
	moveavg.DoModal();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -