diff --git a/GUIs.ZooFlow/Config/ClassUIConfig.vb b/GUIs.ZooFlow/Config/ClassUIConfig.vb index 43223d89..342bf1f0 100644 --- a/GUIs.ZooFlow/Config/ClassUIConfig.vb +++ b/GUIs.ZooFlow/Config/ClassUIConfig.vb @@ -1,8 +1,11 @@ Public Class ClassUIConfig Public Property SkinName As String = "Office 2016 Colorful" Public Property FlowForm As New FlowFormConfig - + Public Property SearchForm As New SearchFormConfig Public Class FlowFormConfig Public Property Location As New Point(0, 0) End Class + Public Class SearchFormConfig + Public Property Location As New Point(0, 0) + End Class End Class diff --git a/GUIs.ZooFlow/MyApplication.vb b/GUIs.ZooFlow/MyApplication.vb index 48abfd21..f0a5c9ca 100644 --- a/GUIs.ZooFlow/MyApplication.vb +++ b/GUIs.ZooFlow/MyApplication.vb @@ -27,6 +27,7 @@ Namespace My Property LogConfig As LogConfig Property MainForm As frmAdmin + Property SearchForm As frmSearchStart Property Database As MSSQLServer Property Database_IDB As MSSQLServer Property Queries As New ClassQueries diff --git a/GUIs.ZooFlow/frmSearchStart.Designer.vb b/GUIs.ZooFlow/frmSearchStart.Designer.vb index 82b40cc0..9ffec5d8 100644 --- a/GUIs.ZooFlow/frmSearchStart.Designer.vb +++ b/GUIs.ZooFlow/frmSearchStart.Designer.vb @@ -41,7 +41,6 @@ Partial Class frmSearchStart Me.WindowsUIButtonPanel1 = New DevExpress.XtraBars.Docking2010.WindowsUIButtonPanel() Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage() - Me.TokenEdit1 = New DevExpress.XtraEditors.TokenEdit() Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage() Me.XtraTabPage3 = New DevExpress.XtraTab.XtraTabPage() Me.XtraTabPage4 = New DevExpress.XtraTab.XtraTabPage() @@ -51,12 +50,20 @@ Partial Class frmSearchStart Me.XtraTabPage8 = New DevExpress.XtraTab.XtraTabPage() Me.XtraTabPage9 = New DevExpress.XtraTab.XtraTabPage() Me.XtraTabPage10 = New DevExpress.XtraTab.XtraTabPage() + Me.TokenEdit1 = New DevExpress.XtraEditors.TokenEdit() + Me.GridControlSerchTerms = New DevExpress.XtraGrid.GridControl() + Me.GridViewSearchTerms = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.SplitContainerControlSearch = New DevExpress.XtraEditors.SplitContainerControl() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemRadioGroup1, System.ComponentModel.ISupportInitialize).BeginInit() Me.Panel1.SuspendLayout() CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.XtraTabControl1.SuspendLayout() CType(Me.TokenEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridControlSerchTerms, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridViewSearchTerms, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SplitContainerControlSearch, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerControlSearch.SuspendLayout() Me.SuspendLayout() ' 'RibbonControl1 @@ -192,32 +199,19 @@ Partial Class frmSearchStart ' Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.XtraTabControl1.HeaderLocation = DevExpress.XtraTab.TabHeaderLocation.Bottom - Me.XtraTabControl1.Location = New System.Drawing.Point(0, 207) + Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0) Me.XtraTabControl1.Name = "XtraTabControl1" Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1 - Me.XtraTabControl1.Size = New System.Drawing.Size(874, 299) + Me.XtraTabControl1.Size = New System.Drawing.Size(449, 299) 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(872, 274) + Me.XtraTabPage1.Size = New System.Drawing.Size(447, 274) Me.XtraTabPage1.Text = "Search#1" ' - 'TokenEdit1 - ' - Me.TokenEdit1.Location = New System.Drawing.Point(191, 60) - Me.TokenEdit1.MenuManager = Me.RibbonControl1 - Me.TokenEdit1.Name = "TokenEdit1" - Me.TokenEdit1.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(128, Byte), Integer)) - Me.TokenEdit1.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.TokenEdit1.Properties.Appearance.Options.UseBackColor = True - Me.TokenEdit1.Properties.Appearance.Options.UseFont = True - Me.TokenEdit1.Properties.Separators.AddRange(New String() {","}) - Me.TokenEdit1.Size = New System.Drawing.Size(683, 22) - Me.TokenEdit1.TabIndex = 0 - ' 'XtraTabPage2 ' Me.XtraTabPage2.Name = "XtraTabPage2" @@ -272,13 +266,56 @@ Partial Class frmSearchStart Me.XtraTabPage10.Size = New System.Drawing.Size(872, 274) Me.XtraTabPage10.Text = "Search#10" ' + 'TokenEdit1 + ' + Me.TokenEdit1.Location = New System.Drawing.Point(191, 60) + Me.TokenEdit1.MenuManager = Me.RibbonControl1 + Me.TokenEdit1.Name = "TokenEdit1" + Me.TokenEdit1.Properties.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(128, Byte), Integer)) + Me.TokenEdit1.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.TokenEdit1.Properties.Appearance.Options.UseBackColor = True + Me.TokenEdit1.Properties.Appearance.Options.UseFont = True + Me.TokenEdit1.Properties.Separators.AddRange(New String() {","}) + Me.TokenEdit1.Size = New System.Drawing.Size(683, 22) + Me.TokenEdit1.TabIndex = 0 + ' + 'GridControlSerchTerms + ' + Me.GridControlSerchTerms.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControlSerchTerms.Location = New System.Drawing.Point(0, 0) + Me.GridControlSerchTerms.MainView = Me.GridViewSearchTerms + Me.GridControlSerchTerms.MenuManager = Me.RibbonControl1 + Me.GridControlSerchTerms.Name = "GridControlSerchTerms" + Me.GridControlSerchTerms.Size = New System.Drawing.Size(415, 299) + Me.GridControlSerchTerms.TabIndex = 15 + Me.GridControlSerchTerms.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewSearchTerms}) + ' + 'GridViewSearchTerms + ' + Me.GridViewSearchTerms.GridControl = Me.GridControlSerchTerms + Me.GridViewSearchTerms.Name = "GridViewSearchTerms" + ' + 'SplitContainerControlSearch + ' + Me.SplitContainerControlSearch.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2 + Me.SplitContainerControlSearch.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainerControlSearch.Location = New System.Drawing.Point(0, 207) + Me.SplitContainerControlSearch.Name = "SplitContainerControlSearch" + Me.SplitContainerControlSearch.Panel1.Controls.Add(Me.XtraTabControl1) + Me.SplitContainerControlSearch.Panel1.Text = "Panel1" + Me.SplitContainerControlSearch.Panel2.Controls.Add(Me.GridControlSerchTerms) + Me.SplitContainerControlSearch.Panel2.Text = "Panel2" + Me.SplitContainerControlSearch.Size = New System.Drawing.Size(874, 299) + Me.SplitContainerControlSearch.SplitterPosition = 449 + Me.SplitContainerControlSearch.TabIndex = 16 + ' 'frmSearchStart ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(874, 601) + Me.Controls.Add(Me.SplitContainerControlSearch) Me.Controls.Add(Me.TokenEdit1) - Me.Controls.Add(Me.XtraTabControl1) Me.Controls.Add(Me.WindowsUIButtonPanel1) Me.Controls.Add(Me.Panel1) Me.Controls.Add(Me.RibbonStatusBar1) @@ -295,6 +332,10 @@ Partial Class frmSearchStart CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.XtraTabControl1.ResumeLayout(False) CType(Me.TokenEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridControlSerchTerms, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridViewSearchTerms, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SplitContainerControlSearch, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerControlSearch.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() @@ -327,4 +368,7 @@ Partial Class frmSearchStart Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem Friend WithEvents TokenEdit1 As DevExpress.XtraEditors.TokenEdit Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents GridControlSerchTerms As DevExpress.XtraGrid.GridControl + Friend WithEvents GridViewSearchTerms As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents SplitContainerControlSearch As DevExpress.XtraEditors.SplitContainerControl End Class diff --git a/GUIs.ZooFlow/frmSearchStart.vb b/GUIs.ZooFlow/frmSearchStart.vb index 07e595d9..27bb5f81 100644 --- a/GUIs.ZooFlow/frmSearchStart.vb +++ b/GUIs.ZooFlow/frmSearchStart.vb @@ -7,6 +7,7 @@ Imports DevExpress.XtraEditors Public Class frmSearchStart Private Logger As Logger Private DTSearchProfiles As DataTable + Private TabSelectedIndex As Integer Private TabSelected As XtraTabPage Private PSEARCH_ID As Integer = 0 Private PSEARCH_BASE_RESULT_SQL As String @@ -65,8 +66,11 @@ Public Class frmSearchStart cmbProfile.AutoCompleteMode = AutoCompleteMode.Suggest cmbProfile.AutoCompleteSource = AutoCompleteSource.ListItems cmbProfile.SelectedIndex = -1 + TabSelectedIndex = -1 + Me.Panel1.Visible = True Else + TabSelectedIndex = 0 TabSelected = XtraTabControl1.TabPages(0) TabSelected.PageVisible = True PSEARCH_ID = DTSearchProfiles.Rows(0).Item("SEARCH_PROFILE_ID") @@ -344,4 +348,22 @@ Public Class frmSearchStart End Sub + Private Sub cmbProfile_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbProfile.SelectedIndexChanged + If FormShown = False Then Exit Sub + If cmbProfile.SelectedIndex <> -1 Then + If TabSelectedIndex = -1 Then + TabSelectedIndex = 0 + Else + TabSelectedIndex += 1 + End If + TabSelected = XtraTabControl1.TabPages(TabSelectedIndex) + TabSelected.PageVisible = True + PSEARCH_ID = cmbProfile.SelectedValue + TabSelected.Text = cmbProfile.Text + Load_Search_Attributes() + BarButtonItemNewSearch.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + XtraTabControl1.SelectedTabPageIndex = TabSelectedIndex + + End If + End Sub End Class \ No newline at end of file