-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathxCodeMain.pas
47 lines (37 loc) · 856 Bytes
/
xCodeMain.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
unit xCodeMain;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, System.Actions, Vcl.ActnList, Vcl.StdActns,
Vcl.StdCtrls;
type
TfrmXifyCode = class(TForm)
lblKudos: TLabel;
inpCode: TMemo;
ActionList: TActionList;
EditPaste: TEditPaste;
procedure EditPasteExecute(Sender: TObject);
private
public
end;
var
frmXifyCode: TfrmXifyCode;
implementation
uses
System.Character,
Vcl.Clipbrd;
{$R *.dfm}
function XIt(const s: string): string;
var
i: integer;
begin
Result := s;
for i := 1 to Length(Result) do
if Result[i].IsLetter or Result[i].IsNumber then
Result[i] := 'X';
end;
procedure TfrmXifyCode.EditPasteExecute(Sender: TObject);
begin
inpCode.Text := XIt(Clipboard.AsText);
end;
end.