ZooFlow: Improvements and Performance for frmSearchStart

This commit is contained in:
Jonathan Jenne 2020-11-20 16:09:29 +01:00
parent baa914d153
commit d0e4ecb4ed
9 changed files with 394 additions and 621 deletions

View File

@ -12,8 +12,8 @@ Public Class ClassCommandlineArgs
"start-search" "start-search"
} }
Private CommandLineArgTypeString As String = String.Join("|", CommandLineArgTypes) Private CommandLineArgTypeString As String = String.Join("|", CommandLineArgTypes)
Private CommandLineArgRegex As String = $"(?:-{{2}}(?:({CommandLineArgTypeString})+)=([a-zA-Z0-9~#]+)\s*)+" Private CommandLineArgRegex As String = $"(?:-{{2}}(?:({CommandLineArgTypeString})+)=([a-zA-Z0-9~|]+)\s*)+"
Private CommandLineArgParameterRegex As String = "(?:~{0,1}([\w\d-]+#[\w\d-]+))+" Private CommandLineArgParameterRegex As String = "(?:~{0,1}([\w\d-]+|[\w\d-]+))+"
Public FunctionName As String Public FunctionName As String
Public FunctionArgs As New Dictionary(Of String, String) Public FunctionArgs As New Dictionary(Of String, String)
@ -23,7 +23,7 @@ Public Class ClassCommandlineArgs
Public Sub New(pLogConfig As LogConfig) Public Sub New(pLogConfig As LogConfig)
LogConfig = pLogConfig LogConfig = pLogConfig
Logger = pLogConfig.GetLogger() Logger = LogConfig.GetLogger()
End Sub End Sub
Public Sub Parse(Args As List(Of String)) Public Sub Parse(Args As List(Of String))
@ -48,7 +48,7 @@ Public Class ClassCommandlineArgs
FunctionName = oParamName FunctionName = oParamName
For Each oValue As String In oParamValue.Split("~"c) For Each oValue As String In oParamValue.Split("~"c)
Dim oValueArray = oValue.Split("#"c).ToList Dim oValueArray = oValue.Split("|"c).ToList
FunctionArgs.Add(oValueArray.Item(0), oValueArray.Item(1)) FunctionArgs.Add(oValueArray.Item(0), oValueArray.Item(1))
Next Next
Else Else

View File

@ -13,4 +13,9 @@
Public Const MODULE_CLIPBOARDWATCHER = "CW" Public Const MODULE_CLIPBOARDWATCHER = "CW"
Public Const MODULE_GLOBAL_INDEXER = "GLOBIX" Public Const MODULE_GLOBAL_INDEXER = "GLOBIX"
Public Const MODULE_ZOOFLOW = "ZOOFLOW" Public Const MODULE_ZOOFLOW = "ZOOFLOW"
Public Const ATTR_TYPE_STRING = "VARCHAR"
Public Const ATTR_TYPE_INTEGER = "BIG INTEGER"
Public Const ATTR_TYPE_DATE = "DATE"
Public Const ATTR_TYPE_BOOLEAN = "BIT"
End Class End Class

View File

@ -1,9 +1,9 @@
Imports DevExpress.XtraEditors Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Base
Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraTab Imports DevExpress.XtraTab
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Public Class ClassControlCreator Public Class ClassControlCreator
@ -54,41 +54,30 @@ Public Class ClassControlCreator
Public Class ControlMetadata Public Class ControlMetadata
Public Guid As Integer Public Guid As Integer
Public AttrID As Integer Public AttributeID As Integer
Public DependingAttrID As Integer Public DependingAttributeID As Integer
Public Multiselect As Boolean Public Multiselect As Boolean
Public AttrTitle As String Public AttributeTitle As String
Public AttrType As String Public AttributeType As String
Public SourceSQL As String Public SourceSQL As String
Public DTSource As DataTable Public DTSource As DataTable
Public MinValue As String Public MinValue As String
Public MaxValue As String Public MaxValue As String
End Class End Class
Private Shared Function TransformDataRow(row As DataRow, pXPosition As Integer, pYPosition As Integer) As ControlDBProps Private Shared Function TransformDataRow(pRow As DataRow, pXPosition As Integer, pYPosition As Integer) As ControlDBProps
Dim oxPos As Integer = pXPosition Dim oxPos As Integer = pXPosition
Dim oYPos As Integer = pYPosition Dim oYPos As Integer = pYPosition
' Dim style As FontStyle = NotNull(row.Item("FONT_STYLE"), DEFAULT_FONT_STYLE) Dim oGuid As Integer = pRow.Item("GUID")
' Dim size As Single = NotNull(row.Item("FONT_SIZE"), DEFAULT_FONT_SIZE) Dim oName As String = pRow.Item("ATTRIBUTE_TITLE")
' Dim familyString As String = NotNull(row.Item("FONT_FAMILY"), DEFAULT_FONT_FAMILY)
'Dim family As FontFamily = New FontFamily(familyString)
Dim oGuid As Integer = row.Item("GUID")
Dim oName As String = row.Item("ATTRIBUTE_TITLE")
Dim oLocation As New Point(oxPos, oYPos) Dim oLocation As New Point(oxPos, oYPos)
'Dim oFont As New Font(family, size, style, GraphicsUnit.Point)
'Dim oColor As Color = IntToColor(NotNull(row.Item("FONT_COLOR"), DEFAULT_COLOR))
'Dim oReadOnly As Boolean = row.Item("READ_ONLY")
Return New ControlDBProps() With { Return New ControlDBProps() With {
.Guid = oGuid, .Guid = oGuid,
.Name = oName, .Name = oName,
.Location = oLocation} .Location = oLocation
'.Font = oFont, }
'.Color = oColor
End Function End Function
Public Function CreateBaseControl(ctrl As Control, pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As Control Public Function CreateBaseControl(pControl As Control, pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As Control
Try Try
Dim props As ControlDBProps = TransformDataRow(pAttributeRow, pXPosition, pYPosition) Dim props As ControlDBProps = TransformDataRow(pAttributeRow, pXPosition, pYPosition)
Dim oSourceSQL As String = pAttributeRow.Item("SOURCE_SQL").ToString Dim oSourceSQL As String = pAttributeRow.Item("SOURCE_SQL").ToString
@ -97,39 +86,38 @@ Public Class ClassControlCreator
oSourceSQL = oSourceSQL.Replace("@RESULT_TITLE", pAttributeRow.Item("ATTRIBUTE_TITLE").ToString) oSourceSQL = oSourceSQL.Replace("@RESULT_TITLE", pAttributeRow.Item("ATTRIBUTE_TITLE").ToString)
Dim oDTSource As DataTable Dim oDTSource As DataTable
'If pAttributeRow.Item("DEPENDING_ATTRIBUTE1") = 0 Then 'If pAttributeRow.Item("DEPENDING_ATTRIBUTE1") = 0 Then
oDTSource = My.DatabaseIDB.GetDatatable(oSourceSQL) If Utils.NotNull(oSourceSQL, String.Empty) <> String.Empty Then
oDTSource = My.DatabaseIDB.GetDatatable(oSourceSQL)
End If
'End If 'End If
Dim oMinValue As String = "" Dim oMinValue As String = ""
Dim oMaxValue As String = "" Dim oMaxValue As String = ""
If Not IsNothing(oDTSource) Then If Not IsNothing(oDTSource) Then
oMinValue = oDTSource.Rows(0).Item(0) oMinValue = oDTSource.Rows(0).Item(0)
oMaxValue = oDTSource.Rows(oDTSource.Rows.Count - 1).Item(0) oMaxValue = oDTSource.Rows(oDTSource.Rows.Count - 1).Item(0)
End If End If
'ctrl.Tag = New ControlMetadata() With {
Dim omyclass = New ControlMetadata() With { Dim oMetadata = New ControlMetadata() With {
.Guid = CType(pAttributeRow.Item("GUID"), Integer), .Guid = CType(pAttributeRow.Item("GUID"), Integer),
.AttrID = CType(pAttributeRow.Item("ATTRIBUTE_ID"), Integer), .AttributeID = CType(pAttributeRow.Item("ATTRIBUTE_ID"), Integer),
.DTSource = CType(oDTSource, DataTable), .DTSource = CType(oDTSource, DataTable),
.AttrTitle = CType(pAttributeRow.Item("ATTRIBUTE_TITLE"), String), .AttributeTitle = CType(pAttributeRow.Item("ATTRIBUTE_TITLE"), String),
.Multiselect = CType(pAttributeRow.Item("MULTISELECT"), Boolean), .Multiselect = CType(pAttributeRow.Item("MULTISELECT"), Boolean),
.SourceSQL = oSourceSQL, .SourceSQL = oSourceSQL,
.MinValue = oMinValue, .MinValue = oMinValue,
.MaxValue = oMaxValue .MaxValue = oMaxValue
} }
' If CInt(pAttributeRow.Item("DEPENDING_ATTRIBUTE1")) <> 0 Then
' omyclass.DTSource = Nothing pControl.Tag = oMetadata
'' Else pControl.Name = props.Name
' omyclass.DTSource = CType(oDTSource, DataTable) pControl.Location = props.Location
' End If pControl.Font = props.Font
ctrl.Tag = omyclass pControl.ForeColor = props.Color
ctrl.Name = props.Name
ctrl.Location = props.Location
ctrl.Font = props.Font
ctrl.ForeColor = props.Color
Return ctrl Return pControl
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
@ -147,7 +135,7 @@ Public Class ClassControlCreator
oCheckBox.AutoSize = True oCheckBox.AutoSize = True
Try Try
oCheckBox.Text = pAttributeRow.Item("ATTRIBUTE_TITLE") oCheckBox.Text = pAttributeRow.Item("ATTRIBUTE_TITLE").ToString
Catch ex As Exception Catch ex As Exception
oCheckBox.Text = "NO CAPTION AVAILABLE" oCheckBox.Text = "NO CAPTION AVAILABLE"
End Try End Try
@ -163,13 +151,13 @@ Public Class ClassControlCreator
oDateControl.Properties.ShowWeekNumbers = True oDateControl.Properties.ShowWeekNumbers = True
oDateControl.Properties.ShowClear = True oDateControl.Properties.ShowClear = True
Try Try
Dim oMinDate As Date = DirectCast(oDateControl.Tag, ClassControlCreator.ControlMetadata).MinValue Dim oMinDate As Date = DirectCast(oDateControl.Tag, ControlMetadata).MinValue
oDateControl.Properties.MinValue = oMinDate oDateControl.Properties.MinValue = oMinDate
Catch ex As Exception Catch ex As Exception
End Try End Try
Try Try
Dim oMaxDate As Date = DirectCast(oDateControl.Tag, ClassControlCreator.ControlMetadata).MaxValue Dim oMaxDate As Date = DirectCast(oDateControl.Tag, ControlMetadata).MaxValue
oDateControl.Properties.MaxValue = oMaxDate oDateControl.Properties.MaxValue = oMaxDate
Catch ex As Exception Catch ex As Exception
@ -178,187 +166,103 @@ Public Class ClassControlCreator
Return oDateControl Return oDateControl
End Function End Function
Public Function CreateExistingGridControl(pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As GridControl Public Function CreateExistingGridControl(pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As GridControl
Dim oWatch1 As New Watch("Creating Base Control")
Dim oMyNewGridControl As GridControl = CreateBaseControl(New GridControl(), pAttributeRow, pXPosition, pYPosition) Dim oMyNewGridControl As GridControl = CreateBaseControl(New GridControl(), pAttributeRow, pXPosition, pYPosition)
Dim oDatatable As New DataTable Dim oDatatable As New DataTable
Dim oView As DevExpress.XtraGrid.Views.Grid.GridView Dim oView As GridView
oWatch1.Stop()
oWatch1 = New Watch("Configuring Grid")
oMyNewGridControl.ForceInitialize() oMyNewGridControl.ForceInitialize()
oMyNewGridControl.ContextMenu = Nothing
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH")), DEFAULT_HEIGHT_GRIDVIEW)
'oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH")), CInt(pAttributeRow.Item("HEIGHT")))
oView = CType(oMyNewGridControl.MainView, GridView) oView = CType(oMyNewGridControl.MainView, GridView)
oView.OptionsView.ShowGroupPanel = False
oMyNewGridControl.ContextMenu = Nothing
oView.Appearance.EvenRow.BackColor = Color.PaleTurquoise oView.Appearance.EvenRow.BackColor = Color.PaleTurquoise
oView.OptionsBehavior.Editable = False oView.OptionsBehavior.Editable = False
oView.OptionsBehavior.ReadOnly = True oView.OptionsBehavior.ReadOnly = True
oView.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False
oView.OptionsBehavior.AllowAddRows = False oView.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.False
oView.OptionsBehavior.AllowDeleteRows = False
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None
oView.OptionsView.ShowAutoFilterRow = True oView.OptionsView.ShowAutoFilterRow = True
oView.OptionsView.EnableAppearanceEvenRow = True oView.OptionsView.EnableAppearanceEvenRow = True
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH")), CInt(pAttributeRow.Item("HEIGHT"))) oView.OptionsView.ShowGroupPanel = False
If CType(pAttributeRow.Item("MULTISELECT"), Boolean) Then If CType(pAttributeRow.Item("MULTISELECT"), Boolean) Then
oView.OptionsSelection.MultiSelect = True oView.OptionsSelection.MultiSelect = True
oView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect oView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect
oView.OptionsSelection.CheckBoxSelectorColumnWidth = 20 oView.OptionsSelection.CheckBoxSelectorColumnWidth = 20
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH") + 50), CInt(pAttributeRow.Item("HEIGHT"))) oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH") + 50), DEFAULT_HEIGHT_GRIDVIEW)
End If End If
'oView.Columns("TERM_ID").Visible = False
' Add and configure navigator to delete rows
oMyNewGridControl.UseEmbeddedNavigator = True
With oMyNewGridControl.EmbeddedNavigator.Buttons
.CancelEdit.Visible = False
.Edit.Visible = False
.EndEdit.Visible = False
.First.Visible = False
.Last.Visible = False
.Next.Visible = False
.NextPage.Visible = False
.PrevPage.Visible = False
.Prev.Visible = False
End With oWatch1.Stop()
oWatch1 = New Watch("Loading Datasource")
' Add and configure navigator to delete rows
'oMyNewGridControl.UseEmbeddedNavigator = True
'With oMyNewGridControl.EmbeddedNavigator.Buttons
' .CancelEdit.Visible = False
' .Edit.Visible = False
' .EndEdit.Visible = False
' .First.Visible = False
' .Last.Visible = False
' .Next.Visible = False
' .NextPage.Visible = False
' .PrevPage.Visible = False
' .Prev.Visible = False
'End With
GridTables.Clear() GridTables.Clear()
Dim oDTSource As DataTable = DirectCast(oMyNewGridControl.Tag, ControlMetadata).DTSource
'Dim oColumn = New DataColumn() With {
' .DataType = GetType(String),
' .ColumnName = pAttributeRow.Item("ATTRIBUTE_TITLE").ToString,
' .Caption = pAttributeRow.Item("ATTRIBUTE_TITLE").ToString,
' .ReadOnly = False
' }
'oDatatable.Columns.Add(oColumn)
'For Each oRow As DataRow In DT_MY_COLUMNS.Rows
' ' Create Columns in Datatable
' Dim oColumn = New DataColumn() With {
' .DataType = GetType(String),
' .ColumnName = pAttributeRow.Item("ATTRIBUTE_TITLE").ToString,
' .Caption = pAttributeRow.Item("ATTRIBUTE_TITLE").ToString,
' .ReadOnly = False
' }
' oDatatable.Columns.Add(oColumn)
' ' Fetch and cache Combobox results
' Dim oConnectionId As Integer = NotNull(oRow.Item("CONNECTION_ID"), 0)
' Dim oSqlCommand As String = NotNull(oRow.Item("SQL_COMMAND"), "")
' If Not clsPatterns.HasComplexPatterns(oSqlCommand) Then
' If oConnectionId > 0 And oSqlCommand <> "" Then
' Try
' Dim oComboboxDataTable As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId)
' GridTables.Add(oRow.Item("SPALTENNAME"), oComboboxDataTable)
' Catch ex As Exception
' Logger.Warn("Could not load data for column {0} in control {1}", oRow.Item("SPALTENNAME"), oControl.Name)
' Logger.Error(ex)
' End Try
' End If
' End If
'Next
Dim oDTSource As DataTable = DirectCast(oMyNewGridControl.Tag, ClassControlCreator.ControlMetadata).DTSource
oMyNewGridControl.DataSource = oDTSource oMyNewGridControl.DataSource = oDTSource
oView.PopulateColumns() oView.PopulateColumns()
oMyNewGridControl.RefreshDataSource() oMyNewGridControl.RefreshDataSource()
oMyNewGridControl.ForceInitialize() oMyNewGridControl.ForceInitialize()
'Try
' oView.Columns(0).Caption = "Existierende Werte"
'Catch ex As Exception
'End Try oWatch1.Stop()
'AddHandler oView.CustomRowCellEdit, Sub(sender As Object, e As CustomRowCellEditEventArgs)
' For Each oRow As DataRow In DT_MY_COLUMNS.Rows
' If oRow.Item("SPALTENNAME") = e.Column.FieldName Then
' If GridTables.ContainsKey(e.Column.FieldName) Then
' Dim oComboboxDataTable As DataTable = GridTables.Item(e.Column.FieldName)
' Dim oEditor As New RepositoryItemComboBox()
' Dim oItems As New List(Of String)
' AddHandler oEditor.Validating, Sub(_sender As ComboBoxEdit, _e As CancelEventArgs)
' If oItems.Contains(_sender.EditValue) Then
' _e.Cancel = False
' Else
' _e.Cancel = True
' End If
' End Sub
' For Each oRow2 As DataRow In oComboboxDataTable.Rows
' Dim oValue = oRow2.Item(0)
' Try
' oValue &= $" | {oRow2.Item(1)}"
' Catch ex As Exception
' End Try
' oEditor.Items.Add(oValue)
' oItems.Add(oValue)
' Next
' e.RepositoryItem = oEditor
' End If
' End If
' Next
' End Sub
'AddHandler oView.CellValueChanged, Sub(sender As Object, e As CellValueChangedEventArgs)
' Dim oValue = e.Value.ToString()
' Dim oView2 As GridView = TryCast(sender, GridView)
' If oValue.Contains(" | ") Then
' oValue = oValue.Split(" | ").ToList().Item(0)
' oView2.SetRowCellValue(e.RowHandle, e.Column, oValue)
' End If
' End Sub
Return oMyNewGridControl Return oMyNewGridControl
End Function End Function
Public Function AddCheckBox(indexname As String, y As Integer, vorbelegung As String, caption As String) Public Function AddCheckBox(pIndexname As String, y As Integer, pVorbelegung As String, pCaption As String) As CheckBox
Try Try
Dim value As Boolean = False Dim oValue As Boolean = False
Dim chk As New CheckBox Dim oCheckbox As New CheckBox With {
chk.Name = "chk" & indexname .Name = "chk" & pIndexname,
chk.Size = New Size(100, 27) .Size = New Size(100, 27),
chk.Location = New Point(11, y) .Location = New Point(11, y),
chk.Tag = New ControlMeta() With { .Tag = New ControlMeta() With {
.IndexName = indexname, .IndexName = pIndexname,
.IndexType = "BOOLEAN" .IndexType = "BOOLEAN"
}
} }
If caption <> "" Then If pCaption <> "" Then
chk.Text = caption oCheckbox.Text = pCaption
chk.Size = New Size(CInt(caption.Length * 15), 27) oCheckbox.Size = New Size(CInt(pCaption.Length * 15), 27)
End If End If
If Boolean.TryParse(vorbelegung, value) = False Then If Boolean.TryParse(pVorbelegung, oValue) = False Then
If vorbelegung = "1" Or vorbelegung = "0" Then If pVorbelegung = "1" Or pVorbelegung = "0" Then
chk.Checked = CBool(vorbelegung) oCheckbox.Checked = CBool(pVorbelegung)
Else Else
chk.Checked = False oCheckbox.Checked = False
End If End If
Else Else
chk.Checked = value oCheckbox.Checked = oValue
End If End If
AddHandler chk.CheckedChanged, AddressOf Checkbox_CheckedChanged AddHandler oCheckbox.CheckedChanged, AddressOf Checkbox_CheckedChanged
Return chk Return oCheckbox
Catch ex As Exception Catch ex As Exception
Logger.Info("Unhandled Exception in AddCheckBox: " & ex.Message) Logger.Info("Unhandled Exception in AddCheckBox: " & ex.Message)
Logger.Error(ex.Message) Logger.Error(ex.Message)
@ -370,107 +274,32 @@ Public Class ClassControlCreator
'PrepareDependingControl(sender) 'PrepareDependingControl(sender)
End Sub End Sub
'Public Function AddVorschlag_ComboBox(indexname As String, y As Integer, conid As Integer, sql_Vorschlag As String, Multiselect As Boolean, DataType As String, Optional Vorgabe As String = "", Optional AddNewValues As Boolean = False, Optional PreventDuplicateValues As Boolean = False, Optional SQLSuggestion As Boolean = False) As Control Function AddCombobox(indexname As String, y As Integer) As ComboBoxEdit
' Try Dim oCombobox As New ComboBoxEdit
' Dim oSql As String = sql_Vorschlag oCombobox.Name = "cmb" & indexname
' Dim oConnectionString As String oCombobox.AutoSize = True
' Dim oControl As New DigitalData.Controls.LookupGrid.LookupControl2 With { oCombobox.Size = New Size(300, 27)
' .Multiselect = Multiselect, oCombobox.Location = New Point(11, y)
' .AllowAddNewValues = AddNewValues,
' .PreventDuplicates = PreventDuplicateValues,
' .Location = New Point(11, y),
' .Size = New Size(300, 27),
' .Name = "cmbMulti" & indexname,
' .Tag = New ControlMeta() With {
' .IndexName = indexname,
' .IndexType = DataType
' }
' }
' oControl.Properties.AppearanceFocused.BackColor = Color.Lime
' If Not String.IsNullOrEmpty(Vorgabe) Then oCombobox.Tag = New ControlMeta() With {
' Dim oDefaultValues As New List(Of String)
' If Vorgabe.Contains(",") Then
' oDefaultValues = Vorgabe.
' Split(",").ToList().
' Select(Function(item) item.Trim()).
' ToList()
' Else
' oDefaultValues = Vorgabe.
' Split(ClassConstants.VECTORSEPARATOR).ToList().
' Select(Function(item) item.Trim()).
' ToList()
' End If
' oControl.SelectedValues = oDefaultValues
' End If
' AddHandler oControl.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
' oConnectionString = ClassFormFunctions.GetConnectionString(conid)
' If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then
' Logger.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
' If ClassPatterns.HasComplexPatterns(oSql) Then
' Logger.Debug(" >>sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
' Else
' Dim oDatatable = ClassDatabase.Return_Datatable_Combined(oSql, oConnectionString, False)
' oControl.DataSource = oDatatable
' End If
' Else
' Logger.Warn("Connection String for control [{0}] is empty!", oControl.Name)
' End If
' Return oControl
' Catch ex As Exception
' Logger.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)
' Logger.Error(ex.Message)
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in AddVorschlag_ComboBox:")
' Return Nothing
' End Try
'End Function
'Private Sub Lookup_SelectedValuesChanged(sender As LookupControl2, SelectedValues As List(Of String))
' PrepareDependingControl(sender)
'End Sub
Function AddCombobox(indexname As String, y As Integer)
Dim cmb As New ComboBox
cmb.Name = "cmb" & indexname
cmb.AutoSize = True
cmb.Size = New Size(300, 27)
cmb.Location = New Point(11, y)
cmb.Tag = New ControlMeta() With {
.IndexName = indexname .IndexName = indexname
} }
AddHandler cmb.SelectedIndexChanged, AddressOf OncmbSIndexChanged AddHandler oCombobox.SelectedIndexChanged, AddressOf OncmbSIndexChanged
AddHandler cmb.GotFocus, AddressOf OncmbGotFocus AddHandler oCombobox.GotFocus, AddressOf OncmbGotFocus
AddHandler cmb.LostFocus, AddressOf OncmbLostFocus AddHandler oCombobox.LostFocus, AddressOf OncmbLostFocus
'AddHandler cmb.KeyDown, AddressOf OncmbKeyDown Return oCombobox
Return cmb
End Function End Function
'Public Sub OncmbKeyDown(sender As System.Object, e As System.EventArgs) Public Sub OncmbGotFocus(sender As Object, e As System.EventArgs)
' Dim cmb As ComboBox = sender Dim oCombobox As ComboBoxEdit = CType(sender, ComboBoxEdit)
oCombobox.BackColor = Color.Lime
' ' Verhindert, dass Auswahlliste und Autocompleteliste übereinander liegen
' If cmb.DroppedDown = True Then
' cmb.DroppedDown = False
' End If
'End Sub
Public Sub OncmbGotFocus(sender As System.Object, e As System.EventArgs)
Dim cmb As ComboBox = sender
cmb.BackColor = Color.Lime
End Sub End Sub
Public Sub OncmbLostFocus(sender As System.Object, e As System.EventArgs) Public Sub OncmbLostFocus(sender As Object, e As System.EventArgs)
Dim cmb As ComboBox = sender Dim oCombobox As ComboBoxEdit = CType(sender, ComboBoxEdit)
cmb.BackColor = Color.White oCombobox.BackColor = Color.White
End Sub End Sub
Public Sub OncmbSIndexChanged(sender As System.Object, e As System.EventArgs) Public Sub OncmbSIndexChanged(sender As System.Object, e As System.EventArgs)
@ -478,139 +307,20 @@ Public Class ClassControlCreator
Exit Sub Exit Sub
End If End If
Dim cmb As ComboBox = sender Dim oCombobox As ComboBoxEdit = CType(sender, ComboBoxEdit)
If cmb.SelectedIndex <> -1 Then If oCombobox.SelectedIndex <> -1 Then
If cmb.Text.Length > 15 Then If oCombobox.Text.Length > 15 Then
Dim g As Graphics = cmb.CreateGraphics Dim g As Graphics = oCombobox.CreateGraphics
cmb.Width = g.MeasureString(cmb.Text, cmb.Font).Width + 30 oCombobox.Width = CInt(g.MeasureString(oCombobox.Text, oCombobox.Font).Width + 30)
g.Dispose() g.Dispose()
End If End If
' Get_NextComboBoxResults(cmb)
SendKeys.Send("{TAB}") SendKeys.Send("{TAB}")
End If End If
End Sub End Sub
'Private Sub Get_NextComboBoxResults(cmb As ComboBox)
' Try
' Dim indexname = cmb.Name.Replace("cmb", "")
' Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & CURRENT_DOKART_ID & " ORDER BY SEQUENCE"
' Dim DT As DataTable = ClassDatabase.Return_Datatable(sql, True)
' If Not IsNothing(DT) Then
' If DT.Rows.Count > 0 Then
' Dim cmbname = "cmb" & DT.Rows(0).Item("NAME")
' Renew_ComboboxResults(DT.Rows(0).Item("GUID"), indexname, cmb.Text)
' End If
' End If
' Catch ex As Exception
' MsgBox("Error in Get_NextComboBoxResults:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
' End Try
'End Sub
'Private Sub Renew_ComboboxResults(INDEX_GUID As Integer, SearchString As String, Resultvalue As String)
' Try
' Dim connectionString As String
' Dim sqlCnn As SqlConnection
' Dim sqlCmd As SqlCommand
' Dim adapter As New SqlDataAdapter
' Dim oracleConn As OracleConnection
' Dim oracleCmd As OracleCommand
' Dim oracleadapter As New OracleDataAdapter
' Dim NewDataset As New DataSet
' Dim i As Integer
' Dim DT_INDEX As DataTable = ClassDatabase.Return_Datatable("select * FROM TBDD_INDEX_MAN WHERE GUID = " & INDEX_GUID, True)
' If IsNothing(DT_INDEX) Then
' Exit Sub
' End If
' Dim conid = DT_INDEX.Rows(0).Item("CONNECTION_ID")
' Dim sql_result = DT_INDEX.Rows(0).Item("SQL_RESULT")
' Dim NAME = DT_INDEX.Rows(0).Item("NAME")
' If Not IsNothing(conid) And Not IsNothing(sql_result) And Not IsNothing(NAME) Then
' For Each ctrl As Control In Me.Panel.Controls
' If ctrl.Name = "cmb" & NAME.ToString Then
' Dim cmb As ComboBox = ctrl
' Dim sql As String = sql_result.ToString.ToUpper.Replace("@" & SearchString.ToUpper, Resultvalue)
' connectionString = ClassFormFunctions.GetConnectionString(conid)
' If connectionString Is Nothing = False Then
' 'SQL Befehl füllt die Auswahlliste
' If connectionString.Contains("Initial Catalog=") Then
' sqlCnn = New SqlConnection(connectionString)
' sqlCnn.Open()
' sqlCmd = New SqlCommand(sql, sqlCnn)
' adapter.SelectCommand = sqlCmd
' adapter.Fill(NewDataset)
' ElseIf connectionString.StartsWith("Data Source=") And connectionString.Contains("SERVICE_NAME") Then
' oracleConn = New OracleConnection(connectionString)
' ' Try
' oracleConn.Open()
' oracleCmd = New OracleCommand(sql, oracleConn)
' oracleadapter.SelectCommand = oracleCmd
' oracleadapter.Fill(NewDataset)
' End If
' If NewDataset.Tables(0).Rows.Count > 0 Then
' cmb.Items.Clear()
' 'Die Standargrösse definieren
' Dim newWidth As Integer = 300
' For i = 0 To NewDataset.Tables(0).Rows.Count - 1
' 'MsgBox(NewDataset.Tables(0).Rows(i).Item(0))
' cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
' Try
' Dim text As String = NewDataset.Tables(0).Rows(i).Item(0)
' If text.Length > 15 Then
' Dim g As Graphics = cmb.CreateGraphics
' If g.MeasureString(text, cmb.Font).Width + 30 > newWidth Then
' newWidth = g.MeasureString(text, cmb.Font).Width + 30
' End If
' g.Dispose()
' End If
' Catch ex As Exception
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Anpassung Breite ComboBox:")
' End Try
' Next
' cmb.Size = New Size(newWidth, 27)
' cmb.AutoCompleteSource = AutoCompleteSource.ListItems
' cmb.AutoCompleteMode = AutoCompleteMode.Suggest
' End If
' If connectionString.Contains("Initial Catalog=") Then
' Try
' adapter.Dispose()
' sqlCmd.Dispose()
' sqlCnn.Close()
' Catch ex As Exception
' End Try
' Else
' Try
' oracleadapter.Dispose()
' oracleCmd.Dispose()
' oracleConn.Close()
' Catch ex As Exception
' End Try
' End If
' End If
' End If
' Next
' End If
' Catch ex As Exception
' Logger.Info(" - Unvorhergesehener Unexpected error in Renew_ComboboxResults - Fehler: " & vbNewLine & ex.Message)
' Logger.Error(ex.Message)
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Renew_ComboboxResults:")
' End Try
'End Sub
Public Function AddTextBox(pAttrName As String, y As Integer, text As String, pAttrDataType As String) As DevExpress.XtraEditors.TextEdit Public Function AddTextBox(pAttrName As String, y As Integer, text As String, pAttrDataType As String) As DevExpress.XtraEditors.TextEdit
Dim oEdit As New DevExpress.XtraEditors.TextEdit With { Dim oEdit As New TextEdit With {
.Name = "txt" & pAttrName, .Name = "txt" & pAttrName,
.Size = New Size(260, 27), .Size = New Size(260, 27),
.Location = New Point(11, y), .Location = New Point(11, y),
@ -622,7 +332,7 @@ Public Class ClassControlCreator
Select Case pAttrDataType Select Case pAttrDataType
Case "INTEGER" Case "INTEGER"
oEdit.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric oEdit.Properties.Mask.MaskType = Mask.MaskType.Numeric
oEdit.Properties.Mask.EditMask = "d" oEdit.Properties.Mask.EditMask = "d"
Console.WriteLine() Console.WriteLine()
End Select End Select
@ -640,26 +350,26 @@ Public Class ClassControlCreator
Return oEdit Return oEdit
End Function End Function
Public Sub OnTextBoxFocus(sender As System.Object, e As System.EventArgs) Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender Dim oTextbox As TextEdit = CType(sender, TextEdit)
oTextbox.BackColor = Color.Lime oTextbox.BackColor = Color.Lime
oTextbox.SelectAll() oTextbox.SelectAll()
End Sub End Sub
Public Sub OnTextBoxTextChanged(sender As System.Object, e As System.EventArgs) Public Sub OnTextBoxTextChanged(sender As Object, e As EventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender Dim oTextbox As TextEdit = CType(sender, TextEdit)
Using oGraphics As Graphics = oTextbox.CreateGraphics() Using oGraphics As Graphics = oTextbox.CreateGraphics()
oTextbox.Width = oGraphics.MeasureString(oTextbox.Text, oTextbox.Font).Width + 15 oTextbox.Width = CInt(oGraphics.MeasureString(oTextbox.Text, oTextbox.Font).Width + 15)
End Using End Using
End Sub End Sub
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs) Public Sub OnTextBoxLostFocus(sender As Object, e As EventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender Dim oTextbox As TextEdit = CType(sender, TextEdit)
oTextbox.BackColor = Color.White oTextbox.BackColor = Color.White
End Sub End Sub
Public Sub OnTextBoxKeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
Dim oTextbox As DevExpress.XtraEditors.TextEdit = sender Dim oTextbox As TextEdit = CType(sender, TextEdit)
If oTextbox.Text = String.Empty Then If oTextbox.Text = String.Empty Then
Exit Sub Exit Sub
@ -675,8 +385,8 @@ Public Class ClassControlCreator
End Sub End Sub
Public Function AddDateTimePicker(indexname As String, y As Integer, DataType As String) As DevExpress.XtraEditors.DateEdit Public Function AddDateTimePicker(indexname As String, y As Integer, DataType As String) As DateEdit
Dim oPicker As New DevExpress.XtraEditors.DateEdit With { Dim oPicker As New DateEdit With {
.Name = "dtp" & indexname, .Name = "dtp" & indexname,
.Size = New Size(260, 27), .Size = New Size(260, 27),
.Location = New Point(11, y), .Location = New Point(11, y),
@ -689,105 +399,4 @@ Public Class ClassControlCreator
Return oPicker Return oPicker
End Function End Function
Sub OndtpChanged()
'offen was hier zu tun ist
End Sub
'Private Sub PrepareDependingControl(Control As Control)
' If TypeOf Control Is Label Then
' Exit Sub
' End If
' Try
' Dim oMeta = DirectCast(Control.Tag, ClassControls.ControlMeta)
' Dim oIndexName As String = oMeta.IndexName
' Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'"
' Dim oDatatable As DataTable = ClassDatabase.Return_Datatable(oSQL)
' If Not IsNothing(oDatatable) Then
' Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, Control.Name)
' For Each oRow As DataRow In oDatatable.Rows
' Dim oControlName As String = NotNull(oRow.Item("NAME"), "")
' Dim oConnectionId As Integer = NotNull(oRow.Item("CONNECTION_ID"), -1)
' Dim oControlSql As String = NotNull(oRow.Item("SQL_RESULT"), "")
' If oConnectionId = -1 Or oControlSql = String.Empty Then
' Logger.Warn("Missing SQL Query or ConnectionId for Control [{0}]! Continuing.", oControlName)
' Continue For
' End If
' oControlSql = ClassPatterns.ReplaceUserValues(oControlSql, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_DOKART_ID)
' oControlSql = ClassPatterns.ReplaceInternalValues(oControlSql)
' oControlSql = ClassPatterns.ReplaceControlValues(oControlSql, Panel)
' Logger.Debug("SQL After Preparing: [{0}]", oControlSql)
' Logger.Debug("Setting new value for [{0}]", oControlName)
' SetDependingControlResult(oControlName, oControlSql, oConnectionId)
' Next
' End If
' Catch ex As Exception
' Logger.Error(ex)
' End Try
'End Sub
'Private Sub SetDependingControlResult(IndexName As String, SqlCommand As String, SqlConnectionId As Integer)
' Try
' If SqlCommand Is Nothing OrElse SqlCommand = String.Empty Then
' Logger.Warn("New Value for Index [{0}] could not be set. Supplied SQL is empty.")
' Exit Sub
' End If
' Dim oConnectionString = ClassFormFunctions.GetConnectionString(SqlConnectionId)
' Dim oDatatable As DataTable = ClassDatabase.Return_Datatable_CS(SqlCommand, oConnectionString)
' Dim oFoundControl As Control = Nothing
' For Each oControl As Control In Panel.Controls
' If TypeOf oControl Is Label Then
' Continue For
' End If
' Dim oMeta = DirectCast(oControl.Tag, ClassControls.ControlMeta)
' Dim oIndex As String = oMeta.IndexName
' If oIndex = IndexName Then
' oFoundControl = oControl
' Exit For
' End If
' Next
' If oFoundControl Is Nothing Then
' Logger.Warn("Depending Control for Index [{0}] not found!", IndexName)
' End If
' If oDatatable Is Nothing Then
' Logger.Warn("Error in SQL Command: {0}", SqlCommand)
' End If
' Select Case oFoundControl.GetType.Name
' Case GetType(DevExpress.XtraEditors.TextEdit).Name
' If oDatatable.Rows.Count > 0 Then
' Dim oFirstRow As DataRow = oDatatable.Rows.Item(0)
' If oFirstRow.ItemArray.Length > 0 Then
' Dim oValue = oFirstRow.Item(0).ToString()
' Logger.Debug("Setting Value for TextEdit [{0}]: [{1}]", oFoundControl.Name, oValue)
' DirectCast(oFoundControl, DevExpress.XtraEditors.TextEdit).Text = oValue
' End If
' End If
' Case GetType(LookupControl2).Name
' Logger.Debug("Setting Value for LookupControl [{0}]: [{1}]", oFoundControl.Name, "DATATABLE")
' DirectCast(oFoundControl, LookupControl2).DataSource = oDatatable
' Case GetType(ComboBox).Name
' Logger.Debug("Setting Value for Combobox [{0}]: [{1}]", oFoundControl.Name, "DATATABLE")
' DirectCast(oFoundControl, ComboBox).DataSource = oDatatable
' Case Else
' Logger.Debug("Could not set depending control result for [{0}]", oFoundControl.GetType.Name)
' End Select
' Catch ex As Exception
' Logger.Error(ex)
' End Try
'End Sub
End Class End Class

View File

@ -6,6 +6,8 @@ Imports DigitalData.Modules.Language.Utils
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.GUIs.ZooFlow.ClassInitLoader Imports DigitalData.GUIs.ZooFlow.ClassInitLoader
Imports DigitalData.GUIs.ZooFlow.ClassConstants Imports DigitalData.GUIs.ZooFlow.ClassConstants
Imports System.Threading
Imports System.Globalization
Public Class ClassInit Public Class ClassInit
Private _MainForm As frmFlowForm Private _MainForm As frmFlowForm
@ -36,8 +38,9 @@ Public Class ClassInit
oInit.AddStep("Checking connectivity..", AddressOf CheckConnectivity, True) oInit.AddStep("Checking connectivity..", AddressOf CheckConnectivity, True)
oInit.AddStep("Initializing User..", AddressOf InitializeUser, True) oInit.AddStep("Initializing User..", AddressOf InitializeUser, True)
oInit.AddStep("Initializing IDB..", AddressOf InitializeIDB, True) oInit.AddStep("Initializing IDB..", AddressOf InitializeIDB, True)
oInit.AddStep("Loading 3rd-party licenses", AddressOf Initialize3rdParty, False) oInit.AddStep("Initializing Language..", AddressOf InitializeLanguage, False)
oInit.AddStep("Loading basic Configs", AddressOf InitBasicData, False) oInit.AddStep("Loading 3rd-party licenses..", AddressOf Initialize3rdParty, False)
oInit.AddStep("Loading Basic Configs..", AddressOf InitBasicData, False)
' === Init Schritte definieren ' === Init Schritte definieren
AddHandler oInit.ProgressChanged, AddressOf ProgressChanged AddHandler oInit.ProgressChanged, AddressOf ProgressChanged
@ -47,6 +50,17 @@ Public Class ClassInit
End If End If
End Sub End Sub
Private Sub InitializeLanguage(MyApplication As My.MyApplication)
Dim oLanguage = MyApplication.User.Language
Dim oDateFormat = MyApplication.User.DateFormat
Dim oCultureInfo As New CultureInfo(oLanguage)
oCultureInfo.DateTimeFormat.ShortDatePattern = oDateFormat
Thread.CurrentThread.CurrentCulture = oCultureInfo
Thread.CurrentThread.CurrentUICulture = oCultureInfo
CultureInfo.DefaultThreadCurrentCulture = oCultureInfo
CultureInfo.DefaultThreadCurrentUICulture = oCultureInfo
End Sub
Private Function SetupDatabase() As Boolean Private Function SetupDatabase() As Boolean
If My.SystemConfig.ConnectionString = String.Empty Then If My.SystemConfig.ConnectionString = String.Empty Then
Dim oResult = frmConfigDatabase.ShowDialog() Dim oResult = frmConfigDatabase.ShowDialog()

View File

@ -0,0 +1,35 @@
Public Class SearchFilter
Public Shared Property DefaultFilters As New List(Of FilterTimeframe) From {
New FilterTimeframe() With {.Name = "Kein", .DisableFilter = True, .[To] = Nothing},
New FilterTimeframe() With {.Name = "Eigener", .CustomFilter = True, .[To] = Date.Now, .From = Date.Now},
New FilterTimeframe() With {
.Name = "letzte 7 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(7))
},
New FilterTimeframe() With {
.Name = "letzte 14 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(14))
},
New FilterTimeframe() With {
.Name = "letzte 30 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(30))
},
New FilterTimeframe() With {
.Name = "aktueller Monat",
.From = New Date(Now.Year, Now.Month, 1)
}
}
Public Class FilterTimeframe
Public Property Name As String
Public Property From As Date
Public Property [To] As Date = Date.Now
Public Property DisableFilter As Boolean = False
Public Property CustomFilter As Boolean = False
Public Overrides Function ToString() As String
Return Name.ToString
End Function
End Class
End Class

View File

@ -195,6 +195,7 @@
<Compile Include="My Project\AssemblyInfo.vb" /> <Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="MyApplication.vb" /> <Compile Include="MyApplication.vb" />
<Compile Include="Queries\ClassQueries.vb" /> <Compile Include="Queries\ClassQueries.vb" />
<Compile Include="Search\SearchFilter.vb" />
<EmbeddedResource Include="frmAdministrationZooFlow.resx"> <EmbeddedResource Include="frmAdministrationZooFlow.resx">
<DependentUpon>frmAdministrationZooFlow.vb</DependentUpon> <DependentUpon>frmAdministrationZooFlow.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@ -26,6 +26,7 @@ Partial Class frmSearchStart
Dim SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, Nothing, true, true) Dim SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, Nothing, true, true)
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSearchStart)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSearchStart))
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonNewSearch = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonNewSearch = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonSaveSearch = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonSaveSearch = New DevExpress.XtraBars.BarButtonItem()
Me.BarHeaderItem1 = New DevExpress.XtraBars.BarHeaderItem() Me.BarHeaderItem1 = New DevExpress.XtraBars.BarHeaderItem()
@ -45,11 +46,12 @@ Partial Class frmSearchStart
Me.cmbFilterTimeframe = New DevExpress.XtraBars.BarEditItem() Me.cmbFilterTimeframe = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemComboBox2 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() Me.RepositoryItemComboBox2 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
Me.BarCheckboxOpenSearchInSameWindow = New DevExpress.XtraBars.BarCheckItem() Me.BarCheckboxOpenSearchInSameWindow = New DevExpress.XtraBars.BarCheckItem()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupFunctions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupProfiles = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupProfiles = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupFilter = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupFilter = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupSettings = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit() Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit()
Me.RepositoryItemTimeSpanEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTimeSpanEdit() Me.RepositoryItemTimeSpanEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTimeSpanEdit()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@ -98,17 +100,28 @@ Partial Class frmSearchStart
'RibbonControl1 'RibbonControl1
' '
Me.RibbonControl1.AutoSizeItems = True Me.RibbonControl1.AutoSizeItems = True
Me.RibbonControl1.CaptionBarItemLinks.Add(Me.BarButtonItem2)
Me.RibbonControl1.ExpandCollapseItem.Id = 0 Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonNewSearch, Me.BarButtonSaveSearch, Me.BarHeaderItem1, Me.BarEditItem1, Me.BarButtonClearSearch, Me.BarButtonItem3, Me.BarEditItem2, Me.BarStaticItemInfo, Me.BarButtonStartSearch, Me.BarStaticItem1, Me.txtFilterFrom, Me.txtFilterTo, Me.cmbFilterTimeframe, Me.BarCheckboxOpenSearchInSameWindow}) Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.BarButtonItem2, Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonNewSearch, Me.BarButtonSaveSearch, Me.BarHeaderItem1, Me.BarEditItem1, Me.BarButtonClearSearch, Me.BarButtonItem3, Me.BarEditItem2, Me.BarStaticItemInfo, Me.BarButtonStartSearch, Me.BarStaticItem1, Me.txtFilterFrom, Me.txtFilterTo, Me.cmbFilterTimeframe, Me.BarCheckboxOpenSearchInSameWindow, Me.BarButtonItem1})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 22 Me.RibbonControl1.MaxItemId = 24
Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemRadioGroup1, Me.RepositoryItemComboBox1, Me.RepositoryItemTextEdit1, Me.RepositoryItemDateEdit1, Me.RepositoryItemDateEdit2, Me.RepositoryItemComboBox2, Me.RepositoryItemTimeSpanEdit1}) Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemRadioGroup1, Me.RepositoryItemComboBox1, Me.RepositoryItemTextEdit1, Me.RepositoryItemDateEdit1, Me.RepositoryItemDateEdit2, Me.RepositoryItemComboBox2, Me.RepositoryItemTimeSpanEdit1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.Size = New System.Drawing.Size(1070, 158) Me.RibbonControl1.ShowItemCaptionsInCaptionBar = True
Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
Me.RibbonControl1.Size = New System.Drawing.Size(1020, 131)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
' '
'BarButtonItem2
'
Me.BarButtonItem2.Caption = "Fenster wiederherstellen"
Me.BarButtonItem2.Id = 23
Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem2.Name = "BarButtonItem2"
Me.BarButtonItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
'
'BarButtonNewSearch 'BarButtonNewSearch
' '
Me.BarButtonNewSearch.Caption = "Neue Suche" Me.BarButtonNewSearch.Caption = "Neue Suche"
@ -234,31 +247,32 @@ Partial Class frmSearchStart
' '
'BarCheckboxOpenSearchInSameWindow 'BarCheckboxOpenSearchInSameWindow
' '
Me.BarCheckboxOpenSearchInSameWindow.Caption = "Suche in gleichem Fenster öffnen" Me.BarCheckboxOpenSearchInSameWindow.Caption = "Ergebnis in gleichem Fenster öffnen"
Me.BarCheckboxOpenSearchInSameWindow.Id = 21 Me.BarCheckboxOpenSearchInSameWindow.Id = 21
Me.BarCheckboxOpenSearchInSameWindow.ImageOptions.SvgImage = CType(resources.GetObject("BarCheckItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.BarCheckboxOpenSearchInSameWindow.ImageOptions.SvgImage = CType(resources.GetObject("BarCheckboxOpenSearchInSameWindow.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarCheckboxOpenSearchInSameWindow.Name = "BarCheckboxOpenSearchInSameWindow" Me.BarCheckboxOpenSearchInSameWindow.Name = "BarCheckboxOpenSearchInSameWindow"
' '
'BarButtonItem1
'
Me.BarButtonItem1.Caption = "Fenster wiederherstellen"
Me.BarButtonItem1.Id = 22
Me.BarButtonItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem1.Name = "BarButtonItem1"
'
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroupProfiles, Me.RibbonPageGroupFilter}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupFunctions, Me.RibbonPageGroupProfiles, Me.RibbonPageGroupFilter, Me.RibbonPageGroupSettings})
Me.RibbonPage1.Name = "RibbonPage1" Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Start" Me.RibbonPage1.Text = "Start"
' '
'RibbonPageGroup1 'RibbonPageGroupFunctions
' '
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonStartSearch) Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonStartSearch)
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonClearSearch) Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonNewSearch)
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonNewSearch) Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonClearSearch)
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonSaveSearch) Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonSaveSearch)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroupFunctions.Name = "RibbonPageGroupFunctions"
Me.RibbonPageGroup1.Text = "Suchfunktionen" Me.RibbonPageGroupFunctions.Text = "Suchfunktionen"
'
'RibbonPageGroup2
'
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarCheckboxOpenSearchInSameWindow)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "Sucheinstellungen"
' '
'RibbonPageGroupProfiles 'RibbonPageGroupProfiles
' '
@ -275,6 +289,12 @@ Partial Class frmSearchStart
Me.RibbonPageGroupFilter.Name = "RibbonPageGroupFilter" Me.RibbonPageGroupFilter.Name = "RibbonPageGroupFilter"
Me.RibbonPageGroupFilter.Text = "Filter" Me.RibbonPageGroupFilter.Text = "Filter"
' '
'RibbonPageGroupSettings
'
Me.RibbonPageGroupSettings.ItemLinks.Add(Me.BarCheckboxOpenSearchInSameWindow)
Me.RibbonPageGroupSettings.Name = "RibbonPageGroupSettings"
Me.RibbonPageGroupSettings.Text = "Sucheinstellungen"
'
'RepositoryItemTextEdit1 'RepositoryItemTextEdit1
' '
Me.RepositoryItemTextEdit1.AutoHeight = False Me.RepositoryItemTextEdit1.AutoHeight = False
@ -289,10 +309,10 @@ Partial Class frmSearchStart
'RibbonStatusBar1 'RibbonStatusBar1
' '
Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItemInfo) Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItemInfo)
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 577) Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 455)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(1070, 24) Me.RibbonStatusBar1.Size = New System.Drawing.Size(1020, 22)
' '
'pnlProfileChoose 'pnlProfileChoose
' '
@ -301,10 +321,10 @@ Partial Class frmSearchStart
Me.pnlProfileChoose.Controls.Add(Me.Label1) Me.pnlProfileChoose.Controls.Add(Me.Label1)
Me.pnlProfileChoose.Dock = System.Windows.Forms.DockStyle.Top Me.pnlProfileChoose.Dock = System.Windows.Forms.DockStyle.Top
Me.pnlProfileChoose.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.pnlProfileChoose.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.pnlProfileChoose.Location = New System.Drawing.Point(0, 158) Me.pnlProfileChoose.Location = New System.Drawing.Point(0, 131)
Me.pnlProfileChoose.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.pnlProfileChoose.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.pnlProfileChoose.Name = "pnlProfileChoose" Me.pnlProfileChoose.Name = "pnlProfileChoose"
Me.pnlProfileChoose.Size = New System.Drawing.Size(1070, 57) Me.pnlProfileChoose.Size = New System.Drawing.Size(1020, 57)
Me.pnlProfileChoose.TabIndex = 5 Me.pnlProfileChoose.TabIndex = 5
' '
'cmbProfile 'cmbProfile
@ -315,7 +335,7 @@ Partial Class frmSearchStart
Me.cmbProfile.FormattingEnabled = True Me.cmbProfile.FormattingEnabled = True
Me.cmbProfile.Location = New System.Drawing.Point(3, 23) Me.cmbProfile.Location = New System.Drawing.Point(3, 23)
Me.cmbProfile.Name = "cmbProfile" Me.cmbProfile.Name = "cmbProfile"
Me.cmbProfile.Size = New System.Drawing.Size(1065, 21) Me.cmbProfile.Size = New System.Drawing.Size(1015, 21)
Me.cmbProfile.TabIndex = 2 Me.cmbProfile.TabIndex = 2
Me.cmbProfile.ValueMember = "DOKART_ID" Me.cmbProfile.ValueMember = "DOKART_ID"
' '
@ -337,68 +357,68 @@ Partial Class frmSearchStart
Me.XtraTabControl1.MultiLine = DevExpress.Utils.DefaultBoolean.[False] Me.XtraTabControl1.MultiLine = DevExpress.Utils.DefaultBoolean.[False]
Me.XtraTabControl1.Name = "XtraTabControl1" Me.XtraTabControl1.Name = "XtraTabControl1"
Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1 Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1
Me.XtraTabControl1.Size = New System.Drawing.Size(1070, 362) Me.XtraTabControl1.Size = New System.Drawing.Size(1020, 267)
Me.XtraTabControl1.TabIndex = 12 Me.XtraTabControl1.TabIndex = 12
Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPage3, Me.XtraTabPage4, Me.XtraTabPage5, Me.XtraTabPage6, Me.XtraTabPage7, Me.XtraTabPage8, Me.XtraTabPage9, Me.XtraTabPage10}) Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPage3, Me.XtraTabPage4, Me.XtraTabPage5, Me.XtraTabPage6, Me.XtraTabPage7, Me.XtraTabPage8, Me.XtraTabPage9, Me.XtraTabPage10})
' '
'XtraTabPage1 'XtraTabPage1
' '
Me.XtraTabPage1.Name = "XtraTabPage1" Me.XtraTabPage1.Name = "XtraTabPage1"
Me.XtraTabPage1.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage1.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage1.Text = "Search#1" Me.XtraTabPage1.Text = "Search#1"
' '
'XtraTabPage2 'XtraTabPage2
' '
Me.XtraTabPage2.Name = "XtraTabPage2" Me.XtraTabPage2.Name = "XtraTabPage2"
Me.XtraTabPage2.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage2.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage2.Text = "Search#2" Me.XtraTabPage2.Text = "Search#2"
' '
'XtraTabPage3 'XtraTabPage3
' '
Me.XtraTabPage3.Name = "XtraTabPage3" Me.XtraTabPage3.Name = "XtraTabPage3"
Me.XtraTabPage3.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage3.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage3.Text = "Search#3" Me.XtraTabPage3.Text = "Search#3"
' '
'XtraTabPage4 'XtraTabPage4
' '
Me.XtraTabPage4.Name = "XtraTabPage4" Me.XtraTabPage4.Name = "XtraTabPage4"
Me.XtraTabPage4.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage4.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage4.Text = "Search#4" Me.XtraTabPage4.Text = "Search#4"
' '
'XtraTabPage5 'XtraTabPage5
' '
Me.XtraTabPage5.Name = "XtraTabPage5" Me.XtraTabPage5.Name = "XtraTabPage5"
Me.XtraTabPage5.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage5.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage5.Text = "Search#5" Me.XtraTabPage5.Text = "Search#5"
' '
'XtraTabPage6 'XtraTabPage6
' '
Me.XtraTabPage6.Name = "XtraTabPage6" Me.XtraTabPage6.Name = "XtraTabPage6"
Me.XtraTabPage6.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage6.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage6.Text = "Search#6" Me.XtraTabPage6.Text = "Search#6"
' '
'XtraTabPage7 'XtraTabPage7
' '
Me.XtraTabPage7.Name = "XtraTabPage7" Me.XtraTabPage7.Name = "XtraTabPage7"
Me.XtraTabPage7.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage7.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage7.Text = "Search#7" Me.XtraTabPage7.Text = "Search#7"
' '
'XtraTabPage8 'XtraTabPage8
' '
Me.XtraTabPage8.Name = "XtraTabPage8" Me.XtraTabPage8.Name = "XtraTabPage8"
Me.XtraTabPage8.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage8.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage8.Text = "Search#8" Me.XtraTabPage8.Text = "Search#8"
' '
'XtraTabPage9 'XtraTabPage9
' '
Me.XtraTabPage9.Name = "XtraTabPage9" Me.XtraTabPage9.Name = "XtraTabPage9"
Me.XtraTabPage9.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage9.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage9.Text = "Search#9" Me.XtraTabPage9.Text = "Search#9"
' '
'XtraTabPage10 'XtraTabPage10
' '
Me.XtraTabPage10.Name = "XtraTabPage10" Me.XtraTabPage10.Name = "XtraTabPage10"
Me.XtraTabPage10.Size = New System.Drawing.Size(1068, 337) Me.XtraTabPage10.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage10.Text = "Search#10" Me.XtraTabPage10.Text = "Search#10"
' '
'ContextMenuStripSearchTerms 'ContextMenuStripSearchTerms
@ -437,13 +457,13 @@ Partial Class frmSearchStart
Me.SplitContainerControlSearch.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2 Me.SplitContainerControlSearch.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2
Me.SplitContainerControlSearch.Dock = System.Windows.Forms.DockStyle.Fill Me.SplitContainerControlSearch.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainerControlSearch.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2 Me.SplitContainerControlSearch.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2
Me.SplitContainerControlSearch.Location = New System.Drawing.Point(0, 215) Me.SplitContainerControlSearch.Location = New System.Drawing.Point(0, 188)
Me.SplitContainerControlSearch.Name = "SplitContainerControlSearch" Me.SplitContainerControlSearch.Name = "SplitContainerControlSearch"
Me.SplitContainerControlSearch.Panel1.Controls.Add(Me.XtraTabControl1) Me.SplitContainerControlSearch.Panel1.Controls.Add(Me.XtraTabControl1)
Me.SplitContainerControlSearch.Panel1.Text = "Panel1" Me.SplitContainerControlSearch.Panel1.Text = "Panel1"
Me.SplitContainerControlSearch.Panel2.Text = "Panel2" Me.SplitContainerControlSearch.Panel2.Text = "Panel2"
Me.SplitContainerControlSearch.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1 Me.SplitContainerControlSearch.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1
Me.SplitContainerControlSearch.Size = New System.Drawing.Size(1070, 362) Me.SplitContainerControlSearch.Size = New System.Drawing.Size(1020, 267)
Me.SplitContainerControlSearch.SplitterPosition = 310 Me.SplitContainerControlSearch.SplitterPosition = 310
Me.SplitContainerControlSearch.TabIndex = 16 Me.SplitContainerControlSearch.TabIndex = 16
' '
@ -453,13 +473,14 @@ Partial Class frmSearchStart
Me.Appearance.Options.UseFont = True Me.Appearance.Options.UseFont = True
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1070, 601) Me.ClientSize = New System.Drawing.Size(1020, 477)
Me.Controls.Add(Me.SplitContainerControlSearch) Me.Controls.Add(Me.SplitContainerControlSearch)
Me.Controls.Add(Me.pnlProfileChoose) Me.Controls.Add(Me.pnlProfileChoose)
Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1) Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.Icon = CType(resources.GetObject("frmSearchStart.IconOptions.Icon"), System.Drawing.Icon) Me.IconOptions.Icon = CType(resources.GetObject("frmSearchStart.IconOptions.Icon"), System.Drawing.Icon)
Me.IconOptions.SvgImage = CType(resources.GetObject("frmSearchStart.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.IconOptions.SvgImage = CType(resources.GetObject("frmSearchStart.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.IconOptions.SvgImageColorizationMode = DevExpress.Utils.SvgImageColorizationMode.Full
Me.KeyPreview = True Me.KeyPreview = True
Me.Name = "frmSearchStart" Me.Name = "frmSearchStart"
Me.Ribbon = Me.RibbonControl1 Me.Ribbon = Me.RibbonControl1
@ -489,7 +510,7 @@ End Sub
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents pnlProfileChoose As Panel Friend WithEvents pnlProfileChoose As Panel
Friend WithEvents cmbProfile As ComboBox Friend WithEvents cmbProfile As ComboBox
@ -534,5 +555,7 @@ End Sub
Friend WithEvents RepositoryItemComboBox2 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox Friend WithEvents RepositoryItemComboBox2 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox
Friend WithEvents RepositoryItemTimeSpanEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTimeSpanEdit Friend WithEvents RepositoryItemTimeSpanEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTimeSpanEdit
Friend WithEvents BarCheckboxOpenSearchInSameWindow As DevExpress.XtraBars.BarCheckItem Friend WithEvents BarCheckboxOpenSearchInSameWindow As DevExpress.XtraBars.BarCheckItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageGroupSettings As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
End Class End Class

View File

@ -118,6 +118,23 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="DevExpress.Data.v19.2" name="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <assembly alias="DevExpress.Data.v19.2" name="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<data name="BarButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACECAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iRmlsbF9Eb3duIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAg
MCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJ
LkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgkuc3Qwe29wYWNpdHk6MC41O30KPC9zdHlsZT4NCiAgPGcgY2xh
c3M9InN0MCI+DQogICAgPHBhdGggZD0iTTI4LDEwdjIwSDJWMTBoMTB2Nkg3LjNMMTUsMjcuNkwyMi43
LDE2SDE4di02SDI4eiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQogIDxwYXRoIGQ9Ik0yOCw4SDJW
MmgyNlY4eiBNMTQsMTB2OGgtM2w0LDZsNC02aC0zdi04SDE0eiIgY2xhc3M9IkJsdWUiIC8+DQo8L3N2
Zz4L
</value>
</data>
<data name="BarButtonNewSearch.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="BarButtonNewSearch.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
@ -209,7 +226,7 @@
LDI2LDI0LDI2eiIgY2xhc3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw== LDI2LDI0LDI2eiIgY2xhc3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw==
</value> </value>
</data> </data>
<data name="BarCheckItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="BarCheckboxOpenSearchInSameWindow.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@ -233,6 +250,23 @@
MCwxNnYtNWMwLTAuNSwwLjUtMSwxLTFoMThjMC41LDAsMSwwLjUsMSwxdjVIMHogTTI4LDhWM2MwLTAu MCwxNnYtNWMwLTAuNSwwLjUtMSwxLTFoMThjMC41LDAsMSwwLjUsMSwxdjVIMHogTTI4LDhWM2MwLTAu
NS0wLjUtMS0xLTFIOUM4LjUsMiw4LDIuNSw4LDN2NUgyOHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+ NS0wLjUtMS0xLTFIOUM4LjUsMiw4LDIuNSw4LDN2NUgyOHoiIGNsYXNzPSJCbHVlIiAvPg0KICA8L2c+
DQo8L3N2Zz4L DQo8L3N2Zz4L
</value>
</data>
<data name="BarButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACECAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iRmlsbF9Eb3duIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAg
MCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJ
LkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgkuc3Qwe29wYWNpdHk6MC41O30KPC9zdHlsZT4NCiAgPGcgY2xh
c3M9InN0MCI+DQogICAgPHBhdGggZD0iTTI4LDEwdjIwSDJWMTBoMTB2Nkg3LjNMMTUsMjcuNkwyMi43
LDE2SDE4di02SDI4eiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQogIDxwYXRoIGQ9Ik0yOCw4SDJW
MmgyNlY4eiBNMTQsMTB2OGgtM2w0LDZsNC02aC0zdi04SDE0eiIgY2xhc3M9IkJsdWUiIC8+DQo8L3N2
Zz4L
</value> </value>
</data> </data>
<metadata name="ContextMenuStripSearchTerms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ContextMenuStripSearchTerms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -1,22 +1,29 @@
Option Explicit On Option Explicit On
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Imports DevExpress.XtraTab Imports DevExpress.XtraTab
Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraEditors Imports DevExpress.XtraEditors
Imports DevExpress.XtraSplashScreen Imports DevExpress.XtraSplashScreen
Imports DigitalData.GUIs.Common Imports DigitalData.GUIs.Common
Imports DigitalData.GUIs.ZooFlow.ClassConstants
Imports DigitalData.GUIs.ZooFlow.SearchFilter
Imports System.Threading.Tasks Imports System.Threading.Tasks
Public Class frmSearchStart Public Class frmSearchStart
Private Logger As Logger Private Logger As Logger
' Constants
Private Const DEFAULT_X As Integer = 10 Private Const DEFAULT_X As Integer = 10
Private Const DEFAULT_Y As Integer = 10 Private Const DEFAULT_Y As Integer = 10
' Runtime Variables
Private SelectedTabIndex As Integer Private SelectedTabIndex As Integer
Private SelectedTab As XtraTabPage Private SelectedTab As XtraTabPage
Private HeightBeforeMinimizing As Integer = 600
Private SEARCH_ID As Integer = 0 Private SEARCH_ID As Integer = 0
Private SEARCH_SQL As String Private SEARCH_SQL As String
@ -31,11 +38,15 @@ Public Class frmSearchStart
Private LastSearchForm As frmDocumentResultList Private LastSearchForm As frmDocumentResultList
Private ChangedDateControls As List(Of String) Private ChangedDateControls As List(Of String)
Private StopWatch As Watch
Public Sub New(ByVal pDTSearchProfiles As DataTable, Optional ByVal pRunSearch As Boolean = False) Public Sub New(ByVal pDTSearchProfiles As DataTable, Optional ByVal pRunSearch As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich. ' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent() InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
StopWatch = New Watch(Name)
DatatableSearchProfiles = pDTSearchProfiles DatatableSearchProfiles = pDTSearchProfiles
Logger = My.LogConfig.GetLogger() Logger = My.LogConfig.GetLogger()
Dim oSearchTerms As New DataTable Dim oSearchTerms As New DataTable
@ -48,6 +59,7 @@ Public Class frmSearchStart
oSearchTerms.Columns.Add("SearchTerm", GetType(String)) oSearchTerms.Columns.Add("SearchTerm", GetType(String))
oSearchTerms.Columns.Add("BracketRight", GetType(String)) oSearchTerms.Columns.Add("BracketRight", GetType(String))
oSearchTerms.Columns.Add("Operator", GetType(String)) oSearchTerms.Columns.Add("Operator", GetType(String))
End Sub End Sub
Private Async Sub frmSearchStart_Load(sender As Object, e As EventArgs) Handles Me.Load Private Async Sub frmSearchStart_Load(sender As Object, e As EventArgs) Handles Me.Load
@ -56,30 +68,14 @@ Public Class frmSearchStart
Try Try
oHandle = SplashScreenManager.ShowOverlayForm(Me) oHandle = SplashScreenManager.ShowOverlayForm(Me)
Dim oWatch As New Watch("Setting up Form")
pnlProfileChoose.Visible = False pnlProfileChoose.Visible = False
For Each oTab As XtraTabPage In XtraTabControl1.TabPages For Each oTab As XtraTabPage In XtraTabControl1.TabPages
oTab.PageVisible = False oTab.PageVisible = False
Next Next
RepositoryItemComboBox2.Items.AddRange(New List(Of FilterTimeframe) From { RepositoryItemComboBox2.Items.AddRange(DefaultFilters)
New FilterTimeframe() With {.Name = "Kein", .DisableFilter = True},
New FilterTimeframe() With {.Name = "Eigener", .CustomFilter = True},
New FilterTimeframe() With {
.Name = "letzte 7 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(7)),
.[To] = Date.Now
},
New FilterTimeframe() With {
.Name = "letzte 14 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(14)),
.[To] = Date.Now
},
New FilterTimeframe() With {
.Name = "letzte 30 Tage",
.From = Date.Now.Subtract(TimeSpan.FromDays(30)),
.[To] = Date.Now
}
})
BarCheckboxOpenSearchInSameWindow.Checked = My.UIConfig.SearchForm.OpenSearchInSameWindow BarCheckboxOpenSearchInSameWindow.Checked = My.UIConfig.SearchForm.OpenSearchInSameWindow
@ -96,6 +92,8 @@ Public Class frmSearchStart
For Each oRow As DataRow In DatatableSearchProfiles.Rows For Each oRow As DataRow In DatatableSearchProfiles.Rows
RepositoryItemComboBox1.Items.Add(oRow.Item("TITLE")) RepositoryItemComboBox1.Items.Add(oRow.Item("TITLE"))
Next Next
oWatch.Stop()
Else Else
pnlProfileChoose.Visible = False pnlProfileChoose.Visible = False
RibbonPageGroupProfiles.Visible = False RibbonPageGroupProfiles.Visible = False
@ -108,7 +106,10 @@ Public Class frmSearchStart
SEARCH_SQL = DatatableSearchProfiles.Rows(0).Item("RESULT_SQL") SEARCH_SQL = DatatableSearchProfiles.Rows(0).Item("RESULT_SQL")
SEARCH_TITLE = DatatableSearchProfiles.Rows(0).Item("TITLE") SEARCH_TITLE = DatatableSearchProfiles.Rows(0).Item("TITLE")
oWatch.Stop()
oWatch = New Watch("Loading Attributes")
Await Load_Search_Attributes() Await Load_Search_Attributes()
oWatch.Stop()
BarButtonNewSearch.Visibility = DevExpress.XtraBars.BarItemVisibility.Never BarButtonNewSearch.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End If End If
SEARCH_COUNT = DatatableSearchProfiles.Rows.Count SEARCH_COUNT = DatatableSearchProfiles.Rows.Count
@ -127,37 +128,50 @@ Public Class frmSearchStart
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error while loading ProfileSearches:") MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error while loading ProfileSearches:")
Finally Finally
SplashScreenManager.CloseOverlayForm(oHandle) SplashScreenManager.CloseOverlayForm(oHandle)
StopWatch.Stop()
End Try End Try
End Sub End Sub
Async Function Load_Search_Attributes() As Task Async Function Load_Search_Attributes() As Task
Try Try
DataLoaded = False DataLoaded = False
Dim oWatch1 As New Watch("Getting data from Database")
Dim oSQL = $"SELECT * FROM VWIDB_SEARCH_PROFILE_ATTRIBUTES WHERE SEARCH_PROFIL_ID = {SEARCH_ID} ORDER BY [SEQUENCE]" Dim oSQL = $"SELECT * FROM VWIDB_SEARCH_PROFILE_ATTRIBUTES WHERE SEARCH_PROFIL_ID = {SEARCH_ID} ORDER BY [SEQUENCE]"
Dim oDT As DataTable = Await My.DatabaseIDB.GetDatatableAsync(oSQL) Dim oDT As DataTable = Await My.DatabaseIDB.GetDatatableAsync(oSQL)
oWatch1.Stop()
Dim oWatch2 As New Watch("Procesing Dataset")
DatatableAttributes = Nothing DatatableAttributes = Nothing
DatatableAttributes = oDT.Clone() DatatableAttributes = oDT.Clone()
oDT.Select("", "SEQUENCE").CopyToDataTable(DatatableAttributes, LoadOption.PreserveChanges) oDT.Select("", "SEQUENCE").CopyToDataTable(DatatableAttributes, LoadOption.PreserveChanges)
oWatch2.Stop()
Dim oControlCount As Integer = 1 Dim oControlCount As Integer = 1
Dim oControlRow As Integer = 0 Dim oControlRow As Integer = 0
Dim oControls As New ClassControlCreator(SelectedTab, Me) Dim oControls As New ClassControlCreator(SelectedTab, Me)
Dim YMax As Integer = 0
Dim YActControlHeight As Integer = 0 Dim YActControlHeight As Integer = 0
Dim XActControlWidth As Integer = 0 Dim XActControlWidth As Integer = 0
Dim iList As New List(Of Integer) From {2, 3, 5, 6, 8, 9}
For Each oAttributeRow As DataRow In oDT.Rows For Each oAttributeRow As DataRow In oDT.Rows
Dim oXPosition As Integer Dim oXPosition As Integer
Dim oYPositionControl As Integer Dim oYPositionControl As Integer
Dim oYPositionLabel As Integer Dim oYPositionLabel As Integer
Dim oMyLastGridView As GridView Dim oMyLastGridView As GridView
Dim oSingleResult As Boolean = False Dim oSingleResult As Boolean = False
Dim oAttriTitle As String = oAttributeRow.Item("ATTRIBUTE_TITLE").ToString Dim oAttributeTitle As String = oAttributeRow.Item("ATTRIBUTE_TITLE").ToString
Dim oAttriID As Integer = CInt(oAttributeRow.Item("ATTRIBUTE_ID")) Dim oAttriID As Integer = CInt(oAttributeRow.Item("ATTRIBUTE_ID"))
Dim oAttributeType As String = oAttributeRow.Item("ATTRIBUTE_TYPE").ToString Dim oAttributeType As String = oAttributeRow.Item("ATTRIBUTE_TYPE").ToString
Dim oWatch3 As New Watch($"Loading Attribute: {oAttributeTitle}")
Dim oWatch4 As New Watch($"Calculating Position")
If oControlCount = 1 Or oControlCount = 5 Or oControlCount = 9 Then If oControlCount = 1 Or oControlCount = 5 Or oControlCount = 9 Then
oControlRow += 1 oControlRow += 1
End If End If
If oControlRow = 1 Then If oControlRow = 1 Then
If oControlCount = 1 Then If oControlCount = 1 Then
oXPosition = 10 oXPosition = 10
@ -177,30 +191,39 @@ Public Class frmSearchStart
End If End If
End If End If
Dim oControlHeight As Integer = CInt(oAttributeRow.Item("HEIGHT")) oWatch4.Stop()
oWatch4 = New Watch("Creating Label")
'Dim oControlHeight As Integer = CInt(oAttributeRow.Item("HEIGHT"))
Dim oControlHeight As Integer = 150
Dim oControlWidth As Integer = CInt(oAttributeRow.Item("WIDTH")) Dim oControlWidth As Integer = CInt(oAttributeRow.Item("WIDTH"))
'Dim oControlWidth As Integer = 150
If CBool(oAttributeRow.Item("MULTISELECT")) = True Then If CBool(oAttributeRow.Item("MULTISELECT")) = True Then
oControlWidth += 50 oControlWidth += 50
End If End If
addLabel(oAttriTitle, oXPosition, oYPositionLabel) addLabel(oAttributeTitle, oXPosition, oYPositionLabel)
'Nun das Control mit dem entsprechenden Abstand und der Größe 'Nun das Control mit dem entsprechenden Abstand und der Größe
Dim oCalcHeight As Integer Dim oCalcHeight As Integer
Dim oCalcWidth As Integer Dim oCalcWidth As Integer
If oAttributeType = "VARCHAR" Or oAttributeType = "BIG INTEGER" Then If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
oCalcHeight = oControlHeight + oYPositionControl oCalcHeight = oControlHeight + oYPositionControl
oCalcWidth = oControlWidth oCalcWidth = oControlWidth
ElseIf (oAttributeType = "DATE" Or oAttributeType = "BIT") Then ElseIf (oAttributeType = ATTR_TYPE_DATE Or oAttributeType = ATTR_TYPE_BOOLEAN) Then
oCalcHeight = 20 + oYPositionControl oCalcHeight = 20 + oYPositionControl
oCalcWidth = 100 oCalcWidth = 100
End If End If
If oCalcHeight > YActControlHeight Then If oCalcHeight > YActControlHeight Then
YActControlHeight = oCalcHeight YActControlHeight = oCalcHeight
End If End If
oWatch4.Stop()
oWatch4 = New Watch("Creating Control")
Dim oMyControl As Control = Nothing Dim oMyControl As Control = Nothing
If oAttributeType = "VARCHAR" Or oAttributeType = "BIG INTEGER" Then If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
oMyControl = oControls.CreateExistingGridControl(oAttributeRow, oXPosition, oYPositionControl) oMyControl = oControls.CreateExistingGridControl(oAttributeRow, oXPosition, oYPositionControl)
Dim myDGV As GridControl = CType(oMyControl, GridControl) Dim myDGV As GridControl = CType(oMyControl, GridControl)
@ -212,7 +235,7 @@ Public Class frmSearchStart
End If End If
End If End If
Dim oView As DevExpress.XtraGrid.Views.Grid.GridView Dim oView As GridView
oView = CType(myDGV.MainView, GridView) oView = CType(myDGV.MainView, GridView)
oMyLastGridView = oView oMyLastGridView = oView
If CBool(oAttributeRow.Item("MULTISELECT")) = True Then If CBool(oAttributeRow.Item("MULTISELECT")) = True Then
@ -223,28 +246,30 @@ Public Class frmSearchStart
End If End If
oView.FocusInvalidRow() oView.FocusInvalidRow()
ElseIf oAttributeType = "DATE" Then ElseIf oAttributeType = ATTR_TYPE_DATE Then
oMyControl = oControls.CreateExistingDatepicker(oAttributeRow, oXPosition, oYPositionControl) oMyControl = oControls.CreateExistingDatepicker(oAttributeRow, oXPosition, oYPositionControl)
Dim myDTP As DateEdit = CType(oMyControl, DateEdit) Dim myDTP As DateEdit = CType(oMyControl, DateEdit)
AddHandler myDTP.DisableCalendarDate, AddressOf DisableCalendarDate AddHandler myDTP.DisableCalendarDate, AddressOf DisableCalendarDate
AddHandler myDTP.DateTimeChanged, AddressOf CalendarChanged 'CalendarChanged AddHandler myDTP.DateTimeChanged, AddressOf CalendarChanged 'CalendarChanged
ElseIf oAttributeType = "BIT" Then ElseIf oAttributeType = ATTR_TYPE_BOOLEAN Then
oMyControl = oControls.CreateExistingCheckbox(oAttributeRow, oXPosition, oYPositionControl) oMyControl = oControls.CreateExistingCheckbox(oAttributeRow, oXPosition, oYPositionControl)
Dim myCheckBox As CheckBox = CType(oMyControl, CheckBox) Dim myCheckBox As CheckBox = CType(oMyControl, CheckBox)
AddHandler myCheckBox.CheckedChanged, AddressOf CheckBox_CheckedChanged AddHandler myCheckBox.CheckedChanged, AddressOf CheckBox_CheckedChanged
End If End If
oWatch4.Stop()
oWatch4 = New Watch("Adding Control to Panel")
oControlCount += 1 oControlCount += 1
If oMyControl IsNot Nothing Then If oMyControl IsNot Nothing Then
SelectedTab.Controls.Add(oMyControl) SelectedTab.Controls.Add(oMyControl)
End If End If
If oAttributeType = "VARCHAR" Or oAttributeType = "BIG INTEGER" Then
oMyLastGridView.FocusInvalidRow()
End If
oXPosition += oControlWidth + 20 oXPosition += oControlWidth + 20
oWatch4.Stop()
oWatch3.Stop()
Next Next
Catch ex As Exception Catch ex As Exception
Logger.Warn("Unexpected error in Load_Search_Attributes - Error: " & ex.Message) Logger.Warn("Unexpected error in Load_Search_Attributes - Error: " & ex.Message)
@ -252,7 +277,6 @@ Public Class frmSearchStart
Finally Finally
DataLoaded = True DataLoaded = True
End Try End Try
End Function End Function
Sub addLabel(pAttrName As String, pXPos As Integer, ylbl As Integer) Sub addLabel(pAttrName As String, pXPos As Integer, ylbl As Integer)
Dim lbl As New Label With { Dim lbl As New Label With {
@ -296,8 +320,8 @@ Public Class frmSearchStart
Continue For Continue For
End If End If
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttrID oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
For Each oRowHandle As Integer In oSelectedRows For Each oRowHandle As Integer In oSelectedRows
Dim oResult = oMyGridView.GetRowCellValue(oRowHandle, oMyGridView.Columns(0).FieldName) Dim oResult = oMyGridView.GetRowCellValue(oRowHandle, oMyGridView.Columns(0).FieldName)
Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {SEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{oResult}','{My.Application.User.UserName}'" Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {SEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{oResult}','{My.Application.User.UserName}'"
@ -315,8 +339,8 @@ Public Class frmSearchStart
For Each oName As String In ChangedDateControls For Each oName As String In ChangedDateControls
If oDateEdit.Name = oName Then If oDateEdit.Name = oName Then
If Not IsNothing(oDateEdit.EditValue) Then If Not IsNothing(oDateEdit.EditValue) Then
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttrID oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
Dim oldValue As Date Dim oldValue As Date
Dim validDate As Boolean = False Dim validDate As Boolean = False
Dim oDateValue As Date = DirectCast(oDateEdit.EditValue, Date) Dim oDateValue As Date = DirectCast(oDateEdit.EditValue, Date)
@ -344,8 +368,8 @@ Public Class frmSearchStart
Case "System.Windows.Forms.CheckBox" Case "System.Windows.Forms.CheckBox"
Dim myCheckBox As CheckBox = CType(oControl, CheckBox) Dim myCheckBox As CheckBox = CType(oControl, CheckBox)
If myCheckBox.CheckState <> CheckState.Indeterminate Then If myCheckBox.CheckState <> CheckState.Indeterminate Then
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttrID oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {SEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{myCheckBox.Checked.ToString}','{My.Application.User.UserName}'" Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {SEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{myCheckBox.Checked.ToString}','{My.Application.User.UserName}'"
My.DatabaseIDB.ExecuteNonQuery(oInsert) My.DatabaseIDB.ExecuteNonQuery(oInsert)
End If End If
@ -363,8 +387,8 @@ Public Class frmSearchStart
If IsNothing(oRowView) = False Then If IsNothing(oRowView) = False Then
Dim oResult As String = CType(oRowView.Item(0), String) Dim oResult As String = CType(oRowView.Item(0), String)
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrID Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
' RenewSearchAttributes() ' RenewSearchAttributes()
' AddSearchAttribute(oAttrID, oAttrTitle, oResult) ' AddSearchAttribute(oAttrID, oAttrTitle, oResult)
@ -375,8 +399,8 @@ Public Class frmSearchStart
If DataLoaded = False Then Exit Sub If DataLoaded = False Then Exit Sub
Dim oCurrentCB As CheckBox = DirectCast(sender, CheckBox) Dim oCurrentCB As CheckBox = DirectCast(sender, CheckBox)
Dim oChecked = oCurrentCB.Checked Dim oChecked = oCurrentCB.Checked
Dim oAttrID = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttrID Dim oAttrID = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttributeID
Dim oAttrTitle = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttrTitle Dim oAttrTitle = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
'RenewSearchAttributes() 'RenewSearchAttributes()
' AddSearchAttribute(oAttrID, oAttrTitle, oChecked.ToString) ' AddSearchAttribute(oAttrID, oAttrTitle, oChecked.ToString)
End Sub End Sub
@ -497,8 +521,8 @@ Public Class frmSearchStart
If IsNothing(oRowView) = False Then If IsNothing(oRowView) = False Then
Dim oResult As String = CType(oRowView.Item(0), String) Dim oResult As String = CType(oRowView.Item(0), String)
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrID Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
End If End If
End Sub End Sub
@ -544,10 +568,19 @@ Public Class frmSearchStart
Private Sub BarButtonStartSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonStartSearch.ItemClick Private Sub BarButtonStartSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonStartSearch.ItemClick
RenewSearchAttributes() RenewSearchAttributes()
Start_Search()
' Minimize the search form, but only if results were found
If Start_Search() Then
MinimizeSearchForm()
' Position Result Window below this window
LastSearchForm.Location = GetResultFormLocation()
LastSearchForm.Size = GetResultFormSize()
End If
End Sub End Sub
Private Sub Start_Search() Private Function Start_Search() As Boolean
Dim oHandle As IOverlaySplashScreenHandle = Nothing Dim oHandle As IOverlaySplashScreenHandle = Nothing
Dim oItemsFound As Boolean = False
Try Try
oHandle = SplashScreenManager.ShowOverlayForm(Me) oHandle = SplashScreenManager.ShowOverlayForm(Me)
@ -587,16 +620,14 @@ Public Class frmSearchStart
Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams) Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams)
oForm.Show() oForm.Show()
' Position Result Window below this window
oForm.Location = GetResultFormLocation()
oForm.Size = GetResultFormSize()
AddHandler oForm.FormClosed, Sub() AddHandler oForm.FormClosed, Sub()
LastSearchForm = Nothing LastSearchForm = Nothing
End Sub End Sub
LastSearchForm = oForm LastSearchForm = oForm
End If End If
oItemsFound = True
Else Else
Display_InfoItem("No results for this searchcombination!", Color.OrangeRed, Color.White) Display_InfoItem("No results for this searchcombination!", Color.OrangeRed, Color.White)
End If End If
@ -605,7 +636,9 @@ Public Class frmSearchStart
Finally Finally
SplashScreenManager.CloseOverlayForm(oHandle) SplashScreenManager.CloseOverlayForm(oHandle)
End Try End Try
End Sub
Return oItemsFound
End Function
Private Function GetResultFormLocation() As Point Private Function GetResultFormLocation() As Point
Dim oX = Location.X Dim oX = Location.X
@ -628,17 +661,24 @@ Public Class frmSearchStart
End If End If
End Sub End Sub
Private Class FilterTimeframe Private Sub MinimizeSearchForm()
Public Property Name As String HeightBeforeMinimizing = Height
Public Property From As Date Height = 200
Public Property [To] As Date
Public Property DisableFilter As Boolean = False BarButtonItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
Public Property CustomFilter As Boolean = False End Sub
Private Sub RestoreSearchForm()
Height = HeightBeforeMinimizing
If LastSearchForm IsNot Nothing Then
LastSearchForm.Location = GetResultFormLocation()
End If
BarButtonItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End Sub
Public Overrides Function ToString() As String
Return Name.ToString
End Function
End Class
Private Sub cmbFilterTimeframe_EditValueChanged(sender As Object, e As EventArgs) Handles cmbFilterTimeframe.EditValueChanged Private Sub cmbFilterTimeframe_EditValueChanged(sender As Object, e As EventArgs) Handles cmbFilterTimeframe.EditValueChanged
Dim oTimeframe As FilterTimeframe = DirectCast(cmbFilterTimeframe.EditValue, FilterTimeframe) Dim oTimeframe As FilterTimeframe = DirectCast(cmbFilterTimeframe.EditValue, FilterTimeframe)
@ -668,4 +708,16 @@ Public Class frmSearchStart
My.UIConfig.SearchForm.Size = Size My.UIConfig.SearchForm.Size = Size
My.UIConfigManager.Save() My.UIConfigManager.Save()
End Sub End Sub
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
RestoreSearchForm()
End Sub
Private Sub BarButtonItem2_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
RestoreSearchForm()
End Sub
Private Sub RibbonControl1_MinimizedRibbonHiding(sender As Object, e As DevExpress.XtraBars.Ribbon.MinimizedRibbonEventArgs) Handles RibbonControl1.MinimizedRibbonHiding
End Sub
End Class End Class