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

📄 createfrm.pas

📁 这是一套全面的网络组件
💻 PAS
字号:
unit createfrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TCreateCertForm = class(TForm)
    btnOK: TButton;
    btnCancel: TButton;
    Label3: TLabel;
    edtStoreName: TEdit;
    Label1: TLabel;
    edtCN: TEdit;
    Label2: TLabel;
    Label4: TLabel;
    edtSerial: TEdit;
    edtValidFrom: TEdit;
    edtValidTo: TEdit;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    edtO: TEdit;
    edtOU: TEdit;
    edtL: TEdit;
    edtC: TEdit;
    edtE: TEdit;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    function BuildSubjectString: string;
  end;

implementation

{$R *.dfm}

function TCreateCertForm.BuildSubjectString: string;
begin
  Result := '';
  if (edtCN.Text <> '') then
  begin
    Result := Result + ',CN=' + edtCN.Text;
  end;
  if (edtOU.Text <> '') then
  begin
    Result := Result + ',OU=' + edtOU.Text;
  end;
  if (edtO.Text <> '') then
  begin
    Result := Result + ',O=' + edtO.Text;
  end;
  if (edtL.Text <> '') then
  begin
    Result := Result + ',L=' + edtL.Text;
  end;
  if (edtC.Text <> '') then
  begin
    Result := Result + ',C=' + edtC.Text;
  end;
  if (edtE.Text <> '') then
  begin
    Result := Result + ',E=' + edtE.Text;
  end;
  if (Result <> '') then
  begin
    Delete(Result, 1, 1);
  end;
end;

procedure TCreateCertForm.FormCreate(Sender: TObject);
begin
  edtValidFrom.Text := DateToStr(Date());
  edtValidTo.Text := DateToStr(Date() + 365);
end;

end.

⌨️ 快捷键说明

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