Advertisement
Guest User

Untitled

a guest
Apr 7th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. unit Unit5;
  2.  
  3. interface
  4.  
  5. uses
  6. Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  7. Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
  8.  
  9. type
  10. TFrmSignUp = class(TForm)
  11. Label1: TLabel;
  12. Label2: TLabel;
  13. Label3: TLabel;
  14. BtnSignUp: TButton;
  15. EdtUsername: TEdit;
  16. EdtPassword: TEdit;
  17. EdtPassword2: TEdit;
  18. procedure BtnSignUpClick(Sender: TObject);
  19. private
  20. { Private declarations }
  21. public
  22. { Public declarations }
  23. UserFile : textfile;
  24. TextString : string;
  25. end;
  26.  
  27. var
  28. FrmSignUp: TFrmSignUp;
  29.  
  30. implementation
  31.  
  32. {$R *.dfm}
  33.  
  34. procedure TFrmSignUp.BtnSignUpClick(Sender: TObject);
  35. var Usr,Pss,pss2 : string;
  36. begin
  37.  
  38. Usr := edtusername.Text;
  39. Pss := edtPassword.Text;
  40. Pss2 := edtPassword2.Text;
  41. if (Pss = Pss2) then
  42. begin
  43. Assignfile (userfile, 'LoginDetails.txt');
  44. Append(userfile);
  45. Writeln(userfile,Usr);
  46. Writeln(userfile,Pss);
  47. CloseFile(UserFile);
  48. showmessage ('success');
  49. close;
  50. end
  51. else
  52. begin
  53. ShowMessage('Sign up unsucessful, Please try again');
  54. end;
  55. end;
  56. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement