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

📄 send.cpp

📁 嵌入式计算机及接口技术
💻 CPP
字号:
#include "Send.h"

  Send::Send()
 {
 
 
 ///////////////////////////////////////
    this->BackColor=Blue;
    this->ForeColor=Face;
    this->FontColor=Yellow;
    this->FontType=GB16;
    this->VisionEnable=false;
    this->Enable=true;
    
    this->WindowVisionModel=WinVisionModel_Picture;

   NetTimeLength=0;
   WorkTimeLength=0;
   OtherProductLength=0;  
  
  };
  
void  Send::Message(MessageBody SystemMsg)
{


//处理发送请求
  if (SystemMsg.MsgID==Sys_Msg_RealKeyBoard_Press)
  {
  
//处理起网时间错误

     if(ErrorCode==ErrorCode_NetTime)
     {
        this->CloseNoRefresh();
        NetTimeWindow->Active();
     };

//处理工作时长错误

    if(ErrorCode==ErrorCode_WorkTime)

     {
        this->CloseNoRefresh();
        WorkTimeWindow->Active();
     };
  
  //处理数据正确的返回
     if(ErrorCode==ErrorCode_Right)
     {
        this->CloseNoRefresh();
        NetTimeWindow->Active();
     };
  
  }
 ////////////////////处理起网时间传递
 if (SystemMsg.MsgID==Usr_Msg_Pass_NetTime )
    {
      NetTimeLength=SystemMsg.Parm1;
    };
 ////////////////////处理工作时长传递
 if (SystemMsg.MsgID==Usr_Msg_Pass_WorkTime )
    {
      WorkTimeLength=SystemMsg.Parm1;
    };
  
 //////////////////处理要求发送的
 if (SystemMsg.MsgID==Usr_Msg_Send_Check)
    {
      CheckFormation();//检测数据格式并配相关的图象
    };
 
} ;

void Send::OnActive()
{


};


 void Send::CheckFormation()
 {

  if (NetTimeLength!=5)
     {
       ErrorCode=ErrorCode_NetTime;
       BackPicture.PictureID=ImageBase_Error_NetTime;
       return;
     };
  if (WorkTimeLength!=12)
     {
       ErrorCode=ErrorCode_WorkTime;
       BackPicture.PictureID=ImageBase_Error_WorkTime;
       return;
     };
     
 
  BackPicture.PictureID= ImageBase_DataRight;
  ErrorCode=ErrorCode_Right;


 };

⌨️ 快捷键说明

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