58 lines
921 B
ObjectPascal
58 lines
921 B
ObjectPascal
unit main;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, base64;
|
|
|
|
type
|
|
|
|
{ TMainForm }
|
|
|
|
TMainForm = class(TForm)
|
|
DecodeButton: TButton;
|
|
EncodeButton: TButton;
|
|
InputLabel: TLabel;
|
|
OutputLabel: TLabel;
|
|
InputMemo: TMemo;
|
|
OutputMemo: TMemo;
|
|
UISplitter: TSplitter;
|
|
procedure DecodeButtonClick(Sender: TObject);
|
|
procedure EncodeButtonClick(Sender: TObject);
|
|
procedure FormCreate(Sender: TObject);
|
|
private
|
|
|
|
public
|
|
|
|
end;
|
|
|
|
var
|
|
MainForm: TMainForm;
|
|
|
|
implementation
|
|
|
|
{$R *.lfm}
|
|
|
|
{ TMainForm }
|
|
|
|
procedure TMainForm.FormCreate(Sender: TObject);
|
|
begin
|
|
|
|
end;
|
|
|
|
procedure TMainForm.EncodeButtonClick(Sender: TObject);
|
|
begin
|
|
OutputMemo.Text:= EncodeStringBase64(InputMemo.Text);
|
|
|
|
end;
|
|
|
|
procedure TMainForm.DecodeButtonClick(Sender: TObject);
|
|
begin
|
|
OutputMemo.Text:= DecodeStringBase64(InputMemo.Text);
|
|
end;
|
|
|
|
end.
|
|
|