rename class init to class service
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
Imports EDMI_ClientSuite.ClassInit
|
||||
|
||||
Public Class frmConfigService
|
||||
Private _Init As ClassInit
|
||||
Public Class frmConfigService
|
||||
Private _Service As ClassService
|
||||
|
||||
Private Sub frmServiceConfig_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
_Init = New ClassInit()
|
||||
_Service = New ClassService(My.LogConfig)
|
||||
|
||||
If My.ConfigManager.Config.ServiceConnection <> String.Empty Then
|
||||
txtIPAddress.Text = My.ConfigManager.Config.ServiceIP
|
||||
@@ -18,22 +16,20 @@ Public Class frmConfigService
|
||||
Dim oIPAddress = txtIPAddress.Text
|
||||
Dim oPort = txtPort.Text
|
||||
Dim oEndpointURL = $"net.tcp://{oIPAddress}:{oPort}/DigitalData/Services/Main"
|
||||
Dim oResult As ConnectionTestResult
|
||||
Dim oResult As ClassService.ConnectionTestResult
|
||||
|
||||
My.Config.ServiceIP = oIPAddress
|
||||
My.Config.ServicePort = Integer.Parse(oPort)
|
||||
|
||||
lblStatus.Text = "Verbindung wird hergestellt..."
|
||||
oResult = Await _Init.TestConnectionAsync(My.ConfigManager.Config.ServiceConnection)
|
||||
oResult = Await _Service.TestConnectionAsync(My.ConfigManager.Config.ServiceConnection)
|
||||
|
||||
If oResult = ConnectionTestResult.Successful Then
|
||||
' Save Endpoint URL
|
||||
If oResult = ClassService.ConnectionTestResult.Successful Then
|
||||
My.ConfigManager.Save()
|
||||
'My.Settings.ICMServiceAddress = oEndpointURL
|
||||
lblStatus.Text = "Verbindung hergestellt."
|
||||
Else
|
||||
Select Case oResult
|
||||
Case ConnectionTestResult.NotFound
|
||||
Case ClassService.ConnectionTestResult.NotFound
|
||||
lblStatus.Text = "Dienst konnte nicht gefunden werden. Bitte überprüfen sie Addresse und Port."
|
||||
Case Else
|
||||
lblStatus.Text = "Unbekannter Fehler."
|
||||
|
||||
Reference in New Issue
Block a user