From e8877ffc995fa74dfbbcd03df1f9b19749b76602 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Thu, 10 Apr 2025 15:39:42 +0200 Subject: [PATCH] MS Administration --- app/TaskFlow/FinalIndexDataSet.xss | 2 +- app/TaskFlow/ModuleFinalIndexProperties.vb | 8 +++++- app/TaskFlow/frmAdministration.Designer.vb | 3 +- app/TaskFlow/frmAdministration.resx | 10 +++---- app/TaskFlow/frmAdministration.vb | 33 +++++++++++++++------- app/TaskFlow/frmFormDesigner.Designer.vb | 22 +++++++-------- app/TaskFlow/frmFormDesigner.resx | 14 ++++----- app/TaskFlow/frmFormDesigner.vb | 24 ++++++++++++---- app/TaskFlow/frmValidator.vb | 4 +++ 9 files changed, 78 insertions(+), 42 deletions(-) diff --git a/app/TaskFlow/FinalIndexDataSet.xss b/app/TaskFlow/FinalIndexDataSet.xss index 927c753..6914c17 100644 --- a/app/TaskFlow/FinalIndexDataSet.xss +++ b/app/TaskFlow/FinalIndexDataSet.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/app/TaskFlow/ModuleFinalIndexProperties.vb b/app/TaskFlow/ModuleFinalIndexProperties.vb index 4087836..fbd0558 100644 --- a/app/TaskFlow/ModuleFinalIndexProperties.vb +++ b/app/TaskFlow/ModuleFinalIndexProperties.vb @@ -97,6 +97,7 @@ Module ModuleFinalIndexProperties Public Property VectorBehaviourType As List(Of String) Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes) + 'Sd MaybeSetReadOnlyIfNotVectorIndex(attrs) End Sub @@ -182,7 +183,12 @@ Module ModuleFinalIndexProperties If indexType.Contains(type) Then attrs.IsBrowsable = True Else - attrs.IsBrowsable = False + If attrs.DisplayName = "Index Behaviour" Then + attrs.IsBrowsable = True + Else + attrs.IsBrowsable = False + End If + End If End Sub diff --git a/app/TaskFlow/frmAdministration.Designer.vb b/app/TaskFlow/frmAdministration.Designer.vb index 71f5178..e407c6c 100644 --- a/app/TaskFlow/frmAdministration.Designer.vb +++ b/app/TaskFlow/frmAdministration.Designer.vb @@ -685,6 +685,7 @@ Partial Class frmAdministration Me.viewFinalIndex.Name = "viewFinalIndex" Me.viewFinalIndex.OptionsBehavior.Editable = False Me.viewFinalIndex.OptionsBehavior.ReadOnly = True + Me.viewFinalIndex.OptionsSelection.EnableAppearanceFocusedRow = False Me.viewFinalIndex.OptionsView.EnableAppearanceEvenRow = True Me.viewFinalIndex.OptionsView.ShowGroupPanel = False ' @@ -757,7 +758,7 @@ Partial Class frmAdministration Me.RibbonControl1.ExpandCollapseItem.Id = 0 Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItemRefreshProfileData, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarButtonItem5, Me.BarButtonItem6, Me.BarButtonItem7, Me.BarButtonItem8, Me.BarButtonItem9, Me.BarButtonItem10, Me.BarButtonItem11, Me.BarButtonItem12, Me.BarButtonItem13, Me.BarButtonItem14, Me.BarButtonItem15, Me.BarButtonItem16, Me.BarButtonItem17, Me.BarButtonItem18, Me.BarButtonItem19, Me.tsbStaticInfo, Me.BarButtonItem20, Me.BarButtonItem21, Me.bbtnItemFinishSQL, Me.BarButtonItem22, Me.BarButtonItem23, Me.BarButtonItem24, Me.BarButtonItem25, Me.BarButtonItem26, Me.BarToggleSwitchItemEdit, Me.bbtnitmReject, Me.bbtnitmNotResponsible}) resources.ApplyResources(Me.RibbonControl1, "RibbonControl1") - Me.RibbonControl1.MaxItemId = 32 + Me.RibbonControl1.MaxItemId = 33 Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage3}) Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] diff --git a/app/TaskFlow/frmAdministration.resx b/app/TaskFlow/frmAdministration.resx index 213c085..b3ca0f6 100644 --- a/app/TaskFlow/frmAdministration.resx +++ b/app/TaskFlow/frmAdministration.resx @@ -565,7 +565,7 @@ 58 - 1002, 202 + 1002, 203 3 @@ -688,7 +688,7 @@ 58 - 1002, 237 + 1002, 236 0 @@ -778,7 +778,7 @@ 1002, 493 - 227 + 228 1 @@ -3355,7 +3355,7 @@ 3, 3, 3, 3 - 986, 391 + 986, 394 1 @@ -4630,7 +4630,7 @@ 6, 89 - 1, 0 + 0, 0 1 diff --git a/app/TaskFlow/frmAdministration.vb b/app/TaskFlow/frmAdministration.vb index a7eff35..2330467 100644 --- a/app/TaskFlow/frmAdministration.vb +++ b/app/TaskFlow/frmAdministration.vb @@ -430,7 +430,7 @@ Public Class frmAdministration pgFinalIndexes.SelectedObject = Nothing End If - + tsbStaticInfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei Refresh_Final_indexe:") Finally @@ -659,7 +659,7 @@ Public Class frmAdministration Try Dim view As GridView = sender Dim focusedRow As DataRow = view.GetFocusedDataRow() - pgFinalIndexes.SelectedObject = Nothing + If IsNothing(focusedRow) Then Exit Sub @@ -671,7 +671,7 @@ Public Class frmAdministration If UNSAVED_CHANGES_FI = True Then oShouldRefreshGrid = CHECK_QUESTION_CHANGES() End If - + pgFinalIndexes.SelectedObject = Nothing Dim guid As Integer = focusedRow.Item("GUID") Dim index As String = NotNull(focusedRow.Item("INDEXNAME"), Nothing) @@ -714,7 +714,8 @@ Public Class frmAdministration obj.IndexName = index obj.VectorBehaviourType = New List(Of String) From { "Add", - "Overwrite" + "Overwrite", + "Delete" } If index IsNot Nothing Then @@ -728,9 +729,9 @@ Public Class frmAdministration pgFinalIndexes.SelectedObject = obj pgFinalIndexes.Refresh() - If oShouldRefreshGrid Then - Refresh_Final_Indexes() - End If + 'If oShouldRefreshGrid Then + ' Refresh_Final_Indexes() + 'End If Catch ex As Exception _Logger.Error(ex) MsgBox($"Error while loading Final Index properties: {ex.Message}", MsgBoxStyle.Critical) @@ -774,6 +775,12 @@ Public Class frmAdministration obj.Sequence = oValue ElseIf oName = "ContinueOnIndifferentState" Then obj.ContinueOnIndifferentState = oValue + ElseIf oName = "VectorBehaviour" Then + If oValue = "Delete" Then + obj.StringValue = "" + ElseIf oValue = "Add" And obj.StringValue = "" Then + obj.StringValue = "Your value to set" + End If End If pgFinalIndexes.Refresh() End If @@ -1042,9 +1049,9 @@ Public Class frmAdministration Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick Save_Final_Indexes() - 'Refresh_Final_Indexes() + Refresh_Final_Indexes() If focusedRowHandle <> 199 Then - viewFinalIndex.SelectRow(focusedRowHandle) + viewFinalIndex.FocusedRowHandle = focusedRowHandle End If End Sub Private Sub Save_Final_Indexes() @@ -1124,7 +1131,8 @@ Public Class frmAdministration WHERE GUID = {guid}" If DatabaseFallback.ExecuteNonQueryECM(sql) Then - tsbStaticInfo.Caption = $"Final index saved - {Now.ToLongTimeString} - RESTART NECESSARY" + tsbStaticInfo.Caption = $"Final index saved - {Now.ToLongTimeString} - RESTART/REFRESH NECESSARY" + tsbStaticInfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Always Else End If @@ -1261,6 +1269,7 @@ Public Class frmAdministration If UNSAVED_CHANGES_FI Then Save_Final_Indexes() + 'Refresh_Final_Indexes() End If Return True @@ -1595,4 +1604,8 @@ Public Class frmAdministration Dim ofrm As New frmAdmin_notResponsibleConfig(PROFILGUIDTextBox.Text) ofrm.ShowDialog() End Sub + + Private Sub BarButtonItem1_ItemClick_2(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) + viewFinalIndex.FocusedRowHandle() = 2 + End Sub End Class \ No newline at end of file diff --git a/app/TaskFlow/frmFormDesigner.Designer.vb b/app/TaskFlow/frmFormDesigner.Designer.vb index b9f8ada..cc7f40f 100644 --- a/app/TaskFlow/frmFormDesigner.Designer.vb +++ b/app/TaskFlow/frmFormDesigner.Designer.vb @@ -55,6 +55,7 @@ Partial Class frmFormDesigner Me.RibbonGroupControlFunctions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonGroupControls = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibPGCtrlWidth = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibPGCtrlHeightreal = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.TBPM_PROFILE_CONTROLSBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.DD_DMSLiteDataSet = New DD_ProcessManager.DD_DMSLiteDataSet() @@ -74,7 +75,6 @@ Partial Class frmFormDesigner Me.RibbonPage3 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibPGCtrlheight = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() CType(Me.SplitContainerDesigner, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerDesigner.Panel1.SuspendLayout() Me.SplitContainerDesigner.Panel2.SuspendLayout() @@ -293,7 +293,7 @@ Partial Class frmFormDesigner ' 'RibbonPage1 ' - Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonGroupControlFunctions, Me.RibbonGroupControls, Me.RibPGCtrlWidth, Me.RibbonPageGroup2}) + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonGroupControlFunctions, Me.RibbonGroupControls, Me.RibPGCtrlWidth, Me.RibPGCtrlHeightreal}) Me.RibbonPage1.Name = "RibbonPage1" resources.ApplyResources(Me.RibbonPage1, "RibbonPage1") ' @@ -332,6 +332,14 @@ Partial Class frmFormDesigner Me.RibPGCtrlWidth.Name = "RibPGCtrlWidth" resources.ApplyResources(Me.RibPGCtrlWidth, "RibPGCtrlWidth") ' + 'RibPGCtrlHeightreal + ' + Me.RibPGCtrlHeightreal.AllowTextClipping = False + Me.RibPGCtrlHeightreal.ItemLinks.Add(Me.bbtniheight_plus) + Me.RibPGCtrlHeightreal.ItemLinks.Add(Me.bbtniheight_min) + Me.RibPGCtrlHeightreal.Name = "RibPGCtrlHeightreal" + resources.ApplyResources(Me.RibPGCtrlHeightreal, "RibPGCtrlHeightreal") + ' 'RibbonStatusBar1 ' Me.RibbonStatusBar1.ItemLinks.Add(Me.bstitmProfilID) @@ -437,14 +445,6 @@ Partial Class frmFormDesigner Me.RibPGCtrlheight.Name = "RibPGCtrlheight" resources.ApplyResources(Me.RibPGCtrlheight, "RibPGCtrlheight") ' - 'RibbonPageGroup2 - ' - Me.RibbonPageGroup2.AllowTextClipping = False - Me.RibbonPageGroup2.ItemLinks.Add(Me.bbtniheight_plus) - Me.RibbonPageGroup2.ItemLinks.Add(Me.bbtniheight_min) - Me.RibbonPageGroup2.Name = "RibbonPageGroup2" - resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2") - ' 'frmFormDesigner ' Me.Appearance.Options.UseFont = True @@ -527,6 +527,6 @@ Partial Class frmFormDesigner Friend WithEvents tslblAenderungen As DevExpress.XtraBars.BarStaticItem Friend WithEvents pgControlsNew As DevExpress.XtraVerticalGrid.PropertyGridControl Friend WithEvents bstitmProfilID As DevExpress.XtraBars.BarStaticItem - Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibPGCtrlHeightreal As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibPGCtrlheight As DevExpress.XtraBars.Ribbon.RibbonPageGroup End Class diff --git a/app/TaskFlow/frmFormDesigner.resx b/app/TaskFlow/frmFormDesigner.resx index 13b94b0..7852166 100644 --- a/app/TaskFlow/frmFormDesigner.resx +++ b/app/TaskFlow/frmFormDesigner.resx @@ -439,7 +439,7 @@ Control - Breite (+/-) - + Control-Höhe (Strg + +/-) @@ -1221,6 +1221,12 @@ DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + RibPGCtrlHeightreal + + + DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + TBPM_PROFILE_CONTROLSBindingSource @@ -1323,12 +1329,6 @@ DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - RibbonPageGroup2 - - - DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - frmFormDesigner diff --git a/app/TaskFlow/frmFormDesigner.vb b/app/TaskFlow/frmFormDesigner.vb index eacd275..61158eb 100644 --- a/app/TaskFlow/frmFormDesigner.vb +++ b/app/TaskFlow/frmFormDesigner.vb @@ -64,7 +64,7 @@ Public Class frmFormDesigner BarButtonItem3.ItemAppearance.Normal.BackColor = Color.Red Designer_Locked = True Mouse_IsPressed = False - RibPGCtrlheight.Enabled = False + RibPGCtrlHeightreal.Enabled = False RibPGCtrlWidth.Enabled = False RibbonGroupControls.Enabled = False RibbonGroupControlFunctions.Enabled = False @@ -446,7 +446,7 @@ Public Class frmFormDesigner sender.BringToFront() RibbonGroupControlFunctions.Enabled = True Mouse_IsPressed = True - RibPGCtrlheight.Enabled = True + RibPGCtrlHeightreal.Enabled = True RibPGCtrlWidth.Enabled = True Console.WriteLine("CURRENT_CONTROL:" & CurrentControl.Name) End If @@ -1028,7 +1028,7 @@ Public Class frmFormDesigner pgControlsNew.Enabled = False tslblAenderungen.Caption = $"Control {CurrentControl.Name} deleted - " + Now.ToString CurrentControl = Nothing - RibPGCtrlheight.Enabled = False + RibPGCtrlHeightreal.Enabled = False RibPGCtrlWidth.Enabled = False Reload_ControlNameList() @@ -1100,9 +1100,9 @@ Public Class frmFormDesigner End Sub Private Sub frmFormDesigner_down(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown - If e.Control AndAlso e.KeyCode = e.KeyCode.Add Then + If e.Control AndAlso (e.KeyCode = e.KeyCode.Add Or e.KeyCode = e.KeyCode.Oemplus) Then Height_plus() - ElseIf e.Control AndAlso e.KeyCode = e.KeyCode.Subtract Then + ElseIf e.Control AndAlso (e.KeyCode = e.KeyCode.Subtract Or e.KeyCode = e.KeyCode.OemMinus) Then Height_minus() Else @@ -1122,6 +1122,10 @@ Public Class frmFormDesigner Width_min() End If End If + If e.Control Then + LOGGER.Debug($"KeyDown-Event: e.Control is pressed!") + End If + LOGGER.Debug($"KeyDown-Event: e.KeyCode: {e.KeyCode.ToString}") End Sub @@ -1279,7 +1283,7 @@ Public Class frmFormDesigner End If If Not IsNothing(CurrentControl) Then - RibPGCtrlheight.Enabled = True + RibPGCtrlHeightreal.Enabled = True RibPGCtrlWidth.Enabled = True End If Catch ex As Exception @@ -1302,6 +1306,8 @@ Public Class frmFormDesigner pgControlsNew.UpdateData() UpdateSingleValue("WIDTH", CurrentControl.Size.Width) + Else + MsgBox("Please choose a control!", MsgBoxStyle.Information) End If End Sub Private Sub bbtniwidth_min_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniwidth_min.ItemClick @@ -1319,6 +1325,8 @@ Public Class frmFormDesigner pgControlsNew.UpdateData() UpdateSingleValue("WIDTH", CurrentControl.Size.Width) + Else + MsgBox("Please choose a control!", MsgBoxStyle.Information) End If End Sub @@ -1344,6 +1352,8 @@ Public Class frmFormDesigner pgControlsNew.UpdateData() UpdateSingleValue("HEIGHT", newHeight) + Else + MsgBox("Please choose a control!", MsgBoxStyle.Information) End If End Sub Private Sub bbtniheight_plus_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniheight_plus.ItemClick @@ -1364,6 +1374,8 @@ Public Class frmFormDesigner pgControlsNew.UpdateData() UpdateSingleValue("HEIGHT", newHeight) + Else + MsgBox("Please choose a control!", MsgBoxStyle.Information) End If End Sub End Class \ No newline at end of file diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 927d5e7..6c929bf 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -4233,12 +4233,16 @@ Public Class frmValidator oDT_FIResult = Nothing Dim oValue As String = oFinalIndexRow.Item("VALUE").ToString Dim oFinalIndex = oFinalIndexRow.Item("INDEXNAME") + Dim oIndexBehaviour = oFinalIndexRow.Item("IF_VEKTOR_BEHAVIOUR") Logger.Debug($"Working on final index [{oFinalIndex}]...") Dim oContinueOnIndifferentState As Boolean = CBool(oFinalIndexRow.Item("CONTINUE_INDETERMINED")) Dim oIndexType = 0 If IDB_ACTIVE = False Then oIndexType = WINDREAM_MOD.GetIndexType(oFinalIndexRow.Item("INDEXNAME")) End If + If oIndexBehaviour = "Delete" Then + sd + End If If oValue.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ### Logger.Debug("Indexing wih dynamic sql...") Dim oGUID = oFinalIndexRow.Item("GUID")