unit NewAccount;

interface

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

type
  TfmNewAccount = class(TfrmDockable)
    frameButtons1: TframeButtons;
    txtPassword: TTntEdit;
    Label10: TLabel;
    Label3: TLabel;
    txtUserName: TTntEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    txtNick: TTntEdit;
    txtName: TTntEdit;
    txtCompany: TTntEdit;
    txtmail: TTntEdit;
    procedure frameButtons1btnOKClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmNewAccount: TfmNewAccount;

implementation

uses RiserWindow, Jabber1;

{$R *.dfm}

procedure TfmNewAccount.frameButtons1btnOKClick(Sender: TObject);
var
  errmsg: string;
begin
  errmsg := '';
  if txtUserName.Text = '' then errmsg := errmsg + '  用户名' + #13 + #10;
  if txtPassword.Text = '' then errmsg := errmsg + '  密码' + #13 + #10;
  if txtNick.Text = '' then errmsg := errmsg + '  昵称' + #13 + #10;
  if txtName.Text = '' then errmsg := errmsg + '  姓名' + #13 + #10;
  if txtCompany.Text = '' then errmsg := errmsg + '  企业' + #13 + #10;
  if txtmail.Text = '' then errmsg := errmsg + '  e-mail' + #13 + #10;
  if errmsg <> '' then
  begin
    errmsg := '请输入下列项目的内容:' + #13 + #10 + errmsg;
    ShowRiserWindow(nil, errmsg, ico_info);
    //messagebox(Handle, pchar(errmsg), '错误', MB_OK or MB_ICONERROR);
    exit;
  end;
  ModalResult := mrOk;
end;

end.
