📄 unit20.h
字号:
//---------------------------------------------------------------------------
#ifndef Unit20H
#define Unit20H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include <ToolWin.hpp>
#include <Dialogs.hpp>
#include <printers.hpp>
#include <Menus.hpp>
#include "ThreadE.h"
#include <Grids.hpp>
#include <graphics.hpp>
//---------------------------------------------------------------------------
typedef struct
{
char Name[20]; //名称
char Num[20]; //编号
float Abs; //吸光度
float C1; //浓度
float C; //标准浓度
int TasCount; //测量次数
SYSTEMTIME Time; //日期时间
char BeiZhu[50]; //备注
bool bValid; //数据段是否有效
}XGDPARA;
//---------------------------------------------------------------------------
class TFormXGD : public TForm
{
__published: // IDE-managed Components
TImage *Image1;
TGroupBox *GroupBox1;
TLabel *Label7;
TLabel *Label5;
TLabel *Label6;
TLabel *labelCurBC;
TLabel *labelXGD;
TLabel *labelND;
TTimer *Timer1;
TSaveDialog *SaveDialog1;
TOpenDialog *OpenDialog1;
TPopupMenu *PopupMenu1;
TMenuItem *N1;
TMenuItem *N2;
TMenuItem *N3;
TImage *imgPutu;
TGroupBox *GroupBox2;
TLabel *Label2;
TLabel *Label4;
TLabel *lbWx;
TLabel *lbVal;
TImage *IMTemp;
TStatusBar *StatusBar1;
TStringGrid *StringGrid1;
TCoolBar *CoolBar1;
TToolBar *ToolBar1;
TToolButton *tbNew;
TToolButton *tbOpen;
TToolButton *tbSave;
TToolButton *tbPrint;
TToolBar *ToolBar2;
TToolButton *btnGotoWn;
TToolButton *btnStop;
TToolButton *btnAddItem;
TToolButton *btnDel;
TToolButton *btnCeLiang;
TToolButton *btnReturn;
TToolButton *ToolButton7;
TToolButton *ToolButton8;
TToolButton *btnBuildStd;
TGroupBox *gbND_XGD;
TLabel *lbC;
TLabel *labelC_A;
TLabel *lbR;
TLabel *labelR;
TToolButton *ToolButton1;
TPopupMenu *PopupMenu2;
TMenuItem *N4;
void __fastcall FormCreate(TObject *Sender);
void __fastcall btnReturnClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall btnCeLiangClick(TObject *Sender);
void __fastcall Timer1Timer(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall N1Click(TObject *Sender);
void __fastcall N2Click(TObject *Sender);
void __fastcall N3Click(TObject *Sender);
void __fastcall PopupMenu1Popup(TObject *Sender);
void __fastcall imgPutuMouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall imgPutuMouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall imgPutuMouseMove(TObject *Sender,
TShiftState Shift, int X, int Y);
void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift);
void __fastcall FormActivate(TObject *Sender);
void __fastcall btnGotoWnClick(TObject *Sender);
void __fastcall btnStopClick(TObject *Sender);
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
void __fastcall StringGrid1DrawCell(TObject *Sender, int ACol,
int ARow, TRect &Rect, TGridDrawState State);
void __fastcall StringGrid1SelectCell(TObject *Sender, int ACol,
int ARow, bool &CanSelect);
void __fastcall StringGrid1SetEditText(TObject *Sender, int ACol,
int ARow, const AnsiString Value);
void __fastcall StringGrid1DblClick(TObject *Sender);
void __fastcall btnAddItemClick(TObject *Sender);
void __fastcall btnDelClick(TObject *Sender);
void __fastcall btnBuildStdClick(TObject *Sender);
void __fastcall tbSaveClick(TObject *Sender);
void __fastcall tbOpenClick(TObject *Sender);
void __fastcall tbNewClick(TObject *Sender);
void __fastcall tbPrintClick(TObject *Sender);
void __fastcall ToolButton1Click(TObject *Sender);
private: // User declarations
//void DrawBK(void);
void DrawQX(void);
void DrawPutuBK(void);
void DrawPutuQX(void);
void EnableMenuItems(void);//使主菜单和按纽有效
void DisableMenuItems(void);//使主菜单和按纽无效
void UpdatePara(void);
void GetPara(void);
bool NewItem(void);
bool CheckForNewItem(void);
bool CalcStdQX(float pdx[], float pdy[], int n,
float *a, float *b, float *c
);
void InitPara(void);
bool CheckAmended(void);
bool BuildStd(void);
void SetNDUnit(int index);
void FNFloatToStr(char *gs, int j1, int j2, float val);
int SaveNDFile(AnsiString strFName);
int LoadNDFile(AnsiString strFName);
int DoSave(void);
void PrintPara(TPrinter *pPrinter, TCanvas *Canvas,
int left, int right, int top, int bottom,
bool bPrnStd, bool bPrnData);
void DeleteThread1();
void CreatThread1();
ThreadE *Thread1;
void GetData(void);
void GetDataPutu(int wi);
//bool uvcfile_load();
//bool uvcfile_save();
int Left,Right,Top,Bottom;
float XL,XH,YL,YH;
float fLeft,fRight,fTop,fPutuHeight,fPutuWidth;
int iLeft,iRight,iTop,iPutuHeight,iPutuWidth;
float fPageWidth,fPageHeight;
int m_Wx00, m_Wx11, m_Wy00, m_Wy11;
int m_Wx0, m_Wx1, m_Wy0, m_Wy1;
bool m_bReadData;
int m_Rdi;
int m_RX, m_RY;
TRect RDRect,RSRect;
// bool m_bMouseLeftDown;
bool m_bRunFirst;
int m_SelectRow;
int m_VER; //版本
int m_XGDJD, m_NDJD; //吸光度、浓度精度
float m_UnitK;
float m_WntoGo;
bool m_bStop;
bool m_CanCloseed;
bool m_bFirstActive;
bool m_bAmend; //内容已修改
XGDPARA *m_pXGDParas;
int m_MaxParaCount;
int m_StdParaCount; //标准样品个数
int m_AllParaCount; //所有测量次数
bool m_bStdCompl; //标准样品已建立
int m_CurNDUnit; //当前浓度单位 =0 ug/ml =1 ng/ml =2 pg/ml
int Wx00, Wx11, Wy00, Wy11;
int Wx0, Wx1, Wy0, Wy1;
float m_StdX[2], m_StdY[2];
public: // User declarations
bool bshowsapoint,bshowexpoint,bshowworkline;
int worktype;
void DrawBK(void);
void hg(float *a,float *b,float *c);
void hg1(float *a,float *b,float *c);
float calca[21][2];
int calcs;
float Ra,Rb,Rc;
bool bCeLiang;
void manudraw();
void standardwork();
float exampleabs,examplechroma;
void GotoWn();
void CommonDrawBK(TCanvas *Canvas,
int left, int right, int top, int bottom,
float xl, float xh, float yl, float yh,
int &PWx00, int &PWx11, int &PWy00, int &PWy11,
int &PWx0, int &PWx1, int &PWy0, int &PWy1);
void CommonDrawQX(TCanvas *Canvas,
float xl, float xh, float yl, float yh,
//float dxl, float dxh, float dyl, dyh,
float pdx[], float pdy[], int n,
int Wx00, int Wx11, int Wy00, int Wy11,
int Wx0, int Wx1, int Wy0, int Wy1,
TColor color, bool bLine);
void CommonDrawPoint(TCanvas *Canvas,
float xl, float xh, float yl, float yh,
//float dxl, float dxh, float dyl, dyh,
float dx, float dy, int number,
int Wx00, int Wx11, int Wy00, int Wy11,
int Wx0, int Wx1, int Wy0, int Wy1,
TColor color, bool bShowNumber);
void DrawWorkQX(void);
void CursorAt(UINT x,UINT y);
void ButtonD(UINT button);
void ButtonU(UINT button);
void MouseClikAt(UINT x,UINT y);
void SelectGridCell(TStringGrid *sgrid, int Col, int Row);
__fastcall TFormXGD(TComponent* Owner);
__fastcall ~TFormXGD();
};
//---------------------------------------------------------------------------
extern PACKAGE TFormXGD *FormXGD;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -