毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

DELPHI办公管理系统 第23页

更新时间:2010-1-17:  来源:毕业论文
DELPHI办公管理系统 第23页
   end;
  tmplist:=rnlist1.Cols[1];
 end
 else
  tmplist:=rnlist1.Cols[0];
// 判断是否有非法字符

//再执行大小写转换
 case combobox1.ItemIndex of
  0: rnlist1.Cols[1]:=tmplist;
  1: for nn:=1 to rnlist1.RowCount-1 do   //首字母大写,其他小写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=uppercase(tmplist.Strings[nn][1])+lowercase(copy(tmplist.Strings[nn],2,length(tmplist.Strings[nn])-1));
  2: for nn:=1 to rnlist1.RowCount-1 do   //全部大写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=uppercase(tmplist.Strings[nn]);
  3: for nn:=1 to rnlist1.RowCount-1 do   //全部小写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=lowercase(tmplist.Strings[nn]);
  4: for nn:=1 to rnlist1.RowCount-1 do   //文件名大写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=uppercase(getffname(tmplist.Strings[nn]))+extractfileext(tmplist.Strings[nn]);
  5: for nn:=1 to rnlist1.RowCount-1 do   //文件名小写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=lowercase(getffname(tmplist.Strings[nn]))+extractfileext(tmplist.Strings[nn]);
  6: for nn:=1 to rnlist1.RowCount-1 do   //扩展名大写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=getffname(tmplist.Strings[nn])+uppercase(extractfileext(tmplist.Strings[nn]));
  7: for nn:=1 to rnlist1.RowCount-1 do   //扩展名小写
      if rnlist1.Cells[0,nn]<>'' then
       rnlist1.Cells[1,nn]:=getffname(tmplist.Strings[nn])+lowercase(extractfileext(tmplist.Strings[nn]));
 end;
 rnlist1.Cells[1,0]:='新文件名';

end;

procedure TBM_CHANGEFILEF.SpeedButton4Click(Sender: TObject);
var  nn:integer;
begin
 SpeedButton3click(self);//先执行预览,然后根据预览结果改名
 for nn:=1 to rnlist1.RowCount-1 do
  if rnlist1.Cells[0,nn]<>'' then
   RenameFile(rnlist1.Cells[2,nn]+rnlist1.Cells[0,nn],rnlist1.Cells[2,nn]+rnlist1.Cells[1,nn]);
 rnlist1.Cols[0]:= rnlist1.Cols[1];
 rnlist1.Cells[0,0]:='原文件名';
 showmessage('文件改名完毕!');

end;

procedure TBM_CHANGEFILEF.CheckBox1Click(Sender: TObject);
begin
radiob1.Enabled := checkbox1.Checked;
  radiob2.Enabled := checkbox1.Checked;
  ledit1.Enabled := checkbox1.Checked;
  updown1.Enabled := checkbox1.Checked;
  label3.Enabled := checkbox1.Checked;
  label4.Enabled := checkbox1.Checked;
  combobox2.Enabled := checkbox1.Checked;
  checkbox2.Enabled :=  checkbox1.Checked;
end;

procedure TBM_CHANGEFILEF.RadioB1Click(Sender: TObject);
begin
if radiob1.Checked then
  ledit1.Text :='0';
 updown1.Position :=0;
end;

procedure TBM_CHANGEFILEF.RadioB2Click(Sender: TObject);
begin
 if radiob2.Checked then
  ledit1.Text :='A';
 updown1.Position :=0;
end;

procedure TBM_CHANGEFILEF.UpDown1ChangingEx(Sender: TObject;
  var AllowChange: Boolean; NewValue: Smallint;
  Direction: TUpDownDirection);
begin
 if radiob1.Checked then
  if direction=updup then
   ledit1.Text :=inttostr(strtoint(ledit1.Text)+1)
  else
  begin if strtoint(ledit1.Text)>0 then
   ledit1.Text :=inttostr(strtoint(ledit1.Text)-1);
  end
 else if direction=updUp then ledit1.Text :=getletter(ledit1.Text,true,1)
      else ledit1.Text :=getletter(ledit1.Text,false,1);

end;

procedure TBM_CHANGEFILEF.CheckBox2Click(Sender: TObject);
begin
  combobox3.Enabled:= checkbox2.Checked;
end;

procedure TBM_CHANGEFILEF.FormCreate(Sender: TObject);
begin
rnlist1.Cells[0,0]:='原文件名';
 rnlist1.Cells[1,0]:='新文件名';
 rnlist1.Cells[2,0]:='文件路径';
 totanum:=1;
 label4.Caption :='模板说明:'+#13
 +'用*符号 代表原文件名(或扩展名);'+#13
 +'用<X>符号 代表原文件名(或扩展名)中第'+#13
 +'      X个字母,X为数字;'+#13
 +'用?符号 替换原文件名(或扩展名)中对应'+#13
 +'    位置的字母为数字或字母;' ;
end;

procedure TBM_CHANGEFILEF.SearchFile(path: string);
var
  sr: TSearchRec;
begin
 {
  if FindFirst(path,faanyfile, sr) = 0 then
  repeat
  if (sr.name<>'.') and (sr.name<>'..') then
      if (sr.Attr and fadirectory) = fadirectory then
      SearchFile(path+'\'+sr.name)
      else

 << 上一页  [21] [22] [23] [24] [25] [26] 下一页

DELPHI办公管理系统 第23页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。