This commit is contained in:
2020-03-12 14:49:31 +01:00
parent f4c1a74870
commit cc28d5a6cf
197 changed files with 37402 additions and 4503 deletions

View File

@@ -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