亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pushtestdlg.cpp

?? 郵包機的推動系統,可以推動郵包機,進入郵包箱內.本程序通過串口發送指令.
?? CPP
字號:
// PushTestDlg.cpp : implementation file
//

#include "stdafx.h"
#include "PushTest.h"
#include "PushTestDlg.h"
#include "Push.h"

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

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
UINT ValidateThrd(PVOID pParam);

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPushTestDlg dialog

CPushTestDlg::CPushTestDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CPushTestDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPushTestDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CPushTestDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPushTestDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CPushTestDlg, CDialog)
	//{{AFX_MSG_MAP(CPushTestDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	ON_BN_CLICKED(IDC_BUTTON8, OnButton8)
	ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
	ON_BN_CLICKED(IDC_BUTTON6, OnButton6)
	ON_BN_CLICKED(IDC_BUTTON7, OnButton7)
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
	ON_BN_CLICKED(IDC_BUTTON9, OnButton9)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPushTestDlg message handlers

BOOL CPushTestDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
	m_ExitFlag = TRUE;
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CPushTestDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CPushTestDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CPushTestDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

//顯示信息
void CPushTestDlg::AlertInfo(char * str)
{
	GetDlgItem(IDC_info)->SetWindowText(str);
}
void CPushTestDlg::AlertInfo(int code)
{
	CString str;
	switch(code)
	{
	case -99:
		str = "Negative response(Communication problem/Equipment not connected)";
		break;
	case -31:
		str = "Open port failed!";
		break;
	case -32:
		str = "Close port failed!";
		break;
	case -41:
		str = "Open the Door failed!";
		break;
	case -42:
		str = "Close the Door failed!";
		break;
	case -43:
		str = "Parcel Pushing Failure";
		break;
	case 10:
		str = "Parcel Being";
		break;
	case 11:
		str = "No Parcel";
		break;
	case 12:
		str = "Getting light Sensor1 Failure";
		break;
	case 20:
		str = "Parcel Falling into Parcel Box";
		break;
	case 21:
		str = "Parcel did not Fall into Parcel Box";
		break;
	case 22:
		str = "Getting light Sensor2 Failure";
		break;
	case 30:
		str = "Parcel Box Full";
		break;
	case 31:
		str = "Parcel Box not Full";
		break;
	case 32:
		str = "Getting light Sensor3 Failure";
		break;

	default:
		str = "unknown error";
		break;
	}
	GetDlgItem(IDC_info)->SetWindowText(str);
}

void CPushTestDlg::OnButton1() 
{
	// TODO: Add your control notification handler code here
	int iret = P_OpenPort();
	if(iret == 0)
	{
		AlertInfo("Open Port Success!");		
	}
	else
		AlertInfo(iret);
}

void CPushTestDlg::OnButton2() 
{
	// TODO: Add your control notification handler code here
	m_ExitFlag = FALSE;
	Sleep(200);
	int iret = P_ClosePort();
	if(iret == 0)
		AlertInfo("Close Port Success!");
	else
		AlertInfo(iret);	
}

void CPushTestDlg::OnButton3() 
{
	// TODO: Add your control notification handler code here
	int iret = P_OpenDoor();
	if(iret == 0)
		AlertInfo("Open the Door Success!");
	else
		AlertInfo(iret);	
}

void CPushTestDlg::OnButton8() 
{
	// TODO: Add your control notification handler code here
	int iret = P_PushParcel();
	if(iret == 0)
		AlertInfo("Successful delivery");
	else
		AlertInfo(iret);	
}

void CPushTestDlg::OnButton5() 
{
	// TODO: Add your control notification handler code here
	int iret = P_GetSensor1();
	AlertInfo(iret);
}

void CPushTestDlg::OnButton6() 
{
	// TODO: Add your control notification handler code here
	int iret = P_GetSensor2();
	AlertInfo(iret);
}

void CPushTestDlg::OnButton7() 
{
	// TODO: Add your control notification handler code here
	int iret = P_GetSensor3();
	AlertInfo(iret);
}

void CPushTestDlg::OnButton4() 
{
	// TODO: Add your control notification handler code here
	int iret = P_CloseDoor();
	if(iret == 0)
		AlertInfo("Close the Door Success!");
	else
		AlertInfo(iret);	
}
UINT ValidateThrd(PVOID pParam)
{ 
   CPushTestDlg *pDlg = (CPushTestDlg *)AfxGetApp()->m_pMainWnd;
   MSG msg;
   int stat1,stat2,stat3;
   

   while(pDlg->m_ExitFlag)
   {
	   if( ::PeekMessage(&msg,NULL,0,0,PM_REMOVE) ) 
	   {
		   ::TranslateMessage(&msg);
		   ::DispatchMessage(&msg);
		}
	   stat1 = P_GetSensor1();
	   if(stat1 == 10)
		   pDlg->GetDlgItem(IDC_S1)->SetWindowText("Parcel Being");
	   else if(stat1 == 11)
		   pDlg->GetDlgItem(IDC_S1)->SetWindowText("No Parcel");
	   else if(stat1 == 12)
		   pDlg->GetDlgItem(IDC_S1)->SetWindowText("Getting light Sensor1 Failure");
	   stat2 = P_GetSensor2();
	   if(stat2 == 20)
		   pDlg->GetDlgItem(IDC_S2)->SetWindowText("Parcel Falling into Parcel Box");
	   else if(stat2 == 21)
		   pDlg->GetDlgItem(IDC_S2)->SetWindowText("Parcel did not Fall into Parcel Box");
	   else if(stat2 == 22)
		   pDlg->GetDlgItem(IDC_S2)->SetWindowText("Getting Sensor2 Failure");
	   stat3 = P_GetSensor3();
	   if(stat3 == 30)
		   pDlg->GetDlgItem(IDC_S3)->SetWindowText("Parcel Box Full");
	   else if(stat3 == 31)
		   pDlg->GetDlgItem(IDC_S3)->SetWindowText("arcel Box not Full");
	   else if(stat3 == 32)
		   pDlg->GetDlgItem(IDC_S3)->SetWindowText("Getting light Sensor3 Failure");
   }
   return 1;
}

void CPushTestDlg::OnButton9() 
{
	// TODO: Add your control notification handler code here
	AfxBeginThread(ValidateThrd,NULL);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品亚洲麻豆av一区二区| 欧美美女网站色| 麻豆精品在线播放| 一区二区视频在线| 伊人开心综合网| 一区二区免费在线| 伊人一区二区三区| 亚洲欧美日本韩国| 亚洲另类一区二区| 最新国产精品久久精品| 中文字幕在线不卡一区二区三区| 国产欧美一区二区精品仙草咪| 欧美大胆人体bbbb| 国产亚洲一区二区三区四区 | 欧美成人女星排名| 欧美一区2区视频在线观看| 欧美色手机在线观看| 欧美日韩视频第一区| 欧美蜜桃一区二区三区| 3atv一区二区三区| 欧美电影免费观看高清完整版在线| 制服丝袜成人动漫| 精品毛片乱码1区2区3区| 欧美精品一区二区三区在线| 2020国产精品久久精品美国| 久久久精品综合| 国产精品午夜在线| 一区二区三区中文字幕电影 | 在线观看视频91| 欧美在线免费观看亚洲| 欧美日韩国产在线播放网站| 欧美电影精品一区二区| 日本一区二区动态图| 亚洲人成网站色在线观看| 亚洲一二三专区| 久久99久国产精品黄毛片色诱| 九色综合国产一区二区三区| 成人av先锋影音| 欧美日韩免费在线视频| 久久蜜桃香蕉精品一区二区三区| 国产精品日韩成人| 视频一区二区三区在线| 国产精品18久久久久久vr| 99精品国产91久久久久久| 欧美日韩二区三区| 欧美激情在线一区二区| 一区二区成人在线观看| 国产在线不卡一卡二卡三卡四卡| 91亚洲精品乱码久久久久久蜜桃 | 日韩电影一区二区三区| 国产一区二区三区黄视频 | 亚洲国产精品久久久久秋霞影院| 久久成人精品无人区| 成人国产电影网| 3atv一区二区三区| 亚洲啪啪综合av一区二区三区| 秋霞成人午夜伦在线观看| 白白色亚洲国产精品| 日韩欧美国产三级| 亚洲国产成人tv| 成人18视频日本| 欧美大白屁股肥臀xxxxxx| 亚洲精品视频自拍| 粉嫩av一区二区三区粉嫩| 欧美一区二区网站| 亚洲一区二区三区中文字幕| 丁香激情综合国产| 精品理论电影在线| 三级亚洲高清视频| 欧美色综合影院| 亚洲丝袜精品丝袜在线| 国产成人午夜精品5599 | 首页国产欧美日韩丝袜| 97久久久精品综合88久久| 久久人人爽爽爽人久久久| 日日摸夜夜添夜夜添国产精品| 波多野结衣在线一区| 久久久久国产精品麻豆ai换脸| 日本女人一区二区三区| 欧美日韩久久久一区| 一区二区视频免费在线观看| 91理论电影在线观看| 亚洲欧洲另类国产综合| 不卡的电影网站| 亚洲欧美中日韩| 99久久综合精品| 亚洲三级久久久| 色综合亚洲欧洲| 一区二区三区高清在线| 色婷婷久久综合| 亚洲一区二区在线观看视频| 欧美午夜电影在线播放| 亚洲成人精品影院| 7799精品视频| 精油按摩中文字幕久久| 久久久久久久久岛国免费| 国产精品一区一区| 国产精品美女视频| av不卡免费在线观看| 亚洲色欲色欲www| 91日韩在线专区| 亚洲第一狼人社区| 91麻豆精品国产| 久久狠狠亚洲综合| 国产亚洲精品7777| 99久久亚洲一区二区三区青草| 亚洲蜜臀av乱码久久精品蜜桃| 欧美影院一区二区| 麻豆一区二区99久久久久| 国产日韩影视精品| 一本在线高清不卡dvd| 一区二区三区欧美日韩| 欧美一卡2卡3卡4卡| 国产不卡免费视频| 亚洲一区二区四区蜜桃| 精品免费99久久| 色综合久久中文综合久久牛| 午夜成人在线视频| 久久精品一区二区三区四区| 97精品久久久久中文字幕| 午夜精品久久久久久久久久| 精品国产露脸精彩对白| 91视视频在线观看入口直接观看www | 一区二区三区毛片| 精品日韩99亚洲| 91小视频在线免费看| 日本91福利区| 亚洲视频香蕉人妖| 欧美电影精品一区二区| 色噜噜狠狠一区二区三区果冻| 青草av.久久免费一区| 国产精品传媒入口麻豆| 日韩色视频在线观看| 91女神在线视频| 国产一区二三区| 天堂成人免费av电影一区| 国产精品情趣视频| 日韩欧美在线123| 在线观看视频一区二区欧美日韩| 久久 天天综合| 亚洲狠狠爱一区二区三区| 中文字幕不卡在线观看| 日韩欧美中文字幕公布| 欧美三区免费完整视频在线观看| 国产99久久久国产精品潘金 | 欧美一级一区二区| 91福利视频网站| eeuss鲁片一区二区三区| 久久精品久久精品| 天天av天天翘天天综合网色鬼国产 | 欧美视频自拍偷拍| heyzo一本久久综合| 国产精品一区久久久久| 精品在线免费观看| 免费精品视频最新在线| 五月开心婷婷久久| 香蕉加勒比综合久久| 一区二区三区高清| 一区二区三区在线视频观看| 国产精品成人一区二区艾草 | 亚洲欧美在线视频| 国产精品美女久久久久aⅴ| 国产日韩精品一区二区浪潮av | 岛国一区二区在线观看| 激情图片小说一区| 激情六月婷婷久久| 国产原创一区二区| 国产精品996| 99re亚洲国产精品| 在线亚洲一区二区| 欧美日韩国产首页| 日韩一区二区影院| 久久久亚洲综合| 国产精品入口麻豆九色| 亚洲免费观看高清完整版在线观看 | 久久福利资源站| 国产黄人亚洲片| 不卡视频免费播放| 欧美午夜寂寞影院| 日韩欧美高清在线| 国产欧美日韩精品一区| 一个色综合网站| 日日骚欧美日韩| 国产永久精品大片wwwapp| 岛国av在线一区| 一本一道久久a久久精品| 91激情在线视频| 欧美亚洲免费在线一区| 日韩欧美卡一卡二| 精品日韩欧美一区二区| **欧美大码日韩| 亚洲最大成人综合| 亚洲成人激情综合网| 国内精品在线播放| 国产精品性做久久久久久| 成人免费精品视频| 成人福利视频网站| 在线成人免费视频| 欧美成人性战久久| 国产精品久久夜|