This commit is contained in:
SchreiberM
2016-05-04 14:35:14 +02:00
parent a14801748b
commit 7ec031388f
14 changed files with 5779 additions and 5537 deletions

View File

@@ -8,7 +8,7 @@ Imports System.Net
Imports System.Net.Sockets
Public Class frmMain
Dim strIPAddress As String
Public Shared TIMER_SCAN As New System.Windows.Forms.Timer
Public Shared Sub RUN_TIMER()
@@ -61,42 +61,7 @@ Public Class frmMain
TIMER_SCAN.Enabled = False
End Try
End Sub
Private Sub GetIPAddress()
Try
Dim strHostName As String
Dim strIPAddress As String
strHostName = System.Net.Dns.GetHostName()
Try
strIPAddress = System.Net.Dns.GetHostEntry(strHostName).AddressList(3).ToString()
Catch ex As Exception
strIPAddress = System.Net.Dns.GetHostEntry(strHostName).AddressList(2).ToString()
End Try
'For Each adr In System.Net.Dns.GetHostEntry(strHostName).AddressList()
' MessageBox.Show(adr.ToString)
'Next
LabelIP.Caption = "IP Address: " & strIPAddress
Catch ex As Exception
LabelIP.Caption = "error getting IP"
End Try
End Sub
'Private Function GetIPv4Address() As String
' GetIPv4Address = String.Empty
' Dim strHostName As String = System.Net.Dns.GetHostName()
' Dim iphe As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(strHostName)
' For Each ipheal As System.Net.IPAddress In iphe.AddressList
' If ipheal.AddressFamily = System.Net.Sockets.AddressFamily.InterNetwork Then
' GetIPv4Address = ipheal.ToString()
' End If
' Next
'End Function
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -107,7 +72,6 @@ Public Class frmMain
' Form Titel setzen
ClassWindowLocation.LoadFormLocationSize(Me, 1, CURRENT_SCREEN_ID, "frmMain")
Dim i = My.Application.UICulture.ToString()
GetIPAddress()
' GetIPv4Address()
'Dim splash As New frmSplash()
'splash.ShowDialog()
@@ -119,7 +83,17 @@ Public Class frmMain
LabelVersion.Caption = String.Format("Version {0}", My.Application.Info.Version.ToString)
LabelUser.Caption = Environment.UserName
LabelMachine.Caption = My.Computer.Name
'IP-Adresse-Auslesen
Dim Addresslist() As IPAddress = _
Dns.GetHostEntry(Dns.GetHostName()).AddressList
Dim IPs As IPAddress
For Each IPs In Addresslist
'Aktuelle Machine
ClassLogger.Add(">> " & My.Computer.Name & " - IP: " & IPs.ToString, False)
LabelMachine.Caption = My.Computer.Name & " - IP: " & IPs.ToString
Next IPs
LabelLanguage.Caption = "Language: " & USER_LANGUAGE
Load_Connection_Dep_Data()