Merge branch 'master' into Feature_LookupGrid_DependingControls
This commit is contained in:
commit
2ab4247eae
@ -1,4 +1,5 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DD_LIB_Standards
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraEditors
|
||||
@ -428,6 +429,11 @@ Public Class ClassControlCreator
|
||||
|
||||
oControl.UseEmbeddedNavigator = Not row.Item("READ_ONLY")
|
||||
|
||||
' Copy single cell value in CTRL+C instead of whole row
|
||||
oView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect
|
||||
oView.OptionsSelection.MultiSelect = True
|
||||
oView.OptionsClipboard.CopyColumnHeaders = DefaultBoolean.False
|
||||
|
||||
If row.Item("VKT_ADD_ITEM") = True Then
|
||||
oView.OptionsBehavior.AllowAddRows = DefaultBoolean.True
|
||||
oView.OptionsBehavior.AllowDeleteRows = DefaultBoolean.True
|
||||
@ -546,10 +552,30 @@ Public Class ClassControlCreator
|
||||
Dim oIsRequired = oColumn.Item("VALIDATION")
|
||||
Dim oValue = NotNull(oView.GetRowCellValue(e.RowHandle, oCol.ColumnName), "")
|
||||
|
||||
Try
|
||||
Dim oRegex = NotNull(oColumn.Item("REGEX_MATCH"), String.Empty)
|
||||
Dim oRegexMessage = NotNull(oColumn.Item("REGEX_MESSAGE_DE"), String.Empty)
|
||||
If oRegex <> String.Empty Then
|
||||
Dim oMatch = New Regex(oRegex).IsMatch(oValue)
|
||||
Dim oDefaultMessage = "Wert entspricht nicht dem gefordertem Format!"
|
||||
Dim oMessage = IIf(oRegexMessage <> String.Empty, oRegexMessage, oDefaultMessage)
|
||||
|
||||
If oMatch = False Then
|
||||
oView.SetColumnError(oGridColumn, oMessage)
|
||||
e.Valid = False
|
||||
Exit For
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
|
||||
If oIsRequired And oValue = "" Then
|
||||
oView.SetColumnError(oGridColumn, "Spalte muss ausgefüllt werden!")
|
||||
e.Valid = False
|
||||
Exit For
|
||||
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@ -4,223 +4,241 @@ Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class RefreshHelper
|
||||
'<Serializable>
|
||||
'Public Structure RowInfo
|
||||
' Public Id As Object
|
||||
' Public Level As Integer
|
||||
'End Structure
|
||||
|
||||
''' <summary>
|
||||
''' Saves information about the current row, like the level and row handle
|
||||
''' </summary>
|
||||
<Serializable>
|
||||
Public Structure RowInfo
|
||||
Public Id As Object
|
||||
Public level As Integer
|
||||
End Structure
|
||||
Public Class RowInfo
|
||||
Public Property Id As Object
|
||||
Public Property Level As Integer
|
||||
Public Property Handle As Integer
|
||||
End Class
|
||||
|
||||
Private view As GridView
|
||||
Private keyFieldName As String
|
||||
Private Property _View As GridView
|
||||
Private Property _KeyFieldName As String
|
||||
Private Property _Logger As Logger
|
||||
|
||||
Private saveExpList_Renamed As ArrayList
|
||||
Private Property _VisibleRowIndex As Integer = -1
|
||||
|
||||
Private saveSelList_Renamed As ArrayList
|
||||
Private ReadOnly Property ExpansionViewInfoList() As New List(Of RowInfo)
|
||||
Private ReadOnly Property SelectionViewInfoList() As New List(Of RowInfo)
|
||||
Private ReadOnly Property ExpandedMasterRowList() As New List(Of Object)
|
||||
|
||||
Private saveMasterRowsList_Renamed As ArrayList
|
||||
Private visibleRowIndex As Integer = -1
|
||||
|
||||
Public Sub New(ByVal view As GridView, ByVal keyFieldName As String)
|
||||
Me.view = view
|
||||
Me.keyFieldName = keyFieldName
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property SaveExpList() As ArrayList
|
||||
Get
|
||||
If saveExpList_Renamed Is Nothing Then
|
||||
saveExpList_Renamed = New ArrayList()
|
||||
End If
|
||||
Return saveExpList_Renamed
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SaveSelList() As ArrayList
|
||||
Get
|
||||
If saveSelList_Renamed Is Nothing Then
|
||||
saveSelList_Renamed = New ArrayList()
|
||||
End If
|
||||
Return saveSelList_Renamed
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SaveMasterRowsList() As ArrayList
|
||||
Get
|
||||
If saveMasterRowsList_Renamed Is Nothing Then
|
||||
saveMasterRowsList_Renamed = New ArrayList()
|
||||
End If
|
||||
Return saveMasterRowsList_Renamed
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected Function FindParentRowHandle(ByVal rowInfo As RowInfo, ByVal rowHandle As Integer) As Integer
|
||||
Dim result As Integer = view.GetParentRowHandle(rowHandle)
|
||||
Do While view.GetRowLevel(result) <> rowInfo.level
|
||||
result = view.GetParentRowHandle(result)
|
||||
Loop
|
||||
Return result
|
||||
End Function
|
||||
|
||||
Protected Sub ExpandRowByRowInfo(ByVal rowInfo As RowInfo)
|
||||
Dim dataRowHandle As Integer = view.LocateByValue(0, view.Columns(keyFieldName), rowInfo.Id)
|
||||
If dataRowHandle <> GridControl.InvalidRowHandle Then
|
||||
Dim parentRowHandle As Integer = FindParentRowHandle(rowInfo, dataRowHandle)
|
||||
view.SetRowExpanded(parentRowHandle, True, False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Function GetRowHandleToSelect(ByVal rowInfo As RowInfo) As Integer
|
||||
Dim dataRowHandle As Integer = view.LocateByValue(0, view.Columns(keyFieldName), rowInfo.Id)
|
||||
If dataRowHandle <> GridControl.InvalidRowHandle Then
|
||||
If view.GetRowLevel(dataRowHandle) <> rowInfo.level Then
|
||||
Return FindParentRowHandle(rowInfo, dataRowHandle)
|
||||
End If
|
||||
End If
|
||||
Return dataRowHandle
|
||||
End Function
|
||||
|
||||
Protected Sub SelectRowByRowInfo(ByVal rowInfo As RowInfo, ByVal isFocused As Boolean)
|
||||
If isFocused Then
|
||||
view.FocusedRowHandle = GetRowHandleToSelect(rowInfo)
|
||||
Else
|
||||
view.SelectRow(GetRowHandleToSelect(rowInfo))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub SaveSelectionViewInfo(ByVal list As ArrayList)
|
||||
list.Clear()
|
||||
Dim column As GridColumn = view.Columns(keyFieldName)
|
||||
Dim rowInfo As RowInfo
|
||||
Dim selectionArray() As Integer = view.GetSelectedRows()
|
||||
If selectionArray IsNot Nothing Then ' otherwise we have a single focused but not selected row
|
||||
For i As Integer = 0 To selectionArray.Length - 1
|
||||
Dim dataRowHandle As Integer = selectionArray(i)
|
||||
rowInfo.level = view.GetRowLevel(dataRowHandle)
|
||||
If dataRowHandle < 0 Then ' group row
|
||||
dataRowHandle = view.GetDataRowHandleByGroupRowHandle(dataRowHandle)
|
||||
End If
|
||||
rowInfo.Id = view.GetRowCellValue(dataRowHandle, column)
|
||||
list.Add(rowInfo)
|
||||
Next i
|
||||
End If
|
||||
rowInfo.Id = view.GetRowCellValue(view.FocusedRowHandle, column)
|
||||
rowInfo.level = view.GetRowLevel(view.FocusedRowHandle)
|
||||
list.Add(rowInfo)
|
||||
End Sub
|
||||
|
||||
Public Sub SaveExpansionViewInfo(ByVal list As ArrayList)
|
||||
If view.GroupedColumns.Count = 0 Then
|
||||
Return
|
||||
End If
|
||||
list.Clear()
|
||||
Dim column As GridColumn = view.Columns(keyFieldName)
|
||||
For i As Integer = -1 To Integer.MinValue + 1 Step -1
|
||||
If Not view.IsValidRowHandle(i) Then
|
||||
Exit For
|
||||
End If
|
||||
If view.GetRowExpanded(i) Then
|
||||
Dim rowInfo As RowInfo
|
||||
Dim dataRowHandle As Integer = view.GetDataRowHandleByGroupRowHandle(i)
|
||||
rowInfo.Id = view.GetRowCellValue(dataRowHandle, column)
|
||||
rowInfo.level = view.GetRowLevel(i)
|
||||
list.Add(rowInfo)
|
||||
End If
|
||||
Next i
|
||||
End Sub
|
||||
|
||||
Public Sub SaveExpandedMasterRows(ByVal list As ArrayList)
|
||||
If view.GridControl.Views.Count = 1 Then
|
||||
Return
|
||||
End If
|
||||
list.Clear()
|
||||
Dim column As GridColumn = view.Columns(keyFieldName)
|
||||
For i As Integer = 0 To view.DataRowCount - 1
|
||||
If view.GetMasterRowExpanded(i) Then
|
||||
list.Add(view.GetRowCellValue(i, column))
|
||||
End If
|
||||
Next i
|
||||
End Sub
|
||||
|
||||
Public Sub SaveVisibleIndex()
|
||||
visibleRowIndex = view.GetVisibleIndex(view.FocusedRowHandle) - view.TopRowIndex
|
||||
End Sub
|
||||
|
||||
Public Sub LoadVisibleIndex()
|
||||
Try
|
||||
view.MakeRowVisible(view.FocusedRowHandle, True)
|
||||
view.TopRowIndex = view.GetVisibleIndex(view.FocusedRowHandle) - visibleRowIndex
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub LoadSelectionViewInfo(ByVal list As ArrayList)
|
||||
view.BeginSelection()
|
||||
Try
|
||||
view.ClearSelection()
|
||||
For i As Integer = 0 To list.Count - 1
|
||||
SelectRowByRowInfo(DirectCast(list(i), RowInfo), i = list.Count - 1)
|
||||
Next i
|
||||
Finally
|
||||
view.EndSelection()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub LoadExpansionViewInfo(ByVal list As ArrayList)
|
||||
If view.GroupedColumns.Count = 0 Then
|
||||
Return
|
||||
End If
|
||||
view.BeginUpdate()
|
||||
Try
|
||||
view.CollapseAllGroups()
|
||||
For Each info As RowInfo In list
|
||||
ExpandRowByRowInfo(info)
|
||||
Next info
|
||||
Finally
|
||||
view.EndUpdate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub LoadExpandedMasterRows(ByVal list As ArrayList)
|
||||
view.BeginUpdate()
|
||||
Try
|
||||
view.CollapseAllDetails()
|
||||
Dim column As GridColumn = view.Columns(keyFieldName)
|
||||
For i As Integer = 0 To list.Count - 1
|
||||
Dim rowHandle As Integer = view.LocateByValue(0, column, list(i))
|
||||
view.SetMasterRowExpanded(rowHandle, True)
|
||||
Next i
|
||||
Finally
|
||||
view.EndUpdate()
|
||||
End Try
|
||||
Public Sub New(pLogConfig As LogConfig, pView As GridView, pKeyFieldName As String)
|
||||
_View = pView
|
||||
_KeyFieldName = pKeyFieldName
|
||||
_Logger = pLogConfig.GetLogger()
|
||||
End Sub
|
||||
|
||||
Public Sub SaveViewInfo()
|
||||
Try
|
||||
SaveExpandedMasterRows(SaveMasterRowsList)
|
||||
SaveExpansionViewInfo(SaveExpList)
|
||||
SaveSelectionViewInfo(SaveSelList)
|
||||
SaveExpandedMasterRows()
|
||||
SaveExpansionViewInfo()
|
||||
SaveSelectionViewInfo()
|
||||
SaveVisibleIndex()
|
||||
Catch ex As Exception
|
||||
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub LoadViewInfo()
|
||||
Try
|
||||
LoadExpandedMasterRows(SaveMasterRowsList)
|
||||
LoadExpansionViewInfo(SaveExpList)
|
||||
LoadSelectionViewInfo(SaveSelList)
|
||||
LoadExpandedMasterRows()
|
||||
LoadExpansionViewInfo()
|
||||
LoadSelectionViewInfo()
|
||||
LoadVisibleIndex()
|
||||
Catch ex As Exception
|
||||
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function FindParentRowHandle(pRowInfo As RowInfo, oRowHandle As Integer) As Integer
|
||||
Dim oParentRowHandle As Integer = _View.GetParentRowHandle(oRowHandle)
|
||||
|
||||
Do While _View.GetRowLevel(oParentRowHandle) <> pRowInfo.Level
|
||||
oParentRowHandle = _View.GetParentRowHandle(oParentRowHandle)
|
||||
Loop
|
||||
|
||||
Return oParentRowHandle
|
||||
End Function
|
||||
|
||||
Private Function GetKeyColumn() As GridColumn
|
||||
Return _View.Columns(_KeyFieldName)
|
||||
End Function
|
||||
|
||||
Private Function GetKeyColumnValue(pRowHandle As Integer) As Object
|
||||
Return _View.GetRowCellValue(pRowHandle, GetKeyColumn())
|
||||
End Function
|
||||
|
||||
Private Sub ExpandRowByRowInfo(pRowInfo As RowInfo)
|
||||
'Dim oDataRowHandle As Integer = _View.LocateByValue(0, GetKeyColumn(), rowInfo.Id)
|
||||
Dim oDataRowHandle As Integer = pRowInfo.Handle
|
||||
|
||||
If oDataRowHandle <> GridControl.InvalidRowHandle Then
|
||||
Dim parentRowHandle As Integer = FindParentRowHandle(pRowInfo, oDataRowHandle)
|
||||
_View.SetRowExpanded(parentRowHandle, True, False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GetRowHandleToSelect(pRowInfo As RowInfo) As Integer
|
||||
'Dim oDataRowHandle As Integer = _View.LocateByValue(0, GetKeyColumn(), rowInfo.Id)
|
||||
Dim oDataRowHandle As Integer = pRowInfo.Handle
|
||||
|
||||
If oDataRowHandle <> GridControl.InvalidRowHandle Then
|
||||
If _View.GetRowLevel(oDataRowHandle) <> pRowInfo.Level Then
|
||||
Return FindParentRowHandle(pRowInfo, oDataRowHandle)
|
||||
End If
|
||||
End If
|
||||
Return oDataRowHandle
|
||||
End Function
|
||||
|
||||
Private Sub SelectRowByRowInfo(pRowInfo As RowInfo, pIsFocused As Boolean)
|
||||
If pIsFocused Then
|
||||
_View.FocusedRowHandle = GetRowHandleToSelect(pRowInfo)
|
||||
Else
|
||||
_View.SelectRow(GetRowHandleToSelect(pRowInfo))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SaveSelectionViewInfo()
|
||||
SelectionViewInfoList.Clear()
|
||||
|
||||
Dim oSelectionArray() As Integer = _View.GetSelectedRows()
|
||||
If oSelectionArray IsNot Nothing Then ' otherwise we have a single focused but not selected row
|
||||
Dim oRowInfo As New RowInfo
|
||||
|
||||
For oIndex As Integer = 0 To oSelectionArray.Length - 1
|
||||
Dim oDataRowHandle As Integer = oSelectionArray(oIndex)
|
||||
oRowInfo.Level = _View.GetRowLevel(oDataRowHandle)
|
||||
If oDataRowHandle < 0 Then ' group row
|
||||
oDataRowHandle = _View.GetDataRowHandleByGroupRowHandle(oDataRowHandle)
|
||||
End If
|
||||
|
||||
oRowInfo.Id = GetKeyColumnValue(oDataRowHandle)
|
||||
oRowInfo.Handle = oDataRowHandle
|
||||
|
||||
SelectionViewInfoList.Add(oRowInfo)
|
||||
Next
|
||||
Else
|
||||
SelectionViewInfoList.Add(New RowInfo With {
|
||||
.Id = GetKeyColumnValue(_View.FocusedRowHandle),
|
||||
.Level = _View.GetRowLevel(_View.FocusedRowHandle),
|
||||
.Handle = _View.FocusedRowHandle
|
||||
})
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SaveExpansionViewInfo()
|
||||
' Dont do anything if the current view does not have any grouped columns
|
||||
If _View.GroupedColumns.Count = 0 Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' Clear the list first
|
||||
ExpansionViewInfoList.Clear()
|
||||
|
||||
For oIndex As Integer = -1 To Integer.MinValue + 1 Step -1
|
||||
If Not _View.IsValidRowHandle(oIndex) Then
|
||||
Exit For
|
||||
End If
|
||||
If _View.GetRowExpanded(oIndex) Then
|
||||
Dim oDataRowHandle As Integer = _View.GetDataRowHandleByGroupRowHandle(oIndex)
|
||||
|
||||
ExpansionViewInfoList.Add(New RowInfo With {
|
||||
.Id = GetKeyColumnValue(oDataRowHandle),
|
||||
.Level = _View.GetRowLevel(oIndex),
|
||||
.Handle = oDataRowHandle
|
||||
})
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SaveExpandedMasterRows()
|
||||
If _View.GridControl.Views.Count = 1 Then
|
||||
Return
|
||||
End If
|
||||
|
||||
ExpandedMasterRowList.Clear()
|
||||
|
||||
For oIndex As Integer = 0 To _View.DataRowCount - 1
|
||||
If _View.GetMasterRowExpanded(oIndex) Then
|
||||
ExpandedMasterRowList.Add(GetKeyColumnValue(oIndex))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SaveVisibleIndex()
|
||||
_VisibleRowIndex = _View.GetVisibleIndex(_View.FocusedRowHandle) - _View.TopRowIndex
|
||||
End Sub
|
||||
|
||||
Private Sub LoadVisibleIndex()
|
||||
Try
|
||||
_View.MakeRowVisible(_View.FocusedRowHandle, True)
|
||||
_View.TopRowIndex = _View.GetVisibleIndex(_View.FocusedRowHandle) - _VisibleRowIndex
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSelectionViewInfo()
|
||||
_View.BeginSelection()
|
||||
Try
|
||||
_View.ClearSelection()
|
||||
For i As Integer = 0 To SelectionViewInfoList.Count - 1
|
||||
SelectRowByRowInfo(DirectCast(SelectionViewInfoList(i), RowInfo), i = SelectionViewInfoList.Count - 1)
|
||||
Next i
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Finally
|
||||
_View.EndSelection()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub LoadExpansionViewInfo()
|
||||
If _View.GroupedColumns.Count = 0 Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_View.BeginUpdate()
|
||||
Try
|
||||
_View.CollapseAllGroups()
|
||||
For Each info As RowInfo In ExpansionViewInfoList
|
||||
ExpandRowByRowInfo(info)
|
||||
Next info
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Finally
|
||||
_View.EndUpdate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub LoadExpandedMasterRows()
|
||||
_View.BeginUpdate()
|
||||
Try
|
||||
_View.CollapseAllDetails()
|
||||
Dim oColumn As GridColumn = GetKeyColumn()
|
||||
For oIndex As Integer = 0 To ExpandedMasterRowList.Count - 1
|
||||
Dim oRowHandle As Integer = _View.LocateByValue(0, oColumn, ExpandedMasterRowList(oIndex))
|
||||
_View.SetMasterRowExpanded(oRowHandle, True)
|
||||
Next oIndex
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Finally
|
||||
_View.EndUpdate()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Class SW
|
||||
Public label As String
|
||||
Public stopwatch As Stopwatch
|
||||
|
||||
@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Process Manager")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Digital Data 2021")>
|
||||
<Assembly: AssemblyTrademark("22220")>
|
||||
<Assembly: AssemblyTrademark("22240")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.2.23.0")>
|
||||
<Assembly: AssemblyVersion("2.2.25.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
2
app/DD_PM_WINDREAM/frmControl_Detail.Designer.vb
generated
2
app/DD_PM_WINDREAM/frmControl_Detail.Designer.vb
generated
@ -279,7 +279,6 @@ Partial Class frmControl_Detail
|
||||
resources.ApplyResources(Me.REGEX_MATCHTextBox, "REGEX_MATCHTextBox")
|
||||
Me.REGEX_MATCHTextBox.MenuManager = Me.RibbonControl1
|
||||
Me.REGEX_MATCHTextBox.Name = "REGEX_MATCHTextBox"
|
||||
Me.REGEX_MATCHTextBox.Properties.ReadOnly = True
|
||||
Me.REGEX_MATCHTextBox.StyleController = Me.LayoutControl1
|
||||
'
|
||||
'SimpleButton1
|
||||
@ -294,7 +293,6 @@ Partial Class frmControl_Detail
|
||||
resources.ApplyResources(Me.REGEX_MESSAGE_DETextBox, "REGEX_MESSAGE_DETextBox")
|
||||
Me.REGEX_MESSAGE_DETextBox.MenuManager = Me.RibbonControl1
|
||||
Me.REGEX_MESSAGE_DETextBox.Name = "REGEX_MESSAGE_DETextBox"
|
||||
Me.REGEX_MESSAGE_DETextBox.Properties.ReadOnly = True
|
||||
Me.REGEX_MESSAGE_DETextBox.StyleController = Me.LayoutControl1
|
||||
'
|
||||
'SQL_COMMANDTextBox
|
||||
|
||||
@ -119,14 +119,13 @@ Public Class frmControl_Detail
|
||||
End Sub
|
||||
|
||||
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||
'TODO: Enable when regexes are implemented
|
||||
'Dim oForm As New frmRegexEditor()
|
||||
'oForm.RegexString = REGEX_MATCHTextBox.Text
|
||||
Dim oForm As New frmRegexEditor()
|
||||
oForm.RegexString = REGEX_MATCHTextBox.Text
|
||||
|
||||
'Dim oResult = oForm.ShowDialog()
|
||||
'If oResult = DialogResult.OK Then
|
||||
' REGEX_MATCHTextBox.Text = oForm.RegexString
|
||||
'End If
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
If oResult = DialogResult.OK Then
|
||||
REGEX_MATCHTextBox.Text = oForm.RegexString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SimpleButton2_Click(sender As Object, e As EventArgs) Handles SimpleButton2.Click
|
||||
|
||||
2
app/DD_PM_WINDREAM/frmMain.Designer.vb
generated
2
app/DD_PM_WINDREAM/frmMain.Designer.vb
generated
@ -336,6 +336,8 @@ Partial Class frmMain
|
||||
Me.GridView_Docs.OptionsBehavior.AllowGroupExpandAnimation = DevExpress.Utils.DefaultBoolean.[True]
|
||||
Me.GridView_Docs.OptionsBehavior.Editable = False
|
||||
Me.GridView_Docs.OptionsClipboard.CopyColumnHeaders = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.GridView_Docs.OptionsSelection.MultiSelect = True
|
||||
Me.GridView_Docs.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CellSelect
|
||||
Me.GridView_Docs.OptionsView.ColumnAutoWidth = False
|
||||
Me.GridView_Docs.OptionsView.EnableAppearanceEvenRow = True
|
||||
Me.GridView_Docs.OptionsView.ShowAutoFilterRow = True
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAawBBwGsAQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAcQBBwHEAQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@ -840,7 +840,7 @@
|
||||
<value>728, 17</value>
|
||||
</metadata>
|
||||
<metadata name="Timer5Mins.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>426, 56</value>
|
||||
<value>862, 97</value>
|
||||
</metadata>
|
||||
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>541, 56</value>
|
||||
|
||||
@ -143,7 +143,7 @@ Public Class frmMain
|
||||
LOGGER.Debug("Initializing MainForm....")
|
||||
|
||||
' Create helper to save/load expanded GroupColumns at runtime
|
||||
RefreshHelper = New RefreshHelper(GridView_Docs, "GUID")
|
||||
RefreshHelper = New RefreshHelper(LOGCONFIG, GridView_Docs, "GUID")
|
||||
Dim oVErsion = String.Format("{0}.{1}.{2}", My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build)
|
||||
bsiVersion.Caption = oVErsion
|
||||
If ERROR_STATE = "NO DB-CONNECTION" Or ERROR_STATE = "FAILED DBCONNECTION" Then
|
||||
@ -361,6 +361,7 @@ Public Class frmMain
|
||||
Else
|
||||
RibbonPageGroupBasicConf.Visible = True
|
||||
End If
|
||||
|
||||
LOGGER.Debug("MainForm initialized!")
|
||||
|
||||
FormOpenClose = False
|
||||
@ -983,7 +984,7 @@ Public Class frmMain
|
||||
GridView_Docs.Columns.Item("GROUP_TEXT").Visible = False
|
||||
GridView_Docs.Columns.Item("GROUP_COLOR").Visible = False
|
||||
Catch ex As Exception
|
||||
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
LOGGER.Debug("All columns in CreateBasicView created")
|
||||
Catch ex As Exception
|
||||
@ -1078,7 +1079,7 @@ Public Class frmMain
|
||||
Me.BringToFront()
|
||||
Visible = True
|
||||
End Sub
|
||||
Private Async Sub Timer_Tick(sender As System.Object, e As EventArgs) Handles TimerRefresh.Tick
|
||||
Private Async Sub TimerRefresh_Tick(sender As System.Object, e As EventArgs) Handles TimerRefresh.Tick
|
||||
Try
|
||||
If TimerRefresh.Enabled = False Then
|
||||
Exit Sub
|
||||
@ -1091,21 +1092,25 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
TimerRefresh_running = True
|
||||
'If Application.OpenForms().OfType(Of frmValidator).Any Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
'If Application.OpenForms().OfType(Of frmAdministration).Any Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
'If Application.OpenForms().OfType(Of frmAdmin2).Any Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
' Cancel Refresh if a Validator Form or an Admin Form is opened
|
||||
If Application.OpenForms().OfType(Of frmMassValidator).Any() Or
|
||||
Application.OpenForms().OfType(Of frmValidator).Any() Or
|
||||
Application.OpenForms().OfType(Of frmAdministration).Any() Or
|
||||
Application.OpenForms().OfType(Of frmAdmin2).Any() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
bsilastsync.Caption = "Last Client-Sync: " & Now.ToLongTimeString
|
||||
Else
|
||||
bsilastsync.Caption = "Letzte Synchronisation: " & Now.ToLongTimeString
|
||||
End If
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then RefreshHelper.SaveViewInfo()
|
||||
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then
|
||||
RefreshHelper.SaveViewInfo()
|
||||
End If
|
||||
|
||||
'If Not Application.OpenForms().OfType(Of frmValidator).Any Then
|
||||
' Dim oUpdate = "Not Defined"
|
||||
' Try
|
||||
@ -1117,9 +1122,10 @@ Public Class frmMain
|
||||
'End If
|
||||
|
||||
If bwSync.IsBusy Then
|
||||
Exit Sub
|
||||
TimerRefresh_running = False
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
LoadNavBar()
|
||||
Dim oStopWatch As New RefreshHelper.SW("Decide_Load")
|
||||
@ -1203,7 +1209,6 @@ Public Class frmMain
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ToolStripButton2_Click_2(sender As Object, e As EventArgs)
|
||||
frmAdminPasswort.ShowDialog()
|
||||
End Sub
|
||||
@ -2012,7 +2017,11 @@ Public Class frmMain
|
||||
FRONTEND_ACTION = "NONE"
|
||||
End Sub
|
||||
Async Function Reset_GridLayout(FormLoad As Boolean) As Tasks.Task
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then RefreshHelper.SaveViewInfo()
|
||||
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then
|
||||
RefreshHelper.SaveViewInfo()
|
||||
End If
|
||||
|
||||
InResetlayout = True
|
||||
' Layout zurücksetzen
|
||||
ResetLayout()
|
||||
@ -2142,7 +2151,9 @@ Public Class frmMain
|
||||
|
||||
Private Sub GridView_Docs_LostFocus(sender As Object, e As EventArgs) Handles GridView_Docs.LostFocus
|
||||
' Save expanded GroupRows
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then RefreshHelper.SaveViewInfo()
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then
|
||||
RefreshHelper.SaveViewInfo()
|
||||
End If
|
||||
End Sub
|
||||
Sub LoadCURRENT_DT_PROFILES()
|
||||
Dim oSQL = "select * from TBPM_PROFILE where ACTIVE = 1"
|
||||
@ -2344,7 +2355,9 @@ Public Class frmMain
|
||||
|
||||
LoadNavBar()
|
||||
Await Decide_Load(False, True)
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then RefreshHelper.LoadViewInfo()
|
||||
If GridControl_Docs.Visible = True And FormOpenClose = False Then
|
||||
RefreshHelper.LoadViewInfo()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub bbtniMonitor_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniMonitor.ItemClick
|
||||
@ -2686,4 +2699,14 @@ Public Class frmMain
|
||||
Private Sub bsilastsync_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bsilastsync.ItemClick
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GridView_Docs_KeyDown(sender As Object, e As KeyEventArgs) Handles GridView_Docs.KeyDown
|
||||
Dim view As GridView = CType(sender, GridView)
|
||||
If e.Control AndAlso e.KeyCode = Keys.C Then
|
||||
If view.GetRowCellValue(view.FocusedRowHandle, view.FocusedColumn) IsNot Nothing AndAlso view.GetRowCellValue(view.FocusedRowHandle, view.FocusedColumn).ToString() <> [String].Empty Then
|
||||
Clipboard.SetText(view.GetRowCellValue(view.FocusedRowHandle, view.FocusedColumn).ToString())
|
||||
End If
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Loading…
x
Reference in New Issue
Block a user