This commit is contained in:
2023-02-12 22:01:48 +01:00
parent e8cd9d402b
commit 01357e4a67
4 changed files with 235 additions and 150 deletions

View File

@@ -13,6 +13,7 @@ Imports Newtonsoft.Json
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports GrapeCity.Viewer.Common.Model
Imports System.Drawing.Drawing2D
'Imports UID
@@ -194,7 +195,8 @@ Public Class frmHauptfenster
' transparentpnl.BackColor = Color.Transparent
btnMitarbeiterKonto.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
setProfileImage()
TimerAkte.Enabled = True
Grid_aktiv = False
@@ -1007,11 +1009,78 @@ Public Class frmHauptfenster
End If
If chkFarben Then GridZeichnenAviso()
Label8.Visible = False
lblDauer.Text = "Dauer Anzeige aufbauen: " & hDifferenz.ToString & " ms"
lblDauer.Text = "" & hDifferenz.ToString & " ms"
'lblDauer.Text = "Dauer Anzeige aufbauen: " & hDifferenz.ToString & " ms"
End Sub
Public Sub setProfileImage()
Try
If VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_foto_DocId IsNot Nothing Then
'Get the original image.
'Dim originalImage = Image.FromFile("\\share01\Datenarchiv\DOKUMENTE\MITARBEITER\PERSONAL_FOTOS\20200419_000451_Hofer_375.jpg") 'My.Resources.Koerfez61
'Dim originalImage = Image.FromFile("\\share01\Datenarchiv\DOKUMENTE\MITARBEITER\PERSONAL_FOTOS\20220620_091930_Luxbauer_4.jpg") 'My.Resources.Koerfez61
Dim originalImage = Image.FromFile(cDATENSERVER.GET_PDFPath_BY_DocID(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_foto_DocId)) 'My.Resources.Koerfez61
'Dim originalImage = Image.FromFile("C:\Users\DEVELOPER1\Desktop\grund.png") 'My.Resources.Koerfez61
' MsgBox(cDATENSERVER.GET_PDFPath_BY_DocID(VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_foto_DocId))
Dim picSize = 35
Dim space_X As Integer = 0
Dim space_Y As Integer = 0
Dim picWidth As Integer = 0
Dim picHheight As Integer = 0
Dim factor As Double = 1
If originalImage.Height < originalImage.Width Then
factor = picSize / originalImage.Height
picWidth = originalImage.Width * factor
picHheight = originalImage.Height * factor
' space_X = (picWidth - picHheight) / 2
Else
factor = picSize / originalImage.Width
picWidth = originalImage.Width * factor
picHheight = originalImage.Height * factor
' space_X = (picHheight - picWidth) / 2
End If
' MsgBox(picWidth & " - " & picHheight)
'Create a new, blank image with the same dimensions.
Dim croppedImage As New Bitmap(picWidth, picHheight)
'Prepare to draw on the new image.
Using g = Graphics.FromImage(croppedImage)
Dim path As New GraphicsPath
'Create an ellipse that fills the image in both directions.
'path.AddEllipse(0, 0, croppedImage.Width, croppedImage.Height)
path.AddEllipse(0, 0, picSize, picSize)
Dim reg As New Region(path)
'Draw only within the specified ellipse.
g.Clip = reg
'g.DrawImage(originalImage, 0, 0, picSize, picSize)
g.DrawImage(originalImage, 0, 0, picWidth, picHheight)
End Using
'Display the new image.
btnMitarbeiterKonto.Image = croppedImage
Exit Sub
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
btnMitarbeiterKonto.Image = My.Resources.mitarbeiter_s
End Sub
Function setAkive_AuswahlID() As Integer
If gridAviso.SelectedRows.Count > 0 Then
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = CInt(gridAviso.Rows(gridAviso.SelectedRows(0).Index).Cells("AvisoID").Value)
@@ -2843,7 +2912,7 @@ Public Class frmHauptfenster
End Sub
Private Sub btnAsd_Click(sender As Object, e As EventArgs) Handles btnAsd.Click
Private Sub btnAsd_Click(sender As Object, e As EventArgs)
newNotify(frmNotify.cNotify_ART.AVISO_2H, 1, gridMyAviso.Rows(0).Cells("LKW_Nr").Value, gridMyAviso.Rows(0).Cells("AvisoId").Value)
End Sub
@@ -4087,7 +4156,7 @@ Public Class frmHauptfenster
End Sub
Private Sub Button11_Click_1(sender As Object, e As EventArgs) Handles Button11.Click
cHMRC.VATTEST(InputBox("Token"))
setProfileImage() 'cHMRC.VATTEST(InputBox("Token"))
End Sub
Private Sub GVMSUKIMportToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GVMSUKIMportToolStripMenuItem.Click
@@ -4345,6 +4414,13 @@ Public Class frmHauptfenster
Dim f As New frmWarenorte()
f.ShowDialog(Me)
End Sub
Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles btnMitarbeiterKonto.Click
Me.Cursor = Cursors.WaitCursor
Dim f As New VERAG_PROG_ALLGEMEIN.frmMitarbeitersuche(VERAG_PROG_ALLGEMEIN.cAllgemein.USRID)
f.Show()
Me.Cursor = Cursors.Default
End Sub
End Class
Public Class AvisoStatusFunctions