Initial commit
This commit is contained in:
57
EDOKA/Backup/Drucken/clsListViewItemComparer.vb
Normal file
57
EDOKA/Backup/Drucken/clsListViewItemComparer.vb
Normal file
@@ -0,0 +1,57 @@
|
||||
Public Class clsListViewItemComparer
|
||||
|
||||
Implements IComparer
|
||||
|
||||
Private _Column As Integer
|
||||
Private _Numeric As Boolean = False
|
||||
|
||||
Public Property Column() As Integer
|
||||
Get
|
||||
Return _Column
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_Column = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Numeric() As Boolean
|
||||
Get
|
||||
Return _Numeric
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_Numeric = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(ByVal ColumnIndex As Integer)
|
||||
Column = ColumnIndex
|
||||
End Sub
|
||||
|
||||
Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer _
|
||||
Implements System.Collections.IComparer.Compare
|
||||
Dim ListX As ListViewItem = CType(x, ListViewItem)
|
||||
Dim ListY As ListViewItem = CType(y, ListViewItem)
|
||||
If Numeric Then
|
||||
Dim ListXVal, ListYVal As Decimal
|
||||
Try
|
||||
ListXVal = Decimal.Parse(ListX.SubItems(Column).Text)
|
||||
Catch
|
||||
ListXVal = 0
|
||||
End Try
|
||||
Try
|
||||
ListYVal = Decimal.Parse(ListY.SubItems(Column).Text)
|
||||
Catch
|
||||
ListYVal = 0
|
||||
End Try
|
||||
|
||||
Return Decimal.Compare(ListXVal, ListYVal)
|
||||
Else
|
||||
Dim ListXText As String = ListX.SubItems(Column).Text
|
||||
Dim ListYText As String = ListY.SubItems(Column).Text
|
||||
|
||||
Return String.Compare(ListXText, ListYText)
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
104
EDOKA/Backup/Drucken/clsMehrfachdruck_Data.vb
Normal file
104
EDOKA/Backup/Drucken/clsMehrfachdruck_Data.vb
Normal file
@@ -0,0 +1,104 @@
|
||||
Public Class clsMehrfachdruck_Data
|
||||
|
||||
Public Enum Enum_Typ
|
||||
EDOKA = 1
|
||||
HOST = 2
|
||||
ZV = 3
|
||||
End Enum
|
||||
|
||||
Dim m_DokumentId As String
|
||||
Property DokumentId() As String
|
||||
Get
|
||||
Return m_DokumentId
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_DokumentId = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_PartnerNr As String
|
||||
Property PartnerNr() As String
|
||||
Get
|
||||
Return m_PartnerNr
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_PartnerNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Typ As Enum_Typ
|
||||
Property Typ() As Enum_Typ
|
||||
Get
|
||||
Return m_Typ
|
||||
End Get
|
||||
Set(ByVal Value As Enum_Typ)
|
||||
m_Typ = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_OfficeDokument As Boolean
|
||||
Property OfficeDokument() As Boolean
|
||||
Get
|
||||
Return m_OfficeDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
m_OfficeDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_DokumentTyp As String
|
||||
Property DokumentTyp() As String
|
||||
Get
|
||||
Return m_DokumentTyp
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_DokumentTyp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Auftragnr As String
|
||||
Property Auftragnr() As String
|
||||
Get
|
||||
Return m_Auftragnr
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Auftragnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_PartnerName As String
|
||||
Property PartnerName() As String
|
||||
Get
|
||||
Return m_PartnerName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_PartnerName = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Erstellungsdatum As String
|
||||
Property Erstellungsdatum() As String
|
||||
Get
|
||||
Return m_Erstellungsdatum
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Erstellungsdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(ByVal DokID As String, ByVal iPartnerNr As String, ByVal sTyp As Enum_Typ, _
|
||||
ByVal bOfficeDokument As Boolean, ByVal sDokTyp As String, ByVal sAuftragnr As String, ByVal sPartnerName As String, _
|
||||
ByVal sErstellungsdatum As String)
|
||||
|
||||
m_DokumentId = DokID
|
||||
m_PartnerNr = iPartnerNr
|
||||
m_Typ = sTyp
|
||||
m_OfficeDokument = bOfficeDokument
|
||||
m_DokumentTyp = sDokTyp
|
||||
m_Auftragnr = sAuftragnr
|
||||
m_PartnerName = sPartnerName
|
||||
m_Erstellungsdatum = sErstellungsdatum
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
62
EDOKA/Backup/Drucken/clsPDF_print_show.vb
Normal file
62
EDOKA/Backup/Drucken/clsPDF_print_show.vb
Normal file
@@ -0,0 +1,62 @@
|
||||
Public Class clsPDF_print_show
|
||||
|
||||
Public Enum Enum_Art
|
||||
Drucken = 0
|
||||
Anzeigen = 1
|
||||
End Enum
|
||||
|
||||
Public Function PrintPDF(ByVal sFilename As String, ByVal Art As Enum_Art) As Boolean
|
||||
PrintPDF = True
|
||||
Dim myProcess As New Process()
|
||||
Try
|
||||
'Point the process to our Acrobat file
|
||||
myProcess.StartInfo.FileName = sFilename
|
||||
myProcess.StartInfo.WorkingDirectory = New IO.FileInfo(sFilename).DirectoryName
|
||||
|
||||
'Since we don't want to see Acrobat's UI (we just want the report printed)
|
||||
'then suppress the UI and pass the "Print" verb to force Acrobat to only print
|
||||
myProcess.StartInfo.CreateNoWindow = True
|
||||
|
||||
If Art = Enum_Art.Anzeigen Then
|
||||
myProcess.StartInfo.Verb = "Open"
|
||||
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
|
||||
Else
|
||||
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
|
||||
myProcess.StartInfo.Verb = "Print"
|
||||
End If
|
||||
myProcess.Start()
|
||||
|
||||
'Wait until Acrobat has finished heavy processing, or 10 seconds whichever comes first
|
||||
If Not myProcess.HasExited Then myProcess.WaitForInputIdle(10000)
|
||||
'Attempt to close Acrobat so it's UI doesn't sit on the user's task bar
|
||||
'loop until we suceed or until we timeout. If we timeout, kill Adobe
|
||||
Dim i As Integer = 1
|
||||
Dim lbRunning As Boolean = True
|
||||
'Da keine Kill Rechte auf den Vista Maschinen vorhanden sind, wird der Prozess nicht gekillt.
|
||||
lbRunning = False
|
||||
'While lbRunning And i <= 20
|
||||
' 'sleep for 1/2 of a second
|
||||
' System.Threading.Thread.Sleep(500)
|
||||
|
||||
' 'See if the Adobe will exit gracefully
|
||||
' Select Case myProcess.HasExited
|
||||
' Case True : lbRunning = False
|
||||
' Case False : lbRunning = Not myProcess.CloseMainWindow
|
||||
' End Select
|
||||
|
||||
' i += 1
|
||||
'End While
|
||||
|
||||
'If it never closed gracefuly, force it out of memory
|
||||
If lbRunning AndAlso Not myProcess.HasExited Then myProcess.Kill()
|
||||
myProcess.Dispose()
|
||||
|
||||
Catch ex As System.ComponentModel.Win32Exception
|
||||
PrintPDF = False
|
||||
Catch ex As Exception
|
||||
PrintPDF = False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
109
EDOKA/Backup/Drucken/clsSpooler_Data.vb
Normal file
109
EDOKA/Backup/Drucken/clsSpooler_Data.vb
Normal file
@@ -0,0 +1,109 @@
|
||||
Public Class clsSpooler_Data
|
||||
|
||||
Dim m_JobID As Integer
|
||||
Property JobID() As Integer
|
||||
Get
|
||||
Return m_JobID
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_JobID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_AuftragNR As String
|
||||
Property AuftragNr() As String
|
||||
Get
|
||||
Return m_AuftragNR
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_AuftragNR = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Typ As String
|
||||
Property Typ() As String
|
||||
Get
|
||||
Return m_Typ
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Typ = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Status As String
|
||||
Property Status() As String
|
||||
Get
|
||||
Return m_Status
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Status = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_StatusID As Integer
|
||||
Property StatusID() As Integer
|
||||
Get
|
||||
Return m_StatusID
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_StatusID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Anzahl As String
|
||||
Property Anzahl() As String
|
||||
Get
|
||||
Return m_Anzahl
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Anzahl = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Data As Collection
|
||||
Property Data() As Collection
|
||||
Get
|
||||
Return m_Data
|
||||
End Get
|
||||
Set(ByVal Value As Collection)
|
||||
m_Data = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_ErstelltAm As Date
|
||||
Property ErstelltAm() As Date
|
||||
Get
|
||||
Return m_ErstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As Date)
|
||||
m_ErstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_DateiName As String
|
||||
Property DateiName() As String
|
||||
Get
|
||||
Return m_DateiName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_DateiName = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(ByVal JobID As Integer, ByVal sAuftragNr As String, ByVal sTyp As String, _
|
||||
ByVal sStatus As String, ByVal sAnzahl As String, ByVal sData As Collection, _
|
||||
ByVal sErstellungsdatum As String, ByVal iStatusID As Integer, ByVal sDateiName As String)
|
||||
|
||||
m_JobID = JobID
|
||||
m_AuftragNR = sAuftragNr
|
||||
m_Typ = sTyp
|
||||
m_Status = sStatus
|
||||
m_Anzahl = sAnzahl
|
||||
m_Data = sData
|
||||
m_ErstelltAm = sErstellungsdatum
|
||||
m_StatusID = iStatusID
|
||||
m_DateiName = sDateiName
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
144
EDOKA/Backup/Drucken/frmMehrfachdruck.resx
Normal file
144
EDOKA/Backup/Drucken/frmMehrfachdruck.resx
Normal file
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="lvDruckauftraege.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="lvid_JobID.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="lvid_Auftrag.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="lvid_Typ.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="lvid_Anzahl.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="lvid_Status.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ContextMenu1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>103, 17</value>
|
||||
</data>
|
||||
<data name="ContextMenu1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="mnuAnzeige.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="mnuDurck.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="MenuItem2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="nmuDelete.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="nmuRefresh.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="StatusBar1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>frmMehrfachdruck</value>
|
||||
</data>
|
||||
</root>
|
||||
825
EDOKA/Backup/Drucken/frmMehrfachdruck.vb
Normal file
825
EDOKA/Backup/Drucken/frmMehrfachdruck.vb
Normal file
@@ -0,0 +1,825 @@
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports System.Threading
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class frmMehrfachdruck
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
#Region " Vom Windows Form Designer generierter Code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
' Für Windows Form-Designer erforderlich
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
|
||||
'Sie kann mit dem Windows Form-Designer modifiziert werden.
|
||||
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
||||
Friend WithEvents lvDruckauftraege As System.Windows.Forms.ListView
|
||||
Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
|
||||
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
|
||||
Friend WithEvents nmuDelete As System.Windows.Forms.MenuItem
|
||||
Friend WithEvents nmuRefresh As System.Windows.Forms.MenuItem
|
||||
Friend WithEvents mnuDurck As System.Windows.Forms.MenuItem
|
||||
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
|
||||
Friend WithEvents lvid_JobID As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents lvid_Auftrag As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents lvid_Typ As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents lvid_Anzahl As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents lvid_Status As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents mnuAnzeige As System.Windows.Forms.MenuItem
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.lvDruckauftraege = New System.Windows.Forms.ListView()
|
||||
Me.lvid_JobID = New System.Windows.Forms.ColumnHeader()
|
||||
Me.lvid_Auftrag = New System.Windows.Forms.ColumnHeader()
|
||||
Me.lvid_Typ = New System.Windows.Forms.ColumnHeader()
|
||||
Me.lvid_Anzahl = New System.Windows.Forms.ColumnHeader()
|
||||
Me.lvid_Status = New System.Windows.Forms.ColumnHeader()
|
||||
Me.ContextMenu1 = New System.Windows.Forms.ContextMenu()
|
||||
Me.mnuAnzeige = New System.Windows.Forms.MenuItem()
|
||||
Me.mnuDurck = New System.Windows.Forms.MenuItem()
|
||||
Me.MenuItem2 = New System.Windows.Forms.MenuItem()
|
||||
Me.nmuDelete = New System.Windows.Forms.MenuItem()
|
||||
Me.nmuRefresh = New System.Windows.Forms.MenuItem()
|
||||
Me.StatusBar1 = New System.Windows.Forms.StatusBar()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lvDruckauftraege
|
||||
'
|
||||
Me.lvDruckauftraege.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.lvid_JobID, Me.lvid_Auftrag, Me.lvid_Typ, Me.lvid_Anzahl, Me.lvid_Status})
|
||||
Me.lvDruckauftraege.ContextMenu = Me.ContextMenu1
|
||||
Me.lvDruckauftraege.FullRowSelect = True
|
||||
Me.lvDruckauftraege.GridLines = True
|
||||
Me.lvDruckauftraege.MultiSelect = False
|
||||
Me.lvDruckauftraege.Name = "lvDruckauftraege"
|
||||
Me.lvDruckauftraege.Size = New System.Drawing.Size(480, 88)
|
||||
Me.lvDruckauftraege.TabIndex = 2
|
||||
Me.lvDruckauftraege.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'lvid_JobID
|
||||
'
|
||||
Me.lvid_JobID.Text = "JobID"
|
||||
Me.lvid_JobID.Width = 0
|
||||
'
|
||||
'lvid_Auftrag
|
||||
'
|
||||
Me.lvid_Auftrag.Text = "Auftrag"
|
||||
Me.lvid_Auftrag.Width = 120
|
||||
'
|
||||
'lvid_Typ
|
||||
'
|
||||
Me.lvid_Typ.Text = "Typ"
|
||||
Me.lvid_Typ.Width = 90
|
||||
'
|
||||
'lvid_Anzahl
|
||||
'
|
||||
Me.lvid_Anzahl.Text = "Anzahl"
|
||||
Me.lvid_Anzahl.Width = 70
|
||||
'
|
||||
'lvid_Status
|
||||
'
|
||||
Me.lvid_Status.Text = "Status"
|
||||
Me.lvid_Status.Width = 180
|
||||
'
|
||||
'ContextMenu1
|
||||
'
|
||||
Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuAnzeige, Me.mnuDurck, Me.MenuItem2, Me.nmuDelete, Me.nmuRefresh})
|
||||
'
|
||||
'mnuAnzeige
|
||||
'
|
||||
Me.mnuAnzeige.Index = 0
|
||||
Me.mnuAnzeige.Text = "Dokument Anzeigen"
|
||||
'
|
||||
'mnuDurck
|
||||
'
|
||||
Me.mnuDurck.Index = 1
|
||||
Me.mnuDurck.Text = "Drucken"
|
||||
'
|
||||
'MenuItem2
|
||||
'
|
||||
Me.MenuItem2.Index = 2
|
||||
Me.MenuItem2.Text = "-"
|
||||
'
|
||||
'nmuDelete
|
||||
'
|
||||
Me.nmuDelete.Index = 3
|
||||
Me.nmuDelete.Text = "Auftrag löschen"
|
||||
'
|
||||
'nmuRefresh
|
||||
'
|
||||
Me.nmuRefresh.Index = 4
|
||||
Me.nmuRefresh.Text = "Auftrag erneut anfordern"
|
||||
'
|
||||
'StatusBar1
|
||||
'
|
||||
Me.StatusBar1.Location = New System.Drawing.Point(0, 88)
|
||||
Me.StatusBar1.Name = "StatusBar1"
|
||||
Me.StatusBar1.Size = New System.Drawing.Size(482, 22)
|
||||
Me.StatusBar1.TabIndex = 3
|
||||
'
|
||||
'frmMehrfachdruck
|
||||
'
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(482, 110)
|
||||
Me.ControlBox = False
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.StatusBar1, Me.lvDruckauftraege})
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmMehrfachdruck"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
|
||||
Me.Text = "Druckaufträge"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Deklarationen "
|
||||
|
||||
|
||||
|
||||
'Dim _HashThreads As New Hashtable()
|
||||
'Dim _HashDruckanzeige As New Hashtable()
|
||||
|
||||
Dim tmpColColdData As Collection
|
||||
Dim tmpColOfficeData As Collection
|
||||
|
||||
Dim sAuftraNR As String
|
||||
|
||||
'PDF Drucken
|
||||
Dim printthread As Thread
|
||||
Dim printfilename As String
|
||||
|
||||
Dim m_MenuEintrag As Integer
|
||||
|
||||
Dim iJobCounter As Integer = 0
|
||||
Dim iJobID(1) As Integer 'Job ID's für den Office und Cold Thread
|
||||
|
||||
'Dim colDruckanzeige As New Collection()
|
||||
|
||||
|
||||
Private Enum enum_MehrfachdruckFeld
|
||||
Anzahl = 0
|
||||
Status = 1
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Formular "
|
||||
|
||||
Public Sub InitForm()
|
||||
Try
|
||||
Me.Visible = False
|
||||
StatusBar1.Text = "Druckspooler initialisieren"
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub InitAnzeige()
|
||||
If iMerker = 1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
iMerker = 1
|
||||
|
||||
Dim ColTrans As ColorTranslator
|
||||
Thread.Sleep(1000)
|
||||
If lvDruckauftraege.Items.Count = 0 Then
|
||||
StatusBar1.Text = "keine Druckaufträge"
|
||||
If Me.Visible = True Then
|
||||
Me.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
'Anzeige aktualisieren
|
||||
'Dim coltmp As Collection
|
||||
Dim coltmp As Hashtable
|
||||
|
||||
coltmp = _HashDruckanzeige
|
||||
|
||||
Dim i As Integer
|
||||
i = 0
|
||||
|
||||
GenAnzeige(coltmp, i)
|
||||
'Try
|
||||
|
||||
' lvDruckauftraege.Items.Clear()
|
||||
' lvDruckauftraege.BeginUpdate()
|
||||
' Dim element As DictionaryEntry
|
||||
' For Each element In coltmp
|
||||
' 'For i = 1 To coltmp.Count
|
||||
' colSpooler = element.Value
|
||||
' 'colSpooler = coltmp(i)
|
||||
' lvDruckauftraege.Items.Add(colSpooler.JobID)
|
||||
' lvDruckauftraege.Items(i).SubItems.Add(colSpooler.AuftragNr)
|
||||
' lvDruckauftraege.Items(i).SubItems.Add(colSpooler.Typ)
|
||||
' lvDruckauftraege.Items(i).SubItems.Add(colSpooler.Anzahl)
|
||||
' lvDruckauftraege.Items(i).SubItems.Add(colSpooler.Status)
|
||||
' If colSpooler.Status = "Dokument bereit zum drucken" Then
|
||||
' 'grün
|
||||
' lvDruckauftraege.Items(i).BackColor = Color.FromArgb(255, 164, 253, 143)
|
||||
' End If
|
||||
' If colSpooler.Status = "Fehler beim Drucken" Then
|
||||
' 'rot
|
||||
' lvDruckauftraege.Items(i).BackColor = Color.FromArgb(255, 255, 174, 165)
|
||||
' End If
|
||||
' i &= 1
|
||||
' Next
|
||||
' lvDruckauftraege.EndUpdate()
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Fehler4: " & ex.Message)
|
||||
'End Try
|
||||
|
||||
Try
|
||||
'Statusbar aktualisieren
|
||||
If i > 0 Then
|
||||
Me.StatusBar1.Text = "Anzahl Druckaufträge " + i.ToString.Trim
|
||||
If Me.Visible = False Then
|
||||
Me.Top = Me.ParentForm.ClientSize.Height - Me.Height - 50
|
||||
Me.Left = Me.ParentForm.ClientSize.Width - Me.Width - 30
|
||||
minimize_all_childs()
|
||||
Me.Visible = True
|
||||
Else
|
||||
minimize_all_childs()
|
||||
End If
|
||||
Else
|
||||
StatusBar1.Text = "keine Druckaufträge"
|
||||
If Me.Visible = True Then
|
||||
Me.Visible = False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler1: " & ex.Message)
|
||||
End Try
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler3: " & ex.Message)
|
||||
Finally
|
||||
iMerker = 0
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub GenAnzeige(ByVal coltmp As Hashtable, ByRef i As Integer)
|
||||
Try
|
||||
Dim colSpooler As clsSpooler_Data
|
||||
'lvDruckauftraege = New ListView()
|
||||
lvDruckauftraege.BeginUpdate()
|
||||
Try
|
||||
lvDruckauftraege.Items.Clear()
|
||||
Catch
|
||||
lvDruckauftraege = New ListView()
|
||||
Me.lvDruckauftraege.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.lvid_JobID, Me.lvid_Auftrag, Me.lvid_Typ, Me.lvid_Anzahl, Me.lvid_Status})
|
||||
Me.lvDruckauftraege.ContextMenu = Me.ContextMenu1
|
||||
Me.lvDruckauftraege.FullRowSelect = True
|
||||
Me.lvDruckauftraege.GridLines = True
|
||||
Me.lvDruckauftraege.MultiSelect = False
|
||||
Me.lvDruckauftraege.Name = "lvDruckauftraege"
|
||||
Me.lvDruckauftraege.Size = New System.Drawing.Size(480, 88)
|
||||
Me.lvDruckauftraege.TabIndex = 2
|
||||
Me.lvDruckauftraege.View = System.Windows.Forms.View.Details
|
||||
End Try
|
||||
|
||||
lvDruckauftraege.Sorting = SortOrder.None
|
||||
|
||||
Dim element As DictionaryEntry
|
||||
|
||||
For Each element In coltmp
|
||||
colSpooler = element.Value
|
||||
lvDruckauftraege.Items.Add(colSpooler.JobID.ToString.Trim)
|
||||
lvDruckauftraege.Items(i).SubItems.Add(colSpooler.AuftragNr)
|
||||
lvDruckauftraege.Items(i).SubItems.Add(colSpooler.Typ)
|
||||
lvDruckauftraege.Items(i).SubItems.Add(colSpooler.Anzahl)
|
||||
lvDruckauftraege.Items(i).SubItems.Add(colSpooler.Status)
|
||||
lvDruckauftraege.Items(i).ForeColor = Color.Black
|
||||
If colSpooler.Status = "Dokument bereit zum drucken" Then
|
||||
'grün
|
||||
lvDruckauftraege.Items(i).BackColor = Color.FromArgb(255, 164, 253, 143)
|
||||
End If
|
||||
If colSpooler.Status = "Fehler beim Drucken" Then
|
||||
'rot
|
||||
lvDruckauftraege.Items(i).BackColor = Color.FromArgb(255, 255, 174, 165)
|
||||
End If
|
||||
i = i + 1
|
||||
Next
|
||||
|
||||
lvDruckauftraege.EndUpdate()
|
||||
|
||||
'Dim Sorter As New clsListViewItemComparer(0)
|
||||
'lvDruckauftraege.ListViewItemSorter = Sorter
|
||||
'lvDruckauftraege.Sort()
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler GenAnzeige: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub AnzeigePopup()
|
||||
Try
|
||||
minimize_all_childs()
|
||||
Me.Focus()
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Druck Funktionen "
|
||||
|
||||
Public Function DruckAnfrage(ByVal colColdData As Collection, ByVal colOfficeData As Collection)
|
||||
Try
|
||||
'Auftragsnummer generieren
|
||||
sAuftraNR = Now().ToString.Trim
|
||||
'JobID's zuweisen
|
||||
iJobCounter = iJobCounter + 1
|
||||
iJobID(0) = iJobCounter 'JobID Cold
|
||||
iJobCounter = iJobCounter + 1
|
||||
iJobID(1) = iJobCounter 'JobID Office
|
||||
|
||||
If colColdData.Count > 0 Then
|
||||
Dim MehrfachDruckColdThread As Thread
|
||||
tmpColColdData = colColdData
|
||||
MehrfachDruckColdThread = New Thread(AddressOf StartColdDruckJob)
|
||||
MehrfachDruckColdThread.IsBackground = True
|
||||
MehrfachDruckColdThread.Name = "EDOKA_MehrfachDruck_" + (iJobCounter - 1).ToString.Trim
|
||||
MehrfachDruckColdThread.Start()
|
||||
_HashThreads.Add(iJobCounter - 1, MehrfachDruckColdThread)
|
||||
End If
|
||||
|
||||
If colOfficeData.Count > 0 Then
|
||||
Dim MehrfachDruckEdokaThread As Thread
|
||||
tmpColOfficeData = colOfficeData
|
||||
MehrfachDruckEdokaThread = New Thread(AddressOf StartEdokaDruckJob)
|
||||
MehrfachDruckEdokaThread.IsBackground = True
|
||||
MehrfachDruckEdokaThread.Name = "EDOKA_MehrfachDruck_" + iJobCounter.ToString.Trim
|
||||
MehrfachDruckEdokaThread.Start()
|
||||
_HashThreads.Add(iJobCounter, MehrfachDruckEdokaThread)
|
||||
|
||||
End If
|
||||
Thread.Sleep(1500)
|
||||
InitAnzeige()
|
||||
AnzeigePopup()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub StartColdDruckJob()
|
||||
Dim sThreadName As String
|
||||
Dim iColdJobID As Integer = iJobID(0)
|
||||
sThreadName = "EDOKA_MehrfachDruck_" + iColdJobID.ToString.Trim
|
||||
Try
|
||||
Dim tmpData As Collection
|
||||
Dim gendok As clsMehrfachdruck_Data
|
||||
Dim rReturn As Object
|
||||
|
||||
Dim timestamp As String
|
||||
Dim pdfFileName As String
|
||||
Dim sJobNummer As String
|
||||
|
||||
timestamp = Format(Now, "yyyyMMddHHmmss")
|
||||
sJobNummer = iColdJobID.ToString.Trim
|
||||
Do While Len(sJobNummer) < 4
|
||||
sJobNummer = "0" & sJobNummer
|
||||
Loop
|
||||
pdfFileName = timestamp + "_" + sJobNummer + ".pdf"
|
||||
tmpData = tmpColColdData
|
||||
|
||||
'colDruckanzeige.Add(New clsSpooler_Data(iColdJobID, sAuftraNR, "Cold-Druck", "Daten Aufbereitung", tmpData.Count.ToString.Trim, tmpData, Now(), 1, pdfFileName))
|
||||
Dim newDruckRow As New clsSpooler_Data(iColdJobID, sAuftraNR, "Cold-Druck", "Daten Aufbereitung", tmpData.Count.ToString.Trim, tmpData, Now(), 1, pdfFileName)
|
||||
_HashDruckanzeige.Add(iColdJobID, newDruckRow)
|
||||
|
||||
Console.WriteLine("StartColdDruckJob - JobID=" & iColdJobID.ToString)
|
||||
|
||||
'Wenn mehrere Dokumente gedruckt werden sollen
|
||||
Dim i As Integer
|
||||
Dim tmp1 As New DataTable()
|
||||
|
||||
tmp1.Columns.Add("DokumentId")
|
||||
tmp1.Columns.Add("PartnerNr")
|
||||
tmp1.Columns.Add("Typ")
|
||||
tmp1.Columns.Add("OfficeDokument")
|
||||
tmp1.Columns.Add("DokumentTyp")
|
||||
tmp1.Columns.Add("Auftragnr")
|
||||
tmp1.Columns.Add("PartnerName")
|
||||
tmp1.Columns.Add("Erstellungsdatum")
|
||||
|
||||
Dim row As DataRow
|
||||
|
||||
For i = 1 To tmpData.Count
|
||||
gendok = tmpData(i)
|
||||
row = tmp1.NewRow
|
||||
row.Item("Auftragnr") = gendok.Auftragnr
|
||||
row.Item("DokumentId") = gendok.DokumentId
|
||||
row.Item("DokumentTyp") = gendok.DokumentTyp
|
||||
row.Item("Erstellungsdatum") = gendok.Erstellungsdatum
|
||||
row.Item("OfficeDokument") = gendok.OfficeDokument
|
||||
row.Item("PartnerName") = gendok.PartnerName
|
||||
row.Item("PartnerNr") = gendok.PartnerNr
|
||||
Select Case gendok.Typ
|
||||
Case clsMehrfachdruck_Data.Enum_Typ.EDOKA
|
||||
row.Item("Typ") = 1
|
||||
Case clsMehrfachdruck_Data.Enum_Typ.HOST
|
||||
row.Item("Typ") = 2
|
||||
Case clsMehrfachdruck_Data.Enum_Typ.ZV
|
||||
row.Item("Typ") = 3
|
||||
End Select
|
||||
|
||||
tmp1.Rows.Add(row)
|
||||
Next
|
||||
|
||||
'Cold Dokumente
|
||||
For i = 1 To tmpData.Count
|
||||
gendok = tmpData(i)
|
||||
If gendok.OfficeDokument = False Then
|
||||
DivFnkt.Journal_Dokumentzugriff(gendok.DokumentId, "COLD-Print", 0, 0, "", "")
|
||||
End If
|
||||
Next
|
||||
|
||||
'Dokumente anfordern
|
||||
UpdateCollection(iColdJobID, enum_MehrfachdruckFeld.Status, "Cold-Dokument anfordern")
|
||||
Dim remoteObj As EDKB07Verarbeitung.EDKB07Verarbeitung.IEDKB07
|
||||
Dim Obj As New Object()
|
||||
Obj = Activator.GetObject( _
|
||||
GetType(EDKB07Verarbeitung.EDKB07Verarbeitung.IEDKB07), _
|
||||
System.Configuration.ConfigurationSettings.AppSettings("RemoteObjUrl"))
|
||||
|
||||
' Auf das Remote-Objekt durch die Schnittstelle zugreifen.
|
||||
remoteObj = CType(Obj, EDKB07Verarbeitung.EDKB07Verarbeitung.IEDKB07)
|
||||
Try
|
||||
remoteObj.GetColdMehrfachDruck(Globals.TGNummer, iColdJobID, tmp1, rReturn)
|
||||
'remoteObj = Nothing
|
||||
|
||||
'Dokument erhalten
|
||||
UpdateCollection(iColdJobID, enum_MehrfachdruckFeld.Status, "Cold-Dokument empfangen und speichern")
|
||||
|
||||
Try
|
||||
If rReturn.Length > 1 Then
|
||||
Dim fs As New FileStream(Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("pfad_temporaer_dokumente") & pdfFileName, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
fs.Write(rReturn, 0, rReturn.Length)
|
||||
fs.Close()
|
||||
fs = Nothing
|
||||
Dim s As String
|
||||
UpdateCollection(iColdJobID, enum_MehrfachdruckFeld.Status, "Dokument bereit zum drucken")
|
||||
Else
|
||||
UpdateCollection(iColdJobID, enum_MehrfachdruckFeld.Status, "Fehler beim Drucken")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("StartColdDruckJob - JobID=" & iColdJobID.ToString & " Fehler 1: " & ex.Message)
|
||||
UpdateCollection(iColdJobID, enum_MehrfachdruckFeld.Status, "Fehler beim Drucken")
|
||||
Finally
|
||||
InitAnzeige()
|
||||
AnzeigePopup()
|
||||
End Try
|
||||
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("StartColdDruckJob - JobID=" & iColdJobID.ToString & " Fehler 2: " & ex.Message)
|
||||
UpdateCollection(iColdJobID, enum_MehrfachdruckFeld.Status, "Fehler beim Drucken")
|
||||
InitAnzeige()
|
||||
AnzeigePopup()
|
||||
End Try
|
||||
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("StartColdDruckJob - JobID=" & iColdJobID.ToString & " Fehler 3: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub StartEdokaDruckJob()
|
||||
Try
|
||||
Dim tmpData As Collection
|
||||
Dim iOfficeJobID As Integer = iJobID(1)
|
||||
Dim gendok As clsMehrfachdruck_Data
|
||||
tmpData = tmpColOfficeData
|
||||
|
||||
Console.WriteLine("StartEdokaDruckJob - JobID=" & iOfficeJobID.ToString)
|
||||
|
||||
'colDruckanzeige.Add(New clsSpooler_Data(iOfficeJobID, sAuftraNR, "Office-Druck", "am drucken", tmpData.Count.ToString.Trim, tmpData, Now(), 1, ""))
|
||||
Dim newDruckRow As New clsSpooler_Data(iOfficeJobID, sAuftraNR, "Office-Druck", "am drucken", tmpData.Count.ToString.Trim, tmpData, Now(), 1, "")
|
||||
_HashDruckanzeige.Add(iOfficeJobID, newDruckRow)
|
||||
|
||||
|
||||
Thread.Sleep(2000)
|
||||
|
||||
'Office Dokumente
|
||||
Dim i As Integer
|
||||
For i = 1 To tmpData.Count
|
||||
gendok = tmpData(i)
|
||||
If gendok.OfficeDokument = True Then
|
||||
Console.WriteLine("StartEdokaDruckJob - Vor Drucken=" & iOfficeJobID.ToString)
|
||||
DivFnkt.print_office(gendok.DokumentId, Nothing, False)
|
||||
Console.WriteLine("StartEdokaDruckJob - Nach Drucken=" & iOfficeJobID.ToString)
|
||||
'Druckauftrag anpassen
|
||||
UpdateCollection(iOfficeJobID, enum_MehrfachdruckFeld.Anzahl, i.ToString.Trim + " von " + tmpData.Count.ToString.Trim)
|
||||
If i = tmpData.Count Then
|
||||
UpdateCollection(iOfficeJobID, enum_MehrfachdruckFeld.Status, "gedruckt")
|
||||
End If
|
||||
InitAnzeige()
|
||||
End If
|
||||
Next
|
||||
'Eintrag Löschen
|
||||
DeleteEntryCollection(iOfficeJobID)
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("StartEdokaDruckJob - Fehler =" & ex.Message)
|
||||
'MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " PDF Drucken"
|
||||
'Designd by SHU
|
||||
|
||||
'Private Sub print_pdf(ByVal spfad As String)
|
||||
' 'Druckt ein PDF in einem neuen Thread
|
||||
' printfilename = New String(spfad)
|
||||
' printthread = New Thread(AddressOf start_print_pdf)
|
||||
' printthread.Start()
|
||||
'End Sub
|
||||
|
||||
|
||||
''Dim WithEvents pdfprinter As frmPDF_Printer
|
||||
''Dim Print_Active As Boolean
|
||||
'Private Sub start_print_pdf()
|
||||
' Dim objpdf As New clsPDF_print_show()
|
||||
' objpdf.PrintPDF(printfilename, clsPDF_print_show.Enum_Art.Drucken)
|
||||
' 'pdfprinter = New frmPDF_Printer(printfilename, False) '0
|
||||
' 'pdfprinter.Prepare_Form()
|
||||
' 'Application.DoEvents()
|
||||
' 'Print_Active = True
|
||||
' 'pdfprinter.PrintPDF()
|
||||
' delay(5)
|
||||
'End Sub
|
||||
|
||||
'Private Sub delay(ByVal seconds As Integer)
|
||||
' Me.Cursor = Cursors.WaitCursor
|
||||
' Dim starttime As DateTime = DateTime.Now
|
||||
' Do
|
||||
' Application.DoEvents()
|
||||
' Loop While DateTime.Now.Subtract(starttime).TotalSeconds < seconds
|
||||
' Me.Cursor = Cursors.Default
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Collection Funktionen"
|
||||
|
||||
Private Sub UpdateCollection(ByVal iJobID As Integer, ByVal iTyp As enum_MehrfachdruckFeld, ByVal sWert As String)
|
||||
'Wert in der Collection updaten
|
||||
Try
|
||||
Dim i As Integer
|
||||
Dim colSpooler As clsSpooler_Data
|
||||
Dim element As DictionaryEntry
|
||||
For Each element In _HashDruckanzeige
|
||||
colSpooler = element.Value
|
||||
If colSpooler.JobID = iJobID Then
|
||||
Select Case iTyp
|
||||
Case enum_MehrfachdruckFeld.Anzahl
|
||||
colSpooler.Anzahl = sWert
|
||||
Case enum_MehrfachdruckFeld.Status
|
||||
colSpooler.Status = sWert
|
||||
End Select
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteEntryCollection(ByVal iJobID As Integer)
|
||||
'Eintrag aus der Collection entfernen
|
||||
Try
|
||||
Dim i As Integer
|
||||
Dim colSpooler As clsSpooler_Data
|
||||
Dim element As DictionaryEntry
|
||||
For Each element In _HashDruckanzeige
|
||||
colSpooler = element.Value
|
||||
If colSpooler.JobID = iJobID Then
|
||||
_HashDruckanzeige.Remove(iJobID)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Thread.Sleep(1000)
|
||||
InitAnzeige()
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function GetDataFromColl(ByVal OrgColl As Hashtable, ByVal JobID As Integer) As Collection
|
||||
Try
|
||||
Dim tmpData As Hashtable
|
||||
Dim i As Integer
|
||||
Dim gendok As clsSpooler_Data
|
||||
|
||||
tmpData = OrgColl
|
||||
Dim element As DictionaryEntry
|
||||
For Each element In _HashDruckanzeige
|
||||
gendok = element.Value
|
||||
If gendok.JobID = JobID Then
|
||||
'JobID gefunden
|
||||
GetDataFromColl = gendok.Data
|
||||
Exit Try
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetDateiNameFromColl(ByVal OrgColl As Hashtable, ByVal JobID As Integer) As String
|
||||
Try
|
||||
Dim tmpData As Hashtable
|
||||
Dim i As Integer
|
||||
Dim gendok As clsSpooler_Data
|
||||
|
||||
tmpData = OrgColl
|
||||
Dim element As DictionaryEntry
|
||||
For Each element In _HashDruckanzeige
|
||||
gendok = element.Value
|
||||
If gendok.JobID = JobID Then
|
||||
'JobID gefunden
|
||||
GetDateiNameFromColl = gendok.DateiName
|
||||
Exit Try
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Menufunktionen"
|
||||
|
||||
Private Sub nmuDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nmuDelete.Click
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim iJobID As Integer
|
||||
iJobID = lvDruckauftraege.Items(m_MenuEintrag).SubItems(0).Text
|
||||
|
||||
Console.WriteLine("nmuDelete_Click =" & m_MenuEintrag.ToString & " JobID " & iJobID.ToString)
|
||||
|
||||
Try
|
||||
Dim MehrfachDruckThread As Thread
|
||||
MehrfachDruckThread = _HashThreads.Item(iJobID)
|
||||
MehrfachDruckThread.Abort()
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("nmuDelete_Click 1=" & m_MenuEintrag.ToString & ex.Message)
|
||||
End Try
|
||||
DeleteEntryCollection(iJobID)
|
||||
Catch ex As Exception
|
||||
Console.WriteLine("nmuDelete_Click 2=" & m_MenuEintrag.ToString & ex.Message)
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub nmuRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nmuRefresh.Click
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim tmpCollData As New Collection()
|
||||
Dim tmpCollLeer As New Collection()
|
||||
'tmpCollData = GetDataFromColl(colDruckanzeige, lvDruckauftraege.Items(m_MenuEintrag).SubItems(0).Text)
|
||||
tmpCollData = GetDataFromColl(_HashDruckanzeige, lvDruckauftraege.Items(m_MenuEintrag).SubItems(0).Text)
|
||||
|
||||
If lvDruckauftraege.Items(m_MenuEintrag).SubItems(2).Text = "Cold-Druck" Then
|
||||
DruckAnfrage(tmpCollData, tmpCollLeer)
|
||||
Else
|
||||
DruckAnfrage(tmpCollLeer, tmpCollData)
|
||||
End If
|
||||
|
||||
If lvDruckauftraege.Items(m_MenuEintrag).SubItems(4).Text = "Fehler beim Drucken" Then
|
||||
DeleteEntryCollection(lvDruckauftraege.Items(m_MenuEintrag).SubItems(0).Text())
|
||||
Else
|
||||
InitAnzeige()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub mnuAnzeige_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuAnzeige.Click
|
||||
Dim iJobID As Integer
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim tmpCollData As New Collection()
|
||||
Dim tmpCollLeer As New Collection()
|
||||
Dim sDateiName As String
|
||||
|
||||
iJobID = lvDruckauftraege.Items(m_MenuEintrag).SubItems(0).Text
|
||||
|
||||
sDateiName = GetDateiNameFromColl(_HashDruckanzeige, iJobID)
|
||||
sDateiName = Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("pfad_temporaer_dokumente") & sDateiName
|
||||
|
||||
'Dokument Drucken
|
||||
UpdateCollection(iJobID, enum_MehrfachdruckFeld.Status, "Cold-Dokument drucken")
|
||||
|
||||
Dim objpdf As New clsPDF_print_show()
|
||||
objpdf.PrintPDF(sDateiName, clsPDF_print_show.Enum_Art.Anzeigen)
|
||||
'print_pdf(sDateiName)
|
||||
|
||||
'Abgeschlossen
|
||||
UpdateCollection(iJobID, enum_MehrfachdruckFeld.Status, "gedruckt")
|
||||
|
||||
'Eintrag Löschen
|
||||
DeleteEntryCollection(iJobID)
|
||||
|
||||
Catch ex As Exception
|
||||
UpdateCollection(iJobID, enum_MehrfachdruckFeld.Status, "Fehler beim ausdrucken")
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub mnuDurck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDurck.Click
|
||||
Dim iJobID As Integer
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim tmpCollData As New Collection()
|
||||
Dim tmpCollLeer As New Collection()
|
||||
Dim sDateiName As String
|
||||
|
||||
iJobID = lvDruckauftraege.Items(m_MenuEintrag).SubItems(0).Text
|
||||
|
||||
sDateiName = GetDateiNameFromColl(_HashDruckanzeige, iJobID)
|
||||
sDateiName = Globals.Applikationsdaten.Rows(Globals.AppldataRow).Item("pfad_temporaer_dokumente") & sDateiName
|
||||
|
||||
'Dokument Drucken
|
||||
UpdateCollection(iJobID, enum_MehrfachdruckFeld.Status, "Cold-Dokument drucken")
|
||||
|
||||
Dim objpdf As New clsPDF_print_show()
|
||||
objpdf.PrintPDF(sDateiName, clsPDF_print_show.Enum_Art.Drucken)
|
||||
'print_pdf(sDateiName)
|
||||
|
||||
'Abgeschlossen
|
||||
UpdateCollection(iJobID, enum_MehrfachdruckFeld.Status, "gedruckt")
|
||||
|
||||
'Eintrag Löschen
|
||||
DeleteEntryCollection(iJobID)
|
||||
|
||||
Catch ex As Exception
|
||||
UpdateCollection(iJobID, enum_MehrfachdruckFeld.Status, "Fehler beim ausdrucken")
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ContextMenu1_Popup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ContextMenu1.Popup
|
||||
Try
|
||||
|
||||
m_MenuEintrag = lvDruckauftraege.SelectedItems.Item(0).Index
|
||||
Console.WriteLine("ContextMenu1_Popup =" & m_MenuEintrag.ToString)
|
||||
If lvDruckauftraege.Items(m_MenuEintrag).SubItems(2).Text = "Cold-Druck" Then
|
||||
If lvDruckauftraege.Items(m_MenuEintrag).SubItems(4).Text = "Dokument bereit zum drucken" Or _
|
||||
lvDruckauftraege.Items(m_MenuEintrag).SubItems(4).Text = "Fehler beim ausdrucken" Then
|
||||
mnuAnzeige.Enabled = True
|
||||
mnuDurck.Enabled = True
|
||||
Else
|
||||
mnuAnzeige.Enabled = False
|
||||
mnuDurck.Enabled = False
|
||||
End If
|
||||
Else
|
||||
mnuAnzeige.Enabled = False
|
||||
mnuDurck.Enabled = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Diverse Funktionen"
|
||||
|
||||
Private Sub minimize_all_childs()
|
||||
Dim c As Form
|
||||
For Each c In Me.ParentForm.MdiChildren
|
||||
c.WindowState = FormWindowState.Normal
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
175
EDOKA/Backup/Drucken/frmPDF_Printer.resx
Normal file
175
EDOKA/Backup/Drucken/frmPDF_Printer.resx
Normal file
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="contextMenu.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>123, 17</value>
|
||||
</data>
|
||||
<data name="contextMenu.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="MenuItem13.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="StatusBar1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="addressBar.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ImageList1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ImageList1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</data>
|
||||
<data name="Panel1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Button2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="Button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="webOCWrapper.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="PictureBox2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="PictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAVpJREFUWEfFl2sO
|
||||
hDAIhPXmHs2buVKXLqW0MGwTTfzVx3xMweK+Ac9xHNds+j2+A9vFppIov+d5XqOHxuTc2O6TWRHRCEwK
|
||||
hMRn0Q5tUAPsCgRB4qufG2CaOxXQE6eI7r3M13PMhYiKSyENk4aInDmL6ePRELPjexw0jsOLnjYdCSEA
|
||||
zz5bKdfm3D3rRgBWTngJzC5UiEj0tKkUY2A0eoZrXIgC6Mh09F7kcpwBigtZABk9Ii7zYAlAJH/6ynkS
|
||||
cQkAGr3pQCaKjPAvmYUDVI9oHlgVEQWSCdiUIuJCtvzkN6DmAH+REBeyAGb06q4OOZk5Ai0+a+9CEMgk
|
||||
RJwNWdYRZcQrBC1GkpNdEddu06h6XXXXun0X8B0+hZGiVtSwuKwOUTJDmJFoV25Qhyomy56fnRndcEv/
|
||||
DyxgDyAbZGZdNaG54zM7/bGmQLwJQOyvA5QbdVnGZ48jA/ABQB/NVGTmD6kAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>frmPDF_Printer</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAMAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAMDAwACAgIAAAAD/AAD/
|
||||
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAeAAAAAAAAHeAiAAAAAh3iHgAiAAACIh3eIgA
|
||||
iACId3d4iIgAAI93d/iIiIgAj3f/d3iIiICP/3eZd3iIgI93qnd4gHiACI93eIfweIAACI+H//8AAAAA
|
||||
CI////AAAAAACP/4gAAAAAAAiIAAAAAAAAAAAAAA/P8AAPA/AADADwAAgAMAAIABAAAAAQAAAAAAAAAA
|
||||
AAAAAAAAAAAAAIABAADgBwAA+AEAAP4HAAD/HwAA//8AACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAICAgAAAAP8AAP8AAAD/
|
||||
/wD/AAAA/wD/AP//AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHiAAAAAAAAAAAAAAAAAAHd4iIAA
|
||||
AAAAAAAAAAAAAHd3gAiIgAAAAAAAAAAAAHd3iHiACIiAAAAAAAAAAHd3iHh4iIAIiIAAAAAAAHd3iHd4
|
||||
eIiIgAiIgAAAAAh3iHd3eHiIiIiACIiAAAAIiHd3d3h4iIiIiIAIgAAAiHh3d3d4eIiIiIiIgAAAAI94
|
||||
d3d3ePiIiIiIiIiAAACPeHd3d/iHeIiIiIiIiAAAj3h3d/93eId4iIiIiIgIAI94d/93d3d4h3iIiIiI
|
||||
B4CPeP93eZd4h3iHeIiIiAeIj/iHeqd4h3d3CId4iIgIAIj3eId4h3d3APcIh3iIAAAAiPd4iId3AP//
|
||||
B3iHeAAAAACI93iIAP/8z3CHeIAAAAAAAIj3eI/8z//wiIAAAAAAAAAAiPd4///M9wAAAAAAAAAAAACI
|
||||
+P/M//9wAAAAAAAAAAAAAIiP//zP9wAAAAAAAAAAAAAAj/zP//9wAAAAAAAAAAAAAAj///zP9wAAAAAA
|
||||
AAAAAAAAj/zP//+IAAAAAAAAAAAAAAj///+IAAAAAAAAAAAAAAAAj/+IAAAAAAAAAAAAAAAAAAiIAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8f///8B///8A
|
||||
H//8AAf/8AAB/8AAAH+AAAAfgAAAD4AAAA8AAAAPAAAABwAAAAMAAAABAAAAAAAAAAAAAAADAAAAB8AA
|
||||
AAfwAAAf/AAAf/8AAf//wAD///AAf//8AD///gAP//8AD///gD///8D////j/////////////////w==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
253
EDOKA/Backup/Drucken/frmPDF_Printer.vb
Normal file
253
EDOKA/Backup/Drucken/frmPDF_Printer.vb
Normal file
@@ -0,0 +1,253 @@
|
||||
Imports System.Resources
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmPDF_Printer
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
#Region " Windows Form Designer generated code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Windows Form Designer.
|
||||
InitializeComponent()
|
||||
|
||||
End Sub
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem
|
||||
Friend Shadows WithEvents contextMenu As System.Windows.Forms.ContextMenu
|
||||
Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
|
||||
Friend WithEvents addressBar As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
||||
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents webOCWrapper As WebOCHostCtrl
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmPDF_Printer))
|
||||
Me.contextMenu = New System.Windows.Forms.ContextMenu()
|
||||
Me.MenuItem13 = New System.Windows.Forms.MenuItem()
|
||||
Me.StatusBar1 = New System.Windows.Forms.StatusBar()
|
||||
Me.addressBar = New System.Windows.Forms.ComboBox()
|
||||
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.webOCWrapper = New EDOKAApp.WebOCHostCtrl()
|
||||
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'contextMenu
|
||||
'
|
||||
Me.contextMenu.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem13})
|
||||
'
|
||||
'MenuItem13
|
||||
'
|
||||
Me.MenuItem13.Index = 0
|
||||
Me.MenuItem13.Text = "Print..."
|
||||
'
|
||||
'StatusBar1
|
||||
'
|
||||
Me.StatusBar1.Anchor = ((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right)
|
||||
Me.StatusBar1.Dock = System.Windows.Forms.DockStyle.None
|
||||
Me.StatusBar1.Location = New System.Drawing.Point(0, 405)
|
||||
Me.StatusBar1.Name = "StatusBar1"
|
||||
Me.StatusBar1.Size = New System.Drawing.Size(624, 24)
|
||||
Me.StatusBar1.TabIndex = 1
|
||||
'
|
||||
'addressBar
|
||||
'
|
||||
Me.addressBar.Location = New System.Drawing.Point(16, 56)
|
||||
Me.addressBar.Name = "addressBar"
|
||||
Me.addressBar.Size = New System.Drawing.Size(352, 21)
|
||||
Me.addressBar.Sorted = True
|
||||
Me.addressBar.TabIndex = 3
|
||||
Me.addressBar.Visible = False
|
||||
'
|
||||
'ImageList1
|
||||
'
|
||||
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
||||
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
|
||||
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.PictureBox2, Me.Button2, Me.Label1, Me.Button1})
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(368, 176)
|
||||
Me.Panel1.TabIndex = 10
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(160, 88)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.TabIndex = 3
|
||||
Me.Button2.Text = "&Nein"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Location = New System.Drawing.Point(56, 16)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(264, 48)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Sind die Dokumente erfolgreich gedruckt worden?"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(240, 88)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.TabIndex = 1
|
||||
Me.Button1.Text = "&Ja"
|
||||
'
|
||||
'webOCWrapper
|
||||
'
|
||||
Me.webOCWrapper.BrowserContextMenu = False
|
||||
Me.webOCWrapper.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.webOCWrapper.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.webOCWrapper.Name = "webOCWrapper"
|
||||
Me.webOCWrapper.Size = New System.Drawing.Size(320, 125)
|
||||
Me.webOCWrapper.TabIndex = 11
|
||||
Me.webOCWrapper.TabStop = False
|
||||
'
|
||||
'PictureBox2
|
||||
'
|
||||
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Bitmap)
|
||||
Me.PictureBox2.Location = New System.Drawing.Point(16, 8)
|
||||
Me.PictureBox2.Name = "PictureBox2"
|
||||
Me.PictureBox2.Size = New System.Drawing.Size(40, 50)
|
||||
Me.PictureBox2.TabIndex = 16
|
||||
Me.PictureBox2.TabStop = False
|
||||
'
|
||||
'frmPDF_Printer
|
||||
'
|
||||
Me.AutoScale = False
|
||||
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
|
||||
Me.ClientSize = New System.Drawing.Size(320, 125)
|
||||
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.StatusBar1, Me.addressBar, Me.webOCWrapper})
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "frmPDF_Printer"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "PDF-Dokument drucken"
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Deklarationen"
|
||||
|
||||
Dim m_showdoc As Boolean = True
|
||||
'Dim m_druckjobnr As Integer
|
||||
Dim m_druckjobPfad As String
|
||||
Public Event PrintDOne()
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub delay(ByVal seconds As Integer)
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim starttime As DateTime = DateTime.Now
|
||||
Do
|
||||
Application.DoEvents()
|
||||
Loop While DateTime.Now.Subtract(starttime).TotalSeconds < seconds
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Public Sub PrintPDF()
|
||||
delay(2)
|
||||
webOCWrapper.Print(doUI:=True)
|
||||
Me.Button1.Enabled = True
|
||||
Application.DoEvents()
|
||||
Dim i As Integer
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal druckjobPfad As String, ByVal ShowDoc As Boolean)
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
Me.m_showdoc = ShowDoc
|
||||
Me.m_druckjobPfad = druckjobPfad
|
||||
End Sub
|
||||
|
||||
Private Sub frmPDF_Printer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
Get_Druckjob()
|
||||
If Me.m_showdoc = True Then
|
||||
Me.Width = Me.Width * 2.5
|
||||
Me.Height = Me.Height * 3.5
|
||||
Me.Panel1.Visible = False
|
||||
webOCWrapper.Navigate(addressBar.Text)
|
||||
Else
|
||||
webOCWrapper.Navigate(addressBar.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub Prepare_Form()
|
||||
'SHU Mehrfachdruck
|
||||
Get_Druckjob()
|
||||
If Me.m_showdoc = True Then
|
||||
Me.Width = Me.Width * 2.5
|
||||
Me.Height = Me.Height * 3.5
|
||||
Me.Panel1.Visible = False
|
||||
webOCWrapper.Navigate(addressBar.Text)
|
||||
Else
|
||||
webOCWrapper.Navigate(addressBar.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub inetOptionsMI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
||||
webOCWrapper.InternetOptions()
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
||||
Me.DialogResult = DialogResult.Yes
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Function Get_Druckjob()
|
||||
Try
|
||||
Dim dokumentname2 = m_druckjobPfad
|
||||
Me.addressBar.Text = dokumentname2
|
||||
Return True
|
||||
Exit Function
|
||||
Catch EX As Exception
|
||||
'MyMsg.show_standardmessage(716, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub frmPDF_Printer_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
|
||||
Me.Hide()
|
||||
If Me.DialogResult = DialogResult.Yes Then RaiseEvent PrintDOne()
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
|
||||
Me.DialogResult = DialogResult.No
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user