📄 sendunit.pas
字号:
procedure TDform.FormActivate(Sender: TObject);
begin
if mainform.OpenButton.Caption='读取' then
dform.Label1.Caption:='mainform01';
if mainform.OpenButton.Caption='打开' then
begin
combobox1.Enabled:=true;
dform.Label1.Caption:='mainform02';
edit1.Text:='';
end;
BitBtn1.Enabled:=true;
mainform.enabled:=false;
ComboBox1.Text:='';
DateTimePicker1Change(nil);
end;
procedure TDform.DateTimePicker1Change(Sender: TObject);
begin
Fdate:=DateTimePicker1.date;
DecodeDate(fdate,y,m,d);
if dform.Label1.Caption='mainform01' then
begin
dform.Edit1.Text:=mainform.nameLabel.Caption+'0'+typeform.Label4.Caption+combobox1.Text+inttostr(y)+inttostr(m)+inttostr(d)+'.rdx';
end else
begin
dform.Edit1.Text:=mainform.nameLabel.Caption+'0'+combobox1.Text+inttostr(y)+inttostr(m)+inttostr(d)+'.rdx';
end;
end;
procedure TDform.ComboBox1Change(Sender: TObject);
begin
DateTimePicker1Change(nil);
end;
procedure TDform.FormClose(Sender: TObject; var Action: TCloseAction);
begin
mainform.enabled:=true;
label3.Caption:='false';
screen.Cursor:=crdefault;
end;
procedure TDform.ComboBox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
showmessage('此框中的内容不可编辑!......');
ComboBox1.Text:='';
DateTimePicker1.SetFocus;
exit;
end;
procedure TDform.FormCreate(Sender: TObject);
var
i:integer;
begin
DateTimePicker1.date:=Date;
combobox1.Items.Clear;
for i:=0 to mainform.memo1.Lines.Count-1 do
begin
combobox1.Items.Add(mainform.memo1.Lines[i]);
combobox1.ImageIndex[i]:=0;
{==}
end;
ComboBox1.ItemIndex:=0;
end;
function TDform.makescreat(s:string) :string;
var
temp:string[100];
i:integer;
begin
for i:=0 to 100 do
begin
temp[i]:=' ';
end;
temp:=s;
Result:='';
for i:=0 to 100 do
begin
// if trim(temp[i])='' then exit;
if temp[i]='a' then Result:=Result+'y';
if temp[i]='b' then Result:=Result+'x';
if temp[i]='c' then Result:=Result+'a';
if temp[i]='d' then Result:=Result+'g';
if temp[i]='e' then Result:=Result+'i';
if temp[i]='f' then Result:=Result+'w';
if temp[i]='g' then Result:=Result+'h';
if temp[i]='h' then Result:=Result+'v';
if temp[i]='i' then Result:=Result+'d';
if temp[i]='j' then Result:=Result+'u';
if temp[i]='k' then Result:=Result+'t';
if temp[i]='l' then Result:=Result+'e';
if temp[i]='m' then Result:=Result+'f';
if temp[i]='n' then Result:=Result+'j';
if temp[i]='o' then Result:=Result+'q';
if temp[i]='p' then Result:=Result+'r';
if temp[i]='q' then Result:=Result+'s';
if temp[i]='r' then Result:=Result+'z';
if temp[i]='s' then Result:=Result+'l';
if temp[i]='t' then Result:=Result+'k';
if temp[i]='u' then Result:=Result+'m';
if temp[i]='v' then Result:=Result+'b';
if temp[i]='w' then Result:=Result+'n';
if temp[i]='x' then Result:=Result+'o';
if temp[i]='y' then Result:=Result+'c';
if temp[i]='z' then Result:=Result+'p';
if temp[i]='A' then Result:=Result+'Y';
if temp[i]='B' then Result:=Result+'X';
if temp[i]='C' then Result:=Result+'A';
if temp[i]='D' then Result:=Result+'G';
if temp[i]='E' then Result:=Result+'I';
if temp[i]='F' then Result:=Result+'W';
if temp[i]='G' then Result:=Result+'H';
if temp[i]='H' then Result:=Result+'V';
if temp[i]='I' then Result:=Result+'D';
if temp[i]='J' then Result:=Result+'U';
if temp[i]='K' then Result:=Result+'T';
if temp[i]='L' then Result:=Result+'E';
if temp[i]='M' then Result:=Result+'F';
if temp[i]='N' then Result:=Result+'J';
if temp[i]='O' then Result:=Result+'Q';
if temp[i]='P' then Result:=Result+'R';
if temp[i]='Q' then Result:=Result+'S';
if temp[i]='R' then Result:=Result+'Z';
if temp[i]='S' then Result:=Result+'L';
if temp[i]='T' then Result:=Result+'K';
if temp[i]='U' then Result:=Result+'M';
if temp[i]='V' then Result:=Result+'B';
if temp[i]='W' then Result:=Result+'N';
if temp[i]='X' then Result:=Result+'O';
if temp[i]='Y' then Result:=Result+'C';
if temp[i]='Z' then Result:=Result+'P';
if temp[i]='1' then Result:=Result+'2';
if temp[i]='2' then Result:=Result+'5';
if temp[i]='3' then Result:=Result+'6';
if temp[i]='4' then Result:=Result+'8';
if temp[i]='5' then Result:=Result+'9';
if temp[i]='6' then Result:=Result+'1';
if temp[i]='7' then Result:=Result+'3';
if temp[i]='8' then Result:=Result+'0';
if temp[i]='9' then Result:=Result+'7';
if temp[i]='0' then Result:=Result+'4';
if temp[i]='!' then Result:=Result+'!';
if temp[i]='@' then Result:=Result+'@';
if temp[i]='#' then Result:=Result+'#';
if temp[i]='%' then Result:=Result+'%';
if temp[i]='^' then Result:=Result+'^';
if temp[i]='&' then Result:=Result+'&';
if temp[i]='*' then Result:=Result+'*';
if temp[i]='(' then Result:=Result+'(';
if temp[i]=')' then Result:=Result+')';
if temp[i]='.' then Result:=Result+'.';
Result:=TRIM(Result);
//Result:=
end;
end;
function TDform.showscreat(s:string) :string;
var
temp:string[100];
i:integer;
begin
for i:=0 to 100 do
begin
temp[i]:=' ';
end;
temp:=s;
Result:='';
for i:=0 to 100 do
begin
// if trim(temp[i])='' then exit;
if temp[i]='y' then Result:=Result+'a';
if temp[i]='x' then Result:=Result+'b';
if temp[i]='a' then Result:=Result+'c';
if temp[i]='g' then Result:=Result+'d';
if temp[i]='i' then Result:=Result+'e';
if temp[i]='w' then Result:=Result+'f';
if temp[i]='h' then Result:=Result+'g';
if temp[i]='v' then Result:=Result+'h';
if temp[i]='d' then Result:=Result+'i';
if temp[i]='u' then Result:=Result+'j';
if temp[i]='t' then Result:=Result+'k';
if temp[i]='e' then Result:=Result+'l';
if temp[i]='f' then Result:=Result+'m';
if temp[i]='j' then Result:=Result+'n';
if temp[i]='q' then Result:=Result+'o';
if temp[i]='r' then Result:=Result+'p';
if temp[i]='s' then Result:=Result+'q';
if temp[i]='z' then Result:=Result+'r';
if temp[i]='l' then Result:=Result+'s';
if temp[i]='k' then Result:=Result+'t';
if temp[i]='m' then Result:=Result+'u';
if temp[i]='b' then Result:=Result+'v';
if temp[i]='n' then Result:=Result+'w';
if temp[i]='o' then Result:=Result+'x';
if temp[i]='c' then Result:=Result+'y';
if temp[i]='p' then Result:=Result+'z';
if temp[i]='Y' then Result:=Result+'A';
if temp[i]='X' then Result:=Result+'B';
if temp[i]='A' then Result:=Result+'C';
if temp[i]='G' then Result:=Result+'D';
if temp[i]='I' then Result:=Result+'E';
if temp[i]='W' then Result:=Result+'F';
if temp[i]='H' then Result:=Result+'G';
if temp[i]='V' then Result:=Result+'H';
if temp[i]='D' then Result:=Result+'I';
if temp[i]='U' then Result:=Result+'J';
if temp[i]='T' then Result:=Result+'K';
if temp[i]='E' then Result:=Result+'L';
if temp[i]='F' then Result:=Result+'M';
if temp[i]='J' then Result:=Result+'N';
if temp[i]='Q' then Result:=Result+'O';
if temp[i]='R' then Result:=Result+'P';
if temp[i]='S' then Result:=Result+'Q';
if temp[i]='Z' then Result:=Result+'R';
if temp[i]='L' then Result:=Result+'S';
if temp[i]='K' then Result:=Result+'T';
if temp[i]='M' then Result:=Result+'U';
if temp[i]='B' then Result:=Result+'V';
if temp[i]='N' then Result:=Result+'W';
if temp[i]='O' then Result:=Result+'X';
if temp[i]='C' then Result:=Result+'Y';
if temp[i]='P' then Result:=Result+'Z';
if temp[i]='2' then Result:=Result+'1';
if temp[i]='5' then Result:=Result+'2';
if temp[i]='6' then Result:=Result+'3';
if temp[i]='8' then Result:=Result+'4';
if temp[i]='9' then Result:=Result+'5';
if temp[i]='1' then Result:=Result+'6';
if temp[i]='3' then Result:=Result+'7';
if temp[i]='0' then Result:=Result+'8';
if temp[i]='7' then Result:=Result+'9';
if temp[i]='4' then Result:=Result+'0';
if temp[i]='!' then Result:=Result+'!';
if temp[i]='@' then Result:=Result+'@';
if temp[i]='#' then Result:=Result+'#';
if temp[i]='%' then Result:=Result+'%';
if temp[i]='^' then Result:=Result+'^';
if temp[i]='&' then Result:=Result+'&';
if temp[i]='*' then Result:=Result+'*';
if temp[i]='(' then Result:=Result+'(';
if temp[i]=')' then Result:=Result+')';
if temp[i]='.' then Result:=Result+'.';
Result:=TRIM(Result);
//Result:=
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -