encform.h

来自「著名的SecureBlackBox控件完整源码」· C头文件 代码 · 共 110 行

H
110
字号
//---------------------------------------------------------------------------

#ifndef EncFormH
#define EncFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>

#include "SBXMLDefs.hpp"
#include "SBXMLSec.hpp"
//---------------------------------------------------------------------------

//#define SBB_EXCL_XML_PGP

class TfrmEnc : public TForm
{
__published:	// IDE-managed Components
        TGroupBox *gbGeneralEnc;
        TLabel *lbEncryptionMethod;
        TLabel *lbEncryptedDataType;
        TLabel *lbMimeType;
        TLabel *lbExternalFile;
        TSpeedButton *sbExternalFile;
        TComboBox *cmbEncryptionMethod;
        TCheckBox *cbEncryptKey;
        TComboBox *cmbEncryptedDataType;
        TEdit *edMimeType;
        TEdit *edExternalFile;
        TButton *btnOK;
        TButton *btnCancel;
        TGroupBox *gbKeyInfo;
        TLabel *lbKeyName;
        TSpeedButton *sbKeyFile;
        TLabel *lbPassphrase;
        TLabel *lbKeyFile;
        TEdit *edKeyName;
        TEdit *edKeyFile;
        TEdit *edPassphrase;
        TGroupBox *gbKEK;
        TLabel *lbKeyTransport;
        TLabel *lbKeyWrap;
        TRadioGroup *rgKEK;
        TComboBox *cmbKeyTransport;
        TComboBox *cmbKeyWrap;
        TOpenDialog *dlgOpen;
        TSaveDialog *dlgSave;
        void __fastcall cbEncryptKeyClick(TObject *Sender);
        void __fastcall cmbEncryptedDataTypeClick(TObject *Sender);
        void __fastcall FormShow(TObject *Sender);
        void __fastcall gbKEKClick(TObject *Sender);
        void __fastcall sbExternalFileClick(TObject *Sender);
        void __fastcall sbKeyFileClick(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
private:	// User declarations
        bool FLockOpt;

        AnsiString GetExternalFile(void);
        void SetExternalFile(const AnsiString Value);
        AnsiString GetMimeType(void);
        void SetMimeType(const AnsiString Value);
        AnsiString GetKeyFile(void);
        void SetKeyFile(const AnsiString Value);
        AnsiString GetPassphrase(void);
        void SetPassphrase(const AnsiString Value);
        TElXMLEncryptedDataType GetEncryptedDataType(void);
        void SetEncryptedDataType(const TElXMLEncryptedDataType Value);
        AnsiString GetKeyName(void);
        void SetKeyName(const AnsiString Value);
        TElXMLKeyWrapMethod GetKeyWrapMethod(void);
        void SetKeyWrapMethod(const TElXMLKeyWrapMethod Value);
        TElXMLKeyTransportMethod GetKeyTransportMethod(void);
        void SetKeyTransportMethod(const TElXMLKeyTransportMethod Value);
        TElXMLKeyEncryptionType GetKeyEncryptionType(void);
        void SetKeyEncryptionType(const TElXMLKeyEncryptionType Value);
        bool GetEncryptKey(void);
        void SetEncryptKey(const bool Value);
        TElXMLEncryptionMethod GetEncryptionMethod(void);
        void SetEncryptionMethod(const TElXMLEncryptionMethod Value);
public:		// User declarations
        __fastcall TfrmEnc(TComponent* Owner);

        void UpdateOpt(void);

        __property TElXMLEncryptedDataType EncryptedDataType = {read = GetEncryptedDataType, write = SetEncryptedDataType};
        __property TElXMLEncryptionMethod EncryptionMethod = {read = GetEncryptionMethod, write = SetEncryptionMethod};
        __property bool EncryptKey = {read = GetEncryptKey, write = SetEncryptKey};
        __property TElXMLKeyEncryptionType KeyEncryptionType = {read = GetKeyEncryptionType, write = SetKeyEncryptionType};
        __property TElXMLKeyTransportMethod KeyTransportMethod = {read = GetKeyTransportMethod, write = SetKeyTransportMethod};
        __property TElXMLKeyWrapMethod KeyWrapMethod = {read = GetKeyWrapMethod, write = SetKeyWrapMethod};

        __property AnsiString MimeType = {read = GetMimeType, write = SetMimeType};
        __property AnsiString ExternalFile = {read = GetExternalFile, write = SetExternalFile};

        __property AnsiString KeyName = {read = GetKeyName, write = SetKeyName};
        __property AnsiString KeyFile = {read = GetKeyFile, write = SetKeyFile};
        __property AnsiString Passphrase = {read = GetPassphrase, write = SetPassphrase};

        __property bool LockOpt = {read = FLockOpt, write = FLockOpt};

};
//---------------------------------------------------------------------------
extern PACKAGE TfrmEnc *frmEnc;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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