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

📄 unit1.h

📁 16 relay output channels and 16 isolated digital input channels LED indicators to show activated
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>V
//---------------------------------------------------------------------------
class EventThread : public TThread
{
private:
protected:
        void __fastcall Execute();
public:
        __fastcall EventThread(bool CreateSuspended);
};
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TGroupBox *GroupBox1;
        TEdit *editSelDev;
        TButton *btnSelDev;
        TGroupBox *GroupBox2;
        TComboBox *cmbCounter;
        TGroupBox *GroupBox3;
        TGroupBox *GroupBox4;
        TLabel *Label2;
        TLabel *Label3;
        TEdit *editStartPort;
        TEdit *editPortCount;
        TGroupBox *GroupBox5;
        TLabel *Label4;
        TLabel *Label5;
        TEdit *editStartCnt;
        TEdit *editCntrCount;
        TGroupBox *GroupBox6;
        TButton *btnClose;
        TButton *btnStart;
        TButton *btnStop;
        TListView *lsvDI;
        TListView *lsvCounter;
        TLabel *Label6;
        TEdit *editCompData;
        TLabel *Label1;
        TLabel *Label7;
        TComboBox *cmbInt;
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall btnSelDevClick(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall btnStartClick(TObject *Sender);
        void __fastcall btnStopClick(TObject *Sender);
        void __fastcall btnCloseClick(TObject *Sender);
private:	// User declarations
        LRESULT m_ErrCde;
        LONG    m_DriverHandle;
        ULONG   m_ulDevNum;
        char    m_szErrMsg[80];
        BOOL    m_bContinue;
        ULONG   m_InterruptSrc;
        USHORT  m_CurCounter;
        ULONG   m_StartPort;
        ULONG   m_PortCount;
        ULONG   m_StartCntr;
        ULONG   m_CntrCount;
        void*   m_pThreadHandle;
        EventThread *pEventThread;

public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        void CheckEvent();    // Event checking
        void KillThread();    // Kill the thread
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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