jj 24.05
This commit is contained in:
@@ -401,11 +401,53 @@ Public Class frmConstructor_Main
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Layout"
|
#Region "Layout"
|
||||||
|
|
||||||
|
Private Sub GridControl_Leave(sender As Object, e As EventArgs) Handles GridControl1.Leave, GridControlMain.Leave, GridControlPos.Leave, GridControlDocSearch.Leave
|
||||||
|
Save_Grid_Layout()
|
||||||
|
Save_POSGrid_Layout()
|
||||||
|
Save_DocGrid_Layout()
|
||||||
|
Save_Variants_Grid_Layout()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Save_Variants_Grid_Layout()
|
||||||
|
Try
|
||||||
|
Dim XMLPath = Get_VariantsGrid_Layout_Filename()
|
||||||
|
GridViewVariants.SaveLayoutToXml(XMLPath)
|
||||||
|
' Update_Status_Label(True, "Grid Layout Loaded")
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Load_Variants_Grid_Layout()
|
||||||
|
Try
|
||||||
|
Dim XMLPath = Get_VariantsGrid_Layout_Filename()
|
||||||
|
If File.Exists(XMLPath) Then
|
||||||
|
GridViewVariants.RestoreLayoutFromXml(XMLPath)
|
||||||
|
GridViewVariants.GuessAutoFilterRowValuesFromFilter()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function Get_VariantsGrid_Layout_Filename()
|
||||||
|
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
||||||
|
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
||||||
|
Dim Filename As String = String.Format("GridViewDoc_Search-{0}-{1}-UserLayout.xml", GetSafeFilename(EntityName), CONSTRUCTOR_DETAIL_ID)
|
||||||
|
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SplitContainer_SplitterMoved(sender As Object, e As EventArgs) Handles SplitContainerTop.SplitterMoved, SplitContainerDetails.SplitterMoved, SplitContainerMain.SplitterMoved, SplitContainerFORM.SplitterMoved
|
||||||
|
Save_Splitter_Layout()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub Save_POSGrid_Layout()
|
Sub Save_POSGrid_Layout()
|
||||||
Try
|
Try
|
||||||
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
||||||
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING & "_POS", "")
|
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING & "_POS", "")
|
||||||
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGridPos.Name, EntityName, CONSTRUCTORID)
|
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGridPos.Name, EntityName, CONSTRUCTOR_DETAIL_ID)
|
||||||
Dim XMLPath = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
Dim XMLPath = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
grvwGridPos.SaveLayoutToXml(XMLPath)
|
grvwGridPos.SaveLayoutToXml(XMLPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -416,7 +458,7 @@ Public Class frmConstructor_Main
|
|||||||
Try
|
Try
|
||||||
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
||||||
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING & "_POS", "")
|
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING & "_POS", "")
|
||||||
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGridPos.Name, EntityName, CONSTRUCTORID)
|
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGridPos.Name, EntityName, CONSTRUCTOR_DETAIL_ID)
|
||||||
Dim XMLPath = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
Dim XMLPath = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
If File.Exists(XMLPath) Then
|
If File.Exists(XMLPath) Then
|
||||||
grvwGridPos.RestoreLayoutFromXml(XMLPath)
|
grvwGridPos.RestoreLayoutFromXml(XMLPath)
|
||||||
@@ -552,14 +594,14 @@ Public Class frmConstructor_Main
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function Get_Splitter_Layout_Filename()
|
Private Function Get_Splitter_Layout_Filename()
|
||||||
Dim Filename As String = String.Format("{0}-{1}-SplitterLayout.xml", CONSTRUCTORID, CONSTRUCTOR_DETAIL_ID.ToString)
|
Dim Filename As String = String.Format("{0}-{1}-SplitterLayout.xml", CONSTRUCTOR_DETAIL_ID, CONSTRUCTOR_DETAIL_ID.ToString)
|
||||||
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function Get_POSGrid_Layout_Filename()
|
Private Function Get_POSGrid_Layout_Filename()
|
||||||
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
||||||
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
||||||
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGrid.Name, GetSafeFilename(EntityName), CONSTRUCTORID)
|
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGrid.Name, GetSafeFilename(EntityName), CONSTRUCTOR_DETAIL_ID)
|
||||||
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
End Function
|
End Function
|
||||||
Private Function Get_Grid_Layout_Filename()
|
Private Function Get_Grid_Layout_Filename()
|
||||||
@@ -568,13 +610,13 @@ Public Class frmConstructor_Main
|
|||||||
ACT_EBENE_STRING = "NODE_NAVIGATION"
|
ACT_EBENE_STRING = "NODE_NAVIGATION"
|
||||||
End If
|
End If
|
||||||
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
||||||
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGrid.Name, GetSafeFilename(EntityName), CONSTRUCTORID)
|
Dim Filename As String = String.Format("{0}-{1}-{2}-UserLayout.xml", grvwGrid.Name, GetSafeFilename(EntityName), CONSTRUCTOR_DETAIL_ID)
|
||||||
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
End Function
|
End Function
|
||||||
Private Function Get_DocGrid_Layout_Filename()
|
Private Function Get_DocGrid_Layout_Filename()
|
||||||
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
|
||||||
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
Dim EntityName As String = EntityRegex.Replace(ACT_EBENE_STRING, "")
|
||||||
Dim Filename As String = String.Format("GridViewDoc_Search-{0}-{1}-UserLayout.xml", GetSafeFilename(EntityName), CONSTRUCTORID)
|
Dim Filename As String = String.Format("GridViewDoc_Search-{0}-{1}-UserLayout.xml", GetSafeFilename(EntityName), CONSTRUCTOR_DETAIL_ID)
|
||||||
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
@@ -1144,6 +1186,11 @@ Public Class frmConstructor_Main
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Load_DocGrid_Layout()
|
||||||
|
Load_Grid_Layout()
|
||||||
|
Load_Variants_Grid_Layout()
|
||||||
|
Load_Splitter_Layout()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Sub Doc_ReadOnlyHandler(state As Boolean)
|
Sub Doc_ReadOnlyHandler(state As Boolean)
|
||||||
If state = False Then
|
If state = False Then
|
||||||
@@ -3168,6 +3215,8 @@ Public Class frmConstructor_Main
|
|||||||
'ClassPosGrid.CreateComboEditor(grvwGridPos, POS_ENTITY)
|
'ClassPosGrid.CreateComboEditor(grvwGridPos, POS_ENTITY)
|
||||||
'HideColumns_Pos(PARENT_RECORDID)
|
'HideColumns_Pos(PARENT_RECORDID)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Load_POSGrid_Layout()
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Load_Pos_Data: ", ex.Message)
|
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Load_Pos_Data: ", ex.Message)
|
||||||
@@ -6567,19 +6616,5 @@ Public Class frmConstructor_Main
|
|||||||
Save_Record()
|
Save_Record()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub grvwGrid_LostFocus(sender As Object, e As EventArgs) Handles grvwGrid.LostFocus
|
|
||||||
Save_Grid_Layout()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SplitContainerMain_SplitterMoved(sender As Object, e As EventArgs) Handles SplitContainerMain.SplitterMoved
|
|
||||||
Save_Splitter_Layout()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SplitContainerTop_SplitterMoved(sender As Object, e As EventArgs) Handles SplitContainerTop.SplitterMoved
|
|
||||||
Save_Splitter_Layout()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub SplitContainerDetails_SplitterMoved(sender As Object, e As EventArgs) Handles SplitContainerDetails.SplitterMoved
|
|
||||||
Save_Splitter_Layout()
|
|
||||||
End Sub
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user