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

📄 exitsystem.cpp

📁 机械手IPC控制器伺服运动程序
💻 CPP
字号:
// ExitSystem.cpp : implementation file
//

#include "stdafx.h"
#include "alfa.h"
#include "ExitSystem.h"
#include "Main.h"
#include "io.h"
#include "sys.h"
#include "mccl.h"
#define SYSTEM_FILE _T("system.bkp")
//#define DATAGLB_FILE _T("dataglb.bkp")
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CExitSystem dialog


CExitSystem::CExitSystem(CWnd* pParent /*=NULL*/)
	: CDialog(CExitSystem::IDD, pParent)
{
	//{{AFX_DATA_INIT(CExitSystem)
//	m_pwd = _T("");
	
	//}}AFX_DATA_INIT
}


void CExitSystem::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CExitSystem)
//	DDX_Control(pDX, IDC_EDIT1, m_edt);
//	DDX_Text(pDX, IDC_EDIT1, m_pwd);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CExitSystem, CDialog)
	//{{AFX_MSG_MAP(CExitSystem)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CExitSystem message handlers

void CExitSystem::OnButton2() 
{
	// TODO: Add your control notification handler code here
	ShowWindow(FALSE);
    CMain * main=(CMain *)GetParent();
	main->dlgsystem->ShowWindow(TRUE);
}

void CExitSystem::OnButton1() 
{
	// TODO: Add your control notification handler code here
  UpdateData();
  CMain * main=(CMain *)GetParent();
  CString pwd=main->dlgsystemparam->si.pwd_exitsys;
//  if(m_pwd==pwd) {
//	SaveRecords();
    MCC_SetServoOff(0, CARD_INDEX); // Set Channel 0 Servo Off	
	MCC_SetServoOff(1, CARD_INDEX); // Set Channel 1 Servo Off	
	MCC_SetServoOff(2, CARD_INDEX); // Set Channel 2 Servo Off	
	MCC_SetServoOff(3, CARD_INDEX); // Set Channel 3 Servo Off 	
	MCC_SetServoOff(4, CARD_INDEX); // Set Channel 4 Servo Off
	MCC_SetRIOOutputValue(0, RIO_SET1, RIO_PORT0, CARD_INDEX); 
	MCC_SetRIOOutputValue(0, RIO_SET1, RIO_PORT1, CARD_INDEX); 
	MCC_SetRIOOutputValue(0, RIO_SET1, RIO_PORT2, CARD_INDEX); 
	MCC_SetRIOOutputValue(0, RIO_SET1, RIO_PORT3, CARD_INDEX); 
	main->KillTimer(60);
	main->EndDialog(1);


//	CloseComputer();
//  }
//  else
//  {
//	AfxMessageBox("

⌨️ 快捷键说明

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