Globi Integration und Suche Abhängig

This commit is contained in:
2020-11-25 17:44:40 +01:00
parent 0dd9788d8f
commit 1638fdc173
24 changed files with 1545 additions and 3796 deletions

View File

@@ -0,0 +1,411 @@
Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraTab
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Public Class ClassControlCreator
Private Const DEFAULT_TEXT = "Bezeichnung definieren"
Private Const DEFAULT_FONT_SIZE As Integer = 10
Private Const DEFAULT_FONT_FAMILY As String = "Arial"
Private Const DEFAULT_FONT_STYLE As FontStyle = FontStyle.Regular
Private Const DEFAULT_COLOR As Integer = 0
Private Const DEFAULT_WIDTH As Integer = 170
Private Const DEFAULT_HEIGHT As Integer = 20
Private Const DEFAULT_WIDTH_GRIDVIEW As Integer = 150
Private Const DEFAULT_HEIGHT_GRIDVIEW As Integer = 150
Public Const PREFIX_TEXTBOX = "TXT"
Public Const PREFIX_LABEL = "LBL"
Public Const PREFIX_CHECKBOX = "CHK"
Public Const PREFIX_COMBOBOX = "CMB"
Public Const PREFIX_DATETIMEPICKER = "DTP"
Public Const PREFIX_DATAGRIDVIEW = "DGV"
Public Const PREFIX_LOOKUP = "LU"
Public Const PREFIX_GRIDCONTROL = "GRID"
Public Const PREFIX_LINE = "LINE"
Public Const PREFIX_BUTTON = "BTN"
Public Shared GridTables As New Dictionary(Of String, DataTable)
Private Logger As Logger
Private Property Form As frmSearchStart
Private Property TabPage As XtraTabPage
Public Class ControlMeta
Public Property IndexName As String
Public Property IndexType As String
Public Property MultipleValues As Boolean = False
End Class
''' <summary>
''' Standard Eigenschaften für alle Controls
''' </summary>
Private Class ControlDBProps
Public Guid As Integer
Public Name As String
Public Location As Point
Public [Font] As Font
Public [Color] As Color
End Class
Public Class ControlMetadata
Public Guid As Integer
Public AttributeID As Integer
Public DependingAttributeID As Integer
Public Multiselect As Boolean
Public AttributeTitle As String
Public AttributeType As String
Public SourceSQL As String
Public DTSource As DataTable
Public MinValue As String
Public MaxValue As String
End Class
Private Shared Function TransformDataRow(pRow As DataRow, pXPosition As Integer, pYPosition As Integer) As ControlDBProps
Dim oxPos As Integer = pXPosition
Dim oYPos As Integer = pYPosition
Dim oGuid As Integer = pRow.Item("GUID")
Dim oName As String = pRow.Item("ATTRIBUTE_TITLE")
Dim oLocation As New Point(oxPos, oYPos)
Return New ControlDBProps() With {
.Guid = oGuid,
.Name = oName,
.Location = oLocation
}
End Function
Public Function CreateBaseControl(pControl As Control, pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As Control
Try
Dim props As ControlDBProps = TransformDataRow(pAttributeRow, pXPosition, pYPosition)
Dim oSourceSQL As String = pAttributeRow.Item("SOURCE_SQL").ToString
oSourceSQL = oSourceSQL.Replace("@USER_LANGUAGE", My.Application.User.Language)
oSourceSQL = oSourceSQL.Replace("@pUSER_ID", My.Application.User.UserId)
oSourceSQL = oSourceSQL.Replace("@RESULT_TITLE", pAttributeRow.Item("ATTRIBUTE_TITLE").ToString)
Dim oDTSource As DataTable
'If pAttributeRow.Item("DEPENDING_ATTRIBUTE1") = 0 Then
If Utils.NotNull(oSourceSQL, String.Empty) <> String.Empty Then
oDTSource = My.DatabaseIDB.GetDatatable(oSourceSQL)
End If
'End If
Dim oMinValue As String = ""
Dim oMaxValue As String = ""
If Not IsNothing(oDTSource) Then
oMinValue = oDTSource.Rows(0).Item(0)
oMaxValue = oDTSource.Rows(oDTSource.Rows.Count - 1).Item(0)
End If
Dim oMetadata = New ControlMetadata() With {
.Guid = CType(pAttributeRow.Item("GUID"), Integer),
.AttributeID = CType(pAttributeRow.Item("ATTRIBUTE_ID"), Integer),
.DTSource = CType(oDTSource, DataTable),
.AttributeTitle = CType(pAttributeRow.Item("ATTRIBUTE_TITLE"), String),
.Multiselect = CType(pAttributeRow.Item("MULTISELECT"), Boolean),
.SourceSQL = oSourceSQL,
.MinValue = oMinValue,
.MaxValue = oMaxValue
}
pControl.Tag = oMetadata
pControl.Name = props.Name
pControl.Location = props.Location
pControl.Font = props.Font
pControl.ForeColor = props.Color
Return pControl
Catch ex As Exception
Logger.Error(ex)
End Try
End Function
Public Sub New(pTabPage As XtraTabPage, pForm As frmSearchStart)
Me.Form = pForm
Me.TabPage = pTabPage
Logger = My.LogConfig.GetLogger()
End Sub
Public Function CreateExistingCheckbox(pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As CheckBox
Dim oCheckBox As CheckBox = CType(CreateBaseControl(New CheckBox(), pAttributeRow, pXPosition, pYPosition), CheckBox)
oCheckBox.AutoSize = True
Try
oCheckBox.Text = pAttributeRow.Item("ATTRIBUTE_TITLE").ToString
Catch ex As Exception
oCheckBox.Text = "NO CAPTION AVAILABLE"
End Try
oCheckBox.CheckState = CheckState.Indeterminate
Return oCheckBox
End Function
Public Function CreateExistingDatepicker(pAttributeRow As DataRow, pXPosition As Integer, pYPosition As Integer) As DateEdit
Dim oDateControl As DateEdit = CType(CreateBaseControl(New DateEdit(), pAttributeRow, pXPosition, pYPosition), DateEdit)
oDateControl.Size = New Size(100, 20)
oDateControl.Properties.HighlightTodayCell = True
oDateControl.Properties.ShowWeekNumbers = True
oDateControl.Properties.ShowClear = True
Try
Dim oMinDate As Date = DirectCast(oDateControl.Tag, ControlMetadata).MinValue
oDateControl.Properties.MinValue = oMinDate
Catch ex As Exception
End Try
Try
Dim oMaxDate As Date = DirectCast(oDateControl.Tag, ControlMetadata).MaxValue
oDateControl.Properties.MaxValue = oMaxDate
Catch ex As Exception
End Try
Return oDateControl
End Function
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 oDatatable As New DataTable
Dim oView As GridView
oWatch1.Stop()
oWatch1 = New Watch("Configuring Grid")
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.Appearance.EvenRow.BackColor = Color.PaleTurquoise
oView.OptionsBehavior.Editable = False
oView.OptionsBehavior.ReadOnly = True
oView.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False
oView.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.False
oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None
oView.OptionsView.ShowAutoFilterRow = True
oView.OptionsView.EnableAppearanceEvenRow = True
oView.OptionsView.ShowGroupPanel = False
If CType(pAttributeRow.Item("MULTISELECT"), Boolean) Then
oView.OptionsSelection.MultiSelect = True
oView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect
oView.OptionsSelection.CheckBoxSelectorColumnWidth = 20
oMyNewGridControl.Size = New Size(CInt(pAttributeRow.Item("WIDTH") + 50), DEFAULT_HEIGHT_GRIDVIEW)
End If
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()
Dim oDTSource As DataTable = DirectCast(oMyNewGridControl.Tag, ControlMetadata).DTSource
oMyNewGridControl.DataSource = oDTSource
oView.PopulateColumns()
oView.FocusInvalidRow()
'oMyNewGridControl.RefreshDataSource()
'oMyNewGridControl.ForceInitialize()
oWatch1.Stop()
Return oMyNewGridControl
End Function
Public Sub DeselectGridControl(BaseControl As Control)
Try
DirectCast(DirectCast(BaseControl, GridControl).MainView, GridView).FocusInvalidRow()
Catch ex As Exception
Logger.Error(ex)
End Try
End Sub
Public Function AddCheckBox(pIndexname As String, y As Integer, pVorbelegung As String, pCaption As String) As CheckBox
Try
Dim oValue As Boolean = False
Dim oCheckbox As New CheckBox With {
.Name = "chk" & pIndexname,
.Size = New Size(100, 27),
.Location = New Point(11, y),
.Tag = New ControlMeta() With {
.IndexName = pIndexname,
.IndexType = "BOOLEAN"
}
}
If pCaption <> "" Then
oCheckbox.Text = pCaption
oCheckbox.Size = New Size(CInt(pCaption.Length * 15), 27)
End If
If Boolean.TryParse(pVorbelegung, oValue) = False Then
If pVorbelegung = "1" Or pVorbelegung = "0" Then
oCheckbox.Checked = CBool(pVorbelegung)
Else
oCheckbox.Checked = False
End If
Else
oCheckbox.Checked = oValue
End If
AddHandler oCheckbox.CheckedChanged, AddressOf Checkbox_CheckedChanged
Return oCheckbox
Catch ex As Exception
Logger.Info("Unhandled Exception in AddCheckBox: " & ex.Message)
Logger.Error(ex.Message)
Return Nothing
End Try
End Function
Public Sub Checkbox_CheckedChanged(sender As CheckBox, e As EventArgs)
'PrepareDependingControl(sender)
End Sub
Function AddCombobox(indexname As String, y As Integer) As ComboBoxEdit
Dim oCombobox As New ComboBoxEdit
oCombobox.Name = "cmb" & indexname
oCombobox.AutoSize = True
oCombobox.Size = New Size(300, 27)
oCombobox.Location = New Point(11, y)
oCombobox.Tag = New ControlMeta() With {
.IndexName = indexname
}
AddHandler oCombobox.SelectedIndexChanged, AddressOf OncmbSIndexChanged
AddHandler oCombobox.GotFocus, AddressOf OncmbGotFocus
AddHandler oCombobox.LostFocus, AddressOf OncmbLostFocus
Return oCombobox
End Function
Public Sub OncmbGotFocus(sender As Object, e As System.EventArgs)
Dim oCombobox As ComboBoxEdit = CType(sender, ComboBoxEdit)
oCombobox.BackColor = Color.Lime
End Sub
Public Sub OncmbLostFocus(sender As Object, e As System.EventArgs)
Dim oCombobox As ComboBoxEdit = CType(sender, ComboBoxEdit)
oCombobox.BackColor = Color.White
End Sub
Public Sub OncmbSIndexChanged(sender As System.Object, e As System.EventArgs)
If Form.DataLoaded = False Then
Exit Sub
End If
Dim oCombobox As ComboBoxEdit = CType(sender, ComboBoxEdit)
If oCombobox.SelectedIndex <> -1 Then
If oCombobox.Text.Length > 15 Then
Dim g As Graphics = oCombobox.CreateGraphics
oCombobox.Width = CInt(g.MeasureString(oCombobox.Text, oCombobox.Font).Width + 30)
g.Dispose()
End If
SendKeys.Send("{TAB}")
End If
End Sub
Public Function AddTextBox(pAttrName As String, y As Integer, text As String, pAttrDataType As String) As DevExpress.XtraEditors.TextEdit
Dim oEdit As New TextEdit With {
.Name = "txt" & pAttrName,
.Size = New Size(260, 27),
.Location = New Point(11, y),
.Tag = New ControlMeta() With {
.IndexName = pAttrName,
.IndexType = pAttrDataType
}
}
Select Case pAttrDataType
Case "INTEGER"
oEdit.Properties.Mask.MaskType = Mask.MaskType.Numeric
oEdit.Properties.Mask.EditMask = "d"
Console.WriteLine()
End Select
If text IsNot Nothing Then
oEdit.Text = text
oEdit.SelectAll()
End If
AddHandler oEdit.GotFocus, AddressOf OnTextBoxFocus
AddHandler oEdit.LostFocus, AddressOf OnTextBoxLostFocus
AddHandler oEdit.KeyUp, AddressOf OnTextBoxKeyUp
AddHandler oEdit.TextChanged, AddressOf OnTextBoxTextChanged
Return oEdit
End Function
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
Dim oTextbox As TextEdit = CType(sender, TextEdit)
oTextbox.BackColor = Color.Lime
oTextbox.SelectAll()
End Sub
Public Sub OnTextBoxTextChanged(sender As Object, e As EventArgs)
Dim oTextbox As TextEdit = CType(sender, TextEdit)
Using oGraphics As Graphics = oTextbox.CreateGraphics()
oTextbox.Width = CInt(oGraphics.MeasureString(oTextbox.Text, oTextbox.Font).Width + 15)
End Using
End Sub
Public Sub OnTextBoxLostFocus(sender As Object, e As EventArgs)
Dim oTextbox As TextEdit = CType(sender, TextEdit)
oTextbox.BackColor = Color.White
End Sub
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
Dim oTextbox As TextEdit = CType(sender, TextEdit)
If oTextbox.Text = String.Empty Then
Exit Sub
End If
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
'PrepareDependingControl(oTextbox)
End If
If (e.KeyCode = Keys.Return) Then
SendKeys.Send("{TAB}")
End If
End Sub
Public Function AddDateTimePicker(indexname As String, y As Integer, DataType As String) As DateEdit
Dim oPicker As New DateEdit With {
.Name = "dtp" & indexname,
.Size = New Size(260, 27),
.Location = New Point(11, y),
.Tag = New ControlMeta() With {
.IndexName = indexname,
.IndexType = DataType
}
}
oPicker.Properties.AppearanceFocused.BackColor = Color.Lime
Return oPicker
End Function
End Class

View File

@@ -0,0 +1,247 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmSearchPredefined
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSearchPredefined))
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
Me.ViewMain = New DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView()
Me.gridBand1 = New DevExpress.XtraGrid.Views.BandedGrid.GridBand()
Me.BandedGridColumn2 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.BandedGridColumn3 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.BandedGridColumn4 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.BandedGridColumn5 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.BandedGridColumn6 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.RepositoryItemDateEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemDateEdit()
Me.BandedGridColumn1 = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.SvgImageCollection = New DevExpress.Utils.SvgImageCollection(Me.components)
CType(Me.RibbonControl1,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.GridControl1,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.ViewMain,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.RepositoryItemDateEdit1,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.RepositoryItemDateEdit1.CalendarTimeProperties,System.ComponentModel.ISupportInitialize).BeginInit
CType(Me.SvgImageCollection,System.ComponentModel.ISupportInitialize).BeginInit
Me.SuspendLayout
'
'RibbonControl1
'
Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 2
Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.Size = New System.Drawing.Size(564, 159)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
'
'BarButtonItem1
'
Me.BarButtonItem1.Caption = "Neue Suche"
Me.BarButtonItem1.Id = 1
Me.BarButtonItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem1.ImageOptions.SvgImage"),DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem1.Name = "BarButtonItem1"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2})
Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Start"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
Me.RibbonPageGroup1.Text = "Suchfunktionen"
'
'RibbonPageGroup2
'
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
'
'RibbonStatusBar1
'
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 611)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(564, 22)
'
'RibbonPage2
'
Me.RibbonPage2.Name = "RibbonPage2"
Me.RibbonPage2.Text = "RibbonPage2"
'
'GridControl1
'
Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.GridControl1.Location = New System.Drawing.Point(0, 159)
Me.GridControl1.MainView = Me.ViewMain
Me.GridControl1.MenuManager = Me.RibbonControl1
Me.GridControl1.Name = "GridControl1"
Me.GridControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemDateEdit1})
Me.GridControl1.Size = New System.Drawing.Size(564, 452)
Me.GridControl1.TabIndex = 2
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.ViewMain})
'
'ViewMain
'
Me.ViewMain.Bands.AddRange(New DevExpress.XtraGrid.Views.BandedGrid.GridBand() {Me.gridBand1})
Me.ViewMain.Columns.AddRange(New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() {Me.BandedGridColumn1, Me.BandedGridColumn2, Me.BandedGridColumn3, Me.BandedGridColumn4, Me.BandedGridColumn5, Me.BandedGridColumn6})
Me.ViewMain.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFullFocus
Me.ViewMain.GridControl = Me.GridControl1
Me.ViewMain.Name = "ViewMain"
Me.ViewMain.OptionsBehavior.Editable = false
Me.ViewMain.OptionsBehavior.ReadOnly = true
Me.ViewMain.OptionsView.ShowBands = false
Me.ViewMain.OptionsView.ShowGroupPanel = false
Me.ViewMain.OptionsView.ShowIndicator = false
Me.ViewMain.OptionsView.ShowVerticalLines = DevExpress.Utils.DefaultBoolean.[False]
Me.ViewMain.RowSeparatorHeight = 10
'
'gridBand1
'
Me.gridBand1.Caption = "gridBand1"
Me.gridBand1.Columns.Add(Me.BandedGridColumn2)
Me.gridBand1.Columns.Add(Me.BandedGridColumn3)
Me.gridBand1.Columns.Add(Me.BandedGridColumn4)
Me.gridBand1.Columns.Add(Me.BandedGridColumn5)
Me.gridBand1.Columns.Add(Me.BandedGridColumn6)
Me.gridBand1.Name = "gridBand1"
Me.gridBand1.VisibleIndex = 0
Me.gridBand1.Width = 336
'
'BandedGridColumn2
'
Me.BandedGridColumn2.Caption = "Title"
Me.BandedGridColumn2.FieldName = "Title"
Me.BandedGridColumn2.Name = "BandedGridColumn2"
Me.BandedGridColumn2.Visible = true
Me.BandedGridColumn2.Width = 336
'
'BandedGridColumn3
'
Me.BandedGridColumn3.Caption = "Results"
Me.BandedGridColumn3.FieldName = "Results"
Me.BandedGridColumn3.Name = "BandedGridColumn3"
Me.BandedGridColumn3.RowIndex = 1
Me.BandedGridColumn3.Visible = true
Me.BandedGridColumn3.Width = 84
'
'BandedGridColumn4
'
Me.BandedGridColumn4.Caption = "Changes"
Me.BandedGridColumn4.FieldName = "Changes"
Me.BandedGridColumn4.Name = "BandedGridColumn4"
Me.BandedGridColumn4.RowIndex = 1
Me.BandedGridColumn4.Visible = true
Me.BandedGridColumn4.Width = 84
'
'BandedGridColumn5
'
Me.BandedGridColumn5.Caption = "Overdue"
Me.BandedGridColumn5.FieldName = "Overdue"
Me.BandedGridColumn5.Name = "BandedGridColumn5"
Me.BandedGridColumn5.RowIndex = 1
Me.BandedGridColumn5.Visible = true
Me.BandedGridColumn5.Width = 84
'
'BandedGridColumn6
'
Me.BandedGridColumn6.Caption = "LastChange"
Me.BandedGridColumn6.ColumnEdit = Me.RepositoryItemDateEdit1
Me.BandedGridColumn6.FieldName = "LastChange"
Me.BandedGridColumn6.Name = "BandedGridColumn6"
Me.BandedGridColumn6.RowIndex = 1
Me.BandedGridColumn6.Visible = true
Me.BandedGridColumn6.Width = 84
'
'RepositoryItemDateEdit1
'
Me.RepositoryItemDateEdit1.AutoHeight = false
Me.RepositoryItemDateEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemDateEdit1.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemDateEdit1.Name = "RepositoryItemDateEdit1"
'
'BandedGridColumn1
'
Me.BandedGridColumn1.Caption = "UserID"
Me.BandedGridColumn1.FieldName = "UserID"
Me.BandedGridColumn1.Name = "BandedGridColumn1"
Me.BandedGridColumn1.Visible = true
'
'SvgImageCollection
'
Me.SvgImageCollection.Add("green_arrow_up", "image://svgimages/icon builder/actions_arrow4up.svg")
Me.SvgImageCollection.Add("warning", "image://svgimages/outlook inspired/highimportance.svg")
'
'frmPreSearch
'
Me.AllowFormGlass = DevExpress.Utils.DefaultBoolean.[True]
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 13!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(564, 633)
Me.Controls.Add(Me.GridControl1)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.SvgImage = CType(resources.GetObject("frmPreSearch.IconOptions.SvgImage"),DevExpress.Utils.Svg.SvgImage)
Me.Name = "frmPreSearch"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "Vordefinierte Suchen"
CType(Me.RibbonControl1,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.GridControl1,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.ViewMain,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.RepositoryItemDateEdit1.CalendarTimeProperties,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.RepositoryItemDateEdit1,System.ComponentModel.ISupportInitialize).EndInit
CType(Me.SvgImageCollection,System.ComponentModel.ISupportInitialize).EndInit
Me.ResumeLayout(false)
Me.PerformLayout
End Sub
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
Friend WithEvents ViewMain As DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView
Friend WithEvents SvgImageCollection As DevExpress.Utils.SvgImageCollection
Friend WithEvents BandedGridColumn2 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents BandedGridColumn3 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents BandedGridColumn4 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents BandedGridColumn5 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents BandedGridColumn1 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents gridBand1 As DevExpress.XtraGrid.Views.BandedGrid.GridBand
Friend WithEvents BandedGridColumn6 As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents RepositoryItemDateEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemDateEdit
End Class

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="DevExpress.Data.v19.2" name="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<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
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFQEAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku
QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC
MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRW5hYmxlU2Vh
cmNoIj4NCiAgICA8cGF0aCBkPSJNMTQuNSwxNy44QzEwLjgsMTcuMSw4LDEzLjksOCwxMGMwLTQuNCwz
LjYtOCw4LThzOCwzLjYsOCw4YzAsMS41LTAuNCwyLjgtMS4xLDRjMCwwLDAuMSwwLDAuMSwwICAgYzAu
NywwLDEuNCwwLjEsMi4xLDAuMmMwLjYtMS4zLDAuOS0yLjcsMC45LTQuMmMwLTUuNS00LjUtMTAtMTAt
MTBDMTAuNSwwLDYsNC41LDYsMTBjMCwyLjEsMC43LDQuMSwxLjgsNS43bC03LjUsNy42ICAgYy0wLjQs
MC4zLTAuNCwwLjksMCwxLjNsMS4yLDEuMmMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsNy42LTcuNmMwLjks
MC42LDEuOSwxLjEsMi45LDEuNEMxMy42LDE5LDE0LDE4LjQsMTQuNSwxNy44eiIgY2xhc3M9IkJsdWUi
IC8+DQogICAgPHBhdGggZD0iTTIzLDE2Yy00LjQsMC04LjEsMy05LDdjMC45LDQsNC42LDcsOSw3YzQu
NCwwLDguMS0zLDktN0MzMS4xLDE5LDI3LjQsMTYsMjMsMTZ6IE0yMywyOGMtMy4zLDAtNi4xLTItNy01
ICAgYzAuOS0zLDMuNy01LDctNXM2LjEsMiw3LDVDMjkuMSwyNiwyNi4zLDI4LDIzLDI4eiBNMjMsMjZj
LTEuNywwLTMtMS4zLTMtM3MxLjMtMywzLTNzMywxLjMsMywzUzI0LjcsMjYsMjMsMjZ6IiBjbGFzcz0i
QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs=
</value>
</data>
<metadata name="SvgImageCollection.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="frmPreSearch.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAPcCAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iRmluZCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIg
MzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cjwvc3R5
bGU+DQogIDxwYXRoIGQ9Ik0yOS41LDE5LjdMMjkuNSwxOS43TDI5LjUsMTkuN0MyOS41LDE5LjcsMjku
NSwxOS43LDI5LjUsMTkuN0wyMy44LDZsMCwwYy0wLjQtMS4yLTEuNS0yLTIuOC0yICBjLTEuNywwLTMs
MS4zLTMsM3YzaC00VjdjMC0xLjctMS4zLTMtMy0zQzkuNyw0LDguNiw0LjksOC4yLDZsMCwwTDIuNSwx
OS43YzAsMCwwLDAsMCwwbDAsMGgwQzIuMiwyMC40LDIsMjEuMiwyLDIyICBjMCwzLjMsMi43LDYsNiw2
czYtMi43LDYtNnYtNGg0djRjMCwzLjMsMi43LDYsNiw2czYtMi43LDYtNkMzMCwyMS4yLDI5LjgsMjAu
NCwyOS41LDE5Ljd6IE04LDI2Yy0yLjIsMC00LTEuOC00LTRzMS44LTQsNC00ICBzNCwxLjgsNCw0UzEw
LjIsMjYsOCwyNnogTTI0LDI2Yy0yLjIsMC00LTEuOC00LTRzMS44LTQsNC00czQsMS44LDQsNFMyNi4y
LDI2LDI0LDI2eiIgY2xhc3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw==
</value>
</data>
</root>

View File

@@ -0,0 +1,100 @@
Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid
Imports DevExpress.XtraBars.Ribbon
Imports DigitalData.Modules.Logging
Public Class frmSearchPredefined
Private Logger As Logger
Public Sub New()
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
Logger = My.LogConfig.GetLogger()
End Sub
Private Sub frmPreSearch_Load(sender As Object, e As EventArgs) Handles Me.Load
GridControl1.DataSource = LoadSearches()
Dim oChangesColumn = ViewMain.Columns.Item("Changes")
Dim oOverdueColumn = ViewMain.Columns.Item("Overdue")
Dim oResultsColumn = ViewMain.Columns.Item("Results")
Dim oTitleColumn = ViewMain.Columns.Item("Title")
Dim oUserIdColumn = ViewMain.Columns.Item("UserID")
Dim oLastChangeColumn = ViewMain.Columns.Item("LastChange")
Dim oChangesRule = GetChangesFormatRule()
oChangesRule.Column = oChangesColumn
Dim oOverdueRule = GetOverdueFormatRule()
oOverdueRule.Column = oOverdueColumn
Dim oResultsRule = GetResultsFormatRule()
oResultsRule.Column = oResultsColumn
ViewMain.FormatRules.AddRange({oChangesRule, oResultsRule, oOverdueRule})
oTitleColumn.AppearanceCell.FontStyleDelta = FontStyle.Bold
oTitleColumn.AppearanceCell.FontSizeDelta = 1
End Sub
Private Function GetResultsFormatRule() As GridFormatRule
Dim gridFormatRule As New GridFormatRule()
Dim formatConditionRuleDataBar As New FormatConditionRuleDataBar With {
.PredefinedName = "Yellow",
.AutomaticType = FormatConditionAutomaticType.ZeroBased
}
gridFormatRule.Rule = formatConditionRuleDataBar
Return gridFormatRule
End Function
Private Function GetOverdueFormatRule() As GridFormatRule
Dim oFormatRule As New GridFormatRule()
Dim oRule As New FormatConditionRuleIconSet With {
.IconSet = New FormatConditionIconSet()
}
Dim oIconSet As FormatConditioniconset = oRule.IconSet
oIconSet.ValueType = FormatConditionValueType.Number
Dim oIcon1 As New FormatConditioniconseticon() With {
.Icon = SvgImageCollection.GetImage("warning"),
.Value = 0,
.ValueComparison = FormatConditionComparisonType.Greater
}
oIconSet.Icons.AddRange({oIcon1})
oFormatRule.Rule = oRule
Return oFormatRule
End Function
Private Function GetChangesFormatRule() As GridFormatRule
Dim oFormatRule As New GridFormatRule()
Dim oRule As New FormatConditionRuleIconSet With {
.IconSet = New FormatConditionIconSet()
}
Dim oIconSet As FormatConditioniconset = oRule.IconSet
oIconSet.ValueType = FormatConditionValueType.Number
Dim oIcon1 As New FormatConditioniconseticon() With {
.Icon = SvgImageCollection.GetImage("green_arrow_up"),
.Value = 2,
.ValueComparison = FormatConditionComparisonType.Greater
}
oIconSet.Icons.AddRange({oIcon1})
oFormatRule.Rule = oRule
Return oFormatRule
End Function
Private Function LoadSearches() As DataTable
Dim oSQL = $"SELECT * FROM VWIDB_SEARCH_LANDING"
Dim oDTLanding As DataTable = My.DatabaseIDB.GetDatatable(oSQL)
Return oDTLanding
End Function
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
End Sub
End Class

View File

@@ -0,0 +1,562 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmSearchStart
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
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))
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonNewSearch = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonSaveSearch = New DevExpress.XtraBars.BarButtonItem()
Me.BarHeaderItem1 = New DevExpress.XtraBars.BarHeaderItem()
Me.BarEditItem1 = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemRadioGroup1 = New DevExpress.XtraEditors.Repository.RepositoryItemRadioGroup()
Me.BarButtonClearSearch = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.BarEditItem2 = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
Me.BarStaticItemInfo = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonStartSearch = New DevExpress.XtraBars.BarButtonItem()
Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem()
Me.txtFilterFrom = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemDateEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemDateEdit()
Me.txtFilterTo = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemDateEdit2 = New DevExpress.XtraEditors.Repository.RepositoryItemDateEdit()
Me.cmbFilterTimeframe = New DevExpress.XtraBars.BarEditItem()
Me.RepositoryItemComboBox2 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
Me.BarCheckboxOpenSearchInSameWindow = New DevExpress.XtraBars.BarCheckItem()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroupFunctions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupProfiles = 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.RepositoryItemTimeSpanEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTimeSpanEdit()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.pnlProfileChoose = New System.Windows.Forms.Panel()
Me.cmbProfile = New System.Windows.Forms.ComboBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl()
Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage3 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage4 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage5 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage6 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage7 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage8 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage9 = New DevExpress.XtraTab.XtraTabPage()
Me.XtraTabPage10 = New DevExpress.XtraTab.XtraTabPage()
Me.ContextMenuStripSearchTerms = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.tsmOperator = New System.Windows.Forms.ToolStripMenuItem()
Me.BracketLeftToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.KlammerRechtsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.KlammerEntfernenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SplitContainerControlSearch = New DevExpress.XtraEditors.SplitContainerControl()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemRadioGroup1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemDateEdit1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemDateEdit1.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemDateEdit2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemDateEdit2.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemComboBox2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemTimeSpanEdit1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlProfileChoose.SuspendLayout()
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.XtraTabControl1.SuspendLayout()
Me.ContextMenuStripSearchTerms.SuspendLayout()
CType(Me.SplitContainerControlSearch, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControlSearch.SuspendLayout()
Me.SuspendLayout()
'
'SplashScreenManager
'
SplashScreenManager.ClosingDelay = 500
'
'RibbonControl1
'
Me.RibbonControl1.AutoSizeItems = True
Me.RibbonControl1.CaptionBarItemLinks.Add(Me.BarButtonItem2)
Me.RibbonControl1.ExpandCollapseItem.Id = 0
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.MaxItemId = 24
Me.RibbonControl1.Name = "RibbonControl1"
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.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
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
'
'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
'
Me.BarButtonNewSearch.Caption = "Neue Suche"
Me.BarButtonNewSearch.Id = 1
Me.BarButtonNewSearch.ImageOptions.Image = CType(resources.GetObject("BarButtonNewSearch.ImageOptions.Image"), System.Drawing.Image)
Me.BarButtonNewSearch.ImageOptions.LargeImage = CType(resources.GetObject("BarButtonNewSearch.ImageOptions.LargeImage"), System.Drawing.Image)
Me.BarButtonNewSearch.Name = "BarButtonNewSearch"
'
'BarButtonSaveSearch
'
Me.BarButtonSaveSearch.Caption = "Suchprofil speichern"
Me.BarButtonSaveSearch.Id = 2
Me.BarButtonSaveSearch.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonSaveSearch.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonSaveSearch.Name = "BarButtonSaveSearch"
'
'BarHeaderItem1
'
Me.BarHeaderItem1.Caption = "BarHeaderItem1"
Me.BarHeaderItem1.Id = 3
Me.BarHeaderItem1.Name = "BarHeaderItem1"
'
'BarEditItem1
'
Me.BarEditItem1.Caption = "BarEditItem1"
Me.BarEditItem1.Edit = Me.RepositoryItemRadioGroup1
Me.BarEditItem1.Id = 4
Me.BarEditItem1.Name = "BarEditItem1"
'
'RepositoryItemRadioGroup1
'
Me.RepositoryItemRadioGroup1.Name = "RepositoryItemRadioGroup1"
'
'BarButtonClearSearch
'
Me.BarButtonClearSearch.Caption = "Suche leeren"
Me.BarButtonClearSearch.Id = 5
Me.BarButtonClearSearch.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonClearSearch.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonClearSearch.Name = "BarButtonClearSearch"
'
'BarButtonItem3
'
Me.BarButtonItem3.Caption = "BarButtonItem3"
Me.BarButtonItem3.Id = 6
Me.BarButtonItem3.Name = "BarButtonItem3"
'
'BarEditItem2
'
Me.BarEditItem2.Edit = Me.RepositoryItemComboBox1
Me.BarEditItem2.EditWidth = 100
Me.BarEditItem2.Id = 7
Me.BarEditItem2.Name = "BarEditItem2"
'
'RepositoryItemComboBox1
'
Me.RepositoryItemComboBox1.AutoHeight = False
Me.RepositoryItemComboBox1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemComboBox1.Name = "RepositoryItemComboBox1"
'
'BarStaticItemInfo
'
Me.BarStaticItemInfo.Id = 8
Me.BarStaticItemInfo.Name = "BarStaticItemInfo"
'
'BarButtonStartSearch
'
Me.BarButtonStartSearch.Caption = "Finden (F2)"
Me.BarButtonStartSearch.Id = 9
Me.BarButtonStartSearch.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonStartSearch.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonStartSearch.Name = "BarButtonStartSearch"
'
'BarStaticItem1
'
Me.BarStaticItem1.Caption = "Suchen"
Me.BarStaticItem1.Id = 12
Me.BarStaticItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarStaticItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarStaticItem1.Name = "BarStaticItem1"
Me.BarStaticItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
'
'txtFilterFrom
'
Me.txtFilterFrom.Caption = "Von"
Me.txtFilterFrom.Edit = Me.RepositoryItemDateEdit1
Me.txtFilterFrom.EditWidth = 100
Me.txtFilterFrom.Id = 15
Me.txtFilterFrom.Name = "txtFilterFrom"
'
'RepositoryItemDateEdit1
'
Me.RepositoryItemDateEdit1.AutoHeight = False
Me.RepositoryItemDateEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemDateEdit1.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemDateEdit1.Name = "RepositoryItemDateEdit1"
Me.RepositoryItemDateEdit1.NullDate = ""
'
'txtFilterTo
'
Me.txtFilterTo.Caption = "Bis"
Me.txtFilterTo.Edit = Me.RepositoryItemDateEdit2
Me.txtFilterTo.EditWidth = 100
Me.txtFilterTo.Id = 16
Me.txtFilterTo.Name = "txtFilterTo"
'
'RepositoryItemDateEdit2
'
Me.RepositoryItemDateEdit2.AutoHeight = False
Me.RepositoryItemDateEdit2.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemDateEdit2.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemDateEdit2.Name = "RepositoryItemDateEdit2"
Me.RepositoryItemDateEdit2.NullDate = ""
'
'cmbFilterTimeframe
'
Me.cmbFilterTimeframe.Caption = "Zeitraum"
Me.cmbFilterTimeframe.Edit = Me.RepositoryItemComboBox2
Me.cmbFilterTimeframe.EditWidth = 100
Me.cmbFilterTimeframe.Id = 17
Me.cmbFilterTimeframe.Name = "cmbFilterTimeframe"
'
'RepositoryItemComboBox2
'
Me.RepositoryItemComboBox2.AutoHeight = False
Me.RepositoryItemComboBox2.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemComboBox2.Name = "RepositoryItemComboBox2"
'
'BarCheckboxOpenSearchInSameWindow
'
Me.BarCheckboxOpenSearchInSameWindow.Caption = "Ergebnis in gleichem Fenster öffnen"
Me.BarCheckboxOpenSearchInSameWindow.Id = 21
Me.BarCheckboxOpenSearchInSameWindow.ImageOptions.SvgImage = CType(resources.GetObject("BarCheckboxOpenSearchInSameWindow.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
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
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupFunctions, Me.RibbonPageGroupProfiles, Me.RibbonPageGroupFilter, Me.RibbonPageGroupSettings})
Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Start"
'
'RibbonPageGroupFunctions
'
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonStartSearch)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonNewSearch)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonClearSearch)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonSaveSearch)
Me.RibbonPageGroupFunctions.Name = "RibbonPageGroupFunctions"
Me.RibbonPageGroupFunctions.Text = "Suchfunktionen"
'
'RibbonPageGroupProfiles
'
Me.RibbonPageGroupProfiles.ItemLinks.Add(Me.BarStaticItem1)
Me.RibbonPageGroupProfiles.ItemLinks.Add(Me.BarEditItem2)
Me.RibbonPageGroupProfiles.Name = "RibbonPageGroupProfiles"
Me.RibbonPageGroupProfiles.Text = "Auswahl Suche"
'
'RibbonPageGroupFilter
'
Me.RibbonPageGroupFilter.ItemLinks.Add(Me.cmbFilterTimeframe)
Me.RibbonPageGroupFilter.ItemLinks.Add(Me.txtFilterFrom)
Me.RibbonPageGroupFilter.ItemLinks.Add(Me.txtFilterTo)
Me.RibbonPageGroupFilter.Name = "RibbonPageGroupFilter"
Me.RibbonPageGroupFilter.Text = "Filter"
'
'RibbonPageGroupSettings
'
Me.RibbonPageGroupSettings.ItemLinks.Add(Me.BarCheckboxOpenSearchInSameWindow)
Me.RibbonPageGroupSettings.Name = "RibbonPageGroupSettings"
Me.RibbonPageGroupSettings.Text = "Sucheinstellungen"
'
'RepositoryItemTextEdit1
'
Me.RepositoryItemTextEdit1.AutoHeight = False
Me.RepositoryItemTextEdit1.Name = "RepositoryItemTextEdit1"
'
'RepositoryItemTimeSpanEdit1
'
Me.RepositoryItemTimeSpanEdit1.AutoHeight = False
Me.RepositoryItemTimeSpanEdit1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.RepositoryItemTimeSpanEdit1.Name = "RepositoryItemTimeSpanEdit1"
'
'RibbonStatusBar1
'
Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItemInfo)
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 455)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(1020, 22)
'
'pnlProfileChoose
'
Me.pnlProfileChoose.BackColor = System.Drawing.Color.Transparent
Me.pnlProfileChoose.Controls.Add(Me.cmbProfile)
Me.pnlProfileChoose.Controls.Add(Me.Label1)
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.Location = New System.Drawing.Point(0, 131)
Me.pnlProfileChoose.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.pnlProfileChoose.Name = "pnlProfileChoose"
Me.pnlProfileChoose.Size = New System.Drawing.Size(1020, 57)
Me.pnlProfileChoose.TabIndex = 5
'
'cmbProfile
'
Me.cmbProfile.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cmbProfile.DisplayMember = "DOKART_ID"
Me.cmbProfile.FormattingEnabled = True
Me.cmbProfile.Location = New System.Drawing.Point(3, 23)
Me.cmbProfile.Name = "cmbProfile"
Me.cmbProfile.Size = New System.Drawing.Size(1015, 21)
Me.cmbProfile.TabIndex = 2
Me.cmbProfile.ValueMember = "DOKART_ID"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Label1.Location = New System.Drawing.Point(3, 3)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(131, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Bitte wählen Sie ein Profil:"
'
'XtraTabControl1
'
Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.XtraTabControl1.HeaderLocation = DevExpress.XtraTab.TabHeaderLocation.Bottom
Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0)
Me.XtraTabControl1.MultiLine = DevExpress.Utils.DefaultBoolean.[False]
Me.XtraTabControl1.Name = "XtraTabControl1"
Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1
Me.XtraTabControl1.Size = New System.Drawing.Size(1020, 267)
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})
'
'XtraTabPage1
'
Me.XtraTabPage1.Name = "XtraTabPage1"
Me.XtraTabPage1.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage1.Text = "Search#1"
'
'XtraTabPage2
'
Me.XtraTabPage2.Name = "XtraTabPage2"
Me.XtraTabPage2.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage2.Text = "Search#2"
'
'XtraTabPage3
'
Me.XtraTabPage3.Name = "XtraTabPage3"
Me.XtraTabPage3.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage3.Text = "Search#3"
'
'XtraTabPage4
'
Me.XtraTabPage4.Name = "XtraTabPage4"
Me.XtraTabPage4.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage4.Text = "Search#4"
'
'XtraTabPage5
'
Me.XtraTabPage5.Name = "XtraTabPage5"
Me.XtraTabPage5.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage5.Text = "Search#5"
'
'XtraTabPage6
'
Me.XtraTabPage6.Name = "XtraTabPage6"
Me.XtraTabPage6.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage6.Text = "Search#6"
'
'XtraTabPage7
'
Me.XtraTabPage7.Name = "XtraTabPage7"
Me.XtraTabPage7.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage7.Text = "Search#7"
'
'XtraTabPage8
'
Me.XtraTabPage8.Name = "XtraTabPage8"
Me.XtraTabPage8.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage8.Text = "Search#8"
'
'XtraTabPage9
'
Me.XtraTabPage9.Name = "XtraTabPage9"
Me.XtraTabPage9.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage9.Text = "Search#9"
'
'XtraTabPage10
'
Me.XtraTabPage10.Name = "XtraTabPage10"
Me.XtraTabPage10.Size = New System.Drawing.Size(1018, 244)
Me.XtraTabPage10.Text = "Search#10"
'
'ContextMenuStripSearchTerms
'
Me.ContextMenuStripSearchTerms.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmOperator, Me.BracketLeftToolStripMenuItem, Me.KlammerRechtsToolStripMenuItem, Me.KlammerEntfernenToolStripMenuItem})
Me.ContextMenuStripSearchTerms.Name = "ContextMenuStripSearchTerms"
Me.ContextMenuStripSearchTerms.Size = New System.Drawing.Size(177, 92)
'
'tsmOperator
'
Me.tsmOperator.Name = "tsmOperator"
Me.tsmOperator.Size = New System.Drawing.Size(176, 22)
Me.tsmOperator.Text = "Operator = oder"
'
'BracketLeftToolStripMenuItem
'
Me.BracketLeftToolStripMenuItem.Name = "BracketLeftToolStripMenuItem"
Me.BracketLeftToolStripMenuItem.Size = New System.Drawing.Size(176, 22)
Me.BracketLeftToolStripMenuItem.Text = "Klammer links ("
'
'KlammerRechtsToolStripMenuItem
'
Me.KlammerRechtsToolStripMenuItem.Name = "KlammerRechtsToolStripMenuItem"
Me.KlammerRechtsToolStripMenuItem.Size = New System.Drawing.Size(176, 22)
Me.KlammerRechtsToolStripMenuItem.Text = "Klammer rechts )"
'
'KlammerEntfernenToolStripMenuItem
'
Me.KlammerEntfernenToolStripMenuItem.Name = "KlammerEntfernenToolStripMenuItem"
Me.KlammerEntfernenToolStripMenuItem.Size = New System.Drawing.Size(176, 22)
Me.KlammerEntfernenToolStripMenuItem.Text = "Klammer entfernen"
'
'SplitContainerControlSearch
'
Me.SplitContainerControlSearch.Collapsed = True
Me.SplitContainerControlSearch.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2
Me.SplitContainerControlSearch.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainerControlSearch.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2
Me.SplitContainerControlSearch.Location = New System.Drawing.Point(0, 188)
Me.SplitContainerControlSearch.Name = "SplitContainerControlSearch"
Me.SplitContainerControlSearch.Panel1.Controls.Add(Me.XtraTabControl1)
Me.SplitContainerControlSearch.Panel1.Text = "Panel1"
Me.SplitContainerControlSearch.Panel2.Text = "Panel2"
Me.SplitContainerControlSearch.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1
Me.SplitContainerControlSearch.Size = New System.Drawing.Size(1020, 267)
Me.SplitContainerControlSearch.SplitterPosition = 310
Me.SplitContainerControlSearch.TabIndex = 16
'
'frmSearchStart
'
Me.AllowFormGlass = DevExpress.Utils.DefaultBoolean.[True]
Me.Appearance.Options.UseFont = True
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1020, 477)
Me.Controls.Add(Me.SplitContainerControlSearch)
Me.Controls.Add(Me.pnlProfileChoose)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
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.SvgImageColorizationMode = DevExpress.Utils.SvgImageColorizationMode.Full
Me.KeyPreview = True
Me.Name = "frmSearchStart"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "ZooFlow Suche"
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemRadioGroup1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemDateEdit1.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemDateEdit1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemDateEdit2.CalendarTimeProperties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemDateEdit2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemComboBox2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.RepositoryItemTimeSpanEdit1, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlProfileChoose.ResumeLayout(False)
Me.pnlProfileChoose.PerformLayout()
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.XtraTabControl1.ResumeLayout(False)
Me.ContextMenuStripSearchTerms.ResumeLayout(False)
CType(Me.SplitContainerControlSearch, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControlSearch.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout
End Sub
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents pnlProfileChoose As Panel
Friend WithEvents cmbProfile As ComboBox
Friend WithEvents Label1 As Label
Friend WithEvents BarButtonNewSearch As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonSaveSearch As DevExpress.XtraBars.BarButtonItem
Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl
Friend WithEvents XtraTabPage1 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage3 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage4 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage5 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage6 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage7 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage8 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage9 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents XtraTabPage10 As DevExpress.XtraTab.XtraTabPage
Friend WithEvents BarHeaderItem1 As DevExpress.XtraBars.BarHeaderItem
Friend WithEvents BarEditItem1 As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemRadioGroup1 As DevExpress.XtraEditors.Repository.RepositoryItemRadioGroup
Friend WithEvents BarButtonClearSearch As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents SplitContainerControlSearch As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents BarEditItem2 As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemComboBox1 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox
Friend WithEvents RibbonPageGroupProfiles As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarStaticItemInfo As DevExpress.XtraBars.BarStaticItem
Friend WithEvents ContextMenuStripSearchTerms As ContextMenuStrip
Friend WithEvents tsmOperator As ToolStripMenuItem
Friend WithEvents BracketLeftToolStripMenuItem As ToolStripMenuItem
Friend WithEvents KlammerRechtsToolStripMenuItem As ToolStripMenuItem
Friend WithEvents KlammerEntfernenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents BarButtonStartSearch As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroupFilter As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarStaticItem1 As DevExpress.XtraBars.BarStaticItem
Friend WithEvents RepositoryItemTextEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
Friend WithEvents txtFilterFrom As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemDateEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemDateEdit
Friend WithEvents txtFilterTo As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemDateEdit2 As DevExpress.XtraEditors.Repository.RepositoryItemDateEdit
Friend WithEvents cmbFilterTimeframe As DevExpress.XtraBars.BarEditItem
Friend WithEvents RepositoryItemComboBox2 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox
Friend WithEvents RepositoryItemTimeSpanEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTimeSpanEdit
Friend WithEvents BarCheckboxOpenSearchInSameWindow As DevExpress.XtraBars.BarCheckItem
Friend WithEvents RibbonPageGroupSettings As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,781 @@
Option Explicit On
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Imports DevExpress.XtraTab
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraEditors
Imports DevExpress.XtraSplashScreen
Imports DigitalData.GUIs.Common
Imports DigitalData.GUIs.ZooFlow.ClassConstants
Imports DigitalData.GUIs.ZooFlow.SearchFilter
Imports System.Threading.Tasks
Public Class frmSearchStart
Private Logger As Logger
' Constants
Private Const DEFAULT_X As Integer = 10
Private Const DEFAULT_Y As Integer = 10
' Runtime Variables
Private SelectedTabIndex As Integer
Private SelectedTab As XtraTabPage
Private HeightBeforeMinimizing As Integer = 600
Private SEARCH_ID As Integer = 0
Private SEARCH_SQL As String
Private SEARCH_TITLE As String
Private SEARCH_COUNT As Integer = 0
Public DataLoaded As Boolean = False
Private DatatableAttributes As DataTable
Private DatatableAttributeLinks As DataTable
Private DatatableSearchProfiles As DataTable
Private LastSearchForm As frmDocumentResultList
Private ChangedDateControls As List(Of String)
Private StopWatch As Watch
Public Sub New(ByVal pDTSearchProfiles As DataTable, Optional ByVal pRunSearch As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
StopWatch = New Watch(Name)
DatatableSearchProfiles = pDTSearchProfiles
Logger = My.LogConfig.GetLogger()
Dim oSearchTerms As New DataTable
' Create four typed columns in the DataTable.
oSearchTerms.Columns.Add("BracketLeft", GetType(String))
oSearchTerms.Columns.Add("AttrID", GetType(Integer))
oSearchTerms.Columns.Add("AttrTitle", GetType(String))
oSearchTerms.Columns.Add("Criteria", GetType(String))
oSearchTerms.Columns.Add("SearchTerm", GetType(String))
oSearchTerms.Columns.Add("BracketRight", GetType(String))
oSearchTerms.Columns.Add("Operator", GetType(String))
End Sub
Private Async Sub frmSearchStart_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim oHandle As IOverlaySplashScreenHandle = Nothing
Try
oHandle = SplashScreenManager.ShowOverlayForm(Me)
Dim oWatch As New Watch("Setting up Form")
pnlProfileChoose.Visible = False
For Each oTab As XtraTabPage In XtraTabControl1.TabPages
oTab.PageVisible = False
Next
RepositoryItemComboBox2.Items.AddRange(DefaultFilters)
BarCheckboxOpenSearchInSameWindow.Checked = My.UIConfig.SearchForm.OpenSearchInSameWindow
If DatatableSearchProfiles.Rows.Count > 1 Then
cmbProfile.DataSource = DatatableSearchProfiles
cmbProfile.ValueMember = DatatableSearchProfiles.Columns("SEARCH_PROFILE_ID").ColumnName
cmbProfile.DisplayMember = DatatableSearchProfiles.Columns("TITLE").ColumnName
cmbProfile.AutoCompleteMode = AutoCompleteMode.Suggest
cmbProfile.AutoCompleteSource = AutoCompleteSource.ListItems
cmbProfile.SelectedIndex = -1
SelectedTabIndex = -1
pnlProfileChoose.Visible = True
For Each oRow As DataRow In DatatableSearchProfiles.Rows
RepositoryItemComboBox1.Items.Add(oRow.Item("TITLE"))
Next
oWatch.Stop()
Else
pnlProfileChoose.Visible = False
RibbonPageGroupProfiles.Visible = False
SelectedTabIndex = 0
SelectedTab = XtraTabControl1.TabPages.First
SelectedTab.PageVisible = True
SelectedTab.Text = DatatableSearchProfiles.Rows(0).Item("TITLE")
SEARCH_ID = DatatableSearchProfiles.Rows(0).Item("SEARCH_PROFILE_ID")
SEARCH_SQL = DatatableSearchProfiles.Rows(0).Item("RESULT_SQL")
SEARCH_TITLE = DatatableSearchProfiles.Rows(0).Item("TITLE")
oWatch.Stop()
oWatch = New Watch("Loading Attributes")
Await Load_Search_Attributes()
oWatch.Stop()
BarButtonNewSearch.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End If
SEARCH_COUNT = DatatableSearchProfiles.Rows.Count
SplitContainerControlSearch.Collapsed = True
If My.UIConfig.SearchForm.Size.Height > 0 And My.UIConfig.SearchForm.Size.Width > 0 Then
Size = My.UIConfig.SearchForm.Size
End If
If My.UIConfig.SearchForm.Location.X > 0 And My.UIConfig.SearchForm.Location.Y > 0 Then
Location = My.UIConfig.SearchForm.Location
End If
Catch ex As Exception
Logger.Error(ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error while loading ProfileSearches:")
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
StopWatch.Stop()
End Try
End Sub
Async Function Load_Search_Attributes() As Task
Try
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 oDT As DataTable = Await My.DatabaseIDB.GetDatatableAsync(oSQL)
oSQL = $"SELECT * FROM VWIDB_SEARCH_ATTRIBUTES_LINKS WHERE SEARCH_PROFIL_ID = {SEARCH_ID} ORDER BY DEP_ATTR_ID"
Dim oDT1 As DataTable = Await My.DatabaseIDB.GetDatatableAsync(oSQL)
oWatch1.Stop()
Dim oWatch2 As New Watch("Procesing Dataset")
DatatableAttributes = Nothing
DatatableAttributes = oDT.Clone()
oDT.Select("", "SEQUENCE").CopyToDataTable(DatatableAttributes, LoadOption.PreserveChanges)
DatatableAttributeLinks = Nothing
DatatableAttributeLinks = oDT1.Clone()
oDT1.Select("", "DEP_ATTR_ID").CopyToDataTable(DatatableAttributeLinks, LoadOption.PreserveChanges)
oWatch2.Stop()
Dim oControlCount As Integer = 1
Dim oControlRow As Integer = 0
Dim oControls As New ClassControlCreator(SelectedTab, Me)
Dim YActControlHeight As Integer = 0
Dim XActControlWidth As Integer = 0
For Each oAttributeRow As DataRow In DatatableAttributes.Rows
Dim oXPosition As Integer
Dim oYPositionControl As Integer
Dim oYPositionLabel As Integer
Dim oMyLastGridView As GridView
Dim oSingleResult As Boolean = False
Dim oAttributeTitle As String = oAttributeRow.Item("ATTRIBUTE_TITLE").ToString
Dim oAttriID As Integer = CInt(oAttributeRow.Item("ATTRIBUTE_ID"))
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
oControlRow += 1
End If
If oControlRow = 1 Then
If oControlCount = 1 Then
oXPosition = 10
oYPositionLabel = 10
oYPositionControl = oYPositionLabel + 20
End If
ElseIf oControlRow = 2 Then
If oControlCount = 5 Then
oXPosition = 10
oYPositionLabel = YActControlHeight + 10
oYPositionControl = oYPositionLabel + 20
End If
ElseIf oControlRow = 3 Then
If oControlCount = 9 Then
oXPosition = 10
End If
End If
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 = 150
If CBool(oAttributeRow.Item("MULTISELECT")) = True Then
oControlWidth += 50
End If
addLabel(oAttributeTitle, oXPosition, oYPositionLabel)
'Nun das Control mit dem entsprechenden Abstand und der Größe
Dim oCalcHeight As Integer
Dim oCalcWidth As Integer
If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
oCalcHeight = oControlHeight + oYPositionControl
oCalcWidth = oControlWidth
ElseIf (oAttributeType = ATTR_TYPE_DATE Or oAttributeType = ATTR_TYPE_BOOLEAN) Then
oCalcHeight = 20 + oYPositionControl
oCalcWidth = 100
End If
If oCalcHeight > YActControlHeight Then
YActControlHeight = oCalcHeight
End If
oWatch4.Stop()
oWatch4 = New Watch("Creating Control")
Dim oMyControl As Control = Nothing
If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
oMyControl = oControls.CreateExistingGridControl(oAttributeRow, oXPosition, oYPositionControl)
Dim oGrid As GridControl = CType(oMyControl, GridControl)
Dim oDataSource As DataTable = CType(oGrid.DataSource, DataTable)
If Not IsNothing(oDataSource) AndAlso oDataSource.Rows.Count = 1 Then
oSingleResult = True
End If
Dim oView As GridView = CType(oGrid.MainView, GridView)
oMyLastGridView = oView
oView.FocusInvalidRow()
'Prüfen ob für dieses Grid eine Abhängigkeit definiert ist?
For Each oROW As DataRow In DatatableAttributeLinks.Rows
If CInt(oROW.Item("LINKED_ATTR_ID")) = oAttriID Then
AddHandler oView.FocusedRowChanged, AddressOf FocusedRowChanged
End If
Next
ElseIf oAttributeType = ATTR_TYPE_DATE Then
oMyControl = oControls.CreateExistingDatepicker(oAttributeRow, oXPosition, oYPositionControl)
Dim myDTP As DateEdit = CType(oMyControl, DateEdit)
AddHandler myDTP.DisableCalendarDate, AddressOf DisableCalendarDate
AddHandler myDTP.DateTimeChanged, AddressOf CalendarChanged 'CalendarChanged
ElseIf oAttributeType = ATTR_TYPE_BOOLEAN Then
oMyControl = oControls.CreateExistingCheckbox(oAttributeRow, oXPosition, oYPositionControl)
Dim myCheckBox As CheckBox = CType(oMyControl, CheckBox)
AddHandler myCheckBox.CheckedChanged, AddressOf CheckBox_CheckedChanged
End If
oWatch4.Stop()
oWatch4 = New Watch("Adding Control to Panel")
oControlCount += 1
If oMyControl IsNot Nothing Then
SelectedTab.Controls.Add(oMyControl)
If oAttributeType = ATTR_TYPE_STRING Or oAttributeType = ATTR_TYPE_INTEGER Then
oControls.DeselectGridControl(oMyControl)
End If
End If
oXPosition += oControlWidth + 20
oWatch4.Stop()
oWatch3.Stop()
Next
Catch ex As Exception
Logger.Warn("Unexpected error in Load_Search_Attributes - Error: " & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Load_Search_Attributes:")
Finally
DataLoaded = True
End Try
End Function
Sub addLabel(pAttrName As String, pXPos As Integer, ylbl As Integer)
Dim lbl As New Label With {
.Name = "lbl" & pAttrName,
.AutoSize = True,
.Text = pAttrName,
.Location = New Point(pXPos, ylbl)
}
SelectedTab.Controls.Add(lbl)
End Sub
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControl1.SelectedPageChanged
SelectedTab = XtraTabControl1.SelectedTabPage
End Sub
Private Sub ClearSearchCriteria()
Dim oSQL = $"DELETE FROM TBIDB_USER_SEARCH_CRITERIA WHERE SEARCH_PROFIL_ID = {SEARCH_ID} AND USERID = {My.Application.User.UserId}"
My.DatabaseIDB.ExecuteNonQuery(oSQL)
End Sub
Private Sub ClearSelectedControls()
ChangedDateControls = Nothing
End Sub
Private Sub RenewSearchAttributes()
ClearSearchCriteria()
For Each oControl As Control In SelectedTab.Controls
Dim octrlType = oControl.GetType.ToString
Dim oAttrID As Integer
Dim oAttrTitle As String
Select Case oControl.GetType.FullName
Case GetType(GridControl).FullName
Dim oMyGridControl As GridControl = CType(oControl, GridControl)
Dim oMyGridView As GridView = CType(oMyGridControl.MainView, GridView)
Dim oSelectedRows As Integer() = oMyGridView.GetSelectedRows()
If oSelectedRows.Count = 0 Then
Continue For
End If
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
For Each oRowHandle As Integer In oSelectedRows
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}'"
My.DatabaseIDB.ExecuteNonQuery(oInsert)
Next
Case GetType(DateEdit).FullName
' MsgBox("Date")
Dim oDateEdit As DateEdit = CType(oControl, DateEdit)
If ChangedDateControls Is Nothing Then
Continue For
End If
If ChangedDateControls.Count = 0 Then
Continue For
End If
For Each oName As String In ChangedDateControls
If oDateEdit.Name = oName Then
If Not IsNothing(oDateEdit.EditValue) Then
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
Dim oldValue As Date
Dim validDate As Boolean = False
Dim oDateValue As Date = DirectCast(oDateEdit.EditValue, Date)
Try
validDate = Date.TryParse(oDateEdit.OldEditValue, oldValue)
Catch ex As Exception
oldValue = Date.MinValue
End Try
If Not validDate Then
oldValue = Date.MinValue
End If
If oldValue = oDateEdit.EditValue Then
Exit Sub
End If
Dim dateString = oDateValue.ToString("yyyy-MM-dd") 'hh:mm:ss.fff
Dim omydate = oDateEdit.EditValue.ToString
Dim oInsert = $"EXEC PRIDB_NEW_USER_SEARCH_CRITERIA {SEARCH_ID.ToString},{My.Application.User.UserId.ToString},{oAttrID.ToString},'{omydate}','{My.Application.User.UserName}'"
My.DatabaseIDB.ExecuteNonQuery(oInsert)
End If
End If
Next
Case GetType(CheckBox).FullName
Dim myCheckBox As CheckBox = CType(oControl, CheckBox)
If myCheckBox.CheckState <> CheckState.Indeterminate Then
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
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}'"
My.DatabaseIDB.ExecuteNonQuery(oInsert)
End If
Case Else
'MsgBox(oControl.GetType.ToString)
End Select
Next
End Sub
Private Sub Link2ControlActivated(pAttributeID)
For Each oControl As Control In SelectedTab.Controls
Dim octrlType = oControl.GetType.ToString
Dim oAttrID As Integer
Dim oAttrTitle As String
Select Case oControl.GetType.FullName
Case GetType(GridControl).FullName
Dim oMyGridControl As GridControl = CType(oControl, GridControl)
Dim oMyGridView As GridView = CType(oMyGridControl.MainView, GridView)
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
If pAttributeID = oAttrID Then
MsgBox("Attribute" & oAttrTitle & " is linked")
Continue For
End If
Case GetType(DateEdit).FullName
' MsgBox("Date")
Dim oDateEdit As DateEdit = CType(oControl, DateEdit)
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
If pAttributeID = oAttrID Then
Continue For
End If
Case GetType(CheckBox).FullName
Dim myCheckBox As CheckBox = CType(oControl, CheckBox)
oAttrID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
Case Else
'MsgBox(oControl.GetType.ToString)
End Select
Next
End Sub
Private Sub FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs)
If DataLoaded = False Then Exit Sub
Dim oMyGridView As GridView = DirectCast(sender, GridView)
Dim oMyGridControl As GridControl = oMyGridView.GridControl
Dim oSelectedRows As Integer() = oMyGridView.GetSelectedRows()
If oSelectedRows.Count = 0 Then
Exit Sub
End If
Dim oAttrID As Integer
Dim oAttrTitle As String
oAttrID = DirectCast(oMyGridControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
oAttrTitle = DirectCast(oMyGridControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
For Each orow As DataRow In DatatableAttributeLinks.Rows
If CInt(orow.Item("LINKED_ATTR_ID")) = oAttrID Then
' Nun die Controls durchlaufen
Link2ControlActivated(CInt(orow.Item("DEP_ATTR_ID")))
End If
Next
End Sub
Private Sub CheckBox_CheckedChanged(sender As Object, e As EventArgs)
If DataLoaded = False Then Exit Sub
Dim oCurrentCB As CheckBox = DirectCast(sender, CheckBox)
Dim oChecked = oCurrentCB.Checked
Dim oAttrID = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttributeID
Dim oAttrTitle = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
'RenewSearchAttributes()
' AddSearchAttribute(oAttrID, oAttrTitle, oChecked.ToString)
End Sub
Private Sub frmSearchStart_Shown(sender As Object, e As EventArgs) Handles Me.Shown
DataLoaded = True
End Sub
Private Sub DisableCalendarDate(sender As Object, e As DevExpress.XtraEditors.Calendar.DisableCalendarDateEventArgs)
Dim oDateEdit As DateEdit = DirectCast(sender, DateEdit)
Dim oDTSource As DataTable = DirectCast(oDateEdit.Tag, ClassControlCreator.ControlMetadata).DTSource
If Not IsNothing(oDTSource) Then
If IsValidDate(oDTSource, e.Date) = False Then
e.IsDisabled = True
End If
End If
End Sub
Private Sub CalendarChanged(sender As Object, e As EventArgs)
If DataLoaded = False Then Exit Sub
Dim oDateEdit As DateEdit = CType(sender, DateEdit)
If Not IsNothing(oDateEdit.EditValue) Then
Dim oEditValue = oDateEdit.EditValue.ToString
Dim oList As New List(Of String) From {oDateEdit.Name}
If Not IsNothing(ChangedDateControls) Then
Dim oFound As Boolean = False
For Each oName As String In ChangedDateControls
If oDateEdit.Name = oName Then
oFound = True
Exit For
End If
Next
If oFound = False Then
ChangedDateControls.Add(oDateEdit.Name)
End If
Else
ChangedDateControls = oList
End If
End If
End Sub
Public Function IsValidDate(pCheckDT As DataTable, pDate2Check As Date) As Boolean
Dim oIsValid As Boolean = False
For Each oDateRow As DataRow In pCheckDT.Rows
If CDate(oDateRow.Item(0)) = pDate2Check Then
oIsValid = True
End If
Next
Return oIsValid
End Function
Private Async Sub BarButtonClearSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonClearSearch.ItemClick
Try
ClearSearchCriteria()
ClearSelectedControls()
Catch ex As Exception
MsgBox("Unexpected Error in Clearing Search Items: " & ex.Message, MsgBoxStyle.Critical)
End Try
SelectedTab.Controls.Clear()
Await Load_Search_Attributes()
End Sub
Private Async Sub cmbProfile_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbProfile.SelectedIndexChanged
If DataLoaded = False Then Exit Sub
If cmbProfile.SelectedIndex <> -1 Then
If SelectedTabIndex = -1 Then
SelectedTabIndex = 0
Else
SelectedTabIndex += 1
End If
SelectedTab = XtraTabControl1.TabPages(SelectedTabIndex)
SelectedTab.PageVisible = True
SEARCH_ID = cmbProfile.SelectedValue
Dim oDT As New DataTable
Dim oFilter As String = $"SEARCH_PROFILE_ID = {SEARCH_ID}"
Dim oFilteredRows() As DataRow = DatatableSearchProfiles.Select(oFilter)
oDT = DatatableSearchProfiles.Clone
For Each oRow As DataRow In oFilteredRows
SEARCH_SQL = oRow.Item("RESULT_SQL").ToString
SEARCH_TITLE = cmbProfile.Text
Next
SelectedTab.Text = SEARCH_TITLE
Await Load_Search_Attributes()
BarButtonNewSearch.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
XtraTabControl1.SelectedTabPageIndex = SelectedTabIndex
End If
End Sub
Private Sub BarButtonNewSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonNewSearch.ItemClick
Display_InfoItem("New Search not integrated", Color.Yellow)
End Sub
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonSaveSearch.ItemClick
Display_InfoItem("Search Save not integrated", Color.Yellow)
End Sub
Sub Display_InfoItem(pText As String, pBackColor As Color)
Display_InfoItem(pText, pBackColor, Color.Black)
End Sub
Sub Display_InfoItem(pText As String, pBackColor As Color, pForeColor As Color)
BarStaticItemInfo.Caption = pText
BarStaticItemInfo.ItemAppearance.Normal.BackColor = pBackColor
BarStaticItemInfo.ItemAppearance.Normal.ForeColor = pForeColor
End Sub
Sub Clear_InfoItem()
BarStaticItemInfo.Caption = String.Empty
BarStaticItemInfo.ItemAppearance.Normal.BackColor = Color.Transparent
End Sub
Private Sub GridViewSearchTerms_RowDeleted(sender As Object, e As DevExpress.Data.RowDeletedEventArgs)
If DataLoaded = False Then Exit Sub
Dim oCurrentView As GridView = DirectCast(sender, GridView)
Dim oCurrentControl As GridControl = oCurrentView.GridControl
Dim oRowView As DataRowView = CType(oCurrentView.GetFocusedRow(), DataRowView)
If IsNothing(oRowView) = False Then
Dim oResult As String = CType(oRowView.Item(0), String)
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttributeID
Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttributeTitle
End If
End Sub
Private Sub frmSearchStart_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
My.UIConfig.SearchForm.Location = Me.Location
My.UIConfigManager.Save()
End Sub
Private Function GetSearchTermForType(pAttrID As Int16, pAttrTitle As String, pCriteria As String, pTerm As String) As String
Dim oSearchTerm As String = ""
Dim oFilter As String = $"GUID = {pAttrID}"
Dim oFilteredRows() As DataRow = My.DTAttributes.Select(oFilter)
If oFilteredRows.Length = 1 Then
For Each oRow As DataRow In oFilteredRows
Dim oType As Integer = DirectCast(oRow.Item("TYP_ID"), Integer)
If oType = 1 Or oType = 8 Then
oSearchTerm = $"{pAttrTitle} {pCriteria} '{pTerm.Replace("'", "''")}'"
ElseIf oType = 2 Or oType = 9 Then
oSearchTerm = $"{pAttrTitle} {pCriteria} {pTerm}"
ElseIf oType = 3 Then 'Float
oSearchTerm = $"{pAttrTitle} {pCriteria} Convert(float,'{pTerm.Replace(",", ".")}')"
ElseIf oType = 4 Then 'Decimal
oSearchTerm = $"{pAttrTitle} {pCriteria} Convert(decimal(19,2),'{pTerm.Replace(",", ".")}')"
ElseIf oType = 5 Then 'DATE
oSearchTerm = $"{pAttrTitle} {pCriteria} Convert(date,'{pTerm}')"
ElseIf oType = 7 Then
Dim oBit As Int16
If CBool(pTerm) = True Then
oBit = 1
Else
oBit = 0
End If
oSearchTerm = $"{pAttrTitle} {pCriteria} '{oBit.ToString}'"
End If
Next
End If
Return oSearchTerm
End Function
Private Sub BarButtonStartSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonStartSearch.ItemClick
Prepare_Search()
End Sub
Private Sub Prepare_Search()
RenewSearchAttributes()
' Minimize the search form, but only if results were found
If Start_Search() Then
Hide()
' Position Result Window below this window
LastSearchForm.Location = GetResultFormLocation()
LastSearchForm.Size = GetResultFormSize()
AddHandler LastSearchForm.FormClosed, AddressOf LastSearchForm_FormClosed
End If
End Sub
Private Sub LastSearchForm_FormClosed(sender As Object, e As EventArgs)
If LastSearchForm.ShouldReturnToPreviousForm = True Then
Show()
LastSearchForm = Nothing
Else
Close()
LastSearchForm = Nothing
End If
End Sub
Private Function Start_Search() As Boolean
Dim oHandle As IOverlaySplashScreenHandle = Nothing
Dim oItemsFound As Boolean = False
Try
oHandle = SplashScreenManager.ShowOverlayForm(Me)
Clear_InfoItem()
Dim oSearchSQL = SEARCH_SQL
oSearchSQL = oSearchSQL.Replace("@UserID", My.Application.User.UserId.ToString)
oSearchSQL = oSearchSQL.Replace("@User_ID", My.Application.User.UserId.ToString)
oSearchSQL = oSearchSQL.Replace("@UserName", My.Application.User.UserName)
oSearchSQL = oSearchSQL.Replace("@SearchID", SEARCH_ID.ToString)
Dim oEnvironment As New Modules.ZooFlow.Environment() With {
.User = My.Application.User,
.Modules = My.Application.Modules,
.Database = My.Database,
.DatabaseIDB = My.DatabaseIDB,
.Settings = My.Application.Settings
}
Dim oDTSearchResult As DataTable = My.DatabaseIDB.GetDatatable(oSearchSQL)
If oDTSearchResult.Rows.Count > 0 Then
Dim oShortGuid = Guid.NewGuid()
Dim oWindowGuid = $"{SEARCH_ID.ToString}-{My.User.Name}"
Dim oParams = New DocumentResultParams() With {
.IsIDBResult = True,
.WindowGuid = oWindowGuid,
.Results = New List(Of DocumentResult) From {
New DocumentResult() With {
.Title = SelectedTab.Text,
.Datatable = oDTSearchResult
}
}
}
If My.UIConfig.SearchForm.OpenSearchInSameWindow And LastSearchForm IsNot Nothing Then
LastSearchForm.RefreshResults(oParams.Results)
Else
Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams)
oForm.Show()
LastSearchForm = oForm
End If
oItemsFound = True
Else
Display_InfoItem("No results for this searchcombination!", Color.OrangeRed, Color.White)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
Return oItemsFound
End Function
Private Function GetResultFormLocation() As Point
Return Location
End Function
Private Function GetResultFormSize() As Size
Return Size
End Function
Private Sub frmSearchStart_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.F2 Then
Prepare_Search()
End If
End Sub
'Private Sub MinimizeSearchForm()
' HeightBeforeMinimizing = Height
' Height = 200
' BarButtonItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
'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
Private Sub cmbFilterTimeframe_EditValueChanged(sender As Object, e As EventArgs) Handles cmbFilterTimeframe.EditValueChanged
Dim oTimeframe As FilterTimeframe = DirectCast(cmbFilterTimeframe.EditValue, FilterTimeframe)
If oTimeframe.DisableFilter Then
txtFilterFrom.Enabled = False
txtFilterFrom.Reset()
txtFilterTo.Enabled = False
txtFilterTo.Reset()
Else
txtFilterFrom.Enabled = True
txtFilterFrom.EditValue = oTimeframe.From
txtFilterTo.Enabled = True
txtFilterTo.EditValue = oTimeframe.[To]
End If
End Sub
Private Sub BarCheckboxOpenSearchInSameWindow_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarCheckboxOpenSearchInSameWindow.CheckedChanged
My.UIConfig.SearchForm.OpenSearchInSameWindow = BarCheckboxOpenSearchInSameWindow.Checked
My.UIConfigManager.Save()
End Sub
Private Sub frmSearchStart_ResizeEnd(sender As Object, e As EventArgs) Handles Me.ResizeEnd
My.UIConfig.SearchForm.Location = Location
My.UIConfig.SearchForm.Size = Size
My.UIConfigManager.Save()
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