diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index befd64bd40..7dc0d81696 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: mv `find coverage -type f` db-ui.lcov dotnet test Rdmp.Core.Tests/Rdmp.Core.Tests.csproj --nologo --collect:"XPlat Code Coverage" --no-build --verbosity minimal -c Release -e AWS_ENDPOINT_URL="http://127.0.0.1:9000" --results-directory coverage -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov mv `find coverage -type f` db-core.lcov - - uses: coverallsapp/github-action@v2.3.0 + - uses: coverallsapp/github-action@v2.3.3 with: github-token: ${{ secrets.github_token }} files: ./db-ui.lcov ./db-core.lcov @@ -137,7 +137,7 @@ jobs: mv `find coverage -type f` fs-ui.lcov dotnet test Rdmp.Core.Tests/Rdmp.Core.Tests.csproj --nologo --collect:"XPlat Code Coverage" --no-build --verbosity minimal -c Release -e AWS_ENDPOINT_URL="http://127.0.0.1:9000" --results-directory coverage -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov mv `find coverage -type f` fs-core.lcov - - uses: coverallsapp/github-action@v2.3.0 + - uses: coverallsapp/github-action@v2.3.3 with: github-token: ${{ secrets.github_token }} files: ./fs-ui.lcov ./fs-core.lcov @@ -176,7 +176,6 @@ jobs: cp -r Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/runtimes ./PublishWinForms cp -r Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/x64 ./PublishWinForms cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/D3DCompiler_47_cor3.dll ./PublishWinForms - cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/mongocrypt.dll ./PublishWinForms cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/PenImc_cor3.dll ./PublishWinForms cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/PresentationNative_cor3.dll ./PublishWinForms cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/vcruntime140_cor3.dll ./PublishWinForms diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0e9efd4cfb..0be01d8348 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,7 +7,7 @@ on: jobs: build: name: Build and push Docker image - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 permissions: contents: read packages: write 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 65468d5bac..f43f56930d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,29 @@ +<<<<<<< HEAD +||||||| 925afff47 + +======= +>>>>>>> 637e86636063993b0156997bee867d2a7f5ed9ba # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +<<<<<<< HEAD +||||||| 925afff47 +======= +## [8.3.1] - 2024-10-22 + +- Improve Performance of regenerating problems with child providers +- Update UI Tab opening Logic +- Add Filter to Left-Hand Tree View + +>>>>>>> 637e86636063993b0156997bee867d2a7f5ed9ba ## [8.3.0] - 2024-09-23 - Add New Find & Replace, currently available via User Settings diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000000..65317e7a30 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,7 @@ + + + 11.0 + 8.3.0 + true + + diff --git a/Directory.Packages.props b/Directory.Packages.props index ab4aee9746..d85d9441bb 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,22 +1,22 @@ - - - - + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -25,7 +25,7 @@ - + @@ -37,7 +37,7 @@ - + diff --git a/Rdmp.Core/Logging/LogManager.cs b/Rdmp.Core/Logging/LogManager.cs index 7376316c9b..f17ce88f48 100644 --- a/Rdmp.Core/Logging/LogManager.cs +++ b/Rdmp.Core/Logging/LogManager.cs @@ -63,7 +63,8 @@ public string[] ListDataTasks(bool hideTests = false) using var con = Server.GetConnection(); con.Open(); - using var cmd = Server.GetCommand("SELECT * FROM DataLoadTask", con); + var sh = Server.GetQuerySyntaxHelper(); + using var cmd = Server.GetCommand($"SELECT * FROM {sh.EnsureWrapped("DataLoadTask")}", con); using var r = cmd.ExecuteReader(); while (r.Read()) if (!hideTests || !(bool)r["isTest"]) @@ -113,7 +114,8 @@ public string[] ListDataSets() using var con = Server.GetConnection(); con.Open(); - using var cmd = Server.GetCommand("SELECT * FROM DataSet", con); + var sh = Server.GetQuerySyntaxHelper(); + using var cmd = Server.GetCommand($"SELECT * FROM {sh.EnsureWrapped("DataSet")}", con); using var r = cmd.ExecuteReader(); while (r.Read()) tasks.Add(r["dataSetID"].ToString()); @@ -133,7 +135,8 @@ public IEnumerable GetArchivalDataLoadInfos(string dataTas int? specificDataLoadRunIDOnly = null, int? topX = null) { var db = Server.GetCurrentDatabase(); - var run = db.ExpectTable("DataLoadRun"); + var sh = Server.GetQuerySyntaxHelper(); + var run = db.ExpectTable(sh.EnsureWrapped("DataLoadRun")); using var con = Server.GetConnection(); con.Open(); @@ -144,11 +147,11 @@ public IEnumerable GetArchivalDataLoadInfos(string dataTas string where; if (specificDataLoadRunIDOnly != null) { - where = $"WHERE ID={specificDataLoadRunIDOnly.Value}"; + where = $"WHERE {sh.EnsureWrapped("ID")}={specificDataLoadRunIDOnly.Value}"; } else { - where = "WHERE dataLoadTaskID = @dataTaskId"; + where = $"WHERE {sh.EnsureWrapped("dataLoadTaskID")} = @dataTaskId"; var p = cmd.CreateParameter(); p.ParameterName = "@dataTaskId"; p.Value = dataTaskId; @@ -158,13 +161,13 @@ public IEnumerable GetArchivalDataLoadInfos(string dataTas TopXResponse top = null; if (topX.HasValue) - top = Server.GetQuerySyntaxHelper().HowDoWeAchieveTopX(topX.Value); + top = sh.HowDoWeAchieveTopX(topX.Value); var sb = new StringBuilder("SELECT "); if (top?.Location == QueryComponent.SELECT) sb.AppendLine(top.SQL); - sb.AppendLine($" * FROM {run.GetFullyQualifiedName()} {where} ORDER BY ID desc"); + sb.AppendLine($" * FROM {run.GetFullyQualifiedName()} {where} ORDER BY {sh.EnsureWrapped("ID")} desc"); if (top?.Location == QueryComponent.Postfix) sb.AppendLine(top.SQL); @@ -204,7 +207,8 @@ public IEnumerable GetArchivalDataLoadInfos(string dataTas private static int GetDataTaskId(string dataTask, DiscoveredServer server, DbConnection con) { - using var cmd = server.GetCommand("SELECT ID FROM DataLoadTask WHERE name = @name", con); + var sh = server.GetQuerySyntaxHelper(); + using var cmd = server.GetCommand($"SELECT {sh.EnsureWrapped("ID")} FROM {sh.EnsureWrapped("DataLoadTask")} WHERE name = @name", con); var p = cmd.CreateParameter(); p.ParameterName = "@name"; p.Value = dataTask; @@ -236,9 +240,10 @@ public IDataLoadInfo CreateDataLoadInfo(string dataLoadTaskName, string packageN public void CreateNewLoggingTask(int id, string dataSetID) { using var conn = Server.GetConnection(); + var sh = Server.GetQuerySyntaxHelper(); conn.Open(); var sql = - $"INSERT INTO DataLoadTask (ID, description, name, createTime, userAccount, statusID, isTest, dataSetID) VALUES ({id}, @dataSetID, @dataSetID, @date, @username, 1, 0, @dataSetID)"; + $"INSERT INTO {sh.EnsureWrapped("DataLoadTask")} ({sh.EnsureWrapped("ID")}, description, name, {sh.EnsureWrapped("createTime")}, {sh.EnsureWrapped("userAccount")}, {sh.EnsureWrapped("statusID")}, {sh.EnsureWrapped("isTest")}, {sh.EnsureWrapped("dataSetID")}) VALUES ({id}, @dataSetID, @dataSetID, @date, @username, 1, {sh.False}, @dataSetID)"; using var cmd = Server.GetCommand(sql, conn); Server.AddParameterWithValueToCommand("@date", cmd, DateTime.Now); @@ -251,9 +256,10 @@ public void CreateNewLoggingTask(int id, string dataSetID) private void CreateNewDataSet(string datasetName) { using var conn = Server.GetConnection(); + var sh = Server.GetQuerySyntaxHelper(); conn.Open(); { - const string sql = "INSERT INTO DataSet (dataSetID,name) VALUES (@datasetName,@datasetName)"; + var sql = $"INSERT INTO {sh.EnsureWrapped("DataSet")} ({sh.EnsureWrapped("dataSetID")},name) VALUES (@datasetName,@datasetName)"; using var cmd = Server.GetCommand(sql, conn); Server.AddParameterWithValueToCommand("@datasetName", cmd, datasetName.Substring(Math.Max(0, datasetName.Length - 150))); @@ -274,8 +280,9 @@ public void CreateNewLoggingTaskIfNotExists(string toCreate) private int GetMaxTaskID() { using var conn = Server.GetConnection(); + var sh = Server.GetQuerySyntaxHelper(); conn.Open(); - const string sql = "SELECT MAX(ID) FROM DataLoadTask"; + var sql = $"SELECT MAX({sh.EnsureWrapped("ID")}) FROM {sh.EnsureWrapped("DataLoadTask")}"; using var cmd = Server.GetCommand(sql, conn); var result = cmd.ExecuteScalar(); @@ -285,9 +292,10 @@ private int GetMaxTaskID() public void ResolveFatalErrors(int[] ids, DataLoadInfo.FatalErrorStates newState, string newExplanation) { using var conn = Server.GetConnection(); + var sh = Server.GetQuerySyntaxHelper(); conn.Open(); var sql = - $"UPDATE FatalError SET explanation =@explanation, statusID=@statusID where ID in ({string.Join(",", ids)})"; + $"UPDATE {sh.EnsureWrapped("FatalError")} SET explanation =@explanation, {sh.EnsureWrapped("statusID")}=@statusID where {sh.EnsureWrapped("ID")} in ({string.Join(",", ids)})"; using var cmd = Server.GetCommand(sql, conn); Server.AddParameterWithValueToCommand("@explanation", cmd, newExplanation); @@ -298,4 +306,4 @@ public void ResolveFatalErrors(int[] ids, DataLoadInfo.FatalErrorStates newState throw new Exception( $"Query {sql} resulted in {affectedRows}, we were expecting there to be {ids.Length} updates because that is how many FatalError IDs that were passed to this method"); } -} \ No newline at end of file +} diff --git a/Rdmp.Core/Providers/CatalogueProblemProvider.cs b/Rdmp.Core/Providers/CatalogueProblemProvider.cs index bddd8bd3eb..fcb7522c4b 100644 --- a/Rdmp.Core/Providers/CatalogueProblemProvider.cs +++ b/Rdmp.Core/Providers/CatalogueProblemProvider.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Linq; using Rdmp.Core.CommandExecution.AtomicCommands; @@ -43,18 +44,13 @@ public override void RefreshProblems(ICoreChildProvider childProvider) _childProvider = childProvider; //Take all the catalogue items which DON'T have an associated ColumnInfo (should hopefully be quite rare) - var orphans = _childProvider.AllCatalogueItems.Where(ci => ci.ColumnInfo_ID == null); - - //now identify those which have an ExtractionInformation (that's a problem! they are extractable but orphaned) - _orphanCatalogueItems = new HashSet( - orphans.Where(o => _childProvider.AllExtractionInformations.Any(ei => ei.CatalogueItem_ID == o.ID)) - - //store just the ID for performance - .Select(i => i.ID)); - + var catalogueIDs = _childProvider.AllCatalogueItems.Where(ci => ci.ColumnInfo_ID == null).Select(i => i.ID).ToList(); + var extractionInfoIDs = _childProvider.AllExtractionInformations.Select(ei => ei.CatalogueItem_ID).ToList(); + var orphans = catalogueIDs.Intersect(extractionInfoIDs); + _orphanCatalogueItems = orphans.ToHashSet(); _usedJoinables = new HashSet( - childProvider.AllJoinableCohortAggregateConfigurationUse.Select( - ju => ju.JoinableCohortAggregateConfiguration_ID)); + childProvider.AllJoinableCohortAggregateConfigurationUse.Select( + ju => ju.JoinableCohortAggregateConfiguration_ID)); _joinsWithMismatchedCollations = childProvider.AllJoinInfos.Where(j => !string.IsNullOrWhiteSpace(j.PrimaryKey.Collation) && 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 - AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAuc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gAB+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 @@  - diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 559a541653..04720e6953 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -10,6 +10,6 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("8.3.0")] -[assembly: AssemblyFileVersion("8.3.0")] -[assembly: AssemblyInformationalVersion("8.3.0")] \ No newline at end of file +[assembly: AssemblyVersion("8.3.1")] +[assembly: AssemblyFileVersion("8.3.1")] +[assembly: AssemblyInformationalVersion("8.3.1")] diff --git a/Tools/rdmp/CommandLine/Gui/ConsoleGuiCohortIdentificationConfigurationUI.cs b/Tools/rdmp/CommandLine/Gui/ConsoleGuiCohortIdentificationConfigurationUI.cs index d25ef2f160..1361e18d0b 100644 --- a/Tools/rdmp/CommandLine/Gui/ConsoleGuiCohortIdentificationConfigurationUI.cs +++ b/Tools/rdmp/CommandLine/Gui/ConsoleGuiCohortIdentificationConfigurationUI.cs @@ -140,38 +140,40 @@ private void Tableview1_CellActivated(TableView.CellActivatedEventArgs obj) var o = RowObjects[obj.Row]; if (o == null) return; + var col = tableview1.Table.Columns[obj.Col]; - if (col.ColumnName.Equals("Name")) + switch (col.ColumnName) { - var factory = new ConsoleGuiContextMenuFactory(_activator); - var menu = factory.Create(Array.Empty(), o); - - if (menu != null) + case "Name": { var p = tableview1.CellToScreen(obj.Col, obj.Row); if (p == null) return; - menu.Position = p.Value; - _contextMenuShowing = true; - menu.Show(); - menu.MenuBar.MenuAllClosed += () => _contextMenuShowing = false; + var factory = new ConsoleGuiContextMenuFactory(_activator); + var menu = factory.Create(p.Value.X, p.Value.Y, Array.Empty(), o); + if (menu != null) + { + menu.Position = p.Value; + _contextMenuShowing = true; + menu.Show(); + menu.MenuBar.MenuAllClosed += () => _contextMenuShowing = false; + } + + break; } - } - - if (col.ColumnName.Equals("Working")) - { - var key = Common.GetKey(o); - if (key?.CrashMessage != null) + case "Working": { - _activator.ShowException("Task Crashed", key.CrashMessage); - return; + var key = Common.GetKey(o); + if (key?.CrashMessage != null) _activator.ShowException("Task Crashed", key.CrashMessage); + break; } + case "Execute": + Common.ExecuteOrCancel(o, int.MaxValue); + break; } - - if (col.ColumnName.Equals("Execute")) Common.ExecuteOrCancel(o, Common.Timeout); } private bool IsValidSelection(int col, int row) diff --git a/Tools/rdmp/CommandLine/Gui/ConsoleGuiContextMenuFactory.cs b/Tools/rdmp/CommandLine/Gui/ConsoleGuiContextMenuFactory.cs index b232ba777c..a08111813a 100644 --- a/Tools/rdmp/CommandLine/Gui/ConsoleGuiContextMenuFactory.cs +++ b/Tools/rdmp/CommandLine/Gui/ConsoleGuiContextMenuFactory.cs @@ -28,7 +28,7 @@ public ConsoleGuiContextMenuFactory(IBasicActivateItems activator) this.activator = activator; } - public ContextMenu Create(object[] many, object single) + public ContextMenu Create(int x,int y,object[] many, object single) { var commands = GetCommands(activator, many, single).ToArray(); @@ -65,18 +65,16 @@ public ContextMenu Create(object[] many, object single) items.Add(bar); } - // we can do nothing if theres no menu items + // we can do nothing if there are no menu items if (items.Count == 0) return null; var withSpacers = AddSpacers(items, order); - var menu = new ContextMenu + return new ContextMenu(x, y, new MenuBarItem(withSpacers)) { - MenuItems = new MenuBarItem(withSpacers) + UseSubMenusSingleFrame = true }; - - return menu; } private static MenuItem[] AddSpacers(List items, Dictionary order) diff --git a/Tools/rdmp/CommandLine/Gui/ConsoleMainWindow.cs b/Tools/rdmp/CommandLine/Gui/ConsoleMainWindow.cs index 64f7e53e3b..ec7fe1d2f3 100644 --- a/Tools/rdmp/CommandLine/Gui/ConsoleMainWindow.cs +++ b/Tools/rdmp/CommandLine/Gui/ConsoleMainWindow.cs @@ -17,6 +17,7 @@ using Rdmp.Core.MapsDirectlyToDatabaseTable; using Rdmp.Core.Providers; using Rdmp.Core.Providers.Nodes; +using Rdmp.Core.ReusableLibraryCode.Annotations; using Rdmp.Core.ReusableLibraryCode.Settings; using Terminal.Gui; using Terminal.Gui.Trees; @@ -27,7 +28,7 @@ internal class ConsoleMainWindow { private Window _win; private TreeView _treeView; - private IBasicActivateItems _activator; + private readonly IBasicActivateItems _activator; /// /// The last passed to this UI. @@ -167,7 +168,7 @@ internal void SetUp(Toplevel top) var statusBar = new StatusBar(new StatusItem[] { new(Key.Q | Key.CtrlMask, "~^Q~ Quit", Quit), - new(Key.R | Key.CtrlMask, "~^R~ Run", action: Run), + new(Key.R | Key.CtrlMask, "~^R~ Run", Run), new(Key.F | Key.CtrlMask, "~^F~ Find", Find), new(Key.N | Key.CtrlMask, "~^N~ New", New), new(Key.F5, "~F5~ Refresh", Publish) @@ -252,21 +253,18 @@ private void _treeView_ObjectActivated(ObjectActivatedEventArgs obj) private string AspectGetter(object model) { - if (model is IContainer container) return $"{container} ({container.Operation})"; - - if (model is CohortAggregateContainer setContainer) return $"{setContainer} ({setContainer.Operation})"; - - if (model is ExtractionInformation ei) return $"{ei} ({ei.ExtractionCategory})"; - - if (model is CatalogueItemsNode cin) return $"{cin} ({cin.CatalogueItems.Length})"; - - if (model is TableInfoServerNode server) return $"{server.ServerName} ({server.DatabaseType})"; - - if (model is IDisableable d) return d.IsDisabled ? $"{d} (Disabled)" : d.ToString(); - - return model is IArgument arg - ? $"{arg} ({(string.IsNullOrWhiteSpace(arg.Value) ? "Null" : arg.Value)})" - : model?.ToString() ?? "Null Object"; + return model switch + { + IContainer container => $"{container} ({container.Operation})", + CohortAggregateContainer setContainer => $"{setContainer} ({setContainer.Operation})", + ExtractionInformation ei => $"{ei} ({ei.ExtractionCategory})", + CatalogueItemsNode cin => $"{cin} ({cin.CatalogueItems.Length})", + TableInfoServerNode server => $"{server.ServerName} ({server.DatabaseType})", + IDisableable d => d.IsDisabled ? $"{d} (Disabled)" : d.ToString(), + _ => model is IArgument arg + ? $"{arg} ({(string.IsNullOrWhiteSpace(arg.Value) ? "Null" : arg.Value)})" + : model?.ToString() ?? "Null Object" + }; } private void Publish() @@ -337,7 +335,7 @@ private void Show(object selected) _treeView.SetNeedsDisplay(); } - private void _treeView_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void _treeView_SelectionChanged(object sender, [NotNull] SelectionChangedEventArgs e) { if (e.NewValue != null) _treeView.RefreshObject(e.NewValue); @@ -346,13 +344,9 @@ private void _treeView_SelectionChanged(object sender, SelectionChangedEventArgs private void Menu() { var factory = new ConsoleGuiContextMenuFactory(_activator); - var menu = factory.Create(_treeView.GetAllSelectedObjects().ToArray(), _treeView.SelectedObject); - - if (menu == null) - return; - - menu.Position = DateTime.Now.Subtract(_lastMouseMove).TotalSeconds < 1 ? _lastMousePos : new Point(10, 5); - menu.Show(); + var position = DateTime.Now.Subtract(_lastMouseMove).TotalSeconds < 1 ? _lastMousePos : new Point(10, 5); + var menu = factory.Create(position.X,position.Y,_treeView.GetAllSelectedObjects().ToArray(), _treeView.SelectedObject); + menu?.Show(); } diff --git a/rdmp-client.xml b/rdmp-client.xml index b2aefb80df..c4285dc766 100644 --- a/rdmp-client.xml +++ b/rdmp-client.xml @@ -1,7 +1,7 @@ - 8.3.0.0 - https://github.com/HicServices/RDMP/releases/download/v8.3.0/rdmp-8.3.0-client.zip + 8.3.1.0 + https://github.com/HicServices/RDMP/releases/download/v8.3.1/rdmp-8.3.1-client.zip https://github.com/HicServices/RDMP/blob/main/CHANGELOG.md#7 true