From 078ba6b8cddf19c53f210b3d4b4997d8e8053924 Mon Sep 17 00:00:00 2001 From: Digital Data - Marlon Schreiber Date: Mon, 29 May 2017 13:38:08 +0200 Subject: [PATCH] MS 29.05 --- .../frmConstructor_Main.Designer.vb | 11 ++- .../frmConstructor_Main.resx | 37 +++++--- .../frmConstructor_Main.vb | 93 ++++++++++++++----- 3 files changed, 106 insertions(+), 35 deletions(-) diff --git a/app/DD-Record-Organizer/frmConstructor_Main.Designer.vb b/app/DD-Record-Organizer/frmConstructor_Main.Designer.vb index 13a5f82..ba7b154 100644 --- a/app/DD-Record-Organizer/frmConstructor_Main.Designer.vb +++ b/app/DD-Record-Organizer/frmConstructor_Main.Designer.vb @@ -49,6 +49,7 @@ Partial Class frmConstructor_Main Me.OberhalbToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.UnterhalbToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.tsmiNodeDelete = New System.Windows.Forms.ToolStripMenuItem() + Me.tstxtboxSearchNode = New System.Windows.Forms.ToolStripTextBox() Me.GridControlMain = New DevExpress.XtraGrid.GridControl() Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -309,7 +310,7 @@ Partial Class frmConstructor_Main ' 'cmsTreeView ' - Me.cmsTreeView.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ResetEbenenAuswahlToolStripMenuItem, Me.ToolStripSeparator14, Me.FormDesignerToolStripMenuItem, Me.ToolStripSeparator13, Me.AuswertungAnzeigenToolStripMenuItem, Me.tsmiFilesearch, Me.ToolStripSeparator12, Me.ToolStripSeparator24, Me.tsmi_NewNode, Me.tsmiNodeDelete}) + Me.cmsTreeView.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ResetEbenenAuswahlToolStripMenuItem, Me.ToolStripSeparator14, Me.FormDesignerToolStripMenuItem, Me.ToolStripSeparator13, Me.AuswertungAnzeigenToolStripMenuItem, Me.tsmiFilesearch, Me.ToolStripSeparator12, Me.ToolStripSeparator24, Me.tsmi_NewNode, Me.tsmiNodeDelete, Me.tstxtboxSearchNode}) Me.cmsTreeView.Name = "ContextMenuStrip2" resources.ApplyResources(Me.cmsTreeView, "cmsTreeView") ' @@ -409,6 +410,12 @@ Partial Class frmConstructor_Main resources.ApplyResources(Me.tsmiNodeDelete, "tsmiNodeDelete") Me.tsmiNodeDelete.Name = "tsmiNodeDelete" ' + 'tstxtboxSearchNode + ' + Me.tstxtboxSearchNode.BackColor = System.Drawing.Color.Wheat + resources.ApplyResources(Me.tstxtboxSearchNode, "tstxtboxSearchNode") + Me.tstxtboxSearchNode.Name = "tstxtboxSearchNode" + ' 'GridControlMain ' Me.GridControlMain.AllowDrop = True @@ -1588,6 +1595,7 @@ Partial Class frmConstructor_Main CType(Me.SplitContainerTop, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerTop.ResumeLayout(False) Me.cmsTreeView.ResumeLayout(False) + Me.cmsTreeView.PerformLayout() CType(Me.GridControlMain, System.ComponentModel.ISupportInitialize).EndInit() Me.ContextMenuGrid.ResumeLayout(False) CType(Me.grvwGrid, System.ComponentModel.ISupportInitialize).EndInit() @@ -1843,4 +1851,5 @@ Partial Class frmConstructor_Main Friend WithEvents OrdnerÖffnenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents TimerClearResultfiles As System.Windows.Forms.Timer Friend WithEvents tsbtnPos_Refresh As System.Windows.Forms.ToolStripButton + Friend WithEvents tstxtboxSearchNode As ToolStripTextBox End Class diff --git a/app/DD-Record-Organizer/frmConstructor_Main.resx b/app/DD-Record-Organizer/frmConstructor_Main.resx index 1d9ab29..6788852 100644 --- a/app/DD-Record-Organizer/frmConstructor_Main.resx +++ b/app/DD-Record-Organizer/frmConstructor_Main.resx @@ -135,13 +135,13 @@ 468, 56 - 194, 22 + 220, 22 Reset Ebenen-Auswahl - 191, 6 + 217, 6 @@ -153,16 +153,16 @@ - 194, 22 + 220, 22 Form-Designer - 191, 6 + 217, 6 - 194, 22 + 220, 22 Auswertung anzeigen @@ -268,16 +268,16 @@ - 194, 22 + 220, 22 Dateisuchen - 191, 6 + 217, 6 - 191, 6 + 217, 6 212, 22 @@ -329,7 +329,7 @@ - 194, 22 + 220, 22 Neuer Knoten @@ -351,7 +351,7 @@ - 194, 22 + 220, 22 Knoten löschen @@ -359,8 +359,17 @@ False + + Segoe UI, 9pt, style=Italic + + + 160, 23 + + + Suche Knoten + - 195, 160 + 221, 207 cmsTreeView @@ -3207,6 +3216,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tstxtboxSearchNode + + + System.Windows.Forms.ToolStripTextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + FunktionenDataGridToolStripMenuItem diff --git a/app/DD-Record-Organizer/frmConstructor_Main.vb b/app/DD-Record-Organizer/frmConstructor_Main.vb index 86010d4..9129a2d 100644 --- a/app/DD-Record-Organizer/frmConstructor_Main.vb +++ b/app/DD-Record-Organizer/frmConstructor_Main.vb @@ -672,7 +672,36 @@ Public Class frmConstructor_Main Next Return Nothing End Function + Dim NodesThatMatch As New List(Of TreeNode) + Private Function SearchTheTreeView(ByVal TV As TreeView, ByVal TextToFind As String) As TreeNode + ' Empty previous + NodesThatMatch.Clear() + ' Keep calling RecursiveSearch + For Each TN As TreeNode In TV.Nodes + If TN.Text = TextToFind Then + NodesThatMatch.Add(TN) + End If + RecursiveSearch(TN, TextToFind) + Next + + If NodesThatMatch.Count > 0 Then + Return NodesThatMatch(0) + Else + Return Nothing + End If + + End Function + Private Sub RecursiveSearch(ByVal treeNode As TreeNode, ByVal TextToFind As String) + ' Keep calling the test recursively. + For Each TN As TreeNode In treeNode.Nodes + If TN.Text.Contains(TextToFind) Then + NodesThatMatch.Add(TN) + End If + + RecursiveSearch(TN, TextToFind) + Next + End Sub Private Sub NavPane_MouseUp(sender As Object, e As MouseEventArgs) Handles NavPane.MouseUp Dim pane As TileNavPane = TryCast(sender, TileNavPane) Dim hitInfo As TileNavPaneHitInfo = pane.ViewInfo.CalcHitInfo(e.Location) @@ -982,22 +1011,22 @@ Public Class frmConstructor_Main End If Dim sw1 As New Stopwatch - sw1.Start() + sw1.Start() ClassRightManagement.Check_Set_Rights(CURRENT_RECORD_ID, ENTITY_ID) CONTROL_HANDLING() - elapsed = sw1.Elapsed.TotalSeconds - sw1.Stop() + elapsed = sw1.Elapsed.TotalSeconds + sw1.Stop() - If LogErrorsOnly = False Then ClassLogger.Add(" >> Check Rights took " & Format(elapsed, "0.000000000") & " seconds", False) - If TCDetails.SelectedTabPage Is Nothing Then - Exit Sub - End If - If TabPos.PageVisible = True And TCDetails.SelectedTabPage.Name = "TabPos" Then - Clear_GridPos_View() - Dim POS_GRID_RECORD = Get_Focused_Row_Cell_Value_pos("Record-ID") - Load_Pos_Data() - Load_POSGrid_Layout() - End If + If LogErrorsOnly = False Then ClassLogger.Add(" >> Check Rights took " & Format(elapsed, "0.000000000") & " seconds", False) + If TCDetails.SelectedTabPage Is Nothing Then + Exit Sub + End If + If TabPos.PageVisible = True And TCDetails.SelectedTabPage.Name = "TabPos" Then + Clear_GridPos_View() + Dim POS_GRID_RECORD = Get_Focused_Row_Cell_Value_pos("Record-ID") + Load_Pos_Data() + Load_POSGrid_Layout() + End If If CURRENT_RECORD_ID > 0 Then If RIGHT_RECORD_AND_FILE_READ_ONLY = False And CtrlCommandUI.IsInsert = False Then @@ -1018,14 +1047,14 @@ Public Class frmConstructor_Main 'Liste der geänderten Control Values leeren CtrlBuilder.ControlsChanged.Clear() - elapsed = sw.Elapsed.TotalSeconds - sw.Stop() - Console.WriteLine("Column_Row_Handler took {0}ms to load", sw.ElapsedMilliseconds) - sw.Reset() - If LogErrorsOnly = False Then ClassLogger.Add(" >>>> Column/Row Change took " & Format(elapsed, "0.000000000") & " seconds", False) - If NODE_NAVIGATION = True And _navload = False Then - SearchNode(TreeViewMain.Nodes, RECORD_ID) - End If + elapsed = sw.Elapsed.TotalSeconds + sw.Stop() + Console.WriteLine("Column_Row_Handler took {0}ms to load", sw.ElapsedMilliseconds) + sw.Reset() + If LogErrorsOnly = False Then ClassLogger.Add(" >>>> Column/Row Change took " & Format(elapsed, "0.000000000") & " seconds", False) + If NODE_NAVIGATION = True And _navload = False Then + SearchNode(TreeViewMain.Nodes, RECORD_ID) + End If Catch ex As Exception ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error:", ex.Message & vbNewLine & ex.StackTrace) @@ -6149,6 +6178,11 @@ Public Class frmConstructor_Main End If End If End If + If USER_LANGUAGE <> "de-DE" Then + Me.tstxtboxSearchNode.Text = "Search Node" + Else + Me.tstxtboxSearchNode.Text = "Suche Knoten" + End If End Sub Private Function FindFocussedControl(ByVal ctr As Control) As Control Dim container As ContainerControl = TryCast(ctr, ContainerControl) @@ -6332,10 +6366,10 @@ Public Class frmConstructor_Main End If Dim ins If RECORD_CREATE Then - ins = String.Format("INSERT INTO TBPMO_STRUCTURE_NODES (RECORD_ID,NODE_CONFIG_ID, NODE_CAPTION, ID1, PARENT_GUID, ADDED_WHO) VALUES (" & _ + ins = String.Format("INSERT INTO TBPMO_STRUCTURE_NODES (RECORD_ID,NODE_CONFIG_ID, NODE_CAPTION, ID1, PARENT_GUID, ADDED_WHO) VALUES (" & "{0},{1},'{2}','{3}','{4}','{5}')", NEWRECORD, CURRENT_NODE_CONFIGURABLE_ID, tsmINewText.Text, "CONFIG " & NEWRECORD & "-" & CURRENT_NODE_CONFIGURABLE_ID, PARENT_ID, USER_USERNAME) Else - ins = String.Format("INSERT INTO TBPMO_STRUCTURE_NODES (NODE_CONFIG_ID, NODE_CAPTION, ID1, PARENT_GUID, ADDED_WHO) VALUES (" & _ + ins = String.Format("INSERT INTO TBPMO_STRUCTURE_NODES (NODE_CONFIG_ID, NODE_CAPTION, ID1, PARENT_GUID, ADDED_WHO) VALUES (" & "{1},'{2}','{3}','{4}','{5}')", NEWRECORD, CURRENT_NODE_CONFIGURABLE_ID, tsmINewText.Text, "CONFIG " & NEWRECORD & "-" & CURRENT_NODE_CONFIGURABLE_ID, PARENT_ID, USER_USERNAME) End If If ClassDatabase.Execute_non_Query(ins) Then @@ -6617,4 +6651,17 @@ Public Class frmConstructor_Main End If End Sub + + Private Sub tstxtboxSearchNode_KeyUp(sender As Object, e As KeyEventArgs) Handles tstxtboxSearchNode.KeyUp + If e.KeyCode = Keys.Return Then + If SearchTheTreeView(TreeViewMain, tstxtboxSearchNode.Text) Is Nothing Then + MessageBox.Show("No Match Found") + Else + TreeViewMain.SelectedNode = SearchTheTreeView(TreeViewMain, tstxtboxSearchNode.Text) + End If + End If + End Sub + Private Sub tstxtboxSearchNode_Click(sender As Object, e As EventArgs) Handles tstxtboxSearchNode.Click, tstxtboxSearchNode.Enter + tstxtboxSearchNode.Text = "" + End Sub End Class \ No newline at end of file