//--------------------------------------------------------------------------- #ifndef MultiSwitchProgFormUnitH #define MultiSwitchProgFormUnitH //--------------------------------------------------------------------------- #include #include #include #include #include #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