This commit is contained in:
JenneJ 2016-09-27 16:14:35 +02:00
commit a654c04849
7 changed files with 839 additions and 745 deletions

View File

@ -85,6 +85,16 @@ Public Class ClassInit
If configResult = False Then
Throw New Exception("Find more information in the logfile.")
End If
Dim sql = String.Format("SELECT * FROM TBPMO_KONFIGURATION WHERE GUID = 1")
Dim KONFIG_DT As DataTable = ClassDatabase.Return_Datatable(sql)
If KONFIG_DT.Rows.Count = 1 Then
Try
MY_WIKISTRING = KONFIG_DT.Rows(0).Item("WIKI_STRING")
Catch ex As Exception
MY_WIKISTRING = ""
End Try
WD_UNICODE = KONFIG_DT.Rows(0).Item("WD_UNICODE")
End If
Catch ex As Exception
MsgBox("Unexpected Error in InitBasics2:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try

View File

@ -14,6 +14,8 @@ Module ModuleMySettings
Public Sett_ShowQuickMenue As Boolean = True
Public Sett_ConstructorStart As Integer
Public MY_ADDON_PATH As String
Public MY_WIKISTRING As String
Public WD_UNICODE As Boolean = False
Public WD_ShowEnitityDocs As Boolean = True
Public WD_ShowDocs As Boolean = False

View File

@ -3643,8 +3643,8 @@ Public Class frmConstructor_Main
Dim temppath = Path.GetTempPath
Dim EncodingFormat As Encoding
Dim WDUnicode = ClassDatabase.Execute_Scalar("SELECT WD_UNICODE FROM TBPMO_KONFIGURATION WHERE GUID = 1")
If WDUnicode = True Then
If WD_UNICODE = True Then
EncodingFormat = Encoding.GetEncoding(1252) '1252
If LogErrorsOnly = False Then ClassLogger.Add(" >> Unicode is used (Encoding.GetEncoding(1252))", False)
Else

View File

@ -31,6 +31,8 @@ Partial Class frmRecOrgConfig_Basic
Me.txtwddriveletter = New System.Windows.Forms.TextBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.txtWiki = New System.Windows.Forms.TextBox()
Me.Label9 = New System.Windows.Forms.Label()
Me.chkUnicode = New System.Windows.Forms.CheckBox()
Me.lblSaveresult = New System.Windows.Forms.Label()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
@ -93,23 +95,35 @@ Partial Class frmRecOrgConfig_Basic
'
'GroupBox1
'
resources.ApplyResources(Me.GroupBox1, "GroupBox1")
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.txtDelimiterFile)
Me.GroupBox1.Controls.Add(Me.txtDelimiterVersion)
resources.ApplyResources(Me.GroupBox1, "GroupBox1")
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.TabStop = False
'
'GroupBox2
'
resources.ApplyResources(Me.GroupBox2, "GroupBox2")
Me.GroupBox2.Controls.Add(Me.txtWiki)
Me.GroupBox2.Controls.Add(Me.Label9)
Me.GroupBox2.Controls.Add(Me.chkUnicode)
Me.GroupBox2.Controls.Add(Me.Label2)
Me.GroupBox2.Controls.Add(Me.txtwddriveletter)
resources.ApplyResources(Me.GroupBox2, "GroupBox2")
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.TabStop = False
'
'txtWiki
'
resources.ApplyResources(Me.txtWiki, "txtWiki")
Me.txtWiki.Name = "txtWiki"
'
'Label9
'
resources.ApplyResources(Me.Label9, "Label9")
Me.Label9.Name = "Label9"
'
'chkUnicode
'
resources.ApplyResources(Me.chkUnicode, "chkUnicode")
@ -124,10 +138,10 @@ Partial Class frmRecOrgConfig_Basic
'
'GroupBox3
'
resources.ApplyResources(Me.GroupBox3, "GroupBox3")
Me.GroupBox3.Controls.Add(Me.btnResetBackground)
Me.GroupBox3.Controls.Add(Me.btnSelectBackground)
Me.GroupBox3.Controls.Add(Me.pbBackground)
resources.ApplyResources(Me.GroupBox3, "GroupBox3")
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.TabStop = False
'
@ -152,12 +166,11 @@ Partial Class frmRecOrgConfig_Basic
'OpenFileDialog1
'
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
resources.ApplyResources(Me.OpenFileDialog1, "OpenFileDialog1")
'
'GroupBox4
'
resources.ApplyResources(Me.GroupBox4, "GroupBox4")
Me.GroupBox4.Controls.Add(Me.txtProductName)
resources.ApplyResources(Me.GroupBox4, "GroupBox4")
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.TabStop = False
'
@ -184,7 +197,6 @@ Partial Class frmRecOrgConfig_Basic
'
'GroupBox5
'
resources.ApplyResources(Me.GroupBox5, "GroupBox5")
Me.GroupBox5.Controls.Add(Me.btnTest_Anmeldung)
Me.GroupBox5.Controls.Add(Me.txtServername)
Me.GroupBox5.Controls.Add(Me.Label5)
@ -195,14 +207,15 @@ Partial Class frmRecOrgConfig_Basic
Me.GroupBox5.Controls.Add(Me.txtDomäne)
Me.GroupBox5.Controls.Add(Me.Label7)
Me.GroupBox5.Controls.Add(Me.Label8)
resources.ApplyResources(Me.GroupBox5, "GroupBox5")
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.TabStop = False
'
'btnTest_Anmeldung
'
resources.ApplyResources(Me.btnTest_Anmeldung, "btnTest_Anmeldung")
Me.btnTest_Anmeldung.BackColor = System.Drawing.SystemColors.Control
Me.btnTest_Anmeldung.Image = Global.DD_Record_Organiser.My.Resources.Resources.database_connect
resources.ApplyResources(Me.btnTest_Anmeldung, "btnTest_Anmeldung")
Me.btnTest_Anmeldung.Name = "btnTest_Anmeldung"
Me.btnTest_Anmeldung.UseVisualStyleBackColor = False
'
@ -252,7 +265,7 @@ Partial Class frmRecOrgConfig_Basic
resources.ApplyResources(Me.Label8, "Label8")
Me.Label8.Name = "Label8"
'
'frmConfiguration_Basic
'frmRecOrgConfig_Basic
'
resources.ApplyResources(Me, "$this")
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
@ -266,7 +279,7 @@ Partial Class frmRecOrgConfig_Basic
Me.Controls.Add(Me.GroupBox1)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmConfiguration_Basic"
Me.Name = "frmRecOrgConfig_Basic"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.GroupBox2.ResumeLayout(False)
@ -311,4 +324,6 @@ Partial Class frmRecOrgConfig_Basic
Friend WithEvents txtDomäne As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents txtWiki As System.Windows.Forms.TextBox
Friend WithEvents Label9 As System.Windows.Forms.Label
End Class

View File

@ -149,12 +149,12 @@
<data name="GroupBox1.Text" xml:space="preserve">
<value>General Settings:</value>
</data>
<data name="GroupBox2.Text" xml:space="preserve">
<value>Global windream-Settings</value>
</data>
<data name="chkUnicode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="GroupBox2.Text" xml:space="preserve">
<value>Global windream-Settings</value>
</data>
<data name="lblSaveresult.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
@ -164,9 +164,6 @@
<data name="lblSaveresult.Text" xml:space="preserve">
<value>Changes saved successfully!</value>
</data>
<data name="GroupBox3.Text" xml:space="preserve">
<value>Application background</value>
</data>
<data name="btnResetBackground.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
@ -182,6 +179,9 @@
<data name="pbBackground.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="GroupBox3.Text" xml:space="preserve">
<value>Application background</value>
</data>
<data name="GroupBox4.Text" xml:space="preserve">
<value>Application name</value>
</data>

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,8 @@
Public Class frmRecOrgConfig_Basic
Dim loaded As Boolean = False
Dim changes_ModuleKonfig As Boolean = False
Dim changes_Konfig As Boolean = False
Dim changes_RightService As Boolean = False
Dim changes_PMOKonfig As Boolean = False
Private Sub frmConfiguration_Basic_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
Dim sql As String = "select * from TBDD_MODULES where UPPER(NAME) = UPPER('Record-Organizer')"
@ -46,6 +47,7 @@ Public Class frmRecOrgConfig_Basic
If Not dt Is Nothing Then
If dt.Rows.Count = 1 Then
Me.chkUnicode.Checked = dt.Rows(0).Item("WD_UNICODE")
Me.txtWiki.Text = dt.Rows(0).Item("WIKI_STRING")
End If
End If
Catch ex As Exception
@ -63,7 +65,7 @@ Public Class frmRecOrgConfig_Basic
Private Sub chkUnicode_CheckedChanged(sender As Object, e As EventArgs) Handles chkUnicode.CheckedChanged
If loaded = True Then
changes_Konfig = True
changes_PMOKonfig = True
btnsave.Enabled = True
End If
End Sub
@ -102,13 +104,13 @@ Public Class frmRecOrgConfig_Basic
MsgBox("Error in Save ModuleConfig: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If
If changes_Konfig = True Then
If changes_PMOKonfig = True Then
Try
Dim wduni As Integer = 0
If chkUnicode.Checked Then
wduni = 1
End If
Dim upd = String.Format("UPDATE TBPMO_KONFIGURATION SET AD_DOMAIN = '{0}', AD_USER = '{1}', AD_USER_PW = '{2}', AD_SERVER = '{3}', CHANGED_WHO = '{4}',WD_UNICODE = {5} WHERE GUID = 1", Me.txtDomäne.Text, Me.txtUser.Text, Me.txtPW.Text, Me.txtServername.Text, Environment.UserName, wduni)
Dim upd = String.Format("UPDATE TBPMO_KONFIGURATION SET WIKI_STRING = '{0}', CHANGED_WHO = '{1}', WD_UNICODE = {2} WHERE GUID = 1", Me.txtWiki.Text, Environment.UserName, wduni)
If ClassDatabase.Execute_non_Query(upd, True) = True Then
lblSaveresult.Visible = True
@ -119,6 +121,16 @@ Public Class frmRecOrgConfig_Basic
MsgBox("Error in Save Config: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End If
If changes_RightService = True Then
Dim wrapper As New ClassEncryption("!35452didalog=")
Dim cipherText As String = wrapper.EncryptData(Me.txtPW.Text)
Dim pw As String = cipherText
Dim upd = String.Format("UPDATE TBPMO_SERVICE_RIGHT_CONFIG SET AD_DOMAIN = '{0}', AD_USER = '{1}', AD_USER_PW = '{2}', AD_SERVER = '{3}', CHANGED_WHO = '{4}' WHERE GUID = 1", Me.txtDomäne.Text, Me.txtUser.Text, pw, Me.txtServername.Text, Environment.UserName)
ClassDatabase.Execute_non_Query(upd)
btnsave.Enabled = False
End If
End Sub
@ -171,28 +183,35 @@ Public Class frmRecOrgConfig_Basic
Private Sub txtDomäne_TextChanged(sender As Object, e As EventArgs) Handles txtDomäne.TextChanged
If loaded = True Then
changes_Konfig = True
changes_RightService = True
btnsave.Enabled = True
End If
End Sub
Private Sub txtUser_TextChanged(sender As Object, e As EventArgs) Handles txtUser.TextChanged
If loaded = True Then
changes_Konfig = True
changes_RightService = True
btnsave.Enabled = True
End If
End Sub
Private Sub txtPW_TextChanged(sender As Object, e As EventArgs) Handles txtPW.TextChanged
If loaded = True Then
changes_Konfig = True
changes_RightService = True
btnsave.Enabled = True
End If
End Sub
Private Sub txtServername_TextChanged(sender As Object, e As EventArgs) Handles txtServername.TextChanged
If loaded = True Then
changes_Konfig = True
changes_RightService = True
btnsave.Enabled = True
End If
End Sub
Private Sub txtWiki_TextChanged(sender As Object, e As EventArgs) Handles txtWiki.TextChanged
If loaded = True Then
changes_PMOKonfig = True
btnsave.Enabled = True
End If
End Sub