📄 sendunit.pas
字号:
if downloadfile then begin
StatusBar1.Panels[1].text:=' OK 下载已成功完成..';
end else begin
StatusBar1.Panels[1].text:=' 总计:'+inttostr(t_ftp(sender).size)+' 字节,已下载 '+inttostr(size)+' 字节...';
end;
end ;
end;
if mode=tftp_upload then begin
size:=size+data;
if t_ftp(sender).size=0 then
begin
StatusBar1.Panels[1].text:=' '+inttostr(size)+' 字节已被发送';
end
else
begin
StatusBar1.Panels[1].text:=' '+inttostr(size)+' of '+
inttostr(t_ftp(sender).size)+' 字节已被发送';
end ;
end;
end;
(*@\\\003C000801000801000923000935000801*)
(*@/// procedure Tmainform.ftp_trace(const s: string; level: TTraceLevel); *)
procedure TDform.FormActivate(Sender: TObject);
begin
dform.ComboBox1.Clear;
dform.ComboBox1.Items.Add(form4.name1.text) ;
dform.ComboBox1.Items.Add(form4.name2.text) ;
dform.ComboBox1.Items.Add(form4.name3.text) ;
dform.ComboBox1.Items.Add(form4.name4.text) ;
dform.ComboBox1.Items.Add(form4.name5.text) ;
dform.ComboBox1.Items.Add(form4.name6.text) ;
dform.ComboBox1.Text:='维修报表';
if form4.dformctlabel.Caption='form2' then
begin
form2.Enabled:=false;
combobox1.Visible:=false;
end;
if form4.dformctlabel.Caption='form5' then
begin
form5.Enabled:=false;
combobox1.Visible:=true;
end;
BitBtn1.Enabled:=true;
ComboBox1.Text:='';
end;
procedure TDform.DateTimePicker1Change(Sender: TObject);
begin
Fdate:=DateTimePicker1.date;
DecodeDate(fdate,y,m,d);
if form4.dformctlabel.Caption='form2' then
begin
dform.Edit1.Text:=form4.name.Lines.Text+'-'+trim(GFXComboBox1.Text)+form2.label4.Caption+inttostr(y)+inttostr(m)+inttostr(d)+'.cdx';
end else
begin
dform.Edit1.Text:=form4.name.Lines.Text+'-'+trim(GFXComboBox1.Text)+trim(ComboBox1.text)+inttostr(y)+inttostr(m)+inttostr(d)+'.cdx';
end;
end;
procedure TDform.FormClose(Sender: TObject; var Action: TCloseAction);
begin
screen.Cursor:=crarrow;
if form4.dformctlabel.Caption='form2' then
begin
form2.Enabled:=true;
end;
if form4.dformctlabel.Caption='form5' then
begin
form5.Enabled:=true;
end;
end;
procedure TDform.FormCreate(Sender: TObject);
begin
DateTimePicker1.Date:=date;
GFXComboBox1.Items.Clear;
if fileexists('C:\NewStar\NetSky\DAT\zbid.cdx') then
begin
{===============================================================================}
ClientDataSet1.Close;
ClientDataSet1.LoadFromFile('C:\NewStar\NetSky\DAT\zbid.cdx');
ClientDataSet1.Open;
ClientDataSet1.First;
while not ClientDataSet1.EOF do
begin
GFXComboBox1.Items.Add(ClientDataSet1.fieldbyname('部门').AsString);
ClientDataSet1.Next;
end;
ClientDataSet1.close;
{===============================================================================}
end;
if fileexists('C:\NewStar\NetSky\DAT\fbid.cdx') then
begin
{===============================================================================}
ClientDataSet1.Close;
ClientDataSet1.LoadFromFile('C:\NewStar\NetSky\DAT\fbid.cdx');
ClientDataSet1.Open;
ClientDataSet1.First;
while not ClientDataSet1.EOF do
begin
GFXComboBox1.Items.Add(ClientDataSet1.fieldbyname('分部').AsString);
ClientDataSet1.Next;
end;
ClientDataSet1.close;
{===============================================================================}
end;
if fileexists('C:\NewStar\NetSky\DAT\bscid.cdx') then
begin
{===============================================================================}
ClientDataSet1.Close;
ClientDataSet1.LoadFromFile('C:\NewStar\NetSky\DAT\bscid.cdx');
ClientDataSet1.Open;
ClientDataSet1.First;
while not ClientDataSet1.EOF do
begin
GFXComboBox1.Items.Add(ClientDataSet1.fieldbyname('办事处').AsString);
ClientDataSet1.Next;
end;
ClientDataSet1.close;
{===============================================================================}
end;
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;
procedure TDform.combobox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
showmessage('此框中的内容不可编辑!......');
ComboBox1.Text:='';
DateTimePicker1.SetFocus;
exit;
end;
procedure TDform.combobox1Change(Sender: TObject);
begin
Fdate:=DateTimePicker1.date;
DecodeDate(fdate,y,m,d);
dform.Edit1.Text:=form4.name.Lines.Text+'-'+trim(GFXComboBox1.Text)+trim(ComboBox1.text)+inttostr(y)+inttostr(m)+inttostr(d)+'.cdx';
end;
function TDform.strtoboolean(s:string) :boolean;
begin
result:=false;
if Uppercase(trim(s))='TRUE' then result:=true else result:=false;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -