diff --git a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb index beeeb79..4ce7d24 100644 --- a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb +++ b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb @@ -240,10 +240,12 @@ LOGGER.Error(ex) If Path.StartsWith("\\windream") Then oNormalizedPath = Path.Replace("\\windream\objects\", "") - ElseIf Path.StartsWith("\") Then + ElseIf Path.StartsWith("\\") Then oNormalizedPath = Path.Substring(1) - Else + ElseIf Path.StartsWith("\") Then Return Path + Else + Return "\" & Path End If Return oNormalizedPath diff --git a/app/DD_PM_WINDREAM/frmKonfig.Designer.vb b/app/DD_PM_WINDREAM/frmKonfig.Designer.vb index cf35e60..f3f70c8 100644 --- a/app/DD_PM_WINDREAM/frmKonfig.Designer.vb +++ b/app/DD_PM_WINDREAM/frmKonfig.Designer.vb @@ -22,6 +22,7 @@ Partial Class frmKonfig 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmKonfig)) Me.btnuniversalview = New System.Windows.Forms.Button() Me.Label13 = New System.Windows.Forms.Label() @@ -44,6 +45,8 @@ Partial Class frmKonfig Me.lblSumatra = New System.Windows.Forms.Label() Me.txtUniversalViewer = New System.Windows.Forms.TextBox() Me.TabPage2 = New System.Windows.Forms.TabPage() + Me.RadioAlternativeConnection = New System.Windows.Forms.RadioButton() + Me.RadioDefaultConnection = New System.Windows.Forms.RadioButton() Me.chkbxUserAut = New System.Windows.Forms.CheckBox() Me.Label5 = New System.Windows.Forms.Label() Me.cmbDatenbank = New System.Windows.Forms.ComboBox() @@ -68,11 +71,10 @@ Partial Class frmKonfig Me.Button1 = New System.Windows.Forms.Button() Me.btnLogMail = New System.Windows.Forms.Button() Me.DD_DMSLiteDataSet = New DD_PM_WINDREAM.DD_DMSLiteDataSet() - Me.TBPM_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource() + Me.TBPM_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBPM_KONFIGURATIONTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_KONFIGURATIONTableAdapter() Me.TableAdapterManager = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager() - Me.RadioDefaultConnection = New System.Windows.Forms.RadioButton() - Me.RadioAlternativeConnection = New System.Windows.Forms.RadioButton() + Me.Button4 = New System.Windows.Forms.Button() Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() Me.GroupBox1.SuspendLayout() @@ -240,6 +242,20 @@ Partial Class frmKonfig Me.TabPage2.Name = "TabPage2" Me.TabPage2.UseVisualStyleBackColor = True ' + 'RadioAlternativeConnection + ' + resources.ApplyResources(Me.RadioAlternativeConnection, "RadioAlternativeConnection") + Me.RadioAlternativeConnection.Name = "RadioAlternativeConnection" + Me.RadioAlternativeConnection.UseVisualStyleBackColor = True + ' + 'RadioDefaultConnection + ' + resources.ApplyResources(Me.RadioDefaultConnection, "RadioDefaultConnection") + Me.RadioDefaultConnection.Checked = True + Me.RadioDefaultConnection.Name = "RadioDefaultConnection" + Me.RadioDefaultConnection.TabStop = True + Me.RadioDefaultConnection.UseVisualStyleBackColor = True + ' 'chkbxUserAut ' resources.ApplyResources(Me.chkbxUserAut, "chkbxUserAut") @@ -312,6 +328,7 @@ Partial Class frmKonfig ' 'TabPage3 ' + Me.TabPage3.Controls.Add(Me.Button4) Me.TabPage3.Controls.Add(Me.Label7) Me.TabPage3.Controls.Add(Me.txtIntervall) Me.TabPage3.Controls.Add(Me.Label6) @@ -416,19 +433,11 @@ Partial Class frmKonfig Me.TableAdapterManager.TBPM_TYPETableAdapter = Nothing Me.TableAdapterManager.UpdateOrder = DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete ' - 'RadioDefaultConnection + 'Button4 ' - resources.ApplyResources(Me.RadioDefaultConnection, "RadioDefaultConnection") - Me.RadioDefaultConnection.Checked = True - Me.RadioDefaultConnection.Name = "RadioDefaultConnection" - Me.RadioDefaultConnection.TabStop = True - Me.RadioDefaultConnection.UseVisualStyleBackColor = True - ' - 'RadioAlternativeConnection - ' - resources.ApplyResources(Me.RadioAlternativeConnection, "RadioAlternativeConnection") - Me.RadioAlternativeConnection.Name = "RadioAlternativeConnection" - Me.RadioAlternativeConnection.UseVisualStyleBackColor = True + resources.ApplyResources(Me.Button4, "Button4") + Me.Button4.Name = "Button4" + Me.Button4.UseVisualStyleBackColor = True ' 'frmKonfig ' @@ -501,4 +510,5 @@ Partial Class frmKonfig Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents RadioAlternativeConnection As RadioButton Friend WithEvents RadioDefaultConnection As RadioButton + Friend WithEvents Button4 As Button End Class diff --git a/app/DD_PM_WINDREAM/frmKonfig.resx b/app/DD_PM_WINDREAM/frmKonfig.resx index 632bdf5..d8680f5 100644 --- a/app/DD_PM_WINDREAM/frmKonfig.resx +++ b/app/DD_PM_WINDREAM/frmKonfig.resx @@ -278,700 +278,6 @@ 5 - - GroupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 0 - - - txtUniversalViewer - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 2 - - - Verdana, 9.75pt - - - 4, 26 - - - - 3, 3, 3, 3 - - - 832, 318 - - - 0 - - - Darstellung Dateien: - - - TabPage1 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabControl1 - - - 0 - - - RadioAlternativeConnection - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 0 - - - RadioDefaultConnection - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 1 - - - chkbxUserAut - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 2 - - - Label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 3 - - - cmbDatenbank - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 4 - - - Label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 5 - - - Label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 6 - - - Label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 7 - - - Label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 8 - - - txtUser - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 9 - - - txtPasswort - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 10 - - - BtnConnect - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 11 - - - txtActualConnection - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 12 - - - txtServer - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 13 - - - 4, 26 - - - 3, 3, 3, 3 - - - 832, 318 - - - 1 - - - Datenbankverbindung: - - - TabPage2 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabControl1 - - - 1 - - - True - - - 52, 165 - - - 55, 17 - - - 45 - - - Minuten - - - Label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 0 - - - 8, 162 - - - 38, 25 - - - 44 - - - Center - - - txtIntervall - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 1 - - - True - - - 5, 142 - - - 159, 17 - - - 43 - - - Intervall Popup-Reminder: - - - Label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 2 - - - MiddleLeft - - - 8, 99 - - - 219, 28 - - - 42 - - - Öffne Log-Verzeichnis - - - btnopenlog - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 3 - - - True - - - 506, 28 - - - 117, 21 - - - 41 - - - Log Errors only - - - chkLogErrorsOnly - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 4 - - - 8, 64 - - - 219, 29 - - - 40 - - - Open Appdata-Folder - - - Button3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 5 - - - True - - - 233, 29 - - - 166, 17 - - - 39 - - - Support-Portal Digital Data - - - LinkLabel1 - - - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 6 - - - 506, 105 - - - 219, 28 - - - 38 - - - List all processes - - - Button2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 7 - - - 506, 71 - - - 219, 29 - - - 37 - - - Get Culture Info - - - Button1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 8 - - - MiddleLeft - - - 8, 17 - - - 219, 41 - - - 0 - - - Log/Support Mail erzeugen - - - MiddleRight - - - btnLogMail - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage3 - - - 9 - - - 4, 26 - - - 3, 3, 3, 3 - - - 832, 318 - - - 2 - - - Weiteres - - - TabPage3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabControl1 - - - 2 - - - Fill - - - 0, 0 - - - 840, 348 - - - 21 - - - TabControl1 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - rbPDF_internal - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 0 - - - rbSystem - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 1 - - - btnno_pdf_viewer - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 2 - - - rbSumatra - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 3 - - - rbPDFX_Change - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 4 - - - btnSumatra - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 6 - - - txtpdfxchange - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 7 - - - txtSumatra - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 8 - - - lblSumatra - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox1 - - - 10 - - - 10, 77 - - - 659, 234 - - - 25 - - - PDF-Viewer (optional) - - - GroupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage1 - - - 0 - True @@ -1209,6 +515,30 @@ 10 + + 10, 77 + + + 659, 234 + + + 25 + + + PDF-Viewer (optional) + + + GroupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage1 + + + 0 + 10, 22 @@ -1230,6 +560,94 @@ 2 + + Verdana, 9.75pt + + + 4, 26 + + + + 3, 3, 3, 3 + + + 832, 318 + + + 0 + + + Darstellung Dateien: + + + TabPage1 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabControl1 + + + 0 + + + True + + + NoControl + + + 173, 6 + + + 158, 21 + + + 36 + + + Alternative Verbindung + + + RadioAlternativeConnection + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage2 + + + 0 + + + True + + + 8, 6 + + + 148, 21 + + + 36 + + + Normale Verbindung + + + RadioDefaultConnection + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage2 + + + 1 + True @@ -1530,6 +948,372 @@ 13 + + 4, 26 + + + 3, 3, 3, 3 + + + 832, 318 + + + 1 + + + Datenbankverbindung: + + + TabPage2 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabControl1 + + + 1 + + + NoControl + + + 236, 64 + + + 163, 63 + + + 46 + + + User-Konfiguration zurücksetzen + + + Button4 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 0 + + + True + + + 52, 165 + + + 55, 17 + + + 45 + + + Minuten + + + Label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 1 + + + 8, 162 + + + 38, 25 + + + 44 + + + Center + + + txtIntervall + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 2 + + + True + + + 5, 142 + + + 159, 17 + + + 43 + + + Intervall Popup-Reminder: + + + Label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 3 + + + MiddleLeft + + + 8, 99 + + + 219, 28 + + + 42 + + + Öffne Log-Verzeichnis + + + btnopenlog + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 4 + + + True + + + 506, 28 + + + 117, 21 + + + 41 + + + Log Errors only + + + chkLogErrorsOnly + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 5 + + + 8, 64 + + + 219, 29 + + + 40 + + + Open Appdata-Folder + + + Button3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 6 + + + True + + + 233, 29 + + + 166, 17 + + + 39 + + + Support-Portal Digital Data + + + LinkLabel1 + + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 7 + + + 506, 105 + + + 219, 28 + + + 38 + + + List all processes + + + Button2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 8 + + + 506, 71 + + + 219, 29 + + + 37 + + + Get Culture Info + + + Button1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 9 + + + MiddleLeft + + + 8, 17 + + + 219, 41 + + + 0 + + + Log/Support Mail erzeugen + + + MiddleRight + + + btnLogMail + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabPage3 + + + 10 + + + 4, 26 + + + 3, 3, 3, 3 + + + 832, 318 + + + 2 + + + Weiteres + + + TabPage3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabControl1 + + + 2 + + + Fill + + + 0, 0 + + + 840, 348 + + + 21 + + + TabControl1 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + 159, 17 @@ -1542,63 +1326,6 @@ 841, 17 - - True - - - 8, 6 - - - 148, 21 - - - 36 - - - Normale Verbindung - - - RadioDefaultConnection - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 1 - - - True - - - NoControl - - - 173, 6 - - - 158, 21 - - - 36 - - - Alternative Verbindung - - - RadioAlternativeConnection - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabPage2 - - - 0 - True diff --git a/app/DD_PM_WINDREAM/frmKonfig.vb b/app/DD_PM_WINDREAM/frmKonfig.vb index dc9670c..d85432e 100644 --- a/app/DD_PM_WINDREAM/frmKonfig.vb +++ b/app/DD_PM_WINDREAM/frmKonfig.vb @@ -19,6 +19,7 @@ Public Class frmKonfig End Sub Private Sub frmKonfig_Load(sender As Object, e As System.EventArgs) Handles Me.Load Try + If VIEWER_ALL = "uviewer" Then rbuviewer.Checked = True Else @@ -377,4 +378,26 @@ Public Class frmKonfig Private Sub RadioAlternativeConnection_CheckedChanged(sender As Object, e As EventArgs) Handles RadioAlternativeConnection.CheckedChanged txtActualConnection.Text = MaskConnectionStringPassword(CONFIG.Config.ConnectionStringTest) End Sub + + Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click + Dim di As New IO.DirectoryInfo(Application.UserAppDataPath()) + Dim diar1 As IO.FileInfo() = di.GetFiles() + Dim dra As IO.FileInfo + + 'list the names of all files in the specified directory + For Each dra In diar1 + If dra.Name <> "UserConfig.xml" Then + Try + System.IO.File.Delete(dra.FullName) + LOGGER.Info($"ConfigFile {dra.FullName} has been deleted!") + Catch ex As Exception + + End Try + + End If + + Next + MsgBox("The UserConfiguration has been set back to default!", MsgBoxStyle.OkOnly) + + End Sub End Class \ No newline at end of file diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index b692252..4719781 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -936,18 +936,22 @@ Public Class frmMain Else CMFileStart.Enabled = True End If + If CURRENT_CLICKED_PROFILE_ID > 0 Then + CMGroupStart.Enabled = True + End If End Select End Sub Private Sub CMFileStart_Click(sender As Object, e As EventArgs) Handles CMFileStart.Click - Item_Scope() + Item_Scope("CMROW") End Sub - Private Sub Item_Scope() + Private Sub Item_Scope(startedFrom As String) Try 'GridView_Docs.EndSelection() CURRENT_JUMP_DOC_GUID = 0 Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation) + Dim groupRowText Dim PROFIL_ID If hitInfo.InGroupRow Then @@ -987,7 +991,7 @@ Public Class frmMain Dim expression As String expression = "PROFILE_ID = " & PROFIL_ID - If hitInfo.InGroupRow Then + If hitInfo.InGroupRow Or (startedFrom = "CMGROUP" And hitInfo.InDataRow) Then CURRENT_JUMP_DOC_GUID = 0 CURRENT_DOC_GUID = 0 CURRENT_ProfilGUID = PROFIL_ID @@ -1123,7 +1127,7 @@ Public Class frmMain End Try End Sub Private Sub CMGroupStart_Click(sender As Object, e As EventArgs) Handles CMGroupStart.Click - Item_Scope() + Item_Scope("CMGROUP") End Sub Private Sub NavBarItemOverview_LinkClicked(sender As Object, e As NavBarLinkEventArgs) Handles NavBarItemOverview.LinkClicked @@ -1427,7 +1431,7 @@ Public Class frmMain End Sub Private Sub GridView_Docs_DoubleClick(sender As Object, e As EventArgs) Handles GridView_Docs.DoubleClick - Item_Scope() + Item_Scope("DOUBLECLICK") End Sub Private Sub GridView_Docs_CustomDrawGroupRow(sender As Object, e As Views.Base.RowObjectCustomDrawEventArgs) Handles GridView_Docs.CustomDrawGroupRow @@ -1478,8 +1482,10 @@ Public Class frmMain ' Ein/Ausklappen verhindern DXMouseEventArgs.GetMouseArgs(e).Handled = True GridViewItem_Clicked = "GROUP" + CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID")) ElseIf hi.InDataRow Then GridViewItem_Clicked = "ROW" + Dim profileid = CURRENT_CLICKED_PROFILE_ID Else GridViewItem_Clicked = Nothing End If diff --git a/app/DD_PM_WINDREAM/frmMassValidator.vb b/app/DD_PM_WINDREAM/frmMassValidator.vb index a6ebe6a..228f344 100644 --- a/app/DD_PM_WINDREAM/frmMassValidator.vb +++ b/app/DD_PM_WINDREAM/frmMassValidator.vb @@ -5,7 +5,7 @@ Imports DD_LIB_Standards Imports DigitalData.Controls.LookupGrid Public Class frmMassValidator - Dim DT_PROFILE_CONTROLS As DataTable + Private DTCONTROLS As DataTable Private Delimiter As String Private PROFIL_VEKTORINDEX As String @@ -18,7 +18,7 @@ Public Class frmMassValidator Private FORM_Shown As Boolean = False Private _dependingControl_in_action As Boolean = False - Private errmessage As String + Private oErrorMessage As String Private _windream As New ClassWindream_allgemein 'Private _windreamPM As New ClassPMWindream Private _allgFunk As New ClassAllgemeineFunktionen @@ -54,7 +54,7 @@ Public Class frmMassValidator Size = My.Settings.frmMassValidatorSize End If Try - DT_PROFILE_CONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID) + DTCONTROLS = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_PROFILE_CONTROLS WHERE SQL_UEBERPRUEFUNG NOT LIKE '%WMI%' AND PROFIL_ID = " & CURRENT_ProfilGUID) LOGGER.Debug("Profile Data geladen") Catch ex As Exception LOGGER.Error(ex) @@ -125,10 +125,10 @@ Public Class frmMassValidator End Sub Sub Load_Controls() - 'Try - pnldesigner.Controls.Clear() + Try + pnldesigner.Controls.Clear() - For Each oControlRow As DataRow In DT_PROFILE_CONTROLS.Rows + For Each oControlRow As DataRow In DTCONTROLS.Rows Dim ctrl As Control Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper @@ -151,7 +151,7 @@ Public Class frmMassValidator AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex #Region "CONTROL LIST" - If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then + If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -287,13 +287,32 @@ Public Class frmMassValidator Case "CHK" LOGGER.Debug("Versuch Checkbox zu laden") - ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False) - Case "LINE" + ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False) + Case "LINE" LOGGER.Debug("Versuch Linie zu laden") ctrl = ClassControlCreator.CreateExistingLine(oControlRow, False) Case "LOOKUP" - ctrl = ClassControlCreator.CreateExistingLookupControl(oControlRow, False) + Dim lookup As LookupControl2 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False) + ctrl = lookup + lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES") + lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") + lookup.MultiSelect = oControlRow.Item("MULTISELECT") + + 'If NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then + ' lookup.SelectedValues = New List(Of String) From {oControlRow.Item("DEFAULT_VALUE")} + 'End If + + ''Wenn Multiselect false dann prüfen ob abhängiges Control + If CBool(oControlRow.Item("MULTISELECT")) = False Then + Dim filteredData As DataTable = DTCONTROLS.Clone() + Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'" + DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges) + If filteredData.Rows.Count = 1 Then + AddHandler lookup.EditValueChanged, AddressOf onLookUp1 + End If + End If + Case "TABLE" LOGGER.Debug("Versuch Tabelle zu laden") @@ -325,16 +344,66 @@ Public Class frmMassValidator For Each oControl As Control In pnldesigner.Controls LoadSimpleData(oControl, oControl.Tag) Next - 'Catch ex As Exception - ' If LogErrorsOnly = False Then MsgBox("Error Load_Controls: " & ex.Message, MsgBoxStyle.Critical, "Attention error:") - ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error Load_Controls: " & ex.Message, Environment.UserName) - ' LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message) - ' LOGGER.Info("") + Catch ex As Exception + LOGGER.Info("Unvorhergesehener Fehler bei Load_Controls:" & ex.Message) + LOGGER.Info("") - 'End Try + End Try End Sub + Public Sub onLookUp1(sender As Object, e As System.EventArgs) + If FORM_Shown = False Then + Exit Sub + End If + Dim oLookup As LookupControl2 = sender + Try + If Not IsNothing(oLookup.SelectedValues) Then + If oLookup.SelectedValues.Count = 1 Then + Dim oLOOKUPValue = oLookup.SelectedValues.Item(0) + Dim oLOOKUPName = oLookup.Name + Dim oControlID = oLookup.Tag + Dim filteredData As DataTable = DTCONTROLS.Clone() + Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oLOOKUPName}%'" + DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges) + If filteredData.Rows.Count = 1 Then + Dim oDEPENDING_GUID = filteredData.Rows(0).Item("GUID") + Dim oDEPENDING_CtrlName = filteredData.Rows(0).Item("NAME") + If _dependingControl_in_action = True Then + Exit Sub + End If + If Not IsDBNull(filteredData.Rows(0).Item("CONNECTION_ID")) And Not IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")) Then + Dim oSqlCommand = IIf(IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")), "", filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")) + oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) + LOGGER.Debug(">>> sql after ReplaceAllValues: " & oSqlCommand) + _dependingControl_in_action = True + Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable(oSqlCommand) + Try + Dim oDependingLookup As LookupControl2 = pnldesigner.Controls.Find(oDEPENDING_CtrlName, False).FirstOrDefault() + For Each oControl As Control In pnldesigner.Controls + If oControl.Tag = oDEPENDING_GUID Then + Dim oDependingLookup1 As LookupControl2 = oControl + oDependingLookup1.DataSource = oDTDEPENDING_RESULT + _dependingControl_in_action = False + Exit For + End If + + Next + + + Catch ex As Exception + LOGGER.Warn($"Could not get the lookupconbtrol for name {oDEPENDING_CtrlName}") + _dependingControl_in_action = False + End Try + SendKeys.Send("{TAB}") + End If + End If + End If + End If + Catch ex As Exception + LOGGER.Error(ex) + End Try + End Sub Sub FillIndexValues() Dim controltype As String Dim indexname As String @@ -344,7 +413,7 @@ Public Class frmMassValidator For Each inctrl As Control In Me.pnldesigner.Controls Dim CONTROL_ID = inctrl.Tag - Dim controlRow = (From form In DT_PROFILE_CONTROLS.AsEnumerable' DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable() + Dim controlRow = (From form In DTCONTROLS.AsEnumerable' DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable() Select form Where form.Item("GUID") = CONTROL_ID).Single() @@ -736,12 +805,12 @@ Public Class frmMassValidator If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then Try - If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, box.Name) = 0 Then + If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, box.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If - If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, box.Name) = False Then + If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, box.Name) = False Then MsgBox("Unexpected Error in getting dependent controls - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -761,7 +830,7 @@ Public Class frmMassValidator LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) End Try - Next + Next Catch ex As Exception LOGGER.Error(ex) @@ -808,12 +877,12 @@ Public Class frmMassValidator Dim cmb As ComboBox = sender If cmb.SelectedIndex <> -1 And CTRLS_Loaded = True And FORM_Shown = True Then ' Try - If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, cmb.Name) = 0 Then + If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties CMB - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If - If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, cmb.Name) = False Then + If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, cmb.Name) = False Then MsgBox("Unexpected Error in getting dependent controls CMB- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -851,12 +920,12 @@ Public Class frmMassValidator Public Sub onDGVRowValidating(ByVal sender As Object, ByVal e As DataGridViewCellCancelEventArgs) Dim dgv As DataGridView = sender Try - If ClassControlCreator.GET_CONTROL_PROPERTIES(DT_PROFILE_CONTROLS, dgv.Name) = 0 Then + If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, dgv.Name) = 0 Then MsgBox("Unexpected Error in getting control-properties DGV - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If - If ClassControlCreator.GET_DEPENDING_CONTROLS(DT_PROFILE_CONTROLS, dgv.Name) = False Then + If ClassControlCreator.GET_DEPENDING_CONTROLS(DTCONTROLS, dgv.Name) = False Then MsgBox("Unexpected Error in getting dependent controls DGV- Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) Exit Sub End If @@ -1014,7 +1083,7 @@ Public Class frmMassValidator btnSave.Enabled = False 'Eingaben auf Form überprüfen - If Check_UpdateIndexe() = False Then + If CheckAndUpdateIndices() = False Then Dim workedFiles As Integer For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows @@ -1022,7 +1091,14 @@ Public Class frmMassValidator CURRENT_DOC_GUID = docrow.Item("DOC_GUID") Dim WMDOC As WMObject Try - WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH")) + Dim oRelPath = docrow.Item("FULL_PATH").ToString + If oRelPath.StartsWith("\\") Then + oRelPath = oRelPath.Replace("\\", "\") + If oRelPath.StartsWith("\") = False Then + oRelPath = "\" & oRelPath + End If + End If + WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oRelPath) Catch ex As Exception LOGGER.Error(ex) LOGGER.Info("error while creating WMObject in (IndexVKTMultipleFiles): " & ex.Message) @@ -1198,59 +1274,132 @@ Public Class frmMassValidator Else 'lblerror.Visible = True 'lblerror.Text = errmessage - errormessage = errmessage + errormessage = oErrorMessage frmError.ShowDialog() End If btnSave.Enabled = True End Sub - Function Check_UpdateIndexe() + Function CheckAndUpdateIndices() ' Try - Dim missing As Boolean = False + Dim oMissing As Boolean = False 'Jedes Control auf panel durchlaufen - For Each inctrl As Control In Me.pnldesigner.Controls + For Each oControl As Control In Me.pnldesigner.Controls 'Der input der Box,Cmb muss jedes mal geleert werden Dim input As String = "" 'Jedes Control in Konfig Tab durchlaufn - For Each dr As DataRow In DT_PROFILE_CONTROLS.Rows + For Each dr As DataRow In DTCONTROLS.Rows If dr.Item("CTRL_TYPE") = "LBL" Or dr.Item("CTRL_TYPE") = "LINE" Then Continue For End If 'Den Indexnamen auslesen - Dim _IDXName As String = dr.Item("INDEX_NAME") + Dim oIndexname As String = dr.Item("INDEX_NAME") Dim _MUSSEINGABE As Boolean = CBool(dr.Item("VALIDATION")) Dim _READ_ONLY As Boolean = CBool(dr.Item("READ_ONLY")) Dim Typ As String = dr.Item("CTRL_TYPE") Dim CONTROL_ID As String = dr.Item("GUID") Dim ctrl = dr.Item("NAME") 'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist - If dr.Item("NAME") = inctrl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And _IDXName <> "DD PM-ONLY FOR DISPLAY" Then - LOGGER.Debug("Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & _IDXName & "'") - If _IDXName = "" Then + If dr.Item("NAME") = oControl.Name And (_READ_ONLY = False Or dr.Item("SQL_UEBERPRUEFUNG") <> "") And oIndexname <> "DD PM-ONLY FOR DISPLAY" Then + LOGGER.Debug("Indexierung für Control (" & CONTROL_ID & ") '" & ctrl & "' gestartet. Indexname '" & oIndexname & "'") + If oIndexname = "" Then LOGGER.Info(" >> Indexname is unexpected empty.") Continue For End If - Dim Type As String = inctrl.GetType.ToString + Dim Type As String = oControl.GetType.ToString Select Case Type + Case "DigitalData.Controls.LookupGrid.LookupControl2" + Try + Dim myLookup As LookupControl2 = oControl + + 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss + If myLookup.SelectedValues.Count = 0 And _MUSSEINGABE = True Then + oMissing = True + oErrorMessage = $"No selection in LookUpGrid '{oControl.Name}'" + oControl.BackColor = Color.Red + Exit For + End If + If myLookup.MultiSelect = True Then + Dim Zeilen As Integer = myLookup.SelectedValues.Count + + 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss + If Zeilen > 0 Then + Dim ZeilenGrid As Integer = 0 + Dim myVektorArr As String() + 'Jeden Werte des Datagridviews durchlaufen + For Each value As String In myLookup.SelectedValues + If value Is Nothing = False Then + 'Das Array anpassen + ReDim Preserve myVektorArr(ZeilenGrid) + 'Den Wert im Array speichern + myVektorArr(ZeilenGrid) = value + ZeilenGrid += 1 + End If + Next + 'Jetzt die Datei indexieren + If IndexMultipleFiles(oIndexname, myVektorArr) = False Then + oMissing = True + oErrorMessage = "Fehler beim Indexieren von LookupGrid - 1337: " + Exit For + End If + Else + Dim oValues As New List(Of Object) From {String.Empty} + If IndexMultipleFiles(oIndexname, "") = False Then + oMissing = True + oErrorMessage = "Fehler beim Indexieren von LookupGrid - 1345: " + Exit For + End If + End If + Else + input = myLookup.SelectedValues.FirstOrDefault() + If oIndexname.StartsWith("[%VKT") Then + input = Return_PM_VEKTOR(input, oIndexname) + 'Hier muss nun separat als Vektorfeld indexiert werden + If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then + oMissing = True + oErrorMessage = "Error while indexing LookupGrid with VEKTOR - Check the log and inform Your sysadmin" + Exit For + End If + Else + Dim result() As String + ReDim Preserve result(0) + result(0) = input + If IndexMultipleFiles(oIndexname, result) = False Then + oMissing = True + oErrorMessage = "Error while indexing LookupGrid - Check the log and inform Your sysadmin" + Exit For + Else + 'Nun das Logging + If PROFIL_LOGINDEX <> "" Then + input = Return_LOGString(input, input, oIndexname) + IndexVKTMultipleFiles(input, PROFIL_LOGINDEX) + End If + End If + End If + End If + + + Catch ex As Exception + LOGGER.Error(ex) + End Try Case "System.Windows.Forms.TextBox" Try 'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist - If Check_Missing(inctrl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN - missing = True - errmessage = "Missing input in textbox '" & inctrl.Name & "'" - inctrl.BackColor = Color.Red + If Check_Missing(oControl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN + oMissing = True + oErrorMessage = "Missing input in textbox '" & oControl.Name & "'" + oControl.BackColor = Color.Red Exit For Else - input = inctrl.Text + input = oControl.Text 'Wenn der Wert in ein Vektorfeld geschrieben wird - If _IDXName.StartsWith("[%VKT") Then - input = Return_PM_VEKTOR(input, _IDXName) + If oIndexname.StartsWith("[%VKT") Then + input = Return_PM_VEKTOR(input, oIndexname) 'Hier muss nun separat als Vektorfeld indexiert werden If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then - missing = True - errmessage = "Error while indexing Textbox with VEKTOR - Check the log and inform Your sysadmin" - + oMissing = True + oErrorMessage = "Error while indexing Textbox with VEKTOR - Check the log and inform Your sysadmin" Exit For End If Else @@ -1258,14 +1407,14 @@ Public Class frmMassValidator ReDim Preserve result(0) result(0) = input - If IndexMultipleFiles(_IDXName, result) = False Then - missing = True - errmessage = "error while indexing Textbox - Check the log and inform Your sysadmin" + If IndexMultipleFiles(oIndexname, result) = False Then + oMissing = True + oErrorMessage = "error while indexing Textbox - Check the log and inform Your sysadmin" Exit For Else 'Nun das Logging If PROFIL_LOGINDEX <> "" Then - input = Return_LOGString(input, input, _IDXName) + input = Return_LOGString(input, input, oIndexname) IndexVKTMultipleFiles(input, PROFIL_LOGINDEX) End If End If @@ -1281,59 +1430,24 @@ Public Class frmMassValidator Return True End Try - Case "System.Windows.Forms.ComboBox" - Dim cmb As ComboBox = inctrl - 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss - If cmb.SelectedIndex = -1 And _MUSSEINGABE = True Then - missing = True - errmessage = "Please Choose an entry out of ComboBox '" & cmb.Name & "'" - Exit For - ElseIf cmb.SelectedIndex <> -1 Then - input = cmb.Text - 'Wenn der Wert in ein Vektorfeld geschrieben wird - If _IDXName.StartsWith("[%VKT") Then - input = Return_PM_VEKTOR(input, _IDXName) - 'Hier muss nun separat als Vektorfeld indexiert werden - If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then - missing = True - errmessage = "Error while indexing Combobox with VEKTOR - Check the log and inform Your sysadmin" - Exit For - End If - Else - Dim result() As String - ReDim Preserve result(0) - result(0) = input - If IndexMultipleFiles(_IDXName, result) = False Then - cmb.DroppedDown = True - missing = True - errmessage = "error while indexing Combobox - Check the log and inform Your sysadmin" - Exit For - Else - 'Nun das Logging - If PROFIL_LOGINDEX <> "" Then - input = Return_LOGString(input, input, _IDXName) - IndexVKTMultipleFiles(input, PROFIL_LOGINDEX) - End If - End If - End If - End If + Case "System.Windows.Forms.DateTimePicker" - Dim dtp As DateTimePicker = inctrl + Dim dtp As DateTimePicker = oControl 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss If _MUSSEINGABE = True And dtp.Value.ToString = String.Empty Then - missing = True - errmessage = "Please Choose DateValue for field'" & dtp.Name & "'" + oMissing = True + oErrorMessage = "Please Choose DateValue for field'" & dtp.Name & "'" Exit For ElseIf dtp.Value.ToString <> "01.01.0001 00:00:00" Then input = CDate(dtp.Value) 'Wenn der WErt in ein Vektorfeld geschrieben wird - If _IDXName.StartsWith("[%VKT") Then + If oIndexname.StartsWith("[%VKT") Then 'Input = die String komponente als String - input = Return_PM_VEKTOR(input, _IDXName) + input = Return_PM_VEKTOR(input, oIndexname) 'Hier muss nun separat als Vektorfeld indexiert werden If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then - missing = True - errmessage = "Error while indexing DatePicker with VEKTOR - Check the log and inform Your sysadmin" + oMissing = True + oErrorMessage = "Error while indexing DatePicker with VEKTOR - Check the log and inform Your sysadmin" Exit For End If Else @@ -1341,14 +1455,14 @@ Public Class frmMassValidator ReDim Preserve result(0) result(0) = CDate(input) 'MsgBox(_IDXName) - If IndexMultipleFiles(_IDXName, result) = False Then - missing = True - errmessage = "Error while indexing DatePicker - Check the log and inform Your sysadmin" + If IndexMultipleFiles(oIndexname, result) = False Then + oMissing = True + oErrorMessage = "Error while indexing DatePicker - Check the log and inform Your sysadmin" Exit For Else 'Nun das Logging If PROFIL_LOGINDEX <> "" Then - input = Return_LOGString(input, input, _IDXName) + input = Return_LOGString(input, input, oIndexname) IndexVKTMultipleFiles(input, PROFIL_LOGINDEX) End If End If @@ -1358,12 +1472,12 @@ Public Class frmMassValidator LOGGER.Debug("DateValue is 01.01.0001 00:00:00") End If Case "System.Windows.Forms.CheckBox" - Dim chk As CheckBox = inctrl + Dim chk As CheckBox = oControl input = chk.Checked.ToString If chk.Checked = False And _MUSSEINGABE = True Then - missing = True - errmessage = "Option '" & chk.Name & "' is required." + oMissing = True + oErrorMessage = "Option '" & chk.Name & "' is required." Exit For End If @@ -1376,32 +1490,32 @@ Public Class frmMassValidator result(0) = 0 End If - If _IDXName.StartsWith("[%VKT") Then + If oIndexname.StartsWith("[%VKT") Then 'Input = die String komponente mit Boolean als String - input = Return_PM_VEKTOR(chk.Checked.ToString, _IDXName) + input = Return_PM_VEKTOR(chk.Checked.ToString, oIndexname) 'Hier muss nun separat als Vektorfeld indexiert werden If IndexVKTMultipleFiles(input, PROFIL_VEKTORINDEX) = True Then - missing = True - errmessage = "Error while indexing Checkbox with VEKTOR - Check the log and inform Your sysadmin" + oMissing = True + oErrorMessage = "Error while indexing Checkbox with VEKTOR - Check the log and inform Your sysadmin" Exit For End If Else - If IndexMultipleFiles(_IDXName, result) = False Then - missing = True - errmessage = "error while indexing Checkbox - Check the log and inform Your sysadmin" + If IndexMultipleFiles(oIndexname, result) = False Then + oMissing = True + oErrorMessage = "error while indexing Checkbox - Check the log and inform Your sysadmin" Exit For Else 'Nun das Logging If PROFIL_LOGINDEX <> "" Then - input = Return_LOGString(CBool(result(0)).ToString, result(0).ToString, _IDXName) + input = Return_LOGString(CBool(result(0)).ToString, result(0).ToString, oIndexname) IndexVKTMultipleFiles(input, PROFIL_LOGINDEX) End If End If End If Case "System.Windows.Forms.DataGridView" - Dim dgv As DataGridView = inctrl + Dim dgv As DataGridView = oControl Dim Zeilen As Integer = 0 For Each row As DataGridViewRow In dgv.Rows @@ -1413,8 +1527,8 @@ Public Class frmMassValidator Next 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss If _MUSSEINGABE = True And Zeilen = 0 Then - missing = True - errmessage = "Missing input in vectorfield'" & dgv.Name & "'" + oMissing = True + oErrorMessage = "Missing input in vectorfield'" & dgv.Name & "'" Exit For ElseIf Zeilen > 0 Then Dim ZeilenGrid As Integer = 0 @@ -1455,9 +1569,9 @@ Public Class frmMassValidator Next 'Jetzt die Datei indexieren - If IndexMultipleFiles(_IDXName, myVektorArr) = False Then - missing = True - errmessage = "error while indexing Vektorfeld - Check the log and inform Your sysadmin" + If IndexMultipleFiles(oIndexname, myVektorArr) = False Then + oMissing = True + oErrorMessage = "error while indexing Vektorfeld - Check the log and inform Your sysadmin" Exit For End If End If @@ -1466,7 +1580,7 @@ Public Class frmMassValidator Next Next - Return missing + Return oMissing 'Catch ex As Exception ' Dim st As New StackTrace(True) @@ -1491,9 +1605,19 @@ Public Class frmMassValidator Dim _allfine As Boolean = True Try For Each docrow As DataRow In CURRENT_DT_MASS_CHANGE_DOCS.Rows + If docrow.Item("DOC_ID") = 0 Then + Continue For + End If Dim WMDOC As WMObject Try - WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, docrow.Item("FULL_PATH")) + Dim oRelPath = docrow.Item("FULL_PATH").ToString + If oRelPath.StartsWith("\\") Then + oRelPath = oRelPath.Replace("\\", "\") + ElseIf oRelPath.StartsWith("\") = False Then + oRelPath = "\" & oRelPath + + End If + WMDOC = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, oRelPath) Catch ex As Exception LOGGER.Error(ex) LOGGER.Info("error while creating WMObject in (IndexMultipleFiles): " & ex.Message) diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index c285258..8331b87 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -58,6 +58,7 @@ Public Class frmValidator Private _frmValidatorSearch As frmValidatorSearch 'You need a reference to Form1 Private _dependingControl_in_action As Boolean = False Private DTCONTROLS As DataTable + Private FormLoaded As Boolean = False Public Shared Function SetForegroundWindow(ByVal hwnd As IntPtr) As Boolean @@ -305,7 +306,7 @@ Public Class frmValidator pdfxchange = False sumatra = False RibbonControl1.Minimized = True - + FormLoaded = False If My.Settings.frmValidatorPosition.IsEmpty = False Then @@ -1002,6 +1003,9 @@ Public Class frmValidator End Try End Sub Public Sub onLookUp1(sender As Object, e As System.EventArgs) + If FormLoaded = False Then + Exit Sub + End If Dim oLookup As LookupControl2 = sender Try If Not IsNothing(oLookup.SelectedValues) Then @@ -1492,6 +1496,7 @@ Public Class frmValidator LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'") If CURRENT_DOC_GUID > 0 Then + 'Beschriftung des Navigators 'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files" If myWMDocumentPath <> String.Empty Then @@ -1505,7 +1510,6 @@ Public Class frmValidator Try CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(myWMDocumentPath)) - Catch ex As Exception LOGGER.Error(ex) allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) @@ -2553,6 +2557,7 @@ Public Class frmValidator Refresh_FileList() Load_Next_Document(True) _dependingControl_in_action = False + FormLoaded = True End Sub Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click btnSave.Enabled = False