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

📄 facewin.cpp

📁 嵌入式计算机及接口技术
💻 CPP
字号:
#include "FaceWin.h"
char a[]=
{
   0x24, 0x47, 0x50, 0x53, 0x5A, 0x00, 0x0F, 0x03, 0xD6, 0xF0,
   0x00, 0x00, 0x00, 0x00, 0x10
};

char b[]=
{ 
   0x24, 0x59, 0x48, 0x5A, 0x4C, 0x00, 0x0F, 0x00, 0x00, 0x00,
   0x44, 0x4B, 0x53, 0x51, 0x21
};

char testcontend[38]=
{
'a','b','c','d','e','f',
'a','b','c','d','e','f',
'a','b','c','d','e','f',
'a','b','c','d','e','f',
'a','b','c','d','e','f',
'a','b','c','d','e','f',

'1','2'

};


char ShowBuffer[6];
  FaceWin::FaceWin()
 {
 
 
 ///////////////////////////////////////
    this->BackColor=Blue;
    this->ForeColor=Face;
    this->FontColor=Yellow;
    this->FontType=GB16;
    this->VisionEnable=false;
    this->Enable=true;
    
    this->WindowVisionModel=WinVisionModel_Picture;
    this->Focus=false;

    BackPicture.PictureID=20;
    
/////////////////////////////////////////
/*    Com1.PortNumber=0;
    this->AddChird(&Com1);    
*/
  
  
  };
  
void  FaceWin::Message(MessageBody SystemMsg)
{
  if (SystemMsg.MsgID==Sys_Msg_RealKeyBoard_Press)
  {
    //      if  ( SystemMsg.Parm1=='1')
    //      {
              CloseNoRefresh();
              NextWindow->Active();
   //       }
   /*
          if  ( SystemMsg.Parm1=='2')
          {
          
            Com1.GetLocationNumber();
            DelayNS(1000000);
            if ( Com1. DataVailed=false)
            {
               this->CanvasDraw->PutString(100,200,"can't get number!");
            }
            else
            {

               this->CanvasDraw->PutString(100,200,"ok number!");
              
               DelayNS(100000);
               
               Com1.GetPostion();
               DelayNS(1000000);
               if ( Com1. DataVailed=false)
                  {
                    this->CanvasDraw->PutString(100,220,"can't get Postion!");
                    
                  }
               else
                 {
                    this->CanvasDraw->PutString(100,220,"ok Postion!");
                    DelayNS(100000);
                    Com1.GetRomoteNumber();
                    DelayNS(100000);
                    Com1.SendMMS(testcontend,38);

               
                 }  
               
            };
            
            
            
         }
   
         if  ( SystemMsg.Parm1=='3')
          {
            Com1.SendData(a,15);
         }
   
   
  }
  
 if (SystemMsg.MsgID==Sys_Msg_Uart_GetData)
 {
  
  ShowBuffer[5]=0;
  ShowBuffer[0]=SystemMsg.Msg[0];
  ShowBuffer[1]=SystemMsg.Msg[1];
  ShowBuffer[2]=SystemMsg.Msg[2];
  ShowBuffer[3]=SystemMsg.Msg[3];
  ShowBuffer[4]=SystemMsg.Msg[4];


   this->CanvasDraw->PutString(100,100,ShowBuffer);
   
   
 }
 */ 
 }
} ;

⌨️ 快捷键说明

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