neu
This commit is contained in:
@@ -398,7 +398,7 @@ Public Class frmScan
|
||||
Select Case ART
|
||||
Case "DirectScan"
|
||||
Dim PDF_bytes As Byte() = m_PDFCreator.SaveAsBytes(TryCast(Me, ISave))
|
||||
Me.fileName = tbxSaveFileName.Text ' DS.LAST_ID
|
||||
Me.fileName = addExtension(tbxSaveFileName.Text) ' DS.LAST_ID
|
||||
Me.ReturnValue = PDF_bytes ' DS.LAST_ID
|
||||
Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Case Else : saveToFile()
|
||||
@@ -408,6 +408,34 @@ Public Class frmScan
|
||||
pnl.Enabled = True
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Function addExtension(ByRef FileName As String) As String
|
||||
Dim Extension As String = ""
|
||||
|
||||
If rdbtnJPG.Checked Then
|
||||
Extension = ".jpg"
|
||||
End If
|
||||
If rdbtnBMP.Checked Then
|
||||
Extension = ".bmp"
|
||||
End If
|
||||
If rdbtnPNG.Checked Then
|
||||
Extension = ".png"
|
||||
End If
|
||||
If rdbtnTIFF.Checked Then
|
||||
Extension = ".tiff"
|
||||
End If
|
||||
If rdbtnPDF.Checked Then
|
||||
Extension = ".pdf"
|
||||
End If
|
||||
FileName = FileName.Trim
|
||||
If Not FileName.EndsWith(Extension) Then
|
||||
FileName = FileName & Extension
|
||||
End If
|
||||
Return FileName
|
||||
End Function
|
||||
|
||||
|
||||
Sub saveToFile()
|
||||
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user