//--------------------------------------------------------------------------- #ifndef ProgressFormUnitH #define ProgressFormUnitH //--------------------------------------------------------------------------- #include #include #include #include #include #include #include "PNGButton.hpp" #include "GlobalUnit.h" #include #include "GeneralDialogPanel.h" //--------------------------------------------------------------------------- class TProgressForm : public TForm { __published: // IDE-managed Components TPaintBox *m_pbProgress; TGeneralDialogPanel *m_DialogPanel; TPanel *m_panelProgress; void __fastcall ProgressPaint(TObject *Sender); void __fastcall FormCreate(TObject *Sender); void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift); void __fastcall OnCanceled(TObject *Sender); void __fastcall FormClose(TObject *Sender, TCloseAction &Action); private: // User declarations TBitmap *m_bmpTileLeft, *m_bmpTileRight; TThread *m_pThread; TTimer *m_pTimer; int m_nTileWidth, m_nTileHeight, m_nMaxPos, m_nPos, m_iOperation, m_iOperationResult; TCHAR m_strParam1[256]; char m_strBuff[256]; void* m_pParam1, *m_pParam2; int m_nNextMinPos, m_nNextMaxPos; UINT m_nParam1, m_nParam2; double m_dblParam1, m_dblParam2; int *m_pIntParam1, *m_pIntParam2; //SaveMediaרÓà UINT m_nParam3, m_nParam4; TThread *m_pConfirmThread; int m_iSaveState, m_iConfirmResult, m_iFileHandle; void __fastcall TimerProc(TObject* Sender); void StartConfirm(); void Canceled(); MESSAGE void __fastcall UMOperateFailed(TMessage &Message); MESSAGE void __fastcall UMOperatePercent(TMessage &Message); MESSAGE void __fastcall UMOperateComplete(TMessage &Message); MESSAGE void __fastcall UMOperateNextRange(TMessage &Message); MESSAGE void __fastcall UMRecordComplete(TMessage &Message); MESSAGE void __fastcall UMPaymentConfirmed(TMessage &Message); BEGIN_MESSAGE_MAP void __fastcall TimerProc(TObject* Sender); MESSAGE_HANDLER(MSG_OPERATE_FAILED, TMessage, UMOperateFailed) MESSAGE_HANDLER(MSG_OPERATE_PERCENT, TMessage, UMOperatePercent) MESSAGE_HANDLER(MSG_OPERATE_COMPLETE, TMessage, UMOperateComplete) MESSAGE_HANDLER(MSG_OPERATE_NEXTRANGE, TMessage, UMOperateNextRange) MESSAGE_HANDLER(MSG_RECORD_COMPLETE, TMessage, UMRecordComplete) MESSAGE_HANDLER(MSG_PAYMENTCONFIRMED, TMessage, UMPaymentConfirmed) END_MESSAGE_MAP(TForm) public: // User declarations TMessage m_MsgTransparent; __fastcall TProgressForm(TComponent* Owner); __fastcall ~TProgressForm(); int __fastcall MM_SaveMedia( int iSaveType, int iFileType, LPCTSTR strFileName, int iOp, int nIdCount, UINT aIdStyle[] ); // int __fastcall MM_Save( int iSaveType, LPCTSTR strFileName, int iFileType ); int __fastcall MM_Load( LPCTSTR strFileName, int iFileType ); int __fastcall MM_AudioFxApply( double dblBegin, double dblEnd ); int __fastcall Project_Save( LPCTSTR strFileName ); int __fastcall Project_Load( LPCTSTR strFileName ); int __fastcall User_Register( int isEmailOrMobile ); int __fastcall User_Login(); int __fastcall User_CheckPayment( int iOperation, int nIdCount, UINT aIdStyle[], int aStyleCost[], int* pCost, int* pBalance ); int __fastcall User_ConfirmPayment( int iOperation, int nIdCount, UINT aIdStyle[], int* pUserBalance ); int __fastcall User_SubmitQuestin( LPCSTR strQuestion ); int __fastcall User_StyleScore( UINT idStyle, int iType, int* pScrUser, int* pScrAverage );//add by laq int __fastcall User_UploadSong( LPCTSTR strFileName, TSHAREINFO* pShareInfo ); int __fastcall User_StyleUpload( int iType, int nDataSize, char* pData ); void __fastcall Operation(); void __fastcall SetOperationResult( int iRes ) { m_iOperationResult=iRes; }; int __fastcall GetOpertaionResult() { return m_iOperationResult; }; }; //--------------------------------------------------------------------------- extern PACKAGE TProgressForm *ProgressForm; //--------------------------------------------------------------------------- #endif