Files
AC_Pro/MultiSwitchProgFormUnit.h
2026-06-13 00:05:19 +08:00

106 lines
2.7 KiB
C++

//---------------------------------------------------------------------------
#ifndef MultiSwitchProgFormUnitH
#define MultiSwitchProgFormUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>
#include "ProgHandlePanel.h"
#include "PNGButton.hpp"
#include "GeneralDialogPanel.h"
#include "GlobalUnit.h"
#include "StyleItem.h"
#include "ListPanel.h"
#include "Instruments.h"
#include "TextButton.h"
//---------------------------------------------------------------------------
class ProgListData : public TObject
{
public:
int Prog;
int Channel;
int ProgBak;
String Caption;
TList *List;
__fastcall ProgListData(String Cap, int pr, int ch) {
Caption = Cap;
Prog = pr;
ProgBak = pr;
Channel = ch;
List = new TList();
}
__fastcall ~ProgListData(){
if(List) {
List->Clear();
delete List;
List = NULL;
}
}
};
//---------------------------------------------------------------------------
class ProgItemData : public TObject
{
public:
String Caption;
TCommonItem *Item;
__fastcall ProgItemData(String Cap, TCommonItem *it) {
Caption = Cap;
Item = it;
}
};
//---------------------------------------------------------------------------
class TMultiSwitchProgForm : public TForm
{
__published: // IDE-managed Components
TGeneralDialogPanel *GeneralDialogPanel;
TTextButton *mResetButton;
TTextButton *mCancelButton;
TTextButton *mOKButton;
TLabel *m_lbCurProg;
TShape *m_ShapeCur;
TLabel *m_lbType;
TShape *m_ShapType;
TLabel *m_lbProg;
TShape *m_ShapeProg;
void __fastcall DoReset(TObject *Sender);
void __fastcall DoOkClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
private: // User declarations
TProgHandlePanel *mProgListPanel;
TListPanel *mInsTypePanel;
TListPanel *mInsPanel;
TProgHandleItem *mCurrentItem;
TList *mData;
TCommonItem *m_pItem;
ProgListData *CheckData( char chan, char prog );
void __fastcall InitProgListPanel();
void __fastcall InitInsTypePanel();
void __fastcall InitInsPanel();
void __fastcall DoProListSelect(TObject *Sender);
void __fastcall DoInsTypeClick(TListPanel *Sender, int Index);
void __fastcall DoInsClick(TListPanel *Sender, int Index);
public: // User declarations
TList *ItemChange;
__fastcall TMultiSwitchProgForm(TComponent* Owner, TCommonItem *pItem);
__fastcall ~TMultiSwitchProgForm();
};
//---------------------------------------------------------------------------
extern PACKAGE TMultiSwitchProgForm *MultiSwitchProgForm;
//---------------------------------------------------------------------------
#endif