MS3
This commit is contained in:
@@ -4,6 +4,8 @@ Imports DevExpress.XtraBars
|
||||
Imports System.ComponentModel
|
||||
Imports System.Threading
|
||||
Imports System.Globalization
|
||||
Imports System.Net
|
||||
Imports System.Net.Sockets
|
||||
|
||||
Public Class frmMain
|
||||
|
||||
@@ -59,6 +61,44 @@ 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
|
||||
' Referenz zu frmMain speichern
|
||||
MAIN_FORM = Me
|
||||
@@ -67,7 +107,8 @@ 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()
|
||||
|
||||
@@ -77,6 +118,7 @@ Public Class frmMain
|
||||
Me.Text = Application.ProductName
|
||||
LabelVersion.Caption = String.Format("Version {0}", My.Application.Info.Version.ToString)
|
||||
LabelUser.Caption = Environment.UserName
|
||||
|
||||
LabelMachine.Caption = My.Computer.Name
|
||||
LabelLanguage.Caption = "Language: " & USER_LANGUAGE
|
||||
Load_Connection_Dep_Data()
|
||||
@@ -491,7 +533,7 @@ Public Class frmMain
|
||||
MsgBox("Application will close now!", MsgBoxStyle.Critical)
|
||||
Me.Close()
|
||||
End If
|
||||
|
||||
|
||||
'If DOCTYPE_COUNT_ACTUAL > LICENSE_DOCTYPE_COUNT Then
|
||||
' If CURRENT_USER_IS_ADMIN = True Then
|
||||
' ClassLogger.Add(">> User is Admin - Timer will be started", False)
|
||||
@@ -577,7 +619,7 @@ Public Class frmMain
|
||||
TimerTasks.Enabled = False
|
||||
TimerTasks.Stop()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub BarButtonItem3_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarButtonItem3.ItemClick
|
||||
|
||||
Reference in New Issue
Block a user