This commit is contained in:
2022-04-28 16:27:55 +02:00
parent abc4d664a0
commit b8a3325c2f
12 changed files with 635 additions and 111 deletions

View File

@@ -58,8 +58,8 @@ Partial Class frmFlowSearch1
Me.Label1 = New System.Windows.Forms.Label()
Me.cmbLimitationDateAttr = New System.Windows.Forms.ComboBox()
Me.PictureEdit1 = New DevExpress.XtraEditors.PictureEdit()
Me.txtSearchInput = New DevExpress.XtraEditors.TextEdit()
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
Me.TextEditSearch = New DevExpress.XtraEditors.TextEdit()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.DockPanel1.SuspendLayout()
@@ -81,7 +81,7 @@ Partial Class frmFlowSearch1
CType(Me.ToggleSwitchYear_Last.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ToggleSwitchYear.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtSearchInput.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TextEditSearch.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'RibbonControl1
@@ -94,7 +94,7 @@ Partial Class frmFlowSearch1
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(936, 89)
Me.RibbonControl1.Size = New System.Drawing.Size(943, 89)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
'
'BarButtonStartSearch
@@ -170,10 +170,10 @@ Partial Class frmFlowSearch1
'RibbonStatusBar1
'
Me.RibbonStatusBar1.ItemLinks.Add(Me.bsiStatus)
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 745)
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 515)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(936, 24)
Me.RibbonStatusBar1.Size = New System.Drawing.Size(943, 24)
'
'RibbonPage2
'
@@ -197,7 +197,7 @@ Partial Class frmFlowSearch1
Me.DockPanel1.Location = New System.Drawing.Point(0, 89)
Me.DockPanel1.Name = "DockPanel1"
Me.DockPanel1.OriginalSize = New System.Drawing.Size(193, 200)
Me.DockPanel1.Size = New System.Drawing.Size(193, 656)
Me.DockPanel1.Size = New System.Drawing.Size(193, 426)
Me.DockPanel1.Text = "Datum"
'
'DockPanel1_Container
@@ -207,7 +207,7 @@ Partial Class frmFlowSearch1
Me.DockPanel1_Container.Controls.Add(Me.cmbLimitationDateAttr)
Me.DockPanel1_Container.Location = New System.Drawing.Point(3, 40)
Me.DockPanel1_Container.Name = "DockPanel1_Container"
Me.DockPanel1_Container.Size = New System.Drawing.Size(186, 613)
Me.DockPanel1_Container.Size = New System.Drawing.Size(186, 383)
Me.DockPanel1_Container.TabIndex = 0
'
'XtraTabControl1
@@ -220,7 +220,7 @@ Partial Class frmFlowSearch1
Me.XtraTabControl1.Name = "XtraTabControl1"
Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1
Me.XtraTabControl1.ShowTabHeader = DevExpress.Utils.DefaultBoolean.[True]
Me.XtraTabControl1.Size = New System.Drawing.Size(171, 552)
Me.XtraTabControl1.Size = New System.Drawing.Size(171, 322)
Me.XtraTabControl1.TabIndex = 10
Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2})
'
@@ -241,13 +241,13 @@ Partial Class frmFlowSearch1
Me.XtraTabPage1.Controls.Add(Me.ToggleSwitchYear_Last)
Me.XtraTabPage1.Controls.Add(Me.ToggleSwitchYear)
Me.XtraTabPage1.Name = "XtraTabPage1"
Me.XtraTabPage1.Size = New System.Drawing.Size(169, 527)
Me.XtraTabPage1.Size = New System.Drawing.Size(169, 297)
Me.XtraTabPage1.Text = "Standard"
'
'DateEditTill
'
Me.DateEditTill.EditValue = Nothing
Me.DateEditTill.Location = New System.Drawing.Point(3, 281)
Me.DateEditTill.Location = New System.Drawing.Point(3, 260)
Me.DateEditTill.MenuManager = Me.RibbonControl1
Me.DateEditTill.Name = "DateEditTill"
Me.DateEditTill.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
@@ -267,7 +267,7 @@ Partial Class frmFlowSearch1
'
'ToggleSwitchDateto
'
Me.ToggleSwitchDateto.Location = New System.Drawing.Point(3, 256)
Me.ToggleSwitchDateto.Location = New System.Drawing.Point(3, 235)
Me.ToggleSwitchDateto.MenuManager = Me.RibbonControl1
Me.ToggleSwitchDateto.Name = "ToggleSwitchDateto"
Me.ToggleSwitchDateto.Properties.OffText = "Datum bis"
@@ -277,7 +277,7 @@ Partial Class frmFlowSearch1
'
'lblDatefrom
'
Me.lblDatefrom.Location = New System.Drawing.Point(3, 211)
Me.lblDatefrom.Location = New System.Drawing.Point(2, 190)
Me.lblDatefrom.Name = "lblDatefrom"
Me.lblDatefrom.Size = New System.Drawing.Size(34, 13)
Me.lblDatefrom.TabIndex = 3
@@ -286,7 +286,7 @@ Partial Class frmFlowSearch1
'DateEditFrom
'
Me.DateEditFrom.EditValue = Nothing
Me.DateEditFrom.Location = New System.Drawing.Point(3, 230)
Me.DateEditFrom.Location = New System.Drawing.Point(3, 209)
Me.DateEditFrom.MenuManager = Me.RibbonControl1
Me.DateEditFrom.Name = "DateEditFrom"
Me.DateEditFrom.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
@@ -370,7 +370,7 @@ Partial Class frmFlowSearch1
'XtraTabPage2
'
Me.XtraTabPage2.Name = "XtraTabPage2"
Me.XtraTabPage2.Size = New System.Drawing.Size(169, 527)
Me.XtraTabPage2.Size = New System.Drawing.Size(169, 297)
Me.XtraTabPage2.Text = "...tbd"
'
'Label1
@@ -392,11 +392,9 @@ Partial Class frmFlowSearch1
'
'PictureEdit1
'
Me.PictureEdit1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.PictureEdit1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.PictureEdit1.EditValue = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZooFlow_CW_DevExpress
Me.PictureEdit1.Location = New System.Drawing.Point(709, 537)
Me.PictureEdit1.Location = New System.Drawing.Point(716, 307)
Me.PictureEdit1.MenuManager = Me.RibbonControl1
Me.PictureEdit1.Name = "PictureEdit1"
Me.PictureEdit1.Properties.Appearance.BackColor = System.Drawing.SystemColors.Control
@@ -408,39 +406,35 @@ Partial Class frmFlowSearch1
Me.PictureEdit1.Size = New System.Drawing.Size(215, 202)
Me.PictureEdit1.TabIndex = 8
'
'txtSearchInput
'
Me.txtSearchInput.EditValue = ""
Me.txtSearchInput.Location = New System.Drawing.Point(206, 95)
Me.txtSearchInput.MenuManager = Me.RibbonControl1
Me.txtSearchInput.Name = "txtSearchInput"
Me.txtSearchInput.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI Semibold", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtSearchInput.Properties.Appearance.ForeColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(19, Byte), Integer))
Me.txtSearchInput.Properties.Appearance.Options.UseFont = True
Me.txtSearchInput.Properties.Appearance.Options.UseForeColor = True
Me.txtSearchInput.Properties.NullText = "Suchbegriff eingeben"
Me.txtSearchInput.Properties.Padding = New System.Windows.Forms.Padding(10)
Me.txtSearchInput.Size = New System.Drawing.Size(673, 46)
Me.txtSearchInput.TabIndex = 12
'
'SimpleButton1
'
Me.SimpleButton1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.SimpleButton1.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZooFlow_CW_DevExpress
Me.SimpleButton1.ImageOptions.SvgImageSize = New System.Drawing.Size(40, 40)
Me.SimpleButton1.Location = New System.Drawing.Point(878, 95)
Me.SimpleButton1.Location = New System.Drawing.Point(885, 95)
Me.SimpleButton1.Name = "SimpleButton1"
Me.SimpleButton1.Size = New System.Drawing.Size(46, 46)
Me.SimpleButton1.TabIndex = 16
'
'TextEditSearch
'
Me.TextEditSearch.Location = New System.Drawing.Point(199, 95)
Me.TextEditSearch.MenuManager = Me.RibbonControl1
Me.TextEditSearch.Name = "TextEditSearch"
Me.TextEditSearch.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 18.0!)
Me.TextEditSearch.Properties.Appearance.Options.UseFont = True
Me.TextEditSearch.Size = New System.Drawing.Size(680, 38)
Me.TextEditSearch.TabIndex = 20
'
'frmFlowSearch1
'
Me.Appearance.BackColor = System.Drawing.SystemColors.Control
Me.Appearance.Options.UseBackColor = True
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(936, 769)
Me.ClientSize = New System.Drawing.Size(943, 539)
Me.Controls.Add(Me.TextEditSearch)
Me.Controls.Add(Me.SimpleButton1)
Me.Controls.Add(Me.txtSearchInput)
Me.Controls.Add(Me.PictureEdit1)
Me.Controls.Add(Me.DockPanel1)
Me.Controls.Add(Me.RibbonStatusBar1)
@@ -473,7 +467,7 @@ Partial Class frmFlowSearch1
CType(Me.ToggleSwitchYear_Last.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.ToggleSwitchYear.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtSearchInput.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TextEditSearch.Properties, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -513,6 +507,6 @@ Partial Class frmFlowSearch1
Friend WithEvents DateEditTill As DevExpress.XtraEditors.DateEdit
Friend WithEvents DateEditFrom As DevExpress.XtraEditors.DateEdit
Friend WithEvents ToggleSwitchDateto As DevExpress.XtraEditors.ToggleSwitch
Friend WithEvents txtSearchInput As DevExpress.XtraEditors.TextEdit
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
Friend WithEvents TextEditSearch As DevExpress.XtraEditors.TextEdit
End Class

View File

@@ -125,7 +125,6 @@ Public Class frmFlowSearch1
Else
cmbLimitationDateAttr.Items.Add(IDB_ADDED_WHEN_String_Englisch)
End If
'Dim oDT As DataTable = My.DatabaseIDB.GetDatatable($"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID IN (5,6) AND LANG_ID = {My.Application.User.LanguageId}")
For Each oRow As DataRow In My.Tables.DTIDB_ATTRIBUTE.Rows
If CBool(oRow.Item("SYS_ATTRIBUTE")) = False And (oRow.Item("TYP_ID") = 5 Or oRow.Item("TYP_ID") = 6) Then
@@ -163,9 +162,9 @@ Public Class frmFlowSearch1
collection.Add(orow.Item("TERM"))
Next
txtSearchInput.MaskBox.AutoCompleteSource = AutoCompleteSource.CustomSource
txtSearchInput.MaskBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend
txtSearchInput.MaskBox.AutoCompleteCustomSource = collection
TextEditSearch.MaskBox.AutoCompleteSource = AutoCompleteSource.CustomSource
TextEditSearch.MaskBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend
TextEditSearch.MaskBox.AutoCompleteCustomSource = collection
TogglesDate = New List(Of ToggleSwitch) From {
ToggleSwitchTomorrow,
@@ -190,7 +189,7 @@ Public Class frmFlowSearch1
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oResult = Await SearchRunner.Run(txtSearchInput.Text, DateEditFrom.EditValue, DateEditTill.EditValue)
Dim oResult = Await SearchRunner.Run(TextEditSearch.Text, DateEditFrom.EditValue, DateEditTill.EditValue)
If oResult.OK = False Then
bsiStatus.Caption = oResult.ErrorMessage
End If
@@ -206,29 +205,8 @@ Public Class frmFlowSearch1
End Sub
Private Async Function txtSearchInput_KeyUp(sender As Object, e As KeyEventArgs) As Threading.Tasks.Task Handles txtSearchInput.KeyUp
If e.KeyCode = Keys.Return Then
If txtSearchInput.Text = String.Empty Then
Return
End If
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oResult = Await SearchRunner.Run(txtSearchInput.Text, DateEditFrom.EditValue, DateEditTill.EditValue)
If oResult.OK = False Then
bsiStatus.Caption = oResult.ErrorMessage
End If
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
End If
End Function
Private Sub BarButtonReset_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonReset.ItemClick
txtSearchInput.Text = ""
TextEditSearch.Text = ""
ResetTogglesDate()
ToggleSwitchDateto.IsOn = False
SearchRunner.ExplicitDate = False
@@ -255,10 +233,13 @@ Public Class frmFlowSearch1
End Sub
Private Async Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
RunSearch()
End Sub
Private Async Sub RunSearch()
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oResult = Await SearchRunner.Run(txtSearchInput.Text, DateEditFrom.EditValue, DateEditTill.EditValue)
Dim oResult = Await SearchRunner.Run(TextEditSearch.Text, DateEditFrom.EditValue, DateEditTill.EditValue)
If oResult.OK = False Then
bsiStatus.Caption = oResult.ErrorMessage
End If
@@ -268,4 +249,18 @@ Public Class frmFlowSearch1
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
End Sub
Private Sub TextEditSearch_KeyUp(sender As Object, e As KeyEventArgs) Handles TextEditSearch.KeyUp
If e.KeyCode = Keys.Return Then
If TextEditSearch.Text = String.Empty Then
Return
End If
RunSearch()
End If
End Sub
Private Sub PictureEdit1_Click(sender As Object, e As EventArgs) Handles PictureEdit1.Click
RunSearch()
End Sub
End Class