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

📄 worktime.cpp

📁 嵌入式计算机及接口技术
💻 CPP
字号:
#include "WorkTime.h"
//#define as 78
#define  FishState 0
#define  TotolState 1 

  WorkTime::WorkTime()
 {
 
 
 ///////////////////////////////////////
    this->BackColor=Blue;
    this->ForeColor=Face;
    this->FontColor=Yellow;
    this->FontType=GB16;
    this->VisionEnable=false;
    this->Enable=true;
    
   // this->WindowVisionModel=WinVisionModel_Normal;
  //  this->WindowVisionModel=WinVisionModel_SingleColor;
    this->WindowVisionModel=WinVisionModel_Picture;
    SetCaption("广东海洋大学");
    this->Focus=true;

    BackPicture.PictureID=2;

     
    Edit1.Left=60;
    Edit1.Top=120;
    Edit1.Height=32;
    Edit1.Width=200;
    Edit1.FontType=GB32;
    Edit1.FontColor=Yellow;
    Edit1.FontBack=Red;
    
    Edit1.BackColor=Red;

    Edit1.ForeColor=Black;
    Edit1.FontWidth=16;
    
    Edit1.FocuseBackColor=Blue;
    Edit1.FocuseFontColor=Yellow;
    
    
  //  Edit1.Text="12:23";
 //   Edit1.SetContend("12:23");
    this->AddChird(&Edit1);
     
  
  
  };
  
void  WorkTime::Message(MessageBody SystemMsg)
{
  if (SystemMsg.MsgID==Sys_Msg_RealKeyBoard_Press)
  {
     if (SystemMsg.Parm1==Special_Key_Down)
         {
           PassData();         
           this->CloseNoRefresh();
           NextWindow->Active();
         };

   if (SystemMsg.Parm1==Special_Key_Up)
         {
           PassData();         
           this->CloseNoRefresh();
           ForwardWindow->Active();
         };

  if ((SystemMsg.Parm1>='0')&&(SystemMsg.Parm1<='9'))
     {
         Edit1.Message( SystemMsg);
     };
       
  if ((SystemMsg.Parm1==Special_Key_Left)||(SystemMsg.Parm1==Special_Key_Right))
     {
         Edit1.Message( SystemMsg);
     
     };
       
       
   if( SystemMsg.Parm1==Special_Key_Clear)
      {
        Edit1.SetFocus();
      };
     
  
 } 
} ;


//传递数据到发送窗口
void  WorkTime::PassData()
{
  this->Msg.MsgID=Usr_Msg_Pass_WorkTime ;
  this->Msg.Parm1=Edit1.TextLength;
  this->Msg.Msg=Edit1.Text;
  SendWindow->Message(Msg);
};

///////////
void WorkTime::OnActive()
{
 
   Edit1.SetFocusePostion(1);
   
};

⌨️ 快捷键说明

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