Dim prestr As String = e.Form.Controls("TextBox名称前缀").Text
Dim s As New String("0", cnt)
For Each fl In dlg.FileNames
Dim i As Integer = 0
For Each file As String In FileSys.GetFiles(e.Form.Controls("DropBox文件保存文件夹").Text)
' If e.Form.Controls("RadioButton按前缀和类型编序号").Checked Then
' If file.SubString(file.LastIndexOf("\") + 1,prestr.Length) = prestr AndAlso IsNumeric(file.SubString(file.LastIndexOf("\") + 1 + prestr.Length)) AndAlso file.SubString(file.LastIndexOf(".")) = fl.SubString(fl.LastIndexOf(".")) Then
' i + = 1
' End If
' End If
Next
i + = 1
If e.Form.Controls("CheckBox图片缩放").Checked Then
Dim width As Integer = e.Form.Controls("NumericComboBox宽").Value
Dim height As Integer = e.Form.Controls("NumericComboBox高").Value
Dim img As Image = GetImage(fl)
Dim bmp As Bitmap
If e.Form.Controls("CheckBox保持比例").Checked Then
'Dim bmp As New Bitmap(GetImage(fl),width,Width/img.width*img.Height)
bmp = New Bitmap(GetImage(fl),width,Width/img.width*img.Height)
Else
'Dim bmp As New Bitmap(GetImage(fl),width,height)
bmp = New Bitmap(GetImage(fl),width,height)
End If
bmp.Save(e.Form.Controls("DropBox文件保存文件夹").Text & "\" & prestr & Format(i,s) & fl.SubString(fl.LastIndexOf(".")))
Else
FileSys.CopyFile(fl,e.Form.Controls("DropBox文件保存文件夹").Text & "\" & prestr & Format(i,s) & fl.SubString(fl.LastIndexOf(".")))
End If
Next
SaveConfigValue("默认来源文件夹",fl.SubString(0,fl.LastIndexOf("\")))
SaveConfigValue("默认保存文件夹",e.Form.Controls("DropBox文件保存文件夹").Text)
End If