📄 mcutools.h
字号:
//---------------------------------------------------------------------------
#ifndef MCUToolsH
#define MCUToolsH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <Grids.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Dialogs.hpp>
#include <Registry.hpp>
#include <DB.hpp>
#include <Buttons.hpp>
#include <Mask.hpp>
#include <jpeg.hpp>
#include <CheckLst.hpp>
#include <ValEdit.hpp>
#include <Menus.hpp>
#include "port.h"
#include "stdio.h"
//---------------------------------------------------------------------------
class TfrmMain : public TForm
{
__published: // IDE-managed Components
TPageControl *pcToolSet;
TTabSheet *RTCalc;
TTabSheet *LEDCoder;
TGroupBox *GroupBox1;
TStringGrid *sgRTVal;
TGroupBox *GroupBox2;
TButton *btnRTFile;
TEdit *edR;
TLabel *Label1;
TImage *Image1;
TRadioButton *rbCir1;
TRadioButton *rbCir2;
TLabel *Label2;
TLabel *Label3;
TLabel *Label4;
TButton *btnRTSave;
TMemo *mRT;
TRadioButton *rbRTCStyle;
TRadioButton *rbRTASMStyle;
TButton *Button1;
TEdit *edDB;
TGroupBox *GroupBox3;
TButton *btnExit;
TRadioButton *rbRT8Bits;
TRadioButton *rbRT10Bits;
TButton *btnRTHelp;
TOpenDialog *OpenDialog1;
TSaveDialog *SaveDialog1;
TCheckBox *cbTInc;
TEdit *edTStep;
TLabel *Label5;
TLabel *Label6;
TButton *btnRTCalc;
TGroupBox *GroupBox4;
TRadioButton *rbRTPrefix;
TRadioButton *rbRTPostfix;
TEdit *edRTFix;
TGroupBox *GroupBox7;
TMemo *mLEDCode;
TGroupBox *GroupBox5;
TLabel *lDataDef;
TRadioButton *rbC;
TRadioButton *rbASM;
TEdit *edLEDDB;
TGroupBox *gbHex;
TRadioButton *rbPre;
TRadioButton *rbPost;
TEdit *edHex;
TGroupBox *GroupBox6;
TRadioButton *rb4Bits;
TRadioButton *rb8Bits;
TButton *btnHelp;
TButton *btnCopyTo;
TGroupBox *GroupBox8;
TButton *btnEncode;
TGroupBox *GroupBox9;
TRadioButton *rbLED14;
TRadioButton *rbLED7;
TRadioButton *rbLED16;
TEdit *edLED16A1;
TEdit *edLED16A2;
TEdit *edLED16B;
TEdit *edLED16C;
TEdit *edLED16D1;
TEdit *edLED16D2;
TEdit *edLED16E;
TEdit *edLED16F;
TEdit *edLED16G1;
TEdit *edLED16G2;
TEdit *edLED16H;
TEdit *edLED16J;
TEdit *edLED16K;
TEdit *edLED16L;
TEdit *edLED16M;
TEdit *edLED16N;
TLabel *l16Bits;
TLabel *l14Bits;
TEdit *edLED14M;
TEdit *edLED14L;
TEdit *edLED14K;
TEdit *edLED14J;
TEdit *edLED14H;
TEdit *edLED14G2;
TEdit *edLED14G1;
TEdit *edLED14F;
TEdit *edLED14E;
TEdit *edLED14D;
TEdit *edLED14C;
TEdit *edLED14B;
TEdit *edLED14A;
TEdit *edLED14N;
TLabel *l7Bits;
TEdit *edLED7G;
TEdit *edLED7F;
TEdit *edLED7E;
TEdit *edLED7D;
TEdit *edLED7C;
TEdit *edLED7B;
TEdit *edLED7A;
TLabel *Label11;
TTabSheet *ColorResister;
TGroupBox *GroupBox10;
TGroupBox *GroupBox11;
TShape *Shape1;
TLabel *lColor1;
TLabel *lColor2;
TLabel *lColor3;
TShape *Shape2;
TShape *Shape3;
TLabel *lColor4;
TShape *Shape4;
TLabel *lColor5;
TShape *Shape5;
TShape *Shape6;
TLabel *Label17;
TLabel *Label18;
TSpeedButton *sb1Black;
TSpeedButton *sb1Brown;
TSpeedButton *sb1Red;
TSpeedButton *sb1Orange;
TSpeedButton *sb1Yellow;
TSpeedButton *sb1White;
TSpeedButton *sb1Gray;
TSpeedButton *sb1Purple;
TSpeedButton *sb1Blue;
TSpeedButton *sb1Green;
TGroupBox *GroupBox12;
TGroupBox *GroupBox13;
TRadioButton *rb4Color;
TRadioButton *rb5Color;
TRadioButton *rbOme;
TRadioButton *rbKOme;
TRadioButton *rbMOme;
TSaveDialog *SaveDialog2;
TShape *Shape7;
TLabel *Label19;
TShape *Shape8;
TLabel *Label20;
TShape *Shape9;
TLabel *Label21;
TShape *Shape10;
TLabel *Label22;
TShape *Shape11;
TLabel *Label23;
TShape *Shape12;
TLabel *Label24;
TLabel *Label25;
TLabel *lColor;
TLabel *lCl1;
TLabel *lCl2;
TLabel *lCl3;
TLabel *lCl4;
TLabel *lCl5;
TLabel *lResister;
TSpeedButton *sb2Black;
TSpeedButton *sb2Brown;
TSpeedButton *sb2Red;
TSpeedButton *sb2Orange;
TSpeedButton *sb2Yellow;
TSpeedButton *sb2Green;
TSpeedButton *sb2Blue;
TSpeedButton *sb2Purple;
TSpeedButton *sb2Gray;
TSpeedButton *sb2White;
TSpeedButton *sb3Black;
TSpeedButton *sb3Brown;
TSpeedButton *sb3Red;
TSpeedButton *sb3Orange;
TSpeedButton *sb3Yellow;
TSpeedButton *sb3Green;
TSpeedButton *sb3Blue;
TSpeedButton *sb3Purple;
TSpeedButton *sb3Gray;
TSpeedButton *sb3White;
TSpeedButton *sb4Black;
TSpeedButton *sb4Brown;
TSpeedButton *sb4Red;
TSpeedButton *sb4Orange;
TSpeedButton *sb4Yellow;
TSpeedButton *sb4Green;
TSpeedButton *sb4Blue;
TSpeedButton *sb4Purple;
TSpeedButton *sb4Gray;
TSpeedButton *sb4White;
TSpeedButton *sb5Black;
TSpeedButton *sb5Brown;
TSpeedButton *sb5Red;
TSpeedButton *sb5Gold;
TSpeedButton *sb5Silver;
TSpeedButton *sb5Green;
TSpeedButton *sb5Blue;
TSpeedButton *sb5Purple;
TSpeedButton *sb5Gray;
TSpeedButton *sb5White;
TSpeedButton *sb4Gold;
TSpeedButton *sb4Silver;
TLabel *lPrecision;
TImage *Image3;
TMemo *mResisterBase;
TTabSheet *tsHexBin;
TGroupBox *GroupBox14;
TGroupBox *GroupBox15;
TMemo *mHexText;
TMemo *mBinText;
TGroupBox *GroupBox16;
TLabel *lHTDB;
TRadioButton *rbHTC;
TRadioButton *rbHTASM;
TEdit *edHTDB;
TGroupBox *gbHTHex;
TRadioButton *rbHTPre;
TRadioButton *rbHTPost;
TEdit *edHTFix;
TButton *btnHTLoad;
TButton *btnHTCopy;
TButton *btnLoadHex;
TEdit *edSource;
TEdit *edTarget;
TButton *btnSource;
TButton *btnTarget;
TGroupBox *gbHex2Bin;
TButton *btnHBLoad;
TGroupBox *gbBin2Hex;
TButton *btnB2H;
TEdit *edStartAddress;
TLabel *Label14;
TLabel *Label15;
TRadioButton *rbFill00;
TRadioButton *rbFillFF;
TLabel *Label16;
TLabel *Label9;
TLabel *Label26;
TTabSheet *tsCOMTest;
TGroupBox *gbCOM;
TMemo *mCOMRx;
TLabel *lComRx;
TLabel *lComTx;
TButton *btnSend;
TButton *btnSendFile;
TGroupBox *GroupBox20;
TButton *btnRTClear;
TEdit *edFileSend;
TListView *lvCOMVars;
TButton *btnAddVars;
TButton *btnEditVars;
TButton *btnDelVars;
TButton *btnSaveVars;
TGroupBox *GroupBox18;
TRadioButton *rbMultiVars;
TRadioButton *rbMemMap;
TCheckBox *cbRcvBinary;
TRadioButton *rbManualSend;
TRadioButton *rbTimedSend;
TButton *btnGetFile;
TCheckBox *cbMaster;
TEdit *edTimer;
TLabel *lTimer;
TCheckBox *cbInterLoop;
TLabel *Label27;
TComboBox *COMList;
TLabel *Label28;
TComboBox *cbBaudRate;
TLabel *Label29;
TCheckBox *cbSendBinary;
TLabel *Label30;
TComboBox *cbDataBits;
TComboBox *cbStopBits;
TLabel *Label31;
TComboBox *cbVerify;
TLabel *Label32;
TComboBox *cbFlowControl;
TLabel *Label33;
TLabel *Label34;
TGroupBox *gbMemMap;
TCheckBox *cbMemFixLength;
TEdit *edMemFixLength;
TLabeledEdit *leMemStart;
TValueListEditor *vleInteractive;
TCheckListBox *clbInteractive;
TTimer *Timer1;
TCheckBox *cbVarFixLength;
TLabeledEdit *leMemHead;
TLabeledEdit *leMemEnd;
TLabeledEdit *leVarSplit;
TLabel *lMemHH;
TPopupMenu *PopupMenu1;
TLabel *lMemTH;
TButton *btnVarApply;
TButton *btnVarHelp;
TButton *btnOpenPort;
TCheckBox *cbStopFresh;
TGroupBox *GroupBox19;
TRadioButton *rbHBCRCCCITT;
TRadioButton *rbHBCRC32;
TRadioButton *rbHBCRC16;
TCheckBox *cbHBCRCAppend;
TCheckBox *cbHBCRCLSB;
TEdit *edHBCRC;
TLabel *Label35;
TButton *btnCRC;
TButton *btnLEDDelete;
TButton *btnLEDSave;
TValueListEditor *vlLEDPatterns;
TCheckBox *cbLEDReverse;
TStatusBar *StatusBar1;
TMemo *mDataSend;
TSpeedButton *sbRxFlush;
TRadioButton *rbDataNormal;
TSpeedButton *sbRcvReset;
TSpeedButton *sbTxFlush;
TSpeedButton *sbSndReset;
TSpeedButton *sbStopSend;
TTabSheet *tsSerialMon;
TGroupBox *GroupBox21;
TCheckBox *cbMonShowHex;
TSpeedButton *sbClearMon;
TCheckListBox *clbSerialList;
TButton *btnStartSerMon;
TLabel *Label13;
TCheckBox *cbLogReads;
TCheckBox *cbLogWrites;
TCheckBox *cbDataOnly;
TEdit *edMonExclude;
TEdit *edMonInclude;
TLabel *Label12;
TLabel *Label36;
TButton *btnMonSave;
TCheckBox *cbLogToFile;
TEdit *edLogFile;
TButton *btnLogFile;
TButton *btnFilterApply;
TCheckListBox *clbParallelList;
TLabel *Label37;
TEdit *edMaxBytes;
TLabel *lMonMaxBytes;
TCheckBox *cbMonShowClock;
TButton *btnMaxBytes;
TCheckBox *cbMonAutoScroll;
TEdit *edMaxLines;
TLabel *Label39;
TListView *lvMonData;
TCheckBox *cbStartMoniter;
TButton *btnMaxLines;
TButton *btnMonSaveAs;
TCheckBox *cbMonShowIRP;
TCheckBox *cbMonShowResult;
TCheckBox *cbCOMAutoScroll;
TGroupBox *GroupBox22;
TRadioButton *rbNoModem;
TRadioButton *rbM2Modem;
TRadioButton *rbDial;
TLabel *lModemInit;
TEdit *edModemInit;
TCheckBox *cbMasterModem;
TButton *btnModem;
TCheckBox *cbInteractive;
TTimer *Timer2;
TSpeedButton *sbInterAdd;
TSpeedButton *sbInterEdit;
TSpeedButton *sbInterDel;
TSpeedButton *sbInterSave;
TCheckBox *cbInterClear;
TLabel *Label10;
TEdit *edRDTimeout;
TEdit *edWRTimeout;
TLabel *Label38;
TLabel *Label40;
TEdit *edRDDispMax;
TCheckBox *cbAutoSave;
TButton *btnReadMap;
TStaticText *stA;
TStaticText *stB;
TStaticText *stE;
TStaticText *stG;
TStaticText *stD;
TStaticText *stC;
TStaticText *stF;
TStaticText *stJ;
TStaticText *stM;
TStaticText *stH;
TStaticText *stK;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -