ustva, etc.
This commit is contained in:
@@ -12,6 +12,7 @@ Public Class cUStVLeistender
|
||||
Property UstV_Leistender_UstNr As Object = Nothing
|
||||
Property UstV_Leistender_Adresse As Boolean
|
||||
Property UStV_LeistenderId As Integer
|
||||
Property UstV_aktiv As Boolean
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
@@ -52,6 +53,7 @@ Public Class cUStVLeistender
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_UstNr", UstV_Leistender_UstNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_Adresse", UstV_Leistender_Adresse))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStV_LeistenderId", UStV_LeistenderId,, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_aktiv", UstV_aktiv))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
@@ -988,7 +988,7 @@ Public Class cMDMFunctionsAllgemein
|
||||
For page As Integer = 1 To pdfReader.NumberOfPages
|
||||
Dim canvas As PdfContentByte = stamper.GetOverContent(page)
|
||||
Dim bf As BaseFont = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.EMBEDDED)
|
||||
canvas.SetFontAndSize(bf, 12)
|
||||
canvas.SetFontAndSize(bf, 16)
|
||||
canvas.BeginText()
|
||||
|
||||
'The origin (0,0) is at the bottom-left corner of the page and represent coordinates in points!!!!!
|
||||
|
||||
60
VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb
generated
60
VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb
generated
@@ -22,7 +22,6 @@ Partial Class frmScan
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmScan))
|
||||
Me.dsViewer = New Dynamsoft.Forms.DSViewer()
|
||||
Me.btn = New System.Windows.Forms.Button()
|
||||
@@ -57,7 +56,8 @@ Partial Class frmScan
|
||||
Me.tbxCurrentImageIndex = New System.Windows.Forms.Label()
|
||||
Me.tbxTotalImageNum = New System.Windows.Forms.Label()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.UsrcntlPDFScan1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan()
|
||||
Me.cbxAltFormat = New System.Windows.Forms.CheckBox()
|
||||
Me.cboFormat = New System.Windows.Forms.ComboBox()
|
||||
Me.grpFarbe.SuspendLayout()
|
||||
Me.grpTyp.SuspendLayout()
|
||||
Me.pnl.SuspendLayout()
|
||||
@@ -89,7 +89,7 @@ Partial Class frmScan
|
||||
Me.btnScan.Enabled = False
|
||||
Me.btnScan.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnScan.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnScan.Location = New System.Drawing.Point(477, 132)
|
||||
Me.btnScan.Location = New System.Drawing.Point(476, 157)
|
||||
Me.btnScan.Name = "btnScan"
|
||||
Me.btnScan.Size = New System.Drawing.Size(254, 59)
|
||||
Me.btnScan.TabIndex = 2
|
||||
@@ -139,7 +139,7 @@ Partial Class frmScan
|
||||
'
|
||||
Me.lblDateiname.AutoSize = True
|
||||
Me.lblDateiname.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblDateiname.Location = New System.Drawing.Point(473, 566)
|
||||
Me.lblDateiname.Location = New System.Drawing.Point(473, 546)
|
||||
Me.lblDateiname.Name = "lblDateiname"
|
||||
Me.lblDateiname.Size = New System.Drawing.Size(61, 13)
|
||||
Me.lblDateiname.TabIndex = 7
|
||||
@@ -205,9 +205,9 @@ Partial Class frmScan
|
||||
'cboSource
|
||||
'
|
||||
Me.cboSource.FormattingEnabled = True
|
||||
Me.cboSource.Location = New System.Drawing.Point(477, 105)
|
||||
Me.cboSource.Location = New System.Drawing.Point(480, 105)
|
||||
Me.cboSource.Name = "cboSource"
|
||||
Me.cboSource.Size = New System.Drawing.Size(254, 21)
|
||||
Me.cboSource.Size = New System.Drawing.Size(251, 21)
|
||||
Me.cboSource.TabIndex = 9
|
||||
'
|
||||
'rdbtnRGB
|
||||
@@ -267,7 +267,7 @@ Partial Class frmScan
|
||||
Me.grpTyp.Controls.Add(Me.rdbtnBMP)
|
||||
Me.grpTyp.Controls.Add(Me.rdbtnPNG)
|
||||
Me.grpTyp.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.grpTyp.Location = New System.Drawing.Point(477, 493)
|
||||
Me.grpTyp.Location = New System.Drawing.Point(477, 473)
|
||||
Me.grpTyp.Name = "grpTyp"
|
||||
Me.grpTyp.Size = New System.Drawing.Size(254, 64)
|
||||
Me.grpTyp.TabIndex = 11
|
||||
@@ -279,15 +279,17 @@ Partial Class frmScan
|
||||
Me.tbxSaveFileName._DateTimeOnly = False
|
||||
Me.tbxSaveFileName._numbersOnly = False
|
||||
Me.tbxSaveFileName._numbersOnlyKommastellen = ""
|
||||
Me.tbxSaveFileName._numbersOnlyTrennzeichen = True
|
||||
Me.tbxSaveFileName._Prozent = False
|
||||
Me.tbxSaveFileName._ShortDateNew = False
|
||||
Me.tbxSaveFileName._ShortDateOnly = False
|
||||
Me.tbxSaveFileName._TimeOnly = False
|
||||
Me.tbxSaveFileName._TimeOnly_Seconds = False
|
||||
Me.tbxSaveFileName._value = Nothing
|
||||
Me.tbxSaveFileName._Waehrung = False
|
||||
Me.tbxSaveFileName._WaehrungZeichen = True
|
||||
Me.tbxSaveFileName.ForeColor = System.Drawing.Color.Black
|
||||
Me.tbxSaveFileName.Location = New System.Drawing.Point(536, 563)
|
||||
Me.tbxSaveFileName.Location = New System.Drawing.Point(536, 543)
|
||||
Me.tbxSaveFileName.MaxLineLength = -1
|
||||
Me.tbxSaveFileName.MaxLines_Warning = ""
|
||||
Me.tbxSaveFileName.MaxLines_Warning_Label = Nothing
|
||||
@@ -432,7 +434,8 @@ Partial Class frmScan
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.UsrcntlPDFScan1)
|
||||
Me.pnl.Controls.Add(Me.cbxAltFormat)
|
||||
Me.pnl.Controls.Add(Me.cboFormat)
|
||||
Me.pnl.Controls.Add(Me.Label2)
|
||||
Me.pnl.Controls.Add(Me.dsViewer)
|
||||
Me.pnl.Controls.Add(Me.Button3)
|
||||
@@ -461,25 +464,25 @@ Partial Class frmScan
|
||||
Me.pnl.Size = New System.Drawing.Size(741, 683)
|
||||
Me.pnl.TabIndex = 21
|
||||
'
|
||||
'UsrcntlPDFScan1
|
||||
'cbxAltFormat
|
||||
'
|
||||
Me.UsrcntlPDFScan1._ARCHIV = False
|
||||
Me.UsrcntlPDFScan1._DATENSERVER_KATEGORIE = "DOKUMENTE"
|
||||
Me.UsrcntlPDFScan1._DATENSERVER_ORDNER = ""
|
||||
Me.UsrcntlPDFScan1._DATENSERVER_UOrdner1 = ""
|
||||
Me.UsrcntlPDFScan1._DATENSERVER_UOrdner2 = ""
|
||||
Me.UsrcntlPDFScan1._DATENSERVER_UOrdner3 = ""
|
||||
Me.UsrcntlPDFScan1._MULTI_FILES = False
|
||||
Me.UsrcntlPDFScan1._TEXT_PDF = Nothing
|
||||
Me.UsrcntlPDFScan1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.UsrcntlPDFScan1.BackColor = System.Drawing.Color.White
|
||||
Me.UsrcntlPDFScan1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.UsrcntlPDFScan1.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.UsrcntlPDFScan1.Location = New System.Drawing.Point(344, 349)
|
||||
Me.UsrcntlPDFScan1.Name = "UsrcntlPDFScan1"
|
||||
Me.UsrcntlPDFScan1.Size = New System.Drawing.Size(8, 8)
|
||||
Me.UsrcntlPDFScan1.TabIndex = 21
|
||||
Me.UsrcntlPDFScan1.Visible = False
|
||||
Me.cbxAltFormat.AutoSize = True
|
||||
Me.cbxAltFormat.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbxAltFormat.Location = New System.Drawing.Point(477, 569)
|
||||
Me.cbxAltFormat.Name = "cbxAltFormat"
|
||||
Me.cbxAltFormat.Size = New System.Drawing.Size(88, 17)
|
||||
Me.cbxAltFormat.TabIndex = 9
|
||||
Me.cbxAltFormat.Text = "speichern als"
|
||||
Me.cbxAltFormat.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboFormat
|
||||
'
|
||||
Me.cboFormat.Enabled = False
|
||||
Me.cboFormat.FormattingEnabled = True
|
||||
Me.cboFormat.Location = New System.Drawing.Point(594, 565)
|
||||
Me.cboFormat.Name = "cboFormat"
|
||||
Me.cboFormat.Size = New System.Drawing.Size(133, 21)
|
||||
Me.cboFormat.TabIndex = 22
|
||||
'
|
||||
'frmScan
|
||||
'
|
||||
@@ -534,5 +537,6 @@ Partial Class frmScan
|
||||
Friend WithEvents tbxCurrentImageIndex As System.Windows.Forms.Label
|
||||
Friend WithEvents tbxTotalImageNum As System.Windows.Forms.Label
|
||||
Friend WithEvents pnl As System.Windows.Forms.Panel
|
||||
Friend WithEvents UsrcntlPDFScan1 As usrcntlPDFScan
|
||||
Friend WithEvents cboFormat As Windows.Forms.ComboBox
|
||||
Friend WithEvents cbxAltFormat As Windows.Forms.CheckBox
|
||||
End Class
|
||||
|
||||
@@ -18,6 +18,10 @@ Imports Dynamsoft.Core.Annotation
|
||||
Imports Dynamsoft.TWAIN.Interface
|
||||
Imports Dynamsoft.Core.Enums
|
||||
Imports System.IO
|
||||
Imports Dynamsoft.TWAIN.Enums
|
||||
Imports Dynamsoft.DotTwain
|
||||
Imports ClosedXML.Excel
|
||||
Imports Dynamsoft.PDF.Enums
|
||||
|
||||
|
||||
'Aktuell3
|
||||
@@ -61,6 +65,23 @@ Public Class frmScan
|
||||
End Sub
|
||||
|
||||
|
||||
Public Enum TwainSupportedSizes As UShort
|
||||
TWSS_NONE = 0
|
||||
TWSS_A4 = 1
|
||||
TWSS_JISB5 = 2
|
||||
TWSS_USLETTER = 3
|
||||
TWSS_USLEGAL = 4
|
||||
TWSS_A5 = 5
|
||||
TWSS_ISOB4 = 6
|
||||
TWSS_ISOB6 = 7
|
||||
TWSS_USLEDGER = 9
|
||||
TWSS_USEXECUTIVE = 10
|
||||
TWSS_A3 = 11
|
||||
TWSS_B4 = 12
|
||||
TWSS_B6 = 13
|
||||
TWSS_BUSINESSCARD = 14
|
||||
End Enum
|
||||
|
||||
|
||||
Public Sub OnPostAllTransfers() Implements IAcquireCallback.OnPostAllTransfers
|
||||
Me.Invoke(New CrossThreadOperationControl(AddressOf CallMe))
|
||||
@@ -132,11 +153,11 @@ Public Class frmScan
|
||||
dsViewer.Bind(m_ImageCore)
|
||||
End Sub
|
||||
|
||||
<DllImport("kernel32.dll")> _
|
||||
<DllImport("kernel32.dll")>
|
||||
Private Shared Function GetSystemDirectory(<Out> lpBuffer As StringBuilder, uSize As UInteger) As UInteger
|
||||
End Function
|
||||
|
||||
<DllImport("kernel32.dll")> _
|
||||
<DllImport("kernel32.dll")>
|
||||
Private Shared Function GetWindowsDirectory(<Out> lpBuffer As StringBuilder, uSize As UInteger) As UInteger
|
||||
End Function
|
||||
|
||||
@@ -267,6 +288,10 @@ Public Class frmScan
|
||||
m_TwainManager.SelectSourceByIndex(sSourceIndex)
|
||||
|
||||
|
||||
|
||||
|
||||
'm_TwainManager.SetImageLayout(New Dynamsoft.Common.Margin(0.0, 0.0, width, height))
|
||||
|
||||
''vor Opensource
|
||||
'Dim tmpFile = Path.GetTempFileName & ".pdf"
|
||||
'tmpFile = "D:\Andreas\Dokumente\temptest<>.pdf"
|
||||
@@ -314,6 +339,10 @@ Public Class frmScan
|
||||
End If
|
||||
m_TwainManager.Resolution = Integer.Parse(cboResolution.Text)
|
||||
|
||||
'Dim selectedPaper = CType(cboFormat.SelectedItem, KeyValuePair(Of String, Tuple(Of Double, Double)))
|
||||
'Dim width = selectedPaper.Value.Item1
|
||||
'Dim height = selectedPaper.Value.Item2
|
||||
|
||||
'm_TwainManager.sca()
|
||||
|
||||
|
||||
@@ -400,6 +429,30 @@ Public Class frmScan
|
||||
' hasWebcamSource = true;
|
||||
hasTwainSource = True
|
||||
Next
|
||||
|
||||
|
||||
|
||||
cboFormat.Items.Clear()
|
||||
|
||||
'Dim formats As New List(Of KeyValuePair(Of String, EnumPageSize)) From {
|
||||
' New KeyValuePair(Of String, EnumPageSize)(" ", EnumPageSize.ImageSize),
|
||||
' New KeyValuePair(Of String, EnumPageSize)("A4", EnumPageSize.A4),
|
||||
' New KeyValuePair(Of String, EnumPageSize)("Legal", EnumPageSize.Legal),
|
||||
' New KeyValuePair(Of String, EnumPageSize)("Letter", EnumPageSize.Letter)
|
||||
' }
|
||||
|
||||
'cboFormat.DataSource = formats
|
||||
|
||||
|
||||
Dim items = [Enum].GetValues(GetType(EnumPageSize)).Cast(Of EnumPageSize)().Select(Function(e) New KeyValuePair(Of String, EnumPageSize)(e.ToString(), e)).ToList()
|
||||
|
||||
With cboFormat
|
||||
.DataSource = items
|
||||
.DisplayMember = "Key"
|
||||
.ValueMember = "Value"
|
||||
End With
|
||||
|
||||
|
||||
If hasTwainSource Then
|
||||
cboSource.Enabled = True
|
||||
' chkShowUI.Enabled = True
|
||||
@@ -438,6 +491,12 @@ Public Class frmScan
|
||||
Try
|
||||
Select Case ART
|
||||
Case "DirectScan"
|
||||
|
||||
If cboFormat.SelectedIndex >= 0 Then
|
||||
Dim selectedPaper As EnumPageSize = CType(cboFormat.SelectedValue, EnumPageSize)
|
||||
If cbxAltFormat.Checked Then m_PDFCreator.PageSize = selectedPaper
|
||||
End If
|
||||
|
||||
Dim PDF_bytes As Byte() = m_PDFCreator.SaveAsBytes(TryCast(Me, ISave))
|
||||
Me.fileName = addExtension(tbxSaveFileName.Text) ' DS.LAST_ID
|
||||
Me.ReturnValue = PDF_bytes ' DS.LAST_ID
|
||||
@@ -531,7 +590,10 @@ Public Class frmScan
|
||||
SaveFileDialog.DefaultExt = "pdf"
|
||||
If SaveFileDialog.ShowDialog() = DialogResult.OK Then
|
||||
' Multi page PDF
|
||||
|
||||
If cboFormat.SelectedIndex >= 0 Then
|
||||
Dim selectedPaper As EnumPageSize = CType(cboFormat.SelectedValue, EnumPageSize)
|
||||
If cbxAltFormat.Checked Then m_PDFCreator.PageSize = selectedPaper
|
||||
End If
|
||||
m_PDFCreator.Save(TryCast(Me, ISave), SaveFileDialog.FileName)
|
||||
End If
|
||||
End If
|
||||
@@ -575,12 +637,12 @@ Public Class frmScan
|
||||
Dim iHeight As Integer = (tempAnnotation.EndPoint.X - tempAnnotation.StartPoint.X)
|
||||
Select Case tempAnnotation.AnnotationType
|
||||
'case AnnotationType.enumLine:
|
||||
Case AnnotationType.enumEllipse, AnnotationType.enumRectangle, AnnotationType.enumText
|
||||
Case Dynamsoft.Core.Enums.AnnotationType.enumEllipse, Dynamsoft.Core.Enums.AnnotationType.enumRectangle, Dynamsoft.Core.Enums.AnnotationType.enumText
|
||||
tempAnnotation.StartPoint = New Point(x, y)
|
||||
'tempAnnotation.Size = new Size(iWidth, iHeight);
|
||||
tempAnnotation.EndPoint = New Point((tempAnnotation.StartPoint.X + iWidth), (tempAnnotation.StartPoint.Y + iHeight))
|
||||
Exit Select
|
||||
Case AnnotationType.enumLine
|
||||
Case Dynamsoft.Core.Enums.AnnotationType.enumLine
|
||||
Dim startPoint As Point = tempAnnotation.StartPoint
|
||||
x = startPoint.Y
|
||||
y = iImageWidth - startPoint.X
|
||||
@@ -608,11 +670,11 @@ Public Class frmScan
|
||||
Dim iHeight As Integer = tempAnnotation.Size.Width
|
||||
Select Case tempAnnotation.AnnotationType
|
||||
'case AnnotationType.enumLine:
|
||||
Case AnnotationType.enumEllipse, AnnotationType.enumRectangle, AnnotationType.enumText
|
||||
Case Dynamsoft.Core.Enums.AnnotationType.enumEllipse, Dynamsoft.Core.Enums.AnnotationType.enumRectangle, Dynamsoft.Core.Enums.AnnotationType.enumText
|
||||
tempAnnotation.StartPoint = New Point(x, y)
|
||||
tempAnnotation.EndPoint = New Point((tempAnnotation.StartPoint.X + iWidth), (tempAnnotation.StartPoint.Y + iHeight))
|
||||
Exit Select
|
||||
Case AnnotationType.enumLine
|
||||
Case Dynamsoft.Core.Enums.AnnotationType.enumLine
|
||||
Dim startPoint As Point = tempAnnotation.StartPoint
|
||||
x = iImageHeight - startPoint.Y
|
||||
y = startPoint.X
|
||||
@@ -708,6 +770,10 @@ Public Class frmScan
|
||||
Case "QuickScan"
|
||||
Do
|
||||
startScan()
|
||||
If cboFormat.SelectedIndex >= 0 Then
|
||||
Dim selectedPaper As EnumPageSize = CType(cboFormat.SelectedValue, EnumPageSize)
|
||||
If cbxAltFormat.Checked Then m_PDFCreator.PageSize = selectedPaper
|
||||
End If
|
||||
Dim PDF_bytes As Byte() = m_PDFCreator.SaveAsBytes(TryCast(Me, ISave))
|
||||
Me.fileName = addExtension(tbxSaveFileName.Text) ' DS.LAST_ID
|
||||
Me.ReturnValue = PDF_bytes ' DS.LAST_ID
|
||||
@@ -754,6 +820,10 @@ Public Class frmScan
|
||||
Return True
|
||||
'Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
Private Sub cbxAltFormat_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAltFormat.CheckedChanged
|
||||
cboFormat.Enabled = cbxAltFormat.Checked
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user