⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainform.h

📁 著名的SecureBlackBox控件完整源码
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef MainFormH
#define MainFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "SBPGPKeys.hpp"
#include <ActnList.hpp>
#include <ComCtrls.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <Menus.hpp>
#include <ToolWin.hpp>

#include "Keyring.h"
#include "Wizard.h"
#include "ImportKeyForm.h"
#include "Keys.h"
#include "PassphraseRequestForm.h"
#include "AboutForm.h"

//---------------------------------------------------------------------------
class TfrmKeys : public TForm
{
__published:	// IDE-managed Components
        TToolBar *tbrMain;
        TToolBar *ToolBar1;
        TToolButton *tbNewKeyring;
        TToolButton *tbDelim1;
        TToolButton *tbLoadKeyring;
        TToolButton *tbSaveKeyring;
        TToolButton *tbDelim2;
        TToolButton *tbGenerate;
        TToolButton *tbDelim3;
        TToolButton *tbAddKey;
        TToolButton *tbRemoveKey;
        TToolButton *tbExportKey;
        TToolButton *tbDelim4;
        TToolButton *tbSign;
        TToolButton *tbRevoke;
        TStatusBar *sbrMain;
        TTreeView *tvKeyring;
        TPanel *pInfo;
        TPanel *pKeyInfo;
        TLabel *lbKeyAlgorithm;
        TLabel *lbKeyID;
        TLabel *lbKeyFP;
        TLabel *lbTimeStamp;
        TLabel *lbExpires;
        TLabel *lbTrust;
        TPanel *pSigInfo;
        TLabel *lbSigType;
        TLabel *lbSigner;
        TLabel *lbSigCreated;
        TLabel *lbValidity;
        TPanel *pUserInfo;
        TLabel *lbUserName;
        TImage *picUser;
        TMainMenu *mnuMain;
        TMenuItem *mniFile;
        TMenuItem *mniNewKeyring;
        TMenuItem *mniOpenKeyring;
        TMenuItem *mniSaveKeyring;
        TMenuItem *N1;
        TMenuItem *mniExit;
        TMenuItem *mniHelp;
        TMenuItem *mniAbout;
        TActionList *aclMain;
        TAction *actNewKeyring;
        TAction *actOpenKeyring;
        TAction *actSaveKeyring;
        TAction *actExit;
        TAction *actGenerateKey;
        TAction *actAddKey;
        TAction *actRemoveKey;
        TAction *actExportKey;
        TAction *actSign;
        TAction *actRevoke;
        TAction *actAbout;
        TElPGPKeyring *pgpKeyring;
        TPopupMenu *mnuKeys;
        TMenuItem *NewKey2;
        TMenuItem *DeleteKey2;
        TMenuItem *N3;
        TMenuItem *Sign2;
        TMenuItem *Revoke1;
        TImageList *imgToolbar;
        TImageList *imgTreeView;
        TOpenDialog *OpenDlg;
        TSaveDialog *SaveDlg;
        void __fastcall actNewKeyringExecute(TObject *Sender);
        void __fastcall actOpenKeyringExecute(TObject *Sender);
        void __fastcall actSaveKeyringExecute(TObject *Sender);
        void __fastcall actExitExecute(TObject *Sender);
        void __fastcall actGenerateKeyExecute(TObject *Sender);
        void __fastcall actAddKeyExecute(TObject *Sender);
        void __fastcall actRemoveKeyUpdate(TObject *Sender);
        void __fastcall actRemoveKeyExecute(TObject *Sender);
        void __fastcall actExportKeyExecute(TObject *Sender);
        void __fastcall actSignUpdate(TObject *Sender);
        void __fastcall actSignExecute(TObject *Sender);
        void __fastcall actRevokeExecute(TObject *Sender);
        void __fastcall tvKeyringChange(TObject *Sender, TTreeNode *Node);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall actAboutExecute(TObject *Sender);
private:	// User declarations
        AnsiString FPubKeyringFileName;
        AnsiString FSecKeyringFileName;

        TElPGPSignature* SignUser(TElPGPCustomUser* user, TElPGPCustomPublicKey* userKey, TElPGPSecretKey* signingKey);
        TElPGPSignature* RevokeUser(TElPGPCustomUser* user, TElPGPCustomPublicKey* userKey, TElPGPSecretKey* signingKey);

        AnsiString RequestPassphrase(TElPGPPublicKey* Key);

        void SetStatus(AnsiString s);

        void DrawPublicKeyProps(TElPGPCustomPublicKey* Key);
        void DrawUserIDProps(TElPGPUserID* user);
        void DrawUserAttrProps(TElPGPUserAttr* user);
        void DrawSignatureProps(TElPGPSignature* sig, TElPGPCustomUser* user, TElPGPCustomPublicKey* userKey); // overload;
        void DrawSignatureProps(TElPGPSignature* sig, TElPGPPublicSubkey* subkey, TElPGPCustomPublicKey* userKey); // overload;

        void HideAllInfoPanels(void);
        void EnableView(TPanel* p);
public:		// User declarations
        __fastcall TfrmKeys(TComponent* Owner);

        __property AnsiString PubKeyringFileName = {read = FPubKeyringFileName, write = FPubKeyringFileName};
        __property AnsiString SecKeyringFileName = {read = FSecKeyringFileName, write = FSecKeyringFileName};
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmKeys *frmKeys;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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