tenginethread.h

来自「把html转成txt 把html转成txt」· C头文件 代码 · 共 38 行

H
38
字号
//---------------------------------------------------------------------------
#ifndef TEngineThreadH
#define TEngineThreadH
//---------------------------------------------------------------------------
#include <Classes.hpp>
//---------------------------------------------------------------------------

typedef void __fastcall (__closure *TThreadProgressEvent)(System::TObject *Sender,
  int percent);

class TEngineThread : public TThread
{
private:
  bool error;
  std::string errorMessage;

  Document document;
  TThreadProgressEvent onProgress;
  TNotifyEvent onFinished;
  long fileSize;
  int percentage;

  void __fastcall UpdateProgress(void);
  void __fastcall Finished(void);


protected:
    void __fastcall Execute();
public:
    __fastcall TEngineThread(bool CreateSuspended, const Document &newDocument);
    void SetOnProgress(const TThreadProgressEvent newOnProgress);
    void SetOnFinished(const TNotifyEvent newOnFinished);
    bool GetError(void);
    std::string GetErrorMessage(void);
};
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?