neu
This commit is contained in:
@@ -66,7 +66,6 @@ Public Class cProgramFunctions
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Sub showRpt(rpt As GrapeCity.ActiveReports.SectionReport, Rptname As String, Optional allowPrint As Boolean = True)
|
||||
Dim print As New frmPrintLayout
|
||||
print.Text = Rptname
|
||||
@@ -437,6 +436,41 @@ Public Class cProgramFunctions
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Function getDruckernameBySearch(srch As String, Optional elseStandard As Boolean = True) As String
|
||||
' alle installierten Drucker ermitteln und
|
||||
' in in ein ArrayList-Objekt speichern
|
||||
'Dim sPrinters As New ArrayList
|
||||
'For Each sPrinter As String In PrinterSettings.InstalledPrinters
|
||||
' sPrinters.Add(sPrinter)
|
||||
'Next
|
||||
|
||||
' Array sortieren
|
||||
'sPrinters.Sort()
|
||||
|
||||
' jetzt alle Drucker in sortierter Reihenfolge in einer
|
||||
' ComboBox zur Auswahl anbieten
|
||||
Dim oPS As New System.Drawing.Printing.PrinterSettings
|
||||
|
||||
If PrinterSettings.InstalledPrinters.Count > 0 Then
|
||||
If srch <> "" Then
|
||||
For Each i In PrinterSettings.InstalledPrinters
|
||||
If i.ToString.ToUpper.Contains(srch.ToUpper) Then
|
||||
Return i
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If elseStandard Then
|
||||
For Each i In PrinterSettings.InstalledPrinters
|
||||
If i.ToString = oPS.PrinterName Then
|
||||
Return i
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function IsValidEMail(ByVal MailAdress As String) As Boolean
|
||||
Return Regex.IsMatch(MailAdress, "^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$")
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user