diff --git a/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs b/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs index b7f6996013..9b3609bbe8 100644 --- a/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs +++ b/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs @@ -373,9 +373,24 @@ private T Activate(T2 databaseObject, Image tabImage) var uiInstance = new T(); var floatable = WindowFactory.Create(this, RefreshBus, uiInstance, tabImage, databaseObject); + + int? insertIndex = null; + var panel = _mainDockPanel.Panes.Where(p => p.IsActiveDocumentPane).SingleOrDefault(); + if (panel is not null) + { + var contents = panel.Contents; + insertIndex = contents.IndexOf(panel.ActiveContent)+1; + } + floatable.Show(_mainDockPanel, DockState.Document); + uiInstance.SetDatabaseObject(this, databaseObject); + if (insertIndex is not null) + { + _mainDockPanel.ActivePane.SetContentIndex(floatable, (int)insertIndex); + } + SetTabText(floatable, uiInstance); return uiInstance; @@ -436,32 +451,32 @@ public DockContent Activate(DeserializeInstruction instruction, IActivateItems a case IObjectCollectionControl uiCollection: return Activate(uiCollection, instruction.ObjectCollection); case IRDMPSingleDatabaseObjectControl uiInstance: - { - var databaseObject = instruction.DatabaseObject; - - //the database object is gone? deleted maybe - if (databaseObject == null) - return null; - - DockContent floatable = WindowFactory.Create(this, RefreshBus, uiInstance, - CoreIconProvider.GetImage(databaseObject), databaseObject); - - floatable.Show(_mainDockPanel, DockState.Document); - try { - uiInstance.SetDatabaseObject(this, (DatabaseEntity)databaseObject); - SetTabText(floatable, uiInstance); + var databaseObject = instruction.DatabaseObject; + + //the database object is gone? deleted maybe + if (databaseObject == null) + return null; + + DockContent floatable = WindowFactory.Create(this, RefreshBus, uiInstance, + CoreIconProvider.GetImage(databaseObject), databaseObject); + + floatable.Show(_mainDockPanel, DockState.Document); + try + { + uiInstance.SetDatabaseObject(this, (DatabaseEntity)databaseObject); + SetTabText(floatable, uiInstance); + } + catch (Exception e) + { + floatable.Close(); + throw new Exception( + $"SetDatabaseObject failed on Control of Type '{instruction.UIControlType.Name}', control closed, see inner Exception for details", + e); + } + + return floatable; } - catch (Exception e) - { - floatable.Close(); - throw new Exception( - $"SetDatabaseObject failed on Control of Type '{instruction.UIControlType.Name}', control closed, see inner Exception for details", - e); - } - - return floatable; - } default: return (DockContent)activator.ShowWindow(c, true); } @@ -833,7 +848,7 @@ public void StartSession(string sessionName, IEnumerable GetCohortHoldoutLookupRequest(externalCohortTable, project, cic)); - var ui = new Rdmp.UI.CohortUI.CreateHoldoutLookup.CreateHoldoutLookupUI(this, externalCohortTable, cic); + var ui = new Rdmp.UI.CohortUI.CreateHoldoutLookup.CreateHoldoutLookupUI(this, externalCohortTable, cic); if (!string.IsNullOrWhiteSpace(cic.Description)) ui.CohortDescription = $"{cic.Description} ({Environment.UserName} - {DateTime.Now})"; @@ -878,7 +893,7 @@ public override CohortHoldoutLookupRequest GetCohortHoldoutLookupRequest(Externa public override ICatalogue CreateAndConfigureCatalogue(ITableInfo tableInfo, ColumnInfo[] extractionIdentifierColumns, string initialDescription, IProject projectSpecific, string folder) { - if(extractionIdentifierColumns is not null) + if (extractionIdentifierColumns is not null) { return base.CreateAndConfigureCatalogue(tableInfo, extractionIdentifierColumns, initialDescription, projectSpecific, folder); } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd8a30350..5f286a9d56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,3 @@ - - # Changelog All notable changes to this project will be documented in this file. @@ -13,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [8.3.1] - Unreleased - Improve Performance of regenerating problems with child providers +- Update UI Tab opening Logic +- Add Filter to Left-Hand Tree View ## [8.3.0] - 2024-09-23 diff --git a/Directory.Build.props b/Directory.Build.props index d82739e191..65317e7a30 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ 11.0 - 8.2.0 + 8.3.0 true diff --git a/Directory.Packages.props b/Directory.Packages.props index ab4aee9746..2fc0aebf8b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,9 +1,9 @@ - - - - + + + + @@ -25,7 +25,7 @@ - + diff --git a/Rdmp.UI/Collections/CatalogueCollectionUI.Designer.cs b/Rdmp.UI/Collections/CatalogueCollectionUI.Designer.cs index 8c4677ed7f..f5393fc83a 100644 --- a/Rdmp.UI/Collections/CatalogueCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/CatalogueCollectionUI.Designer.cs @@ -12,7 +12,7 @@ partial class CatalogueCollectionUI : ILifetimeSubscriber /// private IContainer components = null; - + #region Component Designer generated code @@ -22,115 +22,121 @@ partial class CatalogueCollectionUI : ILifetimeSubscriber /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CatalogueCollectionUI)); - this.tlvCatalogues = new BrightIdeasSoftware.TreeListView(); - this.olvColumn1 = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvFilters = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvOrder = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.imageList_RightClickIcons = new System.Windows.Forms.ImageList(this.components); - this.gbColdStorage = new System.Windows.Forms.GroupBox(); - this.catalogueCollectionFilterUI1 = new Rdmp.UI.Collections.CatalogueCollectionFilterUI(); - this.panel2 = new System.Windows.Forms.Panel(); - ((System.ComponentModel.ISupportInitialize)(this.tlvCatalogues)).BeginInit(); - this.gbColdStorage.SuspendLayout(); - this.panel2.SuspendLayout(); - this.SuspendLayout(); + components = new Container(); + ComponentResourceManager resources = new ComponentResourceManager(typeof(CatalogueCollectionUI)); + tlvCatalogues = new TreeListView(); + olvColumn1 = new OLVColumn(); + olvFilters = new OLVColumn(); + olvOrder = new OLVColumn(); + imageList_RightClickIcons = new ImageList(components); + gbColdStorage = new GroupBox(); + catalogueCollectionFilterUI1 = new CatalogueCollectionFilterUI(); + panel2 = new Panel(); + tbFilter = new TextBox(); + ((ISupportInitialize)tlvCatalogues).BeginInit(); + gbColdStorage.SuspendLayout(); + panel2.SuspendLayout(); + SuspendLayout(); // // tlvCatalogues // - this.tlvCatalogues.AllColumns.Add(this.olvColumn1); - this.tlvCatalogues.AllColumns.Add(this.olvFilters); - this.tlvCatalogues.AllColumns.Add(this.olvOrder); - this.tlvCatalogues.CellEditUseWholeCell = false; - this.tlvCatalogues.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvColumn1}); - this.tlvCatalogues.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvCatalogues.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvCatalogues.HideSelection = false; - this.tlvCatalogues.Location = new System.Drawing.Point(0, 0); - this.tlvCatalogues.Name = "tlvCatalogues"; - this.tlvCatalogues.ShowGroups = false; - this.tlvCatalogues.Size = new System.Drawing.Size(500, 414); - this.tlvCatalogues.TabIndex = 0; - this.tlvCatalogues.Text = "label1"; - this.tlvCatalogues.UseCompatibleStateImageBehavior = false; - this.tlvCatalogues.UseFiltering = true; - this.tlvCatalogues.View = System.Windows.Forms.View.Details; - this.tlvCatalogues.VirtualMode = true; + tlvCatalogues.AllColumns.Add(olvColumn1); + tlvCatalogues.AllColumns.Add(olvFilters); + tlvCatalogues.AllColumns.Add(olvOrder); + tlvCatalogues.CellEditUseWholeCell = false; + tlvCatalogues.Columns.AddRange(new ColumnHeader[] { olvColumn1 }); + tlvCatalogues.Dock = DockStyle.Fill; + tlvCatalogues.Location = new System.Drawing.Point(0, 0); + tlvCatalogues.Name = "tlvCatalogues"; + tlvCatalogues.ShowGroups = false; + tlvCatalogues.Size = new System.Drawing.Size(500, 414); + tlvCatalogues.TabIndex = 0; + tlvCatalogues.Text = "label1"; + tlvCatalogues.UseCompatibleStateImageBehavior = false; + tlvCatalogues.UseFiltering = true; + tlvCatalogues.View = View.Details; + tlvCatalogues.VirtualMode = true; // // olvColumn1 // - this.olvColumn1.AspectName = "ToString"; - this.olvColumn1.FillsFreeSpace = false; - this.olvColumn1.HeaderTextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.olvColumn1.MinimumWidth = 100; - this.olvColumn1.Text = "Catalogues"; - this.olvColumn1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.olvColumn1.Width = 100; + olvColumn1.AspectName = "ToString"; + olvColumn1.HeaderTextAlign = HorizontalAlignment.Center; + olvColumn1.MinimumWidth = 100; + olvColumn1.Text = "Catalogues"; + olvColumn1.TextAlign = HorizontalAlignment.Center; + olvColumn1.Width = 100; // // olvFilters // - this.olvFilters.DisplayIndex = 1; - this.olvFilters.IsVisible = false; - this.olvFilters.Text = "Filters"; - this.olvFilters.IsEditable = false; + olvFilters.DisplayIndex = 1; + olvFilters.IsEditable = false; + olvFilters.IsVisible = false; + olvFilters.Text = "Filters"; // // olvOrder // - this.olvOrder.IsEditable = false; - this.olvOrder.IsVisible = false; - this.olvOrder.Text = "Order"; + olvOrder.IsEditable = false; + olvOrder.IsVisible = false; + olvOrder.Text = "Order"; // // imageList_RightClickIcons // - this.imageList_RightClickIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList_RightClickIcons.ImageStream"))); - this.imageList_RightClickIcons.TransparentColor = System.Drawing.Color.Transparent; - this.imageList_RightClickIcons.Images.SetKeyName(0, "DLE"); - this.imageList_RightClickIcons.Images.SetKeyName(1, "DEM"); - this.imageList_RightClickIcons.Images.SetKeyName(2, "DQE"); - this.imageList_RightClickIcons.Images.SetKeyName(3, "LOG"); - this.imageList_RightClickIcons.Images.SetKeyName(4, "aggregates.png"); + imageList_RightClickIcons.ColorDepth = ColorDepth.Depth8Bit; + imageList_RightClickIcons.ImageStream = (ImageListStreamer)resources.GetObject("imageList_RightClickIcons.ImageStream"); + imageList_RightClickIcons.TransparentColor = System.Drawing.Color.Transparent; + imageList_RightClickIcons.Images.SetKeyName(0, "DLE"); + imageList_RightClickIcons.Images.SetKeyName(1, "DEM"); + imageList_RightClickIcons.Images.SetKeyName(2, "DQE"); + imageList_RightClickIcons.Images.SetKeyName(3, "LOG"); + imageList_RightClickIcons.Images.SetKeyName(4, "aggregates.png"); // // gbColdStorage // - this.gbColdStorage.Controls.Add(this.catalogueCollectionFilterUI1); - this.gbColdStorage.Dock = System.Windows.Forms.DockStyle.Bottom; - this.gbColdStorage.Location = new System.Drawing.Point(0, 414); - this.gbColdStorage.Name = "gbColdStorage"; - this.gbColdStorage.Size = new System.Drawing.Size(500, 65); - this.gbColdStorage.TabIndex = 1; - this.gbColdStorage.TabStop = false; - this.gbColdStorage.Text = "Show"; + gbColdStorage.Controls.Add(tbFilter); + gbColdStorage.Controls.Add(catalogueCollectionFilterUI1); + gbColdStorage.Dock = DockStyle.Bottom; + gbColdStorage.Location = new System.Drawing.Point(0, 414); + gbColdStorage.Name = "gbColdStorage"; + gbColdStorage.Size = new System.Drawing.Size(500, 65); + gbColdStorage.TabIndex = 1; + gbColdStorage.TabStop = false; + gbColdStorage.Text = "Show"; // // catalogueCollectionFilterUI1 // - this.catalogueCollectionFilterUI1.Dock = System.Windows.Forms.DockStyle.Fill; - this.catalogueCollectionFilterUI1.Location = new System.Drawing.Point(3, 16); - this.catalogueCollectionFilterUI1.Name = "catalogueCollectionFilterUI1"; - this.catalogueCollectionFilterUI1.Size = new System.Drawing.Size(494, 46); - this.catalogueCollectionFilterUI1.TabIndex = 0; + catalogueCollectionFilterUI1.Dock = DockStyle.Fill; + catalogueCollectionFilterUI1.Location = new System.Drawing.Point(3, 19); + catalogueCollectionFilterUI1.Name = "catalogueCollectionFilterUI1"; + catalogueCollectionFilterUI1.Size = new System.Drawing.Size(494, 43); + catalogueCollectionFilterUI1.TabIndex = 0; // // panel2 // - this.panel2.Controls.Add(this.tlvCatalogues); - this.panel2.Controls.Add(this.gbColdStorage); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 0); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(500, 479); - this.panel2.TabIndex = 2; + panel2.Controls.Add(tlvCatalogues); + panel2.Controls.Add(gbColdStorage); + panel2.Dock = DockStyle.Fill; + panel2.Location = new System.Drawing.Point(0, 0); + panel2.Name = "panel2"; + panel2.Size = new System.Drawing.Size(500, 479); + panel2.TabIndex = 2; + // + // tbFilter + // + tbFilter.Location = new System.Drawing.Point(0, 39); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(500, 23); + tbFilter.TabIndex = 2; // // CatalogueCollectionUI // - this.Controls.Add(this.panel2); - this.Name = "CatalogueCollectionUI"; - this.Size = new System.Drawing.Size(500, 479); - ((System.ComponentModel.ISupportInitialize)(this.tlvCatalogues)).EndInit(); - this.gbColdStorage.ResumeLayout(false); - this.panel2.ResumeLayout(false); - this.ResumeLayout(false); - + Controls.Add(panel2); + Name = "CatalogueCollectionUI"; + Size = new System.Drawing.Size(500, 479); + ((ISupportInitialize)tlvCatalogues).EndInit(); + gbColdStorage.ResumeLayout(false); + gbColdStorage.PerformLayout(); + panel2.ResumeLayout(false); + ResumeLayout(false); } #endregion @@ -143,5 +149,6 @@ private void InitializeComponent() private OLVColumn olvOrder; private CatalogueCollectionFilterUI catalogueCollectionFilterUI1; private Panel panel2; + private TextBox tbFilter; } } diff --git a/Rdmp.UI/Collections/CatalogueCollectionUI.cs b/Rdmp.UI/Collections/CatalogueCollectionUI.cs index c1efc61a13..2bd6ea9d71 100644 --- a/Rdmp.UI/Collections/CatalogueCollectionUI.cs +++ b/Rdmp.UI/Collections/CatalogueCollectionUI.cs @@ -159,7 +159,8 @@ public void RefreshUIFromDatabase(object oRefreshFrom) Alignment = ToolStripItemAlignment.Right, ToolTipText = "Refresh Object" }; - _refresh.Click += delegate (object sender, EventArgs e) { + _refresh.Click += delegate (object sender, EventArgs e) + { var catalogue = Activator.CoreChildProvider.AllCatalogues.First(); if (catalogue is not null) { @@ -225,7 +226,8 @@ public override void SetItemActivator(IActivateItems activator) Activator, olvColumn1, //the icon column //we have our own custom filter logic so no need to pass tbFilter - olvColumn1 //also the renameable column + olvColumn1, //also the renameable column + tbFilter ); CommonTreeFunctionality.MaintainRootObjects = new[] diff --git a/Rdmp.UI/Collections/CatalogueCollectionUI.resx b/Rdmp.UI/Collections/CatalogueCollectionUI.resx index 760480c994..4e69981475 100644 --- a/Rdmp.UI/Collections/CatalogueCollectionUI.resx +++ b/Rdmp.UI/Collections/CatalogueCollectionUI.resx @@ -1,17 +1,17 @@  - @@ -122,57 +122,56 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK - CwAAAk1TRnQBSQFMAgEBBQEAAZgBAQGYAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo - AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA - AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 - AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA - AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm - AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM - AWYCAAHMAZkCAALMAgABzAH/AgAB/wFm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+wEPAQ4BOAEpAQ4BKQL7ATcCDwEwAQ8BEAH7AQABAwReBQAEXgERBAAB + +wEAAfsCAAH7BgABOAE3AzgBAAE4AgABOAEiAQ4EOAH7AQMBDwL7ASkB+wEpAQ8C+wEpAfsBIgL7AQAG + XgMABV4HAAFRAgABDwFeBQABOAEAAjgBDgE3AzgBAAE4AQACOAEAATgE+wEOAvsBNwEPA/sBIwP7AQAG + XgHlAQAGXgH7BQABAwP7AQABUQUAAjgBAAI4AgACOAIAAjgBAAI4BPsBKQH7AQ8BKQIDAQ8B+wEpA/sB + AALlAXkBWAFRAV4CAAEOBV4B+wYAAfsCAAEiBgADOAUAAQMEAAM4BPsBDgEDAg8B+wIPATABDgP7BgAB + XgIAAeUFAAH7BgABWAEiAVgHAAQ4AwACOAMABDgK+wEDAfsBMAP7AQ8GAAJeAXQFAAFSEAAEOAEAAjgC + AAI4AQAEOAP7ATcBIwv7AQAB+wUAAl4BDgwAAQ4BXgEAAfsGAAQ4AQAGOAEABDgE+wEwC/sGAAHlA14E + AAH7CQABIgcACzgBAwQ4BPsBNwf7ASkD+wIAAVgDAAReAwABIgoAAfsHAAo4AQAFOAT7ASkH+wEwA/sD + AAFYAQAGXgEAAVgTABA4BfsBIwE3A/sBKQEDBPsFAAH7BV4BAwEQEwAQOAf7AikBNwb7BgABFAkAAUIB + TQE+BwABPgMAASgDAAFAAwABIAMAAQEBAAEBBgABARYAA/+HAAH4AQ8BgAUAAeABBwGAAQEEAAHAAQMB + wAEBBAABgAEBAcABAwQAAYABAAHgAQMEAAGAAQAB4AEHBgAB8AEHBgAB8AEPBgAB+AEPBgAB+AEfBAAB + gAEAAfwBHwQAAYABAQH8AT8EAAHAAQEB/gE/BAAB4AEDAf4BfwQAAfABBwH/AX8EAAH8AT8L \ No newline at end of file diff --git a/Rdmp.UI/Collections/CohortIdentificationCollectionUI.Designer.cs b/Rdmp.UI/Collections/CohortIdentificationCollectionUI.Designer.cs index cf23d33fa5..f2043e27ba 100644 --- a/Rdmp.UI/Collections/CohortIdentificationCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/CohortIdentificationCollectionUI.Designer.cs @@ -31,54 +31,64 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.tlvCohortIdentificationConfigurations = new BrightIdeasSoftware.TreeListView(); - this.olvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvFrozen = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.tlvCohortIdentificationConfigurations)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + tlvCohortIdentificationConfigurations = new TreeListView(); + olvName = new OLVColumn(); + olvFrozen = new OLVColumn(); + tbFilter = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)tlvCohortIdentificationConfigurations).BeginInit(); + SuspendLayout(); // // tlvCohortIdentificationConfigurations // - this.tlvCohortIdentificationConfigurations.AllColumns.Add(this.olvName); - this.tlvCohortIdentificationConfigurations.AllColumns.Add(this.olvFrozen); - this.tlvCohortIdentificationConfigurations.CellEditUseWholeCell = false; - this.tlvCohortIdentificationConfigurations.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvName,olvFrozen}); - this.tlvCohortIdentificationConfigurations.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvCohortIdentificationConfigurations.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvCohortIdentificationConfigurations.Location = new System.Drawing.Point(0, 0); - this.tlvCohortIdentificationConfigurations.Name = "tlvCohortIdentificationConfigurations"; - this.tlvCohortIdentificationConfigurations.ShowGroups = false; - this.tlvCohortIdentificationConfigurations.Size = new System.Drawing.Size(500, 600); - this.tlvCohortIdentificationConfigurations.TabIndex = 0; - this.tlvCohortIdentificationConfigurations.UseCompatibleStateImageBehavior = false; - this.tlvCohortIdentificationConfigurations.View = System.Windows.Forms.View.Details; - this.tlvCohortIdentificationConfigurations.VirtualMode = true; + tlvCohortIdentificationConfigurations.AllColumns.Add(olvName); + tlvCohortIdentificationConfigurations.AllColumns.Add(olvFrozen); + tlvCohortIdentificationConfigurations.CellEditUseWholeCell = false; + tlvCohortIdentificationConfigurations.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { olvName, olvFrozen }); + tlvCohortIdentificationConfigurations.Dock = System.Windows.Forms.DockStyle.Fill; + tlvCohortIdentificationConfigurations.Location = new System.Drawing.Point(0, 0); + tlvCohortIdentificationConfigurations.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tlvCohortIdentificationConfigurations.Name = "tlvCohortIdentificationConfigurations"; + tlvCohortIdentificationConfigurations.ShowGroups = false; + tlvCohortIdentificationConfigurations.Size = new System.Drawing.Size(583, 692); + tlvCohortIdentificationConfigurations.TabIndex = 0; + tlvCohortIdentificationConfigurations.UseCompatibleStateImageBehavior = false; + tlvCohortIdentificationConfigurations.View = System.Windows.Forms.View.Details; + tlvCohortIdentificationConfigurations.VirtualMode = true; // // olvName // - this.olvName.AspectName = "ToString"; - this.olvName.Sortable = false; - this.olvName.Text = "Cohort Identification Configurations"; - this.olvName.MinimumWidth = 100; + olvName.AspectName = "ToString"; + olvName.MinimumWidth = 100; + olvName.Sortable = false; + olvName.Text = "Cohort Identification Configurations"; + olvName.Width = 100; // // olvFrozen - // // - this.olvFrozen.Sortable = true; - this.olvFrozen.Text = "Frozen"; - this.olvFrozen.IsEditable = false; + olvFrozen.IsEditable = false; + olvFrozen.Text = "Frozen"; + // + // tbFilter + // + tbFilter.Dock = System.Windows.Forms.DockStyle.Bottom; + tbFilter.Location = new System.Drawing.Point(0, 669); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(583, 23); + tbFilter.TabIndex = 1; + // // CohortIdentificationCollectionUI // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tlvCohortIdentificationConfigurations); - this.Name = "CohortIdentificationCollectionUI"; - this.Size = new System.Drawing.Size(500, 600); - ((System.ComponentModel.ISupportInitialize)(this.tlvCohortIdentificationConfigurations)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(tbFilter); + Controls.Add(tlvCohortIdentificationConfigurations); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "CohortIdentificationCollectionUI"; + Size = new System.Drawing.Size(583, 692); + ((System.ComponentModel.ISupportInitialize)tlvCohortIdentificationConfigurations).EndInit(); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -86,5 +96,6 @@ private void InitializeComponent() private TreeListView tlvCohortIdentificationConfigurations; private OLVColumn olvName; private OLVColumn olvFrozen; + private System.Windows.Forms.TextBox tbFilter; } } diff --git a/Rdmp.UI/Collections/CohortIdentificationCollectionUI.cs b/Rdmp.UI/Collections/CohortIdentificationCollectionUI.cs index 1103534376..ef5157a26c 100644 --- a/Rdmp.UI/Collections/CohortIdentificationCollectionUI.cs +++ b/Rdmp.UI/Collections/CohortIdentificationCollectionUI.cs @@ -49,7 +49,8 @@ public override void SetItemActivator(IActivateItems activator) tlvCohortIdentificationConfigurations, Activator, olvName, //column with the icon - olvName //column that can be renamed + olvName, //column that can be renamed + tbFilter ); CommonTreeFunctionality.AxeChildren = new[] { diff --git a/Rdmp.UI/Collections/CohortIdentificationCollectionUI.resx b/Rdmp.UI/Collections/CohortIdentificationCollectionUI.resx index 1af7de150c..af32865ec1 100644 --- a/Rdmp.UI/Collections/CohortIdentificationCollectionUI.resx +++ b/Rdmp.UI/Collections/CohortIdentificationCollectionUI.resx @@ -1,17 +1,17 @@  - diff --git a/Rdmp.UI/Collections/DataExportCollectionUI.Designer.cs b/Rdmp.UI/Collections/DataExportCollectionUI.Designer.cs index 398923a821..14cad229c9 100644 --- a/Rdmp.UI/Collections/DataExportCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/DataExportCollectionUI.Designer.cs @@ -30,70 +30,78 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.tlvDataExport = new BrightIdeasSoftware.TreeListView(); - this.olvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvProjectNumber = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvCohortSource = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvCohortVersion = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.tlvDataExport)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + tlvDataExport = new TreeListView(); + olvName = new OLVColumn(); + olvProjectNumber = new OLVColumn(); + olvCohortSource = new OLVColumn(); + olvCohortVersion = new OLVColumn(); + tbFilter = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)tlvDataExport).BeginInit(); + SuspendLayout(); // // tlvDataExport // - this.tlvDataExport.AllColumns.Add(this.olvName); - this.tlvDataExport.AllColumns.Add(this.olvProjectNumber); - this.tlvDataExport.AllColumns.Add(this.olvCohortSource); - this.tlvDataExport.AllColumns.Add(this.olvCohortVersion); - this.tlvDataExport.CellEditUseWholeCell = false; - this.tlvDataExport.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvName, - this.olvProjectNumber, - this.olvCohortVersion}); - this.tlvDataExport.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvDataExport.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvDataExport.FullRowSelect = true; - this.tlvDataExport.HideSelection = false; - this.tlvDataExport.Location = new System.Drawing.Point(0, 0); - this.tlvDataExport.Name = "tlvDataExport"; - this.tlvDataExport.ShowGroups = false; - this.tlvDataExport.Size = new System.Drawing.Size(385, 694); - this.tlvDataExport.TabIndex = 0; - this.tlvDataExport.UseCompatibleStateImageBehavior = false; - this.tlvDataExport.View = System.Windows.Forms.View.Details; - this.tlvDataExport.VirtualMode = true; + tlvDataExport.AllColumns.Add(olvName); + tlvDataExport.AllColumns.Add(olvProjectNumber); + tlvDataExport.AllColumns.Add(olvCohortSource); + tlvDataExport.AllColumns.Add(olvCohortVersion); + tlvDataExport.CellEditUseWholeCell = false; + tlvDataExport.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { olvName, olvProjectNumber, olvCohortVersion }); + tlvDataExport.Dock = System.Windows.Forms.DockStyle.Fill; + tlvDataExport.FullRowSelect = true; + tlvDataExport.Location = new System.Drawing.Point(0, 0); + tlvDataExport.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tlvDataExport.Name = "tlvDataExport"; + tlvDataExport.ShowGroups = false; + tlvDataExport.Size = new System.Drawing.Size(449, 801); + tlvDataExport.TabIndex = 0; + tlvDataExport.UseCompatibleStateImageBehavior = false; + tlvDataExport.View = System.Windows.Forms.View.Details; + tlvDataExport.VirtualMode = true; // // olvName // - this.olvName.AspectName = "ToString"; - this.olvName.CellEditUseWholeCell = true; - this.olvName.Text = "Projects"; - this.olvName.MinimumWidth = 100; + olvName.AspectName = "ToString"; + olvName.CellEditUseWholeCell = true; + olvName.MinimumWidth = 100; + olvName.Text = "Projects"; + olvName.Width = 100; // // olvProjectNumber // - this.olvProjectNumber.Text = "ProjectNumber"; - this.olvProjectNumber.Width = 89; + olvProjectNumber.Text = "ProjectNumber"; + olvProjectNumber.Width = 89; // // olvCohortSource // - this.olvCohortSource.IsVisible = false; - this.olvCohortSource.Text = "CohortSource"; + olvCohortSource.IsVisible = false; + olvCohortSource.Text = "CohortSource"; // // olvCohortVersion // - this.olvCohortVersion.Text = "Version"; + olvCohortVersion.Text = "Version"; + // + // tbFilter + // + tbFilter.Dock = System.Windows.Forms.DockStyle.Bottom; + tbFilter.Location = new System.Drawing.Point(0, 778); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(449, 23); + tbFilter.TabIndex = 1; // // DataExportCollectionUI // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tlvDataExport); - this.Name = "DataExportCollectionUI"; - this.Size = new System.Drawing.Size(385, 694); - ((System.ComponentModel.ISupportInitialize)(this.tlvDataExport)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(tbFilter); + Controls.Add(tlvDataExport); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "DataExportCollectionUI"; + Size = new System.Drawing.Size(449, 801); + ((System.ComponentModel.ISupportInitialize)tlvDataExport).EndInit(); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -103,5 +111,6 @@ private void InitializeComponent() private OLVColumn olvProjectNumber; private OLVColumn olvCohortSource; private OLVColumn olvCohortVersion; + private System.Windows.Forms.TextBox tbFilter; } } diff --git a/Rdmp.UI/Collections/DataExportCollectionUI.cs b/Rdmp.UI/Collections/DataExportCollectionUI.cs index 4afbb21543..4b1a7ee567 100644 --- a/Rdmp.UI/Collections/DataExportCollectionUI.cs +++ b/Rdmp.UI/Collections/DataExportCollectionUI.cs @@ -87,7 +87,8 @@ public override void SetItemActivator(IActivateItems activator) tlvDataExport, Activator, olvName, - olvName + olvName, + tbFilter ); CommonTreeFunctionality.WhitespaceRightClickMenuCommandsGetter = a => GetWhitespaceRightClickMenu(); diff --git a/Rdmp.UI/Collections/DataExportCollectionUI.resx b/Rdmp.UI/Collections/DataExportCollectionUI.resx index 1af7de150c..af32865ec1 100644 --- a/Rdmp.UI/Collections/DataExportCollectionUI.resx +++ b/Rdmp.UI/Collections/DataExportCollectionUI.resx @@ -1,17 +1,17 @@  - diff --git a/Rdmp.UI/Collections/DatasetsCollectionUI.Designer.cs b/Rdmp.UI/Collections/DatasetsCollectionUI.Designer.cs index b2ec676936..61efca5adb 100644 --- a/Rdmp.UI/Collections/DatasetsCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/DatasetsCollectionUI.Designer.cs @@ -1,4 +1,6 @@ -namespace Rdmp.UI.Collections +using System.Windows.Forms; + +namespace Rdmp.UI.Collections { partial class DatasetsCollectionUI { @@ -29,53 +31,64 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.tlvDatasets = new BrightIdeasSoftware.TreeListView(); - this.olvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.tlvDatasets)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + tlvDatasets = new BrightIdeasSoftware.TreeListView(); + olvName = new BrightIdeasSoftware.OLVColumn(); + tbFilter = new TextBox(); + ((System.ComponentModel.ISupportInitialize)tlvDatasets).BeginInit(); + SuspendLayout(); // - // tlvFavourites + // tlvDatasets // - this.tlvDatasets.AllColumns.Add(this.olvName); - this.tlvDatasets.CellEditUseWholeCell = false; - this.tlvDatasets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvName}); - this.tlvDatasets.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvDatasets.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvDatasets.FullRowSelect = true; - this.tlvDatasets.HideSelection = false; - this.tlvDatasets.Location = new System.Drawing.Point(0, 0); - this.tlvDatasets.Name = "tlvFavourites"; - this.tlvDatasets.ShowGroups = false; - this.tlvDatasets.Size = new System.Drawing.Size(322, 557); - this.tlvDatasets.TabIndex = 2; - this.tlvDatasets.UseCompatibleStateImageBehavior = false; - this.tlvDatasets.View = System.Windows.Forms.View.Details; - this.tlvDatasets.VirtualMode = true; + tlvDatasets.AllColumns.Add(olvName); + tlvDatasets.CellEditUseWholeCell = false; + tlvDatasets.Columns.AddRange(new ColumnHeader[] { olvName }); + tlvDatasets.Dock = DockStyle.Fill; + tlvDatasets.FullRowSelect = true; + tlvDatasets.Location = new System.Drawing.Point(0, 0); + tlvDatasets.Margin = new Padding(4, 3, 4, 3); + tlvDatasets.Name = "tlvDatasets"; + tlvDatasets.ShowGroups = false; + tlvDatasets.Size = new System.Drawing.Size(376, 643); + tlvDatasets.TabIndex = 2; + tlvDatasets.UseCompatibleStateImageBehavior = false; + tlvDatasets.View = View.Details; + tlvDatasets.VirtualMode = true; // // olvName // - this.olvName.AspectName = "ToString"; - this.olvName.CellEditUseWholeCell = true; - this.olvName.Text = "Datasets"; - this.olvName.MinimumWidth = 100; + olvName.AspectName = "ToString"; + olvName.CellEditUseWholeCell = true; + olvName.MinimumWidth = 100; + olvName.Text = "Datasets"; + olvName.Width = 100; + // + // tbFilter + // + tbFilter.Dock = DockStyle.Bottom; + tbFilter.Location = new System.Drawing.Point(0, 620); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(376, 23); + tbFilter.TabIndex = 3; // - // FavouritesCollectionUI + // DatasetsCollectionUI // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tlvDatasets); - this.Name = "DatasetsCollectionUI"; - this.Size = new System.Drawing.Size(322, 557); - ((System.ComponentModel.ISupportInitialize)(this.tlvDatasets)).EndInit(); - this.ResumeLayout(false); - this.Text = "DatasetsCollectionUI"; + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(tbFilter); + Controls.Add(tlvDatasets); + Margin = new Padding(4, 3, 4, 3); + Name = "DatasetsCollectionUI"; + Size = new System.Drawing.Size(376, 643); + ((System.ComponentModel.ISupportInitialize)tlvDatasets).EndInit(); + ResumeLayout(false); + PerformLayout(); } #endregion private BrightIdeasSoftware.TreeListView tlvDatasets; private BrightIdeasSoftware.OLVColumn olvName; + private TextBox tbFilter; } } \ No newline at end of file diff --git a/Rdmp.UI/Collections/DatasetsCollectionUI.cs b/Rdmp.UI/Collections/DatasetsCollectionUI.cs index 6a72d8d3d7..5e5d8aaccf 100644 --- a/Rdmp.UI/Collections/DatasetsCollectionUI.cs +++ b/Rdmp.UI/Collections/DatasetsCollectionUI.cs @@ -29,7 +29,7 @@ public override void SetItemActivator(IActivateItems activator) base.SetItemActivator(activator); CommonTreeFunctionality.SetUp(RDMPCollection.Datasets, tlvDatasets, Activator, olvName, olvName, - new RDMPCollectionCommonFunctionalitySettings()); + new RDMPCollectionCommonFunctionalitySettings(),tbFilter); CommonTreeFunctionality.WhitespaceRightClickMenuCommandsGetter = a => new IAtomicCommand[] { @@ -63,6 +63,8 @@ public override void SetItemActivator(IActivateItems activator) CommonFunctionality.Add(_refresh); } } + + public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { diff --git a/Rdmp.UI/Collections/DatasetsCollectionUI.resx b/Rdmp.UI/Collections/DatasetsCollectionUI.resx index 1af7de150c..af32865ec1 100644 --- a/Rdmp.UI/Collections/DatasetsCollectionUI.resx +++ b/Rdmp.UI/Collections/DatasetsCollectionUI.resx @@ -1,17 +1,17 @@  - diff --git a/Rdmp.UI/Collections/FavouritesCollectionUI.Designer.cs b/Rdmp.UI/Collections/FavouritesCollectionUI.Designer.cs index 5dffa6bd0c..9d3b5b9bc6 100644 --- a/Rdmp.UI/Collections/FavouritesCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/FavouritesCollectionUI.Designer.cs @@ -28,53 +28,64 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.tlvFavourites = new BrightIdeasSoftware.TreeListView(); - this.olvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.tlvFavourites)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + tlvFavourites = new BrightIdeasSoftware.TreeListView(); + olvName = new BrightIdeasSoftware.OLVColumn(); + tbFilter = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)tlvFavourites).BeginInit(); + SuspendLayout(); // // tlvFavourites // - this.tlvFavourites.AllColumns.Add(this.olvName); - this.tlvFavourites.CellEditUseWholeCell = false; - this.tlvFavourites.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvName}); - this.tlvFavourites.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvFavourites.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvFavourites.FullRowSelect = true; - this.tlvFavourites.HideSelection = false; - this.tlvFavourites.Location = new System.Drawing.Point(0, 0); - this.tlvFavourites.Name = "tlvFavourites"; - this.tlvFavourites.ShowGroups = false; - this.tlvFavourites.Size = new System.Drawing.Size(322, 557); - this.tlvFavourites.TabIndex = 2; - this.tlvFavourites.UseCompatibleStateImageBehavior = false; - this.tlvFavourites.View = System.Windows.Forms.View.Details; - this.tlvFavourites.VirtualMode = true; + tlvFavourites.AllColumns.Add(olvName); + tlvFavourites.CellEditUseWholeCell = false; + tlvFavourites.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { olvName }); + tlvFavourites.Dock = System.Windows.Forms.DockStyle.Fill; + tlvFavourites.FullRowSelect = true; + tlvFavourites.Location = new System.Drawing.Point(0, 0); + tlvFavourites.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tlvFavourites.Name = "tlvFavourites"; + tlvFavourites.ShowGroups = false; + tlvFavourites.Size = new System.Drawing.Size(376, 643); + tlvFavourites.TabIndex = 2; + tlvFavourites.UseCompatibleStateImageBehavior = false; + tlvFavourites.View = System.Windows.Forms.View.Details; + tlvFavourites.VirtualMode = true; // // olvName // - this.olvName.AspectName = "ToString"; - this.olvName.CellEditUseWholeCell = true; - this.olvName.Text = "Favourites"; - this.olvName.MinimumWidth = 100; + olvName.AspectName = "ToString"; + olvName.CellEditUseWholeCell = true; + olvName.MinimumWidth = 100; + olvName.Text = "Favourites"; + olvName.Width = 100; + // + // tbFilter + // + tbFilter.Dock = System.Windows.Forms.DockStyle.Bottom; + tbFilter.Location = new System.Drawing.Point(0, 620); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(376, 23); + tbFilter.TabIndex = 3; // // FavouritesCollectionUI // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tlvFavourites); - this.Name = "FavouritesCollectionUI"; - this.Size = new System.Drawing.Size(322, 557); - ((System.ComponentModel.ISupportInitialize)(this.tlvFavourites)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(tbFilter); + Controls.Add(tlvFavourites); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "FavouritesCollectionUI"; + Size = new System.Drawing.Size(376, 643); + ((System.ComponentModel.ISupportInitialize)tlvFavourites).EndInit(); + ResumeLayout(false); + PerformLayout(); } #endregion private BrightIdeasSoftware.TreeListView tlvFavourites; private BrightIdeasSoftware.OLVColumn olvName; + private System.Windows.Forms.TextBox tbFilter; } } diff --git a/Rdmp.UI/Collections/FavouritesCollectionUI.cs b/Rdmp.UI/Collections/FavouritesCollectionUI.cs index dc5e97e5b6..0609422418 100644 --- a/Rdmp.UI/Collections/FavouritesCollectionUI.cs +++ b/Rdmp.UI/Collections/FavouritesCollectionUI.cs @@ -36,7 +36,7 @@ public override void SetItemActivator(IActivateItems activator) base.SetItemActivator(activator); CommonTreeFunctionality.SetUp(RDMPCollection.Favourites, tlvFavourites, Activator, olvName, olvName, - new RDMPCollectionCommonFunctionalitySettings()); + new RDMPCollectionCommonFunctionalitySettings(),tbFilter); CommonTreeFunctionality.AxeChildren = new Type[] { typeof(CohortIdentificationConfiguration) }; CommonTreeFunctionality.WhitespaceRightClickMenuCommandsGetter = a => new IAtomicCommand[] diff --git a/Rdmp.UI/Collections/FavouritesCollectionUI.resx b/Rdmp.UI/Collections/FavouritesCollectionUI.resx index 1af7de150c..af32865ec1 100644 --- a/Rdmp.UI/Collections/FavouritesCollectionUI.resx +++ b/Rdmp.UI/Collections/FavouritesCollectionUI.resx @@ -1,17 +1,17 @@  - diff --git a/Rdmp.UI/Collections/LoadMetadataCollectionUI.Designer.cs b/Rdmp.UI/Collections/LoadMetadataCollectionUI.Designer.cs index 94e03f70e6..4bf4108098 100644 --- a/Rdmp.UI/Collections/LoadMetadataCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/LoadMetadataCollectionUI.Designer.cs @@ -31,55 +31,65 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.tlvLoadMetadata = new BrightIdeasSoftware.TreeListView(); - this.olvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvValue = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.tlvLoadMetadata)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + tlvLoadMetadata = new TreeListView(); + olvName = new OLVColumn(); + olvValue = new OLVColumn(); + tbFilter = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)tlvLoadMetadata).BeginInit(); + SuspendLayout(); // // tlvLoadMetadata // - this.tlvLoadMetadata.AllColumns.Add(this.olvName); - this.tlvLoadMetadata.AllColumns.Add(this.olvValue); - this.tlvLoadMetadata.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.SingleClick; - this.tlvLoadMetadata.CellEditUseWholeCell = false; - this.tlvLoadMetadata.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvName, this.olvValue}); - this.tlvLoadMetadata.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvLoadMetadata.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvLoadMetadata.Location = new System.Drawing.Point(0, 0); - this.tlvLoadMetadata.Name = "tlvLoadMetadata"; - this.tlvLoadMetadata.ShowGroups = false; - this.tlvLoadMetadata.Size = new System.Drawing.Size(500, 600); - this.tlvLoadMetadata.TabIndex = 0; - this.tlvLoadMetadata.UseCompatibleStateImageBehavior = false; - this.tlvLoadMetadata.View = System.Windows.Forms.View.Details; - this.tlvLoadMetadata.VirtualMode = true; + tlvLoadMetadata.AllColumns.Add(olvName); + tlvLoadMetadata.AllColumns.Add(olvValue); + tlvLoadMetadata.CellEditActivation = ObjectListView.CellEditActivateMode.SingleClick; + tlvLoadMetadata.CellEditUseWholeCell = false; + tlvLoadMetadata.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { olvName, olvValue }); + tlvLoadMetadata.Dock = System.Windows.Forms.DockStyle.Fill; + tlvLoadMetadata.Location = new System.Drawing.Point(0, 0); + tlvLoadMetadata.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tlvLoadMetadata.Name = "tlvLoadMetadata"; + tlvLoadMetadata.ShowGroups = false; + tlvLoadMetadata.Size = new System.Drawing.Size(583, 692); + tlvLoadMetadata.TabIndex = 0; + tlvLoadMetadata.UseCompatibleStateImageBehavior = false; + tlvLoadMetadata.View = System.Windows.Forms.View.Details; + tlvLoadMetadata.VirtualMode = true; // // olvName // - this.olvName.AspectName = "ToString"; - this.olvName.Text = "Load Metadata"; - this.olvName.MinimumWidth = 100; + olvName.AspectName = "ToString"; + olvName.MinimumWidth = 100; + olvName.Text = "Load Metadata"; + olvName.Width = 100; // // olvValue // - this.olvValue.AspectName = "Value"; - this.olvValue.Text = "Value"; - this.olvValue.FillsFreeSpace = false; - this.olvValue.IsEditable = false; + olvValue.AspectName = "Value"; + olvValue.IsEditable = false; + olvValue.Text = "Value"; + // + // tbFilter + // + tbFilter.Dock = System.Windows.Forms.DockStyle.Bottom; + tbFilter.Location = new System.Drawing.Point(0, 669); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(583, 23); + tbFilter.TabIndex = 1; // // LoadMetadataCollectionUI // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tlvLoadMetadata); - this.Name = "LoadMetadataCollectionUI"; - this.Size = new System.Drawing.Size(500, 600); - ((System.ComponentModel.ISupportInitialize)(this.tlvLoadMetadata)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(tbFilter); + Controls.Add(tlvLoadMetadata); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "LoadMetadataCollectionUI"; + Size = new System.Drawing.Size(583, 692); + ((System.ComponentModel.ISupportInitialize)tlvLoadMetadata).EndInit(); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -87,5 +97,6 @@ private void InitializeComponent() private TreeListView tlvLoadMetadata; private OLVColumn olvName; private OLVColumn olvValue; + private System.Windows.Forms.TextBox tbFilter; } } diff --git a/Rdmp.UI/Collections/LoadMetadataCollectionUI.cs b/Rdmp.UI/Collections/LoadMetadataCollectionUI.cs index 5c9d06697d..fc494a4fc1 100644 --- a/Rdmp.UI/Collections/LoadMetadataCollectionUI.cs +++ b/Rdmp.UI/Collections/LoadMetadataCollectionUI.cs @@ -80,7 +80,7 @@ public override void SetItemActivator(IActivateItems activator) tlvLoadMetadata, activator, olvName, - olvName); + olvName,tbFilter); CommonTreeFunctionality.WhitespaceRightClickMenuCommandsGetter = a => new IAtomicCommand[] { new ExecuteCommandCreateNewLoadMetadata(a) }; diff --git a/Rdmp.UI/Collections/LoadMetadataCollectionUI.resx b/Rdmp.UI/Collections/LoadMetadataCollectionUI.resx index 1af7de150c..af32865ec1 100644 --- a/Rdmp.UI/Collections/LoadMetadataCollectionUI.resx +++ b/Rdmp.UI/Collections/LoadMetadataCollectionUI.resx @@ -1,17 +1,17 @@  - diff --git a/Rdmp.UI/Collections/RDMPCollectionCommonFunctionality.cs b/Rdmp.UI/Collections/RDMPCollectionCommonFunctionality.cs index a60232e790..0b1ad2ba3e 100644 --- a/Rdmp.UI/Collections/RDMPCollectionCommonFunctionality.cs +++ b/Rdmp.UI/Collections/RDMPCollectionCommonFunctionality.cs @@ -50,6 +50,8 @@ public sealed class RDMPCollectionCommonFunctionality : IRefreshBusSubscriber private IActivateItems _activator; public TreeListView Tree; + private TextBox Filter; + public ICoreIconProvider CoreIconProvider { get; private set; } public ICoreChildProvider CoreChildProvider { get; set; } public RenameProvider RenameProvider { get; private set; } @@ -164,11 +166,12 @@ public static void SetupColumnSortTracking(ObjectListView tree, Guid collectionG /// The current activator, used to launch objects, register for refresh events etc /// The column of tree view which should contain the icon for each row object /// Nullable field for specifying which column supports renaming on F2 + /// Optional TextBox Filter public void SetUp(RDMPCollection collection, TreeListView tree, IActivateItems activator, OLVColumn iconColumn, - OLVColumn renameableColumn) + OLVColumn renameableColumn,TextBox filter = null) { SetUp(collection, tree, activator, iconColumn, renameableColumn, - new RDMPCollectionCommonFunctionalitySettings()); + new RDMPCollectionCommonFunctionalitySettings(),filter); } /// @@ -180,8 +183,10 @@ public void SetUp(RDMPCollection collection, TreeListView tree, IActivateItems a /// The column of tree view which should contain the icon for each row object /// Nullable field for specifying which column supports renaming on F2 /// Customise which common behaviours are turned on + /// Optional TextBox Filter + public void SetUp(RDMPCollection collection, TreeListView tree, IActivateItems activator, OLVColumn iconColumn, - OLVColumn renameableColumn, RDMPCollectionCommonFunctionalitySettings settings) + OLVColumn renameableColumn, RDMPCollectionCommonFunctionalitySettings settings, TextBox filter = null) { Settings = settings; Collection = collection; @@ -190,7 +195,7 @@ public void SetUp(RDMPCollection collection, TreeListView tree, IActivateItems a _activator.RefreshBus.Subscribe(this); RepositoryLocator = _activator.RepositoryLocator; - + Filter = filter; Tree = tree; Tree.FullRowSelect = true; Tree.HideSelection = false; @@ -199,6 +204,15 @@ public void SetUp(RDMPCollection collection, TreeListView tree, IActivateItems a Tree.CellToolTip.InitialDelay = UserSettings.TooltipAppearDelay; Tree.CellToolTipShowing += (s, e) => Tree_CellToolTipShowing(activator, e); + if(Filter is not null) + { + Filter.TextChanged += HandleFilter; + Filter.Text = FilterText; + Filter.GotFocus += RemoveText; + Filter.LostFocus += AddText; + } + + Tree.RevealAfterExpand = true; if (!Settings.SuppressChildrenAdder) @@ -291,6 +305,34 @@ public void SetUp(RDMPCollection collection, TreeListView tree, IActivateItems a c.Sortable = false; } + + private readonly string FilterText = "Filter..."; + public void RemoveText(object sender, EventArgs e) + { + if (Filter.Text == FilterText) + { + Filter.Text = ""; + } + } + + public void AddText(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(Filter.Text)) + Filter.Text = FilterText; + } + private void HandleFilter(object sender, EventArgs e) + { + var text = Filter.Text; + if(text == FilterText) + { + Tree.ModelFilter = TextMatchFilter.Contains(Tree, ""); + Tree.UseFiltering = true; + return; + } + Tree.ModelFilter = TextMatchFilter.Contains(Tree, text); + Tree.UseFiltering = true; + } + public static void Tree_CellToolTipShowing(IActivateItems activator, ToolTipShowingEventArgs e) { var model = e.Model; diff --git a/Rdmp.UI/Collections/SavedCohortsCollectionUI.Designer.cs b/Rdmp.UI/Collections/SavedCohortsCollectionUI.Designer.cs index c202721034..698f72d705 100644 --- a/Rdmp.UI/Collections/SavedCohortsCollectionUI.Designer.cs +++ b/Rdmp.UI/Collections/SavedCohortsCollectionUI.Designer.cs @@ -28,64 +28,72 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.tlvSavedCohorts = new BrightIdeasSoftware.TreeListView(); - this.olvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvProjectNumber = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvVersion = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.tlvSavedCohorts)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + tlvSavedCohorts = new BrightIdeasSoftware.TreeListView(); + olvName = new BrightIdeasSoftware.OLVColumn(); + olvProjectNumber = new BrightIdeasSoftware.OLVColumn(); + olvVersion = new BrightIdeasSoftware.OLVColumn(); + tbFilter = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)tlvSavedCohorts).BeginInit(); + SuspendLayout(); // // tlvSavedCohorts // - this.tlvSavedCohorts.AllColumns.Add(this.olvName); - this.tlvSavedCohorts.AllColumns.Add(this.olvProjectNumber); - this.tlvSavedCohorts.AllColumns.Add(this.olvVersion); - this.tlvSavedCohorts.CellEditUseWholeCell = false; - this.tlvSavedCohorts.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvName, - this.olvProjectNumber, - this.olvVersion}); - this.tlvSavedCohorts.Cursor = System.Windows.Forms.Cursors.Default; - this.tlvSavedCohorts.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlvSavedCohorts.FullRowSelect = true; - this.tlvSavedCohorts.HideSelection = false; - this.tlvSavedCohorts.Location = new System.Drawing.Point(0, 0); - this.tlvSavedCohorts.Name = "tlvSavedCohorts"; - this.tlvSavedCohorts.ShowGroups = false; - this.tlvSavedCohorts.Size = new System.Drawing.Size(396, 647); - this.tlvSavedCohorts.TabIndex = 1; - this.tlvSavedCohorts.UseCompatibleStateImageBehavior = false; - this.tlvSavedCohorts.View = System.Windows.Forms.View.Details; - this.tlvSavedCohorts.VirtualMode = true; + tlvSavedCohorts.AllColumns.Add(olvName); + tlvSavedCohorts.AllColumns.Add(olvProjectNumber); + tlvSavedCohorts.AllColumns.Add(olvVersion); + tlvSavedCohorts.CellEditUseWholeCell = false; + tlvSavedCohorts.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { olvName, olvProjectNumber, olvVersion }); + tlvSavedCohorts.Dock = System.Windows.Forms.DockStyle.Fill; + tlvSavedCohorts.FullRowSelect = true; + tlvSavedCohorts.Location = new System.Drawing.Point(0, 0); + tlvSavedCohorts.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + tlvSavedCohorts.Name = "tlvSavedCohorts"; + tlvSavedCohorts.ShowGroups = false; + tlvSavedCohorts.Size = new System.Drawing.Size(462, 747); + tlvSavedCohorts.TabIndex = 1; + tlvSavedCohorts.UseCompatibleStateImageBehavior = false; + tlvSavedCohorts.View = System.Windows.Forms.View.Details; + tlvSavedCohorts.VirtualMode = true; // // olvName // - this.olvName.AspectName = "ToString"; - this.olvName.CellEditUseWholeCell = true; - this.olvName.Text = "Saved Cohorts"; - this.olvName.MinimumWidth = 100; + olvName.AspectName = "ToString"; + olvName.CellEditUseWholeCell = true; + olvName.MinimumWidth = 100; + olvName.Text = "Saved Cohorts"; + olvName.Width = 100; // // olvProjectNumber // - this.olvProjectNumber.AspectName = ""; - this.olvProjectNumber.Text = "Project Number"; + olvProjectNumber.AspectName = ""; + olvProjectNumber.Text = "Project Number"; // // olvVersion // - this.olvVersion.AspectName = ""; - this.olvVersion.Text = "Version"; + olvVersion.AspectName = ""; + olvVersion.Text = "Version"; + // + // tbFilter + // + tbFilter.Dock = System.Windows.Forms.DockStyle.Bottom; + tbFilter.Location = new System.Drawing.Point(0, 724); + tbFilter.Name = "tbFilter"; + tbFilter.Size = new System.Drawing.Size(462, 23); + tbFilter.TabIndex = 2; // // SavedCohortsCollectionUI // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tlvSavedCohorts); - this.Name = "SavedCohortsCollectionUI"; - this.Size = new System.Drawing.Size(396, 647); - ((System.ComponentModel.ISupportInitialize)(this.tlvSavedCohorts)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(tbFilter); + Controls.Add(tlvSavedCohorts); + Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + Name = "SavedCohortsCollectionUI"; + Size = new System.Drawing.Size(462, 747); + ((System.ComponentModel.ISupportInitialize)tlvSavedCohorts).EndInit(); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -94,5 +102,6 @@ private void InitializeComponent() private BrightIdeasSoftware.OLVColumn olvName; private BrightIdeasSoftware.OLVColumn olvProjectNumber; private BrightIdeasSoftware.OLVColumn olvVersion; + private System.Windows.Forms.TextBox tbFilter; } } diff --git a/Rdmp.UI/Collections/SavedCohortsCollectionUI.cs b/Rdmp.UI/Collections/SavedCohortsCollectionUI.cs index b84e14225d..a7a2066eee 100644 --- a/Rdmp.UI/Collections/SavedCohortsCollectionUI.cs +++ b/Rdmp.UI/Collections/SavedCohortsCollectionUI.cs @@ -44,7 +44,7 @@ public override void SetItemActivator(IActivateItems activator) { base.SetItemActivator(activator); - CommonTreeFunctionality.SetUp(RDMPCollection.SavedCohorts, tlvSavedCohorts, Activator, olvName, olvName); + CommonTreeFunctionality.SetUp(RDMPCollection.SavedCohorts, tlvSavedCohorts, Activator, olvName, olvName, tbFilter); tlvSavedCohorts.AddObject(((DataExportChildProvider)Activator.CoreChildProvider).RootCohortsNode); diff --git a/Rdmp.UI/Collections/SavedCohortsCollectionUI.resx b/Rdmp.UI/Collections/SavedCohortsCollectionUI.resx index 1af7de150c..af32865ec1 100644 --- a/Rdmp.UI/Collections/SavedCohortsCollectionUI.resx +++ b/Rdmp.UI/Collections/SavedCohortsCollectionUI.resx @@ -1,17 +1,17 @@  -