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

📄 getdata.cpp

📁 机械原理课程设计,牛头刨床的动力学分析
💻 CPP
字号:
// GetData.cpp : implementation file
//

#include "stdafx.h"
#include "Ox_Planer.h"
#include "GetData.h"

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

/////////////////////////////////////////////////////////////////////////////
// GetData dialog


GetData::GetData(CWnd* pParent /*=NULL*/)
	: CDialog(GetData::IDD, pParent)
{
    
	    m_n = 52;
	    m_k = 1.5;
		m_h = 0.500;
		m_LO2O3 = 0.430;
		m_b1 = 0.5;
		m_b2 = 0.32;
		m_b3 = 0.5;
		m_xs = 150;
		m_ys = 40;
		m_yp = 180;
		m_g3 = 196;
		m_g4 = 30;
		m_g5 = 610;
		m_ys3 = 0.12;
		m_ys4 = 0.003;
		m_pr = 5880;
	//{{AFX_DATA_INIT(GetData)
	//}}AFX_DATA_INIT
}


void GetData::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(GetData)
	DDX_Control(pDX, IDC_COMBO, m_cob);
	DDX_Control(pDX, IDC_EDIT9, m_yss);
	DDX_Control(pDX, IDC_EDIT8, m_xss);
	DDX_Control(pDX, IDC_EDIT7, m_b3s);
	DDX_Control(pDX, IDC_EDIT6, m_b2s);
	DDX_Control(pDX, IDC_EDIT5, m_b1s);
	DDX_Control(pDX, IDC_EDIT4, m_l0203s);
	DDX_Control(pDX, IDC_EDIT3, m_hs);
	DDX_Control(pDX, IDC_EDIT2, m_ks);
	DDX_Control(pDX, IDC_EDIT16, m_prs);
	DDX_Control(pDX, IDC_EDIT15, m_ys4s);
	DDX_Control(pDX, IDC_EDIT14, m_ys3s);
	DDX_Control(pDX, IDC_EDIT13, m_g5s);
	DDX_Control(pDX, IDC_EDIT12, m_g4s);
	DDX_Control(pDX, IDC_EDIT11, m_g3s);
	DDX_Control(pDX, IDC_EDIT10, m_yps);
	DDX_Control(pDX, IDC_EDIT1, m_ns);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(GetData, CDialog)
	//{{AFX_MSG_MAP(GetData)
	ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// GetData message handlers

void GetData::OnSelchangeCombo1() 
{
	// TODO: Add your control notification handler code here

	
	CString str;
	int i;
    i=m_cob.GetCurSel();	
	if(i==1)
	{
	    m_ns.SetWindowText("52");
	    m_ks.SetWindowText("1.5");
		m_hs.SetWindowText("0.5");
		m_l0203s.SetWindowText("0.43");
		m_b1s.SetWindowText("0.5");
		m_b2s.SetWindowText("0.32");
		m_b3s.SetWindowText("0.5");
		m_xss.SetWindowText("150");
		m_yss.SetWindowText("40");
		m_yps.SetWindowText("180");
		m_g3s.SetWindowText("196");
		m_g4s.SetWindowText("30");
		m_g5s.SetWindowText("610");
		m_ys3s.SetWindowText("0.12");
		m_ys4s.SetWindowText("0.003");
        m_prs.SetWindowText("5880");



		m_n = 52;
	    m_k = 1.5;
		m_h = 0.500;
		m_LO2O3 = 0.430;
		m_b1 = 0.5;
		m_b2 = 0.32;
		m_b3 = 0.5;
		m_xs = 150;
		m_ys = 40;
		m_yp = 180;
		m_g3 = 196;
		m_g4 = 30;
		m_g5 = 610;
		m_ys3 = 0.12;
		m_ys4 = 0.003;
		m_pr = 5880;
		
   		}
 else if(i==2)
	{
	   m_ns.SetWindowText("60");
	    m_ks.SetWindowText("1.4");
		m_hs.SetWindowText("0.430");
		m_l0203s.SetWindowText("0.450");
		m_b1s.SetWindowText("0.5");
		m_b2s.SetWindowText("0.35");
		m_b3s.SetWindowText("0.5");
		m_xss.SetWindowText("180");
		m_yss.SetWindowText("40");
		m_yps.SetWindowText("170");
		m_g3s.SetWindowText("176");
		m_g4s.SetWindowText("50");
		m_g5s.SetWindowText("705");
		m_ys3s.SetWindowText("0.11");
		m_ys4s.SetWindowText("0.004");
		m_prs.SetWindowText("4990");	
		m_n = 60;
	    m_k = 1.4;
		m_h = 0.430;
		m_LO2O3 = 0.450;
		m_b1 = 0.5;
		m_b2 = 0.35;
		m_b3 = 0.5;
		m_xs = 180;
		m_ys = 40;
		m_yp = 170;
		m_g3 = 176;
		m_g4 = 50;
		m_g5 = 705;
		m_ys3 = 0.11;
		m_ys4 = 0.004;
		m_pr = 4900;
		
		}
else if(i==3)
	{
	    m_ns.SetWindowText("70");
	    m_ks.SetWindowText("1.4");
		m_hs.SetWindowText("0.440");
		m_l0203s.SetWindowText("0.460");
		m_b1s.SetWindowText("0.5");
		m_b2s.SetWindowText("0.30");
		m_b3s.SetWindowText("0.5");
		m_xss.SetWindowText("160");
		m_yss.SetWindowText("45");
		m_yps.SetWindowText("110");
		m_g3s.SetWindowText("260");
		m_g4s.SetWindowText("45");
		m_g5s.SetWindowText("680");
		m_ys3s.SetWindowText("0.20");
		m_ys4s.SetWindowText("0.005");
		m_prs.SetWindowText("3800");
		m_n = 70;
	    m_k = 1.4;
		m_h = 0.440;
	m_LO2O3 = 0.460;
   	m_b1 =    0.5;
	   m_b2 = 0.30;
		m_b3= 0.5;
		m_xs= 160;
		m_ys= 45;
		m_yp= 110;
		m_g3= 260;
		m_g4= 45;
		m_g5= 680;
	   m_ys3= 0.20;
	   m_ys4= 0.005;
	   m_pr = 3800;
		
		}	
else if(i==4)
	{
	    m_ns.SetWindowText("130");
	    m_ks.SetWindowText("1.5");
		m_hs.SetWindowText("0.480");
		m_l0203s.SetWindowText("0.400");
		m_b1s.SetWindowText("0.5");
		m_b2s.SetWindowText("0.34");
		m_b3s.SetWindowText("0.5");
		m_xss.SetWindowText("175");
		m_yss.SetWindowText("40");
		m_yps.SetWindowText("120");
		m_g3s.SetWindowText("220");
		m_g4s.SetWindowText("40");
		m_g5s.SetWindowText("650");
		m_ys3s.SetWindowText("0.31");
		m_ys4s.SetWindowText("0.008");
		m_prs.SetWindowText("2600");
		m_n = 130;
	    m_k = 1.5;
		m_h = 0.480;
		m_LO2O3 = 0.400;
		m_b1 = 0.5;
		m_b2 = 0.34;
		m_b3 = 0.5;
		m_xs = 175;
		m_ys = 40;
		m_yp = 120;
		m_g3 = 220;
		m_g4 = 40;
		m_g5 = 650;
		m_ys3 = 0.31;
		m_ys4 = 0.008;
		m_pr = 2600;
				}
else if(i==5)
	{
	    m_ns.SetWindowText("110");
	    m_ks.SetWindowText("1.4");
		m_hs.SetWindowText("0.520");
		m_l0203s.SetWindowText("0.380");
		m_b1s.SetWindowText("0.5");
		m_b2s.SetWindowText("0.35");
		m_b3s.SetWindowText("0.5");
		m_xss.SetWindowText("190");
		m_yss.SetWindowText("50");
		m_yps.SetWindowText("140");
		m_g3s.SetWindowText("230");
		m_g4s.SetWindowText("42");
		m_g5s.SetWindowText("620");
		m_ys3s.SetWindowText("0.29");
		m_ys4s.SetWindowText("0.006");
		m_prs.SetWindowText("3000");

		m_n = 110;
	    m_k = 1.4;
		m_h = 0.520;
		m_LO2O3 = 0.380;
		m_b1 = 0.5;
		m_b2 = 0.35;
		m_b3 = 0.5;
		m_xs = 190;
		m_ys = 50;
		m_yp = 140;
		m_g3 = 230;
		m_g4 = 42;
		m_g5 = 620;
		m_ys3 = 0.29;
		m_ys4 = 0.006;
		m_pr = 3000;
		
		}		
}


BOOL GetData::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_cob.AddString("1");
    m_cob.AddString("2");
    m_cob.AddString("3");
    m_cob.AddString("4");
    m_cob.AddString("5");
    m_cob.SelectString(-1,"1");
	m_ns.SetWindowText("52");
	    m_ks.SetWindowText("1.5");
		m_hs.SetWindowText("0.5");
		m_l0203s.SetWindowText("0.43");
		m_b1s.SetWindowText("0.5");
		m_b2s.SetWindowText("0.32");
		m_b3s.SetWindowText("0.5");
		m_xss.SetWindowText("150");
		m_yss.SetWindowText("40");
		m_yps.SetWindowText("180");
		m_g3s.SetWindowText("196");
		m_g4s.SetWindowText("30");
		m_g5s.SetWindowText("610");
		m_ys3s.SetWindowText("0.12");
		m_ys4s.SetWindowText("0.003");
        m_prs.SetWindowText("5880");

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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