MS12.02.2016
This commit is contained in:
@@ -8,9 +8,9 @@ Public Class frmConfig_Basic
|
||||
Dim sz = Me.Size
|
||||
Dim pt = Me.Location
|
||||
Dim de = System.Globalization.CultureInfo.CurrentUICulture
|
||||
'Neue Sprache festlegen und entfernen aller Controls
|
||||
Thread.CurrentThread.CurrentUICulture = New CultureInfo(USER_LANGUAGE)
|
||||
Me.Controls.Clear()
|
||||
''Neue Sprache festlegen und entfernen aller Controls
|
||||
'Thread.CurrentThread.CurrentUICulture = New CultureInfo(USER_LANGUAGE)
|
||||
'Me.Controls.Clear()
|
||||
'Me.Events.Dispose()
|
||||
InitializeComponent()
|
||||
|
||||
@@ -20,6 +20,11 @@ Public Class frmConfig_Basic
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConnect_Click(sender As Object, e As EventArgs) Handles BtnConnect.Click
|
||||
If Me.txtServer.Text = String.Empty Then
|
||||
MsgBox("Please specify SQL-Server Adress!", MsgBoxStyle.Information)
|
||||
txtServer.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
Dim constring As String
|
||||
If chkbxUserAut.Checked Then
|
||||
@@ -56,6 +61,18 @@ Public Class frmConfig_Basic
|
||||
SaveConfigValue("MyConnectionString", constring)
|
||||
|
||||
Me.txtActualConnection.Text = constring
|
||||
|
||||
Dim sql = "SELECT MAX(GUID) FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||
sql = sql.Replace("@user", Environment.UserName)
|
||||
ClassLogger.Add(">> Username: " & Environment.UserName, False)
|
||||
|
||||
CURRENT_USERID = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
If IsDBNull(CURRENT_USERID) Then
|
||||
MsgBox("Attention: Your Username '" & Environment.UserName & "' is not configured for Global Indexer. this might result in unhandled exceptions!", MsgBoxStyle.Exclamation)
|
||||
ClassLogger.Add("User '" & Environment.UserName & "' not configured for Global Indexer! (DBNull - frmConfigBasic)", True)
|
||||
End If
|
||||
|
||||
|
||||
'Me.TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
'Me.TBPM_KONFIGURATIONTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_KONFIGURATION)
|
||||
End If
|
||||
@@ -67,6 +84,11 @@ Public Class frmConfig_Basic
|
||||
|
||||
Private Sub cmbDatenbank_MouseClick(sender As Object, e As MouseEventArgs) Handles cmbDatenbank.MouseClick
|
||||
Try
|
||||
If Me.txtServer.Text = String.Empty Then
|
||||
MsgBox("Please specify SQL-Server Adress!", MsgBoxStyle.Information)
|
||||
txtServer.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.DataSource = Me.txtServer.Text
|
||||
@@ -107,7 +129,7 @@ Public Class frmConfig_Basic
|
||||
|
||||
End Sub
|
||||
<STAThread()> _
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnaddUniversalViewer.Click
|
||||
Try
|
||||
With OpenFileDialog1
|
||||
' Do
|
||||
@@ -122,7 +144,7 @@ Public Class frmConfig_Basic
|
||||
End With
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("aktuellen Thread muss der STA-Modus") Then
|
||||
MsgBox("Diese Eisntellung kann während des Starts nicht geändert werden!" & vbNewLine & "Schliessen Sie das Formular. Sie weren in Folge erneut aufgefordert den PFad zu UViewer einzugeben!", MsgBoxStyle.Information)
|
||||
MsgBox("Diese Einstellung kann während des Starts nicht geändert werden!" & vbNewLine & "Schliessen Sie das Formular. Sie weren in Folge erneut aufgefordert den PFad zu UViewer einzugeben!", MsgBoxStyle.Information)
|
||||
Else
|
||||
MsgBox("Unexpected error in Add UViewer-Path:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End If
|
||||
@@ -335,14 +357,25 @@ Public Class frmConfig_Basic
|
||||
csb.ConnectionString = MyConnectionString
|
||||
|
||||
Dim constr = MyConnectionString
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
If Not constr.Contains("Trusted_Connection") Then
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
Else
|
||||
chkbxUserAut.Checked = True
|
||||
End If
|
||||
|
||||
Me.txtActualConnection.Text = constr
|
||||
End If
|
||||
Me.txtuniversalViewer.Text = UniversalViewer_Path
|
||||
chkLogErrorsOnly.Checked = LogErrorsOnly
|
||||
txtuniversalViewer.Enabled = True
|
||||
btnaddUniversalViewer.Enabled = True
|
||||
|
||||
If ERROR_STATE = "FAILED DBCONNECTION" Then
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
ElseIf ERROR_STATE = "NO DB-CONNECTION" Then
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
txtuniversalViewer.Enabled = False
|
||||
btnaddUniversalViewer.Enabled = False
|
||||
ElseIf ERROR_STATE = "NO UV" Then
|
||||
Me.TabControl1.SelectedIndex = 1
|
||||
End If
|
||||
@@ -416,7 +449,7 @@ Public Class frmConfig_Basic
|
||||
Case 0
|
||||
lang = "de-DE"
|
||||
Case 1
|
||||
lang = "en-GB"
|
||||
lang = "en-US"
|
||||
End Select
|
||||
|
||||
Dim update As String = "UPDATE TBDD_USER SET [LANGUAGE] = '" & lang & "' WHERE GUID = " & CURRENT_USERID
|
||||
@@ -447,4 +480,14 @@ Public Class frmConfig_Basic
|
||||
' Navigate to a URL.
|
||||
System.Diagnostics.Process.Start("http://www.didalog.de/Support")
|
||||
End Sub
|
||||
|
||||
Private Sub chkbxUserAut_CheckedChanged(sender As Object, e As EventArgs) Handles chkbxUserAut.CheckedChanged
|
||||
If chkbxUserAut.Checked Then
|
||||
Me.txtPasswort.Enabled = False
|
||||
Me.txtUser.Enabled = False
|
||||
Else
|
||||
Me.txtPasswort.Enabled = True
|
||||
Me.txtUser.Enabled = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user