From a1a2132ad5cc94dada90f7efae2e930bb1bab897 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 16 Jan 2025 11:15:24 +0000 Subject: [PATCH 01/36] add basic editable --- Rdmp.Core/Curation/Data/Catalogue.cs | 46 +++++- Rdmp.Core/Curation/Data/ICatalogue.cs | 17 +++ .../up/089_UpdateCatalogueMetadata.sql | 24 +++ Rdmp.Core/Rdmp.Core.csproj | 1 + .../MainFormUITabs/CatalogueUI.Designer.cs | 69 ++++++--- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 5 +- Rdmp.UI/MainFormUITabs/CatalogueUI.resx | 4 +- .../EditableLabelUI.Designer.cs | 97 ++++++++++++ Rdmp.UI/SimpleControls/EditableLabelUI.cs | 65 ++++++++ Rdmp.UI/SimpleControls/EditableLabelUI.resx | 144 ++++++++++++++++++ Rdmp.UI/SimpleDialogs/SelectDialog`1.resx | 63 -------- SharedAssemblyInfo.cs | 6 +- 12 files changed, 452 insertions(+), 89 deletions(-) create mode 100644 Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql create mode 100644 Rdmp.UI/SimpleControls/EditableLabelUI.Designer.cs create mode 100644 Rdmp.UI/SimpleControls/EditableLabelUI.cs create mode 100644 Rdmp.UI/SimpleControls/EditableLabelUI.resx delete mode 100644 Rdmp.UI/SimpleDialogs/SelectDialog`1.resx diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 38031316aa..b8858184fe 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -87,6 +87,21 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private bool _isColdStorageDataset; private int? _liveLoggingServerID; + private string _shortDescription; + private string _dataType; + private string _dataSubtype; + private string _dataSource; + private string _dataSourceSetting; + private DateTime? _datasetReleaseDate; + private DateTime? _startDate; + private DateTime? _endDate; + private string _updateLag; + private string _juristiction; + private string _dataController; + private string _dataProcessor; + private string _controlledVocabulary; + private string _associatedPeople; + private Lazy _knownCatalogueItems; @@ -487,6 +502,35 @@ public DateTime? DatasetStartDate get => _datasetStartDate; set => SetField(ref _datasetStartDate, value); } + /// + + public string ShortDescription { get => _shortDescription; set => SetField(ref _shortDescription,value); } + /// + public string DataType { get => _dataType; set => SetField(ref _dataType, value); } + /// + public string DataSubtype { get => _dataSubtype; set => SetField(ref _dataSubtype, value); } + /// + public string DataSource { get => _dataSource; set => SetField(ref _dataSource, value); } + /// + public string DataSourceSetting { get => _dataSourceSetting; set => SetField(ref _dataSourceSetting, value); } + /// + public DateTime? DatasetReleaseDate { get => _datasetReleaseDate; set => SetField(ref _datasetReleaseDate, value); } + /// + public DateTime? StartDate { get => _startDate; set => SetField(ref _startDate, value); } + /// + public DateTime? EndDate { get => _endDate; set => SetField(ref _endDate, value); } + /// + public string UpdateLag { get => _updateLag; set => SetField(ref _updateLag, value); } + /// + public string Juristiction { get => _juristiction; set => SetField(ref _juristiction, value); } + /// + public string DataController { get => _dataController; set => SetField(ref _dataController, value); } + /// + public string DataProcessor { get => _dataProcessor; set => SetField(ref _dataProcessor, value); } + /// + public string ControlledVocabulary { get => _controlledVocabulary; set => SetField(ref _controlledVocabulary, value); } + /// + public string AssociatedPeople { get => _associatedPeople; set => SetField(ref _associatedPeople, value); } #endregion @@ -530,7 +574,7 @@ public LoadMetadata[] LoadMetadatas() ? null : Repository.GetObjectByID(PivotCategory_ExtractionInformation_ID.Value); - #endregion + #endregion #region Enums diff --git a/Rdmp.Core/Curation/Data/ICatalogue.cs b/Rdmp.Core/Curation/Data/ICatalogue.cs index 380980645a..430817f809 100644 --- a/Rdmp.Core/Curation/Data/ICatalogue.cs +++ b/Rdmp.Core/Curation/Data/ICatalogue.cs @@ -102,6 +102,23 @@ public interface ICatalogue : IHasDependencies, IHasQuerySyntaxHelper, INamed, I /// string Description { get; set; } + + string ShortDescription { get;set; } + string DataType { get; set; } + string DataSubtype { get; set; } + string DataSource { get; set; } + string DataSourceSetting { get; set; } + DateTime? DatasetReleaseDate { get; set; } + DateTime? StartDate { get; set; } + DateTime? EndDate { get; set; } + string UpdateLag { get; set; } + string Juristiction { get; set; } + string DataController { get; set; } + string DataProcessor { get; set; } + string ControlledVocabulary { get;set; } + string AssociatedPeople { get; set; } + + /// /// The alledged user specified date at which data began being collected. For a more accurate answer you should run the DQE (See also DatasetTimespanCalculator) /// This field is optional diff --git a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql new file mode 100644 index 0000000000..1adaa53933 --- /dev/null +++ b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql @@ -0,0 +1,24 @@ +--Version: 8.4.3 +--Description: Add new metadata fields for catalogues +if not exists (select 1 from sys.columns where name = 'ControlledVocabulary' and OBJECT_NAME(object_id) = 'Catalogue') +BEGIN +ALTER TABLE dbo.[Catalogue] +ADD +ShortDescription [nvarchar](250), +DataType [nvarchar](30), +DataSubType [nvarchar](30), +DataSource [nvarchar](100), +DataSourceSetting [nvarchar](100), +DatasetReleaseDate [datetime], +StartDate [datetime], +EndDate [datetime], +UpdateLag [nvarchar](255), +Juristiction [nvarchar](255), +DataController [nvarchar](255), +DataProcessor [nvarchar](255), +ControllerVocabulary [nvarchar](MAX), +AssociatedPeople [nvarchar](MAX) +END +GO + + diff --git a/Rdmp.Core/Rdmp.Core.csproj b/Rdmp.Core/Rdmp.Core.csproj index 4abe04fb29..583c294ce6 100644 --- a/Rdmp.Core/Rdmp.Core.csproj +++ b/Rdmp.Core/Rdmp.Core.csproj @@ -256,6 +256,7 @@ + diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index c07ce662af..ed24433ddc 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -93,6 +93,8 @@ private void InitializeComponent() label25 = new Label(); label3 = new Label(); panel1 = new Panel(); + lbDatasetslbl = new Label(); + lbDatasets = new Label(); tableLayoutPanel2 = new TableLayoutPanel(); tbSourceOfDataCollection = new TextBox(); tbEthicsApprover = new TextBox(); @@ -112,8 +114,9 @@ private void InitializeComponent() c_tbGeographicalCoverage = new TextBox(); ticketingControl1 = new TicketingControlUI(); errorProvider1 = new ErrorProvider(components); - lbDatasetslbl = new Label(); - lbDatasets = new Label(); + panel2 = new Panel(); + editableCatalogueName = new SimpleControls.EditableLabelUI(); + editableFolder = new SimpleControls.EditableLabelUI(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); @@ -122,6 +125,7 @@ private void InitializeComponent() flowLayoutPanel1.SuspendLayout(); tableLayoutPanel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)errorProvider1).BeginInit(); + panel2.SuspendLayout(); SuspendLayout(); // // tbDatasetStartDate @@ -625,6 +629,7 @@ private void InitializeComponent() // // splitContainer1.Panel1 // + splitContainer1.Panel1.Controls.Add(panel2); splitContainer1.Panel1.Controls.Add(tableLayoutPanel1); splitContainer1.Panel1MinSize = 200; // @@ -657,7 +662,7 @@ private void InitializeComponent() tableLayoutPanel1.Controls.Add(panel1, 1, 7); tableLayoutPanel1.Controls.Add(lbDatasetslbl, 0, 8); tableLayoutPanel1.Controls.Add(lbDatasets, 1, 8); - tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); + tableLayoutPanel1.Location = new System.Drawing.Point(31, 179); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.Padding = new Padding(0, 0, 5, 0); tableLayoutPanel1.RowCount = 9; @@ -827,6 +832,24 @@ private void InitializeComponent() panel1.Size = new System.Drawing.Size(366, 106); panel1.TabIndex = 153; // + // lbDatasetslbl + // + lbDatasetslbl.Anchor = AnchorStyles.Top | AnchorStyles.Right; + lbDatasetslbl.AutoSize = true; + lbDatasetslbl.Location = new System.Drawing.Point(72, 257); + lbDatasetslbl.Name = "lbDatasetslbl"; + lbDatasetslbl.Size = new System.Drawing.Size(54, 15); + lbDatasetslbl.TabIndex = 160; + lbDatasetslbl.Text = "Datasets:"; + // + // lbDatasets + // + lbDatasets.AutoSize = true; + lbDatasets.Location = new System.Drawing.Point(132, 257); + lbDatasets.Name = "lbDatasets"; + lbDatasets.Size = new System.Drawing.Size(0, 15); + lbDatasets.TabIndex = 161; + // // tableLayoutPanel2 // tableLayoutPanel2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; @@ -928,7 +951,7 @@ private void InitializeComponent() tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.Size = new System.Drawing.Size(456, 1475); + tableLayoutPanel2.Size = new System.Drawing.Size(371, 1475); tableLayoutPanel2.TabIndex = 194; // // tbSourceOfDataCollection @@ -1119,29 +1142,33 @@ private void InitializeComponent() ticketingControl1.Name = "ticketingControl1"; ticketingControl1.Size = new System.Drawing.Size(350, 57); ticketingControl1.TabIndex = 8; - ticketingControl1.TicketText = ""; // // errorProvider1 // errorProvider1.ContainerControl = this; // - // lbDatasetslbl + // panel2 // - lbDatasetslbl.Anchor = AnchorStyles.Top | AnchorStyles.Right; - lbDatasetslbl.AutoSize = true; - lbDatasetslbl.Location = new System.Drawing.Point(72, 257); - lbDatasetslbl.Name = "lbDatasetslbl"; - lbDatasetslbl.Size = new System.Drawing.Size(54, 15); - lbDatasetslbl.TabIndex = 160; - lbDatasetslbl.Text = "Datasets:"; + panel2.Controls.Add(editableFolder); + panel2.Controls.Add(editableCatalogueName); + panel2.Location = new System.Drawing.Point(3, 3); + panel2.Name = "panel2"; + panel2.Size = new System.Drawing.Size(541, 170); + panel2.TabIndex = 161; // - // lbDatasets + // editableCatalogueName // - lbDatasets.AutoSize = true; - lbDatasets.Location = new System.Drawing.Point(132, 257); - lbDatasets.Name = "lbDatasets"; - lbDatasets.Size = new System.Drawing.Size(0, 15); - lbDatasets.TabIndex = 161; + editableCatalogueName.Location = new System.Drawing.Point(0, 0); + editableCatalogueName.Name = "editableCatalogueName"; + editableCatalogueName.Size = new System.Drawing.Size(232, 50); + editableCatalogueName.TabIndex = 0; + // + // editableFolder + // + editableFolder.Location = new System.Drawing.Point(3, 56); + editableFolder.Name = "editableFolder"; + editableFolder.Size = new System.Drawing.Size(232, 50); + editableFolder.TabIndex = 1; // // CatalogueUI // @@ -1162,6 +1189,7 @@ private void InitializeComponent() tableLayoutPanel2.ResumeLayout(false); tableLayoutPanel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)errorProvider1).EndInit(); + panel2.ResumeLayout(false); ResumeLayout(false); } @@ -1248,5 +1276,8 @@ private void InitializeComponent() private TableLayoutPanel tableLayoutPanel2; private Label lbDatasetslbl; private Label lbDatasets; + private Panel panel2; + private SimpleControls.EditableLabelUI editableCatalogueName; + private SimpleControls.EditableLabelUI editableFolder; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index fd74e9144e..8057b91b1f 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -140,7 +140,10 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab lbDatasets.Visible = false; lbDatasetslbl.Visible = false; } - + this.editableCatalogueName.TextValue = _catalogue.Name; + this.editableCatalogueName.Title = "Name"; + this.editableFolder.TextValue = _catalogue.Folder; + this.editableFolder.Title = "Folder"; RefreshUIFromDatabase(); } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.resx b/Rdmp.UI/MainFormUITabs/CatalogueUI.resx index 54b06b46cc..b82edb862b 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.resx +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.resx @@ -1,7 +1,7 @@  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAABGdBTUEAAK/INwWK6QAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH4QURDyAvBICDywAAABl0RVh0 + U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAOpSURBVDhPjZJtTFNnGIYPRs7ijy06CISsyGQs + G6gYoZOVOWHGmMhQy0Tcso2R7QezDFyU8rFP3FxghXZYQGacZCIULCHls7VFtkKrMOgARcppS4RSy4ah + FPkoLTHcO3VnGboiu5In75/nvvK8z/sS/5e7qh1E4wdW4o5sn5dJeti7/zyX7C7mkrqyveRgRfj6kcts + L6Z1bTBHELfKPyRGm/Y/Y5IeOt/348Ffu0Txmt6S2HZadsZ8he3DtK4NJYmj6wCLksT/TFW/e9+sLMCE + tgKmxpPoEUcatN/t4DOtT8YiDyHG5X7BlqsxRda2LNcfajHmTWo8mNRj5nYDKGnawg3BXoppXx2L4kXC + 3OgXONHxRv5UbyoWqFrMDsngMLXDOarB0th1TOtq0FtyBEzEM5arYYS5hbXR2s4R2wbS4Zq6Bsedi7Ao + M3GvQ4iZngrM9kkwqb2woCtLGmJij+J+uYel3PYUfVZOD2Yvu+xtWJquwoIxA7P9JzBS/xEMNWmgqo5D + dy7pl97SRD8m/ih3ldvdtcGi3Cq167+Zd9rktOgSPZX7mofhnMjDZAcPIxUHMSze16AtejOoSxj3369h + UbxMLzvY3z2RXX/6vnOqGUs2WjT6MT1VApzWTNh//xTjtQkwlcVcpgTscIMwikmvoE0QSLTkbdzS/VPE + 2amb2Q6Xe6J/RKZELJrTMTPAh1nChbEkpmZYsItNFXGY9ArkZ1hEw2dPP68p5+TrFceXF23uHf0rcozx + MHMrB+aaBJfx7Ovy4cKocEr4mOjC+1sIUdwL6xo+3+R/TRhRpKtNhm1URosqaRG9I/pqi+P0RH+LnIbi + 3VpaEmj44TXGsIJzqUFexSmsIEVBaG1fHQ/Gjovok6XCPpSCOX08HJaTmO7PxJiEu+wW0eU7LIgiPMpK + 0jd7F/MCpL/V57rmzTdg7a6GKj8aPZc4GFEnw9D8HgbK90NX8KrcKIp+ziCKXkcXk36MsozNpDgtoPOm + ohBLhlbcq+dBL3gFGn4glLlhUH4VgfavIyVdeTtDr+ftZFKrcOqoP3niLd9OZWkKZjVizKnz8WcTH9ov + d6Hxk2DIMkKqmvnb2E2nwpjEEzgW+yyZuGdT57fJoVAJk3C7LgeDVzIfqEUHLIovIuta+FsjWrO3M91r + 8Hasjzddpcf2+HRlcQM6K9NCNM1ZYSrl95zTKuFuf1XhKvvxBC16KHwn1pfMPcIiqzNeIltzwklatp6W + eakKPbyaRwjiL5O/HhK7Nv9LAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx b/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx deleted file mode 100644 index 9363dcf294..0000000000 --- a/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 55f72e959f..851d4a2363 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -10,6 +10,6 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("8.4.2")] -[assembly: AssemblyFileVersion("8.4.2")] -[assembly: AssemblyInformationalVersion("8.4.2")] +[assembly: AssemblyVersion("8.4.3")] +[assembly: AssemblyFileVersion("8.4.3")] +[assembly: AssemblyInformationalVersion("8.4.3")] From fe0fdc48953ccca591209400c57fe92877b1ffad Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 21 Jan 2025 08:13:26 +0000 Subject: [PATCH 02/36] intermin new ui --- .../WindowManagement/HomePane/HomeUI.cs | 4 +- Rdmp.Core/Curation/Data/Catalogue.cs | 13 +- Rdmp.Core/Curation/Data/ICatalogue.cs | 2 +- .../up/089_UpdateCatalogueMetadata.sql | 5 +- Rdmp.UI/Collections/DataExportCollectionUI.cs | 5 +- Rdmp.UI/Collections/FavouritesCollectionUI.cs | 1 + .../MainFormUITabs/CatalogueUI.Designer.cs | 1751 ++++++----------- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 242 ++- Rdmp.UI/MainFormUITabs/CatalogueUI.resx | 3 - .../EditableLabelUI.Designer.cs | 22 +- Rdmp.UI/SimpleControls/EditableLabelUI.cs | 12 + 11 files changed, 801 insertions(+), 1259 deletions(-) diff --git a/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs b/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs index 4f57024a56..232eeac29b 100644 --- a/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs +++ b/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs @@ -81,6 +81,8 @@ protected override void OnLoad(EventArgs e) public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { - BuildCommandLists(); + + //todo what does this do? + //BuildCommandLists(); } } \ No newline at end of file diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index b8858184fe..fed222b50f 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -101,7 +101,7 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private string _dataProcessor; private string _controlledVocabulary; private string _associatedPeople; - + private string _doi; private Lazy _knownCatalogueItems; @@ -532,6 +532,8 @@ public DateTime? DatasetStartDate /// public string AssociatedPeople { get => _associatedPeople; set => SetField(ref _associatedPeople, value); } + public string Doi { get => _doi; set => SetField(ref _doi, value); } + #endregion #region Relationships @@ -865,6 +867,15 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) Folder = r["Folder"].ToString(); + DataSource = r["DataSource"].ToString(); + DataSourceSetting = r["DataSourceSetting"].ToString(); + StartDate = !string.IsNullOrEmpty(r["StartDate"].ToString())? DateTime.Parse(r["StartDate"].ToString()) :null; + EndDate = !string.IsNullOrEmpty(r["EndDate"].ToString())? DateTime.Parse(r["EndDate"].ToString()) : null; + DataController = r["DataController"].ToString(); + DataProcessor = r["DataProcessor"].ToString(); + Juristiction = r["Juristiction"].ToString(); + Doi = r["Doi"].ToString(); + ClearAllInjections(); } diff --git a/Rdmp.Core/Curation/Data/ICatalogue.cs b/Rdmp.Core/Curation/Data/ICatalogue.cs index 430817f809..e0f515645b 100644 --- a/Rdmp.Core/Curation/Data/ICatalogue.cs +++ b/Rdmp.Core/Curation/Data/ICatalogue.cs @@ -117,7 +117,7 @@ public interface ICatalogue : IHasDependencies, IHasQuerySyntaxHelper, INamed, I string DataProcessor { get; set; } string ControlledVocabulary { get;set; } string AssociatedPeople { get; set; } - + string Doi { get; set; } /// /// The alledged user specified date at which data began being collected. For a more accurate answer you should run the DQE (See also DatasetTimespanCalculator) diff --git a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql index 1adaa53933..4fa095c21e 100644 --- a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql +++ b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql @@ -16,8 +16,9 @@ UpdateLag [nvarchar](255), Juristiction [nvarchar](255), DataController [nvarchar](255), DataProcessor [nvarchar](255), -ControllerVocabulary [nvarchar](MAX), -AssociatedPeople [nvarchar](MAX) +ControlledVocabulary [nvarchar](MAX), +AssociatedPeople [nvarchar](MAX), +Doi [nvarchar](50) END GO diff --git a/Rdmp.UI/Collections/DataExportCollectionUI.cs b/Rdmp.UI/Collections/DataExportCollectionUI.cs index 4b1a7ee567..cf82915fc4 100644 --- a/Rdmp.UI/Collections/DataExportCollectionUI.cs +++ b/Rdmp.UI/Collections/DataExportCollectionUI.cs @@ -126,7 +126,10 @@ public override void SetItemActivator(IActivateItems activator) public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { - SetupToolStrip(); + if (e.Object.GetType() == typeof(Project)) + { + SetupToolStrip(); + } } private void SetupToolStrip() diff --git a/Rdmp.UI/Collections/FavouritesCollectionUI.cs b/Rdmp.UI/Collections/FavouritesCollectionUI.cs index 0609422418..57a9c1d233 100644 --- a/Rdmp.UI/Collections/FavouritesCollectionUI.cs +++ b/Rdmp.UI/Collections/FavouritesCollectionUI.cs @@ -57,6 +57,7 @@ public override void SetItemActivator(IActivateItems activator) public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { + //maybe this? RefreshFavourites(); } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index ed24433ddc..d73ef69d67 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -31,1144 +31,630 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - components = new System.ComponentModel.Container(); - tbDatasetStartDate = new TextBox(); - label41 = new Label(); - label28 = new Label(); - c_tbSubjectNumbers = new TextBox(); - tbDataStandards = new TextBox(); - label26 = new Label(); - label27 = new Label(); - tbCountryOfOrigin = new TextBox(); - label23 = new Label(); - label22 = new Label(); - c_ddGranularity = new ComboBox(); - label21 = new Label(); - label64 = new Label(); - label20 = new Label(); - c_tbDetailPageURL = new TextBox(); - label19 = new Label(); - label18 = new Label(); - label16 = new Label(); - c_tbUpdateFrequency = new TextBox(); - label4 = new Label(); - label17 = new Label(); - c_tbSourceUrl = new TextBox(); - c_tbTopics = new TextBox(); - label14 = new Label(); - c_tbQueryToolUrl = new TextBox(); - c_tbBackgroundSummary = new TextBox(); - label6 = new Label(); - c_tbBulkDownloadUrl = new TextBox(); - c_tbTimeCoverage = new TextBox(); - label7 = new Label(); - label12 = new Label(); - c_tbBrowseUrl = new TextBox(); - c_tbUpdateSchedule = new TextBox(); - label13 = new Label(); - c_tbAPIAccessURL = new TextBox(); - label10 = new Label(); - c_ddPeriodicity = new ComboBox(); - c_tbAccessOptions = new TextBox(); - c_tbLastRevisionDate = new TextBox(); - label9 = new Label(); - c_ddType = new ComboBox(); - c_tbResourceOwner = new TextBox(); - c_tbAttributionCitation = new TextBox(); - label8 = new Label(); - c_tbNumberOfThese = new TextBox(); splitContainer1 = new SplitContainer(); - tableLayoutPanel1 = new TableLayoutPanel(); - flowLayoutPanel1 = new FlowLayoutPanel(); - cbDeprecated = new CheckBox(); - cbInternal = new CheckBox(); - cbColdStorage = new CheckBox(); - tbFolder = new TextBox(); - tbAcronym = new TextBox(); - tbName = new TextBox(); - c_tbID = new TextBox(); - label1 = new Label(); - label24 = new Label(); + checkBox3 = new CheckBox(); + checkBox2 = new CheckBox(); + checkBox1 = new CheckBox(); + editableFolder = new SimpleControls.EditableLabelUI(); + editableCatalogueName = new SimpleControls.EditableLabelUI(); + ticketingControl1 = new TicketingControlUI(); + tabControl1 = new TabControl(); + tabPage1 = new TabPage(); label2 = new Label(); - label25 = new Label(); + tbDescription = new TextBox(); + label1 = new Label(); + tbAbstract = new TextBox(); + tabPage2 = new TabPage(); + label8 = new Label(); + tbDataSourceSetting = new TextBox(); + label7 = new Label(); + tbDataSource = new TextBox(); + label6 = new Label(); + comboBox3 = new ComboBox(); + label5 = new Label(); + comboBox2 = new ComboBox(); + label4 = new Label(); + tbKeywords = new TextBox(); label3 = new Label(); - panel1 = new Panel(); - lbDatasetslbl = new Label(); - lbDatasets = new Label(); - tableLayoutPanel2 = new TableLayoutPanel(); - tbSourceOfDataCollection = new TextBox(); - tbEthicsApprover = new TextBox(); - label33 = new Label(); - ddExplicitConsent = new ComboBox(); - label32 = new Label(); - tbAdministrativeContactAddress = new TextBox(); - label31 = new Label(); - tbAdministrativeContactTelephone = new TextBox(); + comboBox1 = new ComboBox(); + tabPage3 = new TabPage(); + dtpEndDate = new DateTimePicker(); + dtpStart = new DateTimePicker(); + label12 = new Label(); label11 = new Label(); - tbAdministrativeContactEmail = new TextBox(); - label30 = new Label(); - tbAdministrativeContactName = new TextBox(); - label29 = new Label(); + label10 = new Label(); + comboBox4 = new ComboBox(); + label9 = new Label(); + tbGeoCoverage = new TextBox(); + tabPage4 = new TabPage(); + label16 = new Label(); + tbJuristiction = new TextBox(); label15 = new Label(); - label5 = new Label(); - c_tbGeographicalCoverage = new TextBox(); - ticketingControl1 = new TicketingControlUI(); - errorProvider1 = new ErrorProvider(components); - panel2 = new Panel(); - editableCatalogueName = new SimpleControls.EditableLabelUI(); - editableFolder = new SimpleControls.EditableLabelUI(); + tbDataProcessor = new TextBox(); + label14 = new Label(); + tbDataController = new TextBox(); + label13 = new Label(); + tbAccessContact = new TextBox(); + tabPage5 = new TabPage(); + label19 = new Label(); + tbControlledVocabulary = new TextBox(); + label18 = new Label(); + tbDOI = new TextBox(); + label17 = new Label(); + tbPeople = new TextBox(); + tabPage6 = new TabPage(); + comboBox5 = new ComboBox(); + label22 = new Label(); + tbUpdateLag = new TextBox(); + label21 = new Label(); + tbInitialReleaseDate = new TextBox(); + label20 = new Label(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); splitContainer1.SuspendLayout(); - tableLayoutPanel1.SuspendLayout(); - flowLayoutPanel1.SuspendLayout(); - tableLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)errorProvider1).BeginInit(); - panel2.SuspendLayout(); + tabControl1.SuspendLayout(); + tabPage1.SuspendLayout(); + tabPage2.SuspendLayout(); + tabPage3.SuspendLayout(); + tabPage4.SuspendLayout(); + tabPage5.SuspendLayout(); + tabPage6.SuspendLayout(); SuspendLayout(); // - // tbDatasetStartDate - // - tbDatasetStartDate.Anchor = AnchorStyles.Left; - tbDatasetStartDate.Location = new System.Drawing.Point(135, 674); - tbDatasetStartDate.Margin = new Padding(4, 3, 20, 3); - tbDatasetStartDate.Name = "tbDatasetStartDate"; - tbDatasetStartDate.Size = new System.Drawing.Size(250, 23); - tbDatasetStartDate.TabIndex = 14; - tbDatasetStartDate.TextChanged += tbDatasetStartDate_TextChanged; - // - // label41 - // - label41.Anchor = AnchorStyles.Right; - label41.Location = new System.Drawing.Point(7, 675); - label41.Margin = new Padding(4, 0, 4, 0); - label41.Name = "label41"; - label41.Size = new System.Drawing.Size(120, 20); - label41.TabIndex = 147; - label41.Text = "Dataset Start Date:"; - label41.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label28 - // - label28.Anchor = AnchorStyles.Right; - label28.ForeColor = System.Drawing.Color.Black; - label28.Location = new System.Drawing.Point(7, 616); - label28.Margin = new Padding(4, 0, 4, 0); - label28.Name = "label28"; - label28.Size = new System.Drawing.Size(120, 23); - label28.TabIndex = 134; - label28.Text = "Subject Numbers:"; - label28.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_tbSubjectNumbers - // - c_tbSubjectNumbers.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbSubjectNumbers.BackColor = System.Drawing.SystemColors.Window; - c_tbSubjectNumbers.Location = new System.Drawing.Point(135, 616); - c_tbSubjectNumbers.Margin = new Padding(4, 3, 20, 3); - c_tbSubjectNumbers.Name = "c_tbSubjectNumbers"; - c_tbSubjectNumbers.Size = new System.Drawing.Size(369, 23); - c_tbSubjectNumbers.TabIndex = 12; - // - // tbDataStandards - // - tbDataStandards.AcceptsReturn = true; - tbDataStandards.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbDataStandards.Location = new System.Drawing.Point(135, 1012); - tbDataStandards.Margin = new Padding(4, 3, 20, 3); - tbDataStandards.Multiline = true; - tbDataStandards.Name = "tbDataStandards"; - tbDataStandards.ScrollBars = ScrollBars.Vertical; - tbDataStandards.Size = new System.Drawing.Size(369, 100); - tbDataStandards.TabIndex = 23; - // - // label26 - // - label26.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label26.Location = new System.Drawing.Point(7, 1009); - label26.Margin = new Padding(4, 0, 4, 0); - label26.Name = "label26"; - label26.Size = new System.Drawing.Size(120, 20); - label26.TabIndex = 115; - label26.Text = "Data Standards:"; - label26.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label27 - // - label27.Anchor = AnchorStyles.Right; - label27.AutoSize = true; - label27.Location = new System.Drawing.Point(24, 987); - label27.Margin = new Padding(4, 0, 4, 0); - label27.Name = "label27"; - label27.Size = new System.Drawing.Size(103, 15); - label27.TabIndex = 114; - label27.Text = "Country of Origin:"; - label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // tbCountryOfOrigin - // - tbCountryOfOrigin.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbCountryOfOrigin.Location = new System.Drawing.Point(135, 983); - tbCountryOfOrigin.Margin = new Padding(4, 3, 20, 3); - tbCountryOfOrigin.Name = "tbCountryOfOrigin"; - tbCountryOfOrigin.Size = new System.Drawing.Size(369, 23); - tbCountryOfOrigin.TabIndex = 22; - // - // label23 - // - label23.Anchor = AnchorStyles.Right; - label23.AutoSize = true; - label23.Location = new System.Drawing.Point(57, 958); - label23.Margin = new Padding(4, 0, 4, 0); - label23.Name = "label23"; - label23.Size = new System.Drawing.Size(70, 15); - label23.TabIndex = 104; - label23.Text = "Source URL:"; - label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // splitContainer1 // - // label22 + splitContainer1.Dock = DockStyle.Fill; + splitContainer1.Location = new System.Drawing.Point(0, 0); + splitContainer1.Name = "splitContainer1"; + splitContainer1.Orientation = Orientation.Horizontal; // - label22.Anchor = AnchorStyles.Right; - label22.AutoSize = true; - label22.Location = new System.Drawing.Point(36, 929); - label22.Margin = new Padding(4, 0, 4, 0); - label22.Name = "label22"; - label22.Size = new System.Drawing.Size(91, 15); - label22.TabIndex = 103; - label22.Text = "Query Tool URL:"; - label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_ddGranularity - // - c_ddGranularity.Anchor = AnchorStyles.Left; - c_ddGranularity.DropDownStyle = ComboBoxStyle.DropDownList; - c_ddGranularity.FormattingEnabled = true; - c_ddGranularity.Location = new System.Drawing.Point(135, 167); - c_ddGranularity.Margin = new Padding(4, 3, 20, 3); - c_ddGranularity.Name = "c_ddGranularity"; - c_ddGranularity.Size = new System.Drawing.Size(250, 23); - c_ddGranularity.TabIndex = 3; + // splitContainer1.Panel1 // - // label21 + splitContainer1.Panel1.Controls.Add(checkBox3); + splitContainer1.Panel1.Controls.Add(checkBox2); + splitContainer1.Panel1.Controls.Add(checkBox1); + splitContainer1.Panel1.Controls.Add(editableFolder); + splitContainer1.Panel1.Controls.Add(editableCatalogueName); + splitContainer1.Panel1.Controls.Add(ticketingControl1); // - label21.Anchor = AnchorStyles.Right; - label21.AutoSize = true; - label21.Location = new System.Drawing.Point(13, 900); - label21.Margin = new Padding(4, 0, 4, 0); - label21.Name = "label21"; - label21.Size = new System.Drawing.Size(114, 15); - label21.TabIndex = 102; - label21.Text = "Bulk Download URL:"; - label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label64 - // - label64.Anchor = AnchorStyles.Right; - label64.AutoSize = true; - label64.Location = new System.Drawing.Point(59, 171); - label64.Margin = new Padding(4, 0, 4, 0); - label64.Name = "label64"; - label64.Size = new System.Drawing.Size(68, 15); - label64.TabIndex = 108; - label64.Text = "Granularity:"; - label64.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // splitContainer1.Panel2 // - // label20 + splitContainer1.Panel2.Controls.Add(tabControl1); + splitContainer1.Size = new System.Drawing.Size(881, 1085); + splitContainer1.SplitterDistance = 158; + splitContainer1.TabIndex = 0; + // + // checkBox3 + // + checkBox3.AutoSize = true; + checkBox3.Location = new System.Drawing.Point(695, 75); + checkBox3.Name = "checkBox3"; + checkBox3.Size = new System.Drawing.Size(94, 19); + checkBox3.TabIndex = 5; + checkBox3.Text = "Cold Storage"; + checkBox3.UseVisualStyleBackColor = true; + // + // checkBox2 + // + checkBox2.AutoSize = true; + checkBox2.Location = new System.Drawing.Point(623, 74); + checkBox2.Name = "checkBox2"; + checkBox2.Size = new System.Drawing.Size(66, 19); + checkBox2.TabIndex = 4; + checkBox2.Text = "Internal"; + checkBox2.UseVisualStyleBackColor = true; + checkBox2.CheckedChanged += checkBox2_CheckedChanged; + // + // checkBox1 + // + checkBox1.AutoSize = true; + checkBox1.Location = new System.Drawing.Point(531, 73); + checkBox1.Name = "checkBox1"; + checkBox1.Size = new System.Drawing.Size(86, 19); + checkBox1.TabIndex = 3; + checkBox1.Text = "Deprecated"; + checkBox1.UseVisualStyleBackColor = true; // - label20.Anchor = AnchorStyles.Right; - label20.AutoSize = true; - label20.Location = new System.Drawing.Point(55, 871); - label20.Margin = new Padding(4, 0, 4, 0); - label20.Name = "label20"; - label20.Size = new System.Drawing.Size(72, 15); - label20.TabIndex = 101; - label20.Text = "Browse URL:"; - label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // editableFolder // - // c_tbDetailPageURL + editableFolder.AutoValidate = AutoValidate.EnableAllowFocusChange; + editableFolder.Location = new System.Drawing.Point(9, 65); + editableFolder.Name = "editableFolder"; + editableFolder.Size = new System.Drawing.Size(278, 48); + editableFolder.TabIndex = 2; // - c_tbDetailPageURL.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbDetailPageURL.Location = new System.Drawing.Point(135, 3); - c_tbDetailPageURL.Margin = new Padding(4, 3, 20, 3); - c_tbDetailPageURL.Name = "c_tbDetailPageURL"; - c_tbDetailPageURL.Size = new System.Drawing.Size(369, 23); - c_tbDetailPageURL.TabIndex = 0; - c_tbDetailPageURL.TextChanged += c_tbDetailPageURL_TextChanged; + // editableCatalogueName // - // label19 + editableCatalogueName.Location = new System.Drawing.Point(9, 7); + editableCatalogueName.Name = "editableCatalogueName"; + editableCatalogueName.Size = new System.Drawing.Size(278, 59); + editableCatalogueName.TabIndex = 1; // - label19.Anchor = AnchorStyles.Right; - label19.AutoSize = true; - label19.Location = new System.Drawing.Point(36, 842); - label19.Margin = new Padding(4, 0, 4, 0); - label19.Name = "label19"; - label19.Size = new System.Drawing.Size(91, 15); - label19.TabIndex = 100; - label19.Text = "API Access URL:"; - label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // ticketingControl1 // - // label18 + ticketingControl1.Location = new System.Drawing.Point(523, 7); + ticketingControl1.Margin = new Padding(4, 3, 4, 3); + ticketingControl1.Name = "ticketingControl1"; + ticketingControl1.Size = new System.Drawing.Size(354, 62); + ticketingControl1.TabIndex = 0; + ticketingControl1.Load += ticketingControl1_Load; + // + // tabControl1 + // + tabControl1.Controls.Add(tabPage1); + tabControl1.Controls.Add(tabPage2); + tabControl1.Controls.Add(tabPage3); + tabControl1.Controls.Add(tabPage4); + tabControl1.Controls.Add(tabPage5); + tabControl1.Controls.Add(tabPage6); + tabControl1.Dock = DockStyle.Fill; + tabControl1.Location = new System.Drawing.Point(0, 0); + tabControl1.Name = "tabControl1"; + tabControl1.SelectedIndex = 0; + tabControl1.Size = new System.Drawing.Size(881, 923); + tabControl1.TabIndex = 0; + // + // tabPage1 + // + tabPage1.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage1.Controls.Add(label2); + tabPage1.Controls.Add(tbDescription); + tabPage1.Controls.Add(label1); + tabPage1.Controls.Add(tbAbstract); + tabPage1.Location = new System.Drawing.Point(4, 24); + tabPage1.Name = "tabPage1"; + tabPage1.Padding = new Padding(3); + tabPage1.Size = new System.Drawing.Size(873, 895); + tabPage1.TabIndex = 0; + tabPage1.Text = "Descriptions"; // - label18.Anchor = AnchorStyles.Right; - label18.AutoSize = true; - label18.Location = new System.Drawing.Point(36, 813); - label18.Margin = new Padding(4, 0, 4, 0); - label18.Name = "label18"; - label18.Size = new System.Drawing.Size(91, 15); - label18.TabIndex = 99; - label18.Text = "Access Options:"; - label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // label2 // - // label16 + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(6, 143); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(67, 15); + label2.TabIndex = 3; + label2.Text = "Description"; // - label16.Anchor = AnchorStyles.Right; - label16.Location = new System.Drawing.Point(7, 646); - label16.Margin = new Padding(4, 0, 4, 0); - label16.Name = "label16"; - label16.Size = new System.Drawing.Size(120, 20); - label16.TabIndex = 98; - label16.Text = "Resource Owner:"; - label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // tbDescription // - // c_tbUpdateFrequency + tbDescription.Location = new System.Drawing.Point(6, 158); + tbDescription.MaxLength = 250; + tbDescription.Multiline = true; + tbDescription.Name = "tbDescription"; + tbDescription.Size = new System.Drawing.Size(861, 116); + tbDescription.TabIndex = 2; // - c_tbUpdateFrequency.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbUpdateFrequency.Location = new System.Drawing.Point(135, 500); - c_tbUpdateFrequency.Margin = new Padding(4, 3, 20, 3); - c_tbUpdateFrequency.Name = "c_tbUpdateFrequency"; - c_tbUpdateFrequency.Size = new System.Drawing.Size(369, 23); - c_tbUpdateFrequency.TabIndex = 7; + // label1 // - // label4 + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(6, 3); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(98, 15); + label1.TabIndex = 1; + label1.Text = "Short Description"; + // + // tbAbstract + // + tbAbstract.Location = new System.Drawing.Point(6, 18); + tbAbstract.MaxLength = 250; + tbAbstract.Multiline = true; + tbAbstract.Name = "tbAbstract"; + tbAbstract.Size = new System.Drawing.Size(861, 116); + tbAbstract.TabIndex = 0; + // + // tabPage2 + // + tabPage2.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage2.Controls.Add(label8); + tabPage2.Controls.Add(tbDataSourceSetting); + tabPage2.Controls.Add(label7); + tabPage2.Controls.Add(tbDataSource); + tabPage2.Controls.Add(label6); + tabPage2.Controls.Add(comboBox3); + tabPage2.Controls.Add(label5); + tabPage2.Controls.Add(comboBox2); + tabPage2.Controls.Add(label4); + tabPage2.Controls.Add(tbKeywords); + tabPage2.Controls.Add(label3); + tabPage2.Controls.Add(comboBox1); + tabPage2.Location = new System.Drawing.Point(4, 24); + tabPage2.Name = "tabPage2"; + tabPage2.Padding = new Padding(3); + tabPage2.Size = new System.Drawing.Size(873, 895); + tabPage2.TabIndex = 1; + tabPage2.Text = "Data Details"; // - label4.Anchor = AnchorStyles.Right; - label4.AutoSize = true; - label4.Location = new System.Drawing.Point(34, 7); - label4.Margin = new Padding(4, 0, 4, 0); - label4.Name = "label4"; - label4.Size = new System.Drawing.Size(93, 15); - label4.TabIndex = 65; - label4.Text = "Detail Page URL:"; - label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // label8 // - // label17 + label8.AutoSize = true; + label8.Location = new System.Drawing.Point(6, 258); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(110, 15); + label8.TabIndex = 11; + label8.Text = "Data Source Setting"; // - label17.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label17.Location = new System.Drawing.Point(7, 700); - label17.Margin = new Padding(4, 0, 4, 0); - label17.Name = "label17"; - label17.Size = new System.Drawing.Size(120, 20); - label17.TabIndex = 97; - label17.Text = "Attribution Citation:"; - label17.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // c_tbSourceUrl - // - c_tbSourceUrl.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbSourceUrl.Location = new System.Drawing.Point(135, 954); - c_tbSourceUrl.Margin = new Padding(4, 3, 20, 3); - c_tbSourceUrl.Name = "c_tbSourceUrl"; - c_tbSourceUrl.Size = new System.Drawing.Size(369, 23); - c_tbSourceUrl.TabIndex = 21; - c_tbSourceUrl.TextChanged += c_tbSourceUrl_TextChanged; - // - // c_tbTopics - // - c_tbTopics.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbTopics.Location = new System.Drawing.Point(135, 331); - c_tbTopics.Margin = new Padding(4, 3, 20, 3); - c_tbTopics.Multiline = true; - c_tbTopics.Name = "c_tbTopics"; - c_tbTopics.ScrollBars = ScrollBars.Vertical; - c_tbTopics.Size = new System.Drawing.Size(369, 100); - c_tbTopics.TabIndex = 6; + // tbDataSourceSetting // - // label14 + tbDataSourceSetting.Location = new System.Drawing.Point(6, 276); + tbDataSourceSetting.Name = "tbDataSourceSetting"; + tbDataSourceSetting.Size = new System.Drawing.Size(366, 23); + tbDataSourceSetting.TabIndex = 10; // - label14.Anchor = AnchorStyles.Right; - label14.Location = new System.Drawing.Point(7, 587); - label14.Margin = new Padding(4, 0, 4, 0); - label14.Name = "label14"; - label14.Size = new System.Drawing.Size(120, 23); - label14.TabIndex = 96; - label14.Text = "Last Revision Date:"; - label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_tbQueryToolUrl - // - c_tbQueryToolUrl.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbQueryToolUrl.Location = new System.Drawing.Point(135, 925); - c_tbQueryToolUrl.Margin = new Padding(4, 3, 20, 3); - c_tbQueryToolUrl.Name = "c_tbQueryToolUrl"; - c_tbQueryToolUrl.Size = new System.Drawing.Size(369, 23); - c_tbQueryToolUrl.TabIndex = 20; - c_tbQueryToolUrl.TextChanged += c_tbQueryToolUrl_TextChanged; - // - // c_tbBackgroundSummary - // - c_tbBackgroundSummary.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbBackgroundSummary.Location = new System.Drawing.Point(135, 196); - c_tbBackgroundSummary.Margin = new Padding(4, 3, 20, 3); - c_tbBackgroundSummary.Multiline = true; - c_tbBackgroundSummary.Name = "c_tbBackgroundSummary"; - c_tbBackgroundSummary.ScrollBars = ScrollBars.Vertical; - c_tbBackgroundSummary.Size = new System.Drawing.Size(369, 100); - c_tbBackgroundSummary.TabIndex = 4; + // label7 + // + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(6, 207); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(70, 15); + label7.TabIndex = 9; + label7.Text = "Data Source"; + // + // tbDataSource + // + tbDataSource.Location = new System.Drawing.Point(6, 225); + tbDataSource.Name = "tbDataSource"; + tbDataSource.Size = new System.Drawing.Size(366, 23); + tbDataSource.TabIndex = 8; // // label6 // - label6.Anchor = AnchorStyles.Right; label6.AutoSize = true; - label6.Location = new System.Drawing.Point(42, 36); - label6.Margin = new Padding(4, 0, 4, 0); + label6.Location = new System.Drawing.Point(6, 156); label6.Name = "label6"; - label6.Size = new System.Drawing.Size(85, 15); - label6.TabIndex = 69; - label6.Text = "Resource Type:"; - label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_tbBulkDownloadUrl - // - c_tbBulkDownloadUrl.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbBulkDownloadUrl.Location = new System.Drawing.Point(135, 896); - c_tbBulkDownloadUrl.Margin = new Padding(4, 3, 20, 3); - c_tbBulkDownloadUrl.Name = "c_tbBulkDownloadUrl"; - c_tbBulkDownloadUrl.Size = new System.Drawing.Size(369, 23); - c_tbBulkDownloadUrl.TabIndex = 19; - c_tbBulkDownloadUrl.TextChanged += c_tbBulkDownloadUrl_TextChanged; - // - // c_tbTimeCoverage - // - c_tbTimeCoverage.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbTimeCoverage.Location = new System.Drawing.Point(135, 558); - c_tbTimeCoverage.Margin = new Padding(4, 3, 20, 3); - c_tbTimeCoverage.Name = "c_tbTimeCoverage"; - c_tbTimeCoverage.Size = new System.Drawing.Size(369, 23); - c_tbTimeCoverage.TabIndex = 10; + label6.Size = new System.Drawing.Size(92, 15); + label6.TabIndex = 7; + label6.Text = "Dataset Subtype"; // - // label7 + // comboBox3 // - label7.Anchor = AnchorStyles.Right; - label7.AutoSize = true; - label7.Location = new System.Drawing.Point(61, 306); - label7.Margin = new Padding(4, 0, 4, 0); - label7.Name = "label7"; - label7.Size = new System.Drawing.Size(66, 15); - label7.TabIndex = 72; - label7.Text = "Periodicity:"; - label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + comboBox3.FormattingEnabled = true; + comboBox3.Location = new System.Drawing.Point(6, 174); + comboBox3.Name = "comboBox3"; + comboBox3.Size = new System.Drawing.Size(121, 23); + comboBox3.TabIndex = 6; // - // label12 + // label5 // - label12.Anchor = AnchorStyles.Right; - label12.Location = new System.Drawing.Point(7, 529); - label12.Margin = new Padding(4, 0, 4, 0); - label12.Name = "label12"; - label12.Size = new System.Drawing.Size(120, 23); - label12.TabIndex = 93; - label12.Text = "Update Schedule:"; - label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_tbBrowseUrl - // - c_tbBrowseUrl.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbBrowseUrl.Location = new System.Drawing.Point(135, 867); - c_tbBrowseUrl.Margin = new Padding(4, 3, 20, 3); - c_tbBrowseUrl.Name = "c_tbBrowseUrl"; - c_tbBrowseUrl.Size = new System.Drawing.Size(369, 23); - c_tbBrowseUrl.TabIndex = 18; - c_tbBrowseUrl.TextChanged += c_tbBrowseUrl_TextChanged; - // - // c_tbUpdateSchedule - // - c_tbUpdateSchedule.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbUpdateSchedule.Location = new System.Drawing.Point(135, 529); - c_tbUpdateSchedule.Margin = new Padding(4, 3, 20, 3); - c_tbUpdateSchedule.Name = "c_tbUpdateSchedule"; - c_tbUpdateSchedule.Size = new System.Drawing.Size(369, 23); - c_tbUpdateSchedule.TabIndex = 9; + label5.AutoSize = true; + label5.Location = new System.Drawing.Point(6, 107); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(73, 15); + label5.TabIndex = 5; + label5.Text = "Dataset Type"; // - // label13 + // comboBox2 // - label13.Anchor = AnchorStyles.Right; - label13.Location = new System.Drawing.Point(7, 558); - label13.Margin = new Padding(4, 0, 4, 0); - label13.Name = "label13"; - label13.Size = new System.Drawing.Size(120, 23); - label13.TabIndex = 89; - label13.Text = "Time Coverage:"; - label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + comboBox2.FormattingEnabled = true; + comboBox2.Location = new System.Drawing.Point(6, 125); + comboBox2.Name = "comboBox2"; + comboBox2.Size = new System.Drawing.Size(121, 23); + comboBox2.TabIndex = 4; + // + // label4 + // + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(6, 57); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(58, 15); + label4.TabIndex = 3; + label4.Text = "Keywords"; + // + // tbKeywords + // + tbKeywords.Location = new System.Drawing.Point(6, 75); + tbKeywords.Name = "tbKeywords"; + tbKeywords.Size = new System.Drawing.Size(845, 23); + tbKeywords.TabIndex = 2; + // + // label3 // - // c_tbAPIAccessURL + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(6, 9); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(82, 15); + label3.TabIndex = 1; + label3.Text = "Resource Type"; + // + // comboBox1 + // + comboBox1.FormattingEnabled = true; + comboBox1.Location = new System.Drawing.Point(6, 27); + comboBox1.Name = "comboBox1"; + comboBox1.Size = new System.Drawing.Size(121, 23); + comboBox1.TabIndex = 0; + // + // tabPage3 + // + tabPage3.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage3.Controls.Add(dtpEndDate); + tabPage3.Controls.Add(dtpStart); + tabPage3.Controls.Add(label12); + tabPage3.Controls.Add(label11); + tabPage3.Controls.Add(label10); + tabPage3.Controls.Add(comboBox4); + tabPage3.Controls.Add(label9); + tabPage3.Controls.Add(tbGeoCoverage); + tabPage3.Location = new System.Drawing.Point(4, 24); + tabPage3.Name = "tabPage3"; + tabPage3.Size = new System.Drawing.Size(873, 895); + tabPage3.TabIndex = 2; + tabPage3.Text = "Geospacial & Temporal"; + // + // dtpEndDate + // + dtpEndDate.Location = new System.Drawing.Point(14, 194); + dtpEndDate.Name = "dtpEndDate"; + dtpEndDate.Size = new System.Drawing.Size(200, 23); + dtpEndDate.TabIndex = 23; + // + // dtpStart + // + dtpStart.Location = new System.Drawing.Point(14, 140); + dtpStart.Name = "dtpStart"; + dtpStart.Size = new System.Drawing.Size(200, 23); + dtpStart.TabIndex = 20; + // + // label12 // - c_tbAPIAccessURL.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbAPIAccessURL.Location = new System.Drawing.Point(135, 838); - c_tbAPIAccessURL.Margin = new Padding(4, 3, 20, 3); - c_tbAPIAccessURL.Name = "c_tbAPIAccessURL"; - c_tbAPIAccessURL.Size = new System.Drawing.Size(369, 23); - c_tbAPIAccessURL.TabIndex = 17; - c_tbAPIAccessURL.TextChanged += c_tbAPIAccessURL_TextChanged; + label12.AutoSize = true; + label12.Location = new System.Drawing.Point(14, 176); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(54, 15); + label12.TabIndex = 19; + label12.Text = "End Date"; + // + // label11 + // + label11.AutoSize = true; + label11.Location = new System.Drawing.Point(14, 122); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(58, 15); + label11.TabIndex = 17; + label11.Text = "Start Date"; // // label10 // - label10.Anchor = AnchorStyles.Right; - label10.Location = new System.Drawing.Point(7, 500); - label10.Margin = new Padding(4, 0, 4, 0); + label10.AutoSize = true; + label10.Location = new System.Drawing.Point(14, 68); label10.Name = "label10"; - label10.Size = new System.Drawing.Size(120, 23); - label10.TabIndex = 77; - label10.Text = "Update Frequency:"; - label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_ddPeriodicity - // - c_ddPeriodicity.Anchor = AnchorStyles.Left; - c_ddPeriodicity.DropDownStyle = ComboBoxStyle.DropDownList; - c_ddPeriodicity.FormattingEnabled = true; - c_ddPeriodicity.Location = new System.Drawing.Point(135, 302); - c_ddPeriodicity.Margin = new Padding(4, 3, 20, 3); - c_ddPeriodicity.Name = "c_ddPeriodicity"; - c_ddPeriodicity.Size = new System.Drawing.Size(250, 23); - c_ddPeriodicity.TabIndex = 5; - // - // c_tbAccessOptions - // - c_tbAccessOptions.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbAccessOptions.Location = new System.Drawing.Point(135, 809); - c_tbAccessOptions.Margin = new Padding(4, 3, 20, 3); - c_tbAccessOptions.Name = "c_tbAccessOptions"; - c_tbAccessOptions.Size = new System.Drawing.Size(369, 23); - c_tbAccessOptions.TabIndex = 16; - // - // c_tbLastRevisionDate - // - c_tbLastRevisionDate.Anchor = AnchorStyles.Left; - c_tbLastRevisionDate.Location = new System.Drawing.Point(135, 587); - c_tbLastRevisionDate.Margin = new Padding(4, 3, 20, 3); - c_tbLastRevisionDate.Name = "c_tbLastRevisionDate"; - c_tbLastRevisionDate.Size = new System.Drawing.Size(250, 23); - c_tbLastRevisionDate.TabIndex = 11; - c_tbLastRevisionDate.TextChanged += c_tbLastRevisionDate_TextChanged; + label10.Size = new System.Drawing.Size(65, 15); + label10.TabIndex = 15; + label10.Text = "Granularity"; + // + // comboBox4 + // + comboBox4.FormattingEnabled = true; + comboBox4.Location = new System.Drawing.Point(14, 86); + comboBox4.Name = "comboBox4"; + comboBox4.Size = new System.Drawing.Size(121, 23); + comboBox4.TabIndex = 14; // // label9 // - label9.Anchor = AnchorStyles.Top | AnchorStyles.Right; label9.AutoSize = true; - label9.ForeColor = System.Drawing.Color.Black; - label9.Location = new System.Drawing.Point(53, 193); - label9.Margin = new Padding(4, 0, 4, 0); + label9.Location = new System.Drawing.Point(14, 17); label9.Name = "label9"; - label9.Size = new System.Drawing.Size(74, 15); - label9.TabIndex = 79; - label9.Text = "Background:"; - label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // c_ddType - // - c_ddType.Anchor = AnchorStyles.Left; - c_ddType.DropDownStyle = ComboBoxStyle.DropDownList; - c_ddType.FormattingEnabled = true; - c_ddType.Location = new System.Drawing.Point(135, 32); - c_ddType.Margin = new Padding(4, 3, 20, 3); - c_ddType.Name = "c_ddType"; - c_ddType.Size = new System.Drawing.Size(250, 23); - c_ddType.TabIndex = 1; - // - // c_tbResourceOwner - // - c_tbResourceOwner.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbResourceOwner.Location = new System.Drawing.Point(135, 645); - c_tbResourceOwner.Margin = new Padding(4, 3, 20, 3); - c_tbResourceOwner.Name = "c_tbResourceOwner"; - c_tbResourceOwner.Size = new System.Drawing.Size(369, 23); - c_tbResourceOwner.TabIndex = 13; - // - // c_tbAttributionCitation - // - c_tbAttributionCitation.AcceptsReturn = true; - c_tbAttributionCitation.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbAttributionCitation.Location = new System.Drawing.Point(135, 703); - c_tbAttributionCitation.Margin = new Padding(4, 3, 20, 3); - c_tbAttributionCitation.Multiline = true; - c_tbAttributionCitation.Name = "c_tbAttributionCitation"; - c_tbAttributionCitation.ScrollBars = ScrollBars.Vertical; - c_tbAttributionCitation.Size = new System.Drawing.Size(369, 100); - c_tbAttributionCitation.TabIndex = 15; + label9.Size = new System.Drawing.Size(130, 15); + label9.TabIndex = 13; + label9.Text = "Geographical Coverage"; + // + // tbGeoCoverage + // + tbGeoCoverage.Location = new System.Drawing.Point(14, 35); + tbGeoCoverage.Name = "tbGeoCoverage"; + tbGeoCoverage.Size = new System.Drawing.Size(366, 23); + tbGeoCoverage.TabIndex = 12; + // + // tabPage4 + // + tabPage4.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage4.Controls.Add(label16); + tabPage4.Controls.Add(tbJuristiction); + tabPage4.Controls.Add(label15); + tabPage4.Controls.Add(tbDataProcessor); + tabPage4.Controls.Add(label14); + tabPage4.Controls.Add(tbDataController); + tabPage4.Controls.Add(label13); + tabPage4.Controls.Add(tbAccessContact); + tabPage4.Location = new System.Drawing.Point(4, 24); + tabPage4.Name = "tabPage4"; + tabPage4.Size = new System.Drawing.Size(873, 895); + tabPage4.TabIndex = 3; + tabPage4.Text = "Access"; // - // label8 + // label16 // - label8.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label8.AutoSize = true; - label8.Location = new System.Drawing.Point(28, 328); - label8.Margin = new Padding(4, 0, 4, 0); - label8.Name = "label8"; - label8.Size = new System.Drawing.Size(99, 15); - label8.TabIndex = 83; - label8.Text = "Search Keywords:"; - label8.TextAlign = System.Drawing.ContentAlignment.TopRight; + label16.AutoSize = true; + label16.Location = new System.Drawing.Point(15, 169); + label16.Name = "label16"; + label16.Size = new System.Drawing.Size(64, 15); + label16.TabIndex = 21; + label16.Text = "Juristiction"; // - // c_tbNumberOfThese + // tbJuristiction // - c_tbNumberOfThese.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; - c_tbNumberOfThese.Location = new System.Drawing.Point(601, 537); - c_tbNumberOfThese.Name = "c_tbNumberOfThese"; - c_tbNumberOfThese.Size = new System.Drawing.Size(28, 23); - c_tbNumberOfThese.TabIndex = 68; - c_tbNumberOfThese.Visible = false; + tbJuristiction.Location = new System.Drawing.Point(15, 187); + tbJuristiction.Name = "tbJuristiction"; + tbJuristiction.Size = new System.Drawing.Size(366, 23); + tbJuristiction.TabIndex = 20; // - // splitContainer1 + // label15 // - splitContainer1.BorderStyle = BorderStyle.Fixed3D; - splitContainer1.Dock = DockStyle.Fill; - splitContainer1.FixedPanel = FixedPanel.Panel1; - splitContainer1.Location = new System.Drawing.Point(0, 0); - splitContainer1.Margin = new Padding(4, 3, 4, 3); - splitContainer1.Name = "splitContainer1"; - splitContainer1.Orientation = Orientation.Horizontal; + label15.AutoSize = true; + label15.Location = new System.Drawing.Point(15, 116); + label15.Name = "label15"; + label15.Size = new System.Drawing.Size(85, 15); + label15.TabIndex = 19; + label15.Text = "Data Processor"; // - // splitContainer1.Panel1 + // tbDataProcessor // - splitContainer1.Panel1.Controls.Add(panel2); - splitContainer1.Panel1.Controls.Add(tableLayoutPanel1); - splitContainer1.Panel1MinSize = 200; + tbDataProcessor.Location = new System.Drawing.Point(15, 134); + tbDataProcessor.Name = "tbDataProcessor"; + tbDataProcessor.Size = new System.Drawing.Size(366, 23); + tbDataProcessor.TabIndex = 18; // - // splitContainer1.Panel2 + // label14 // - splitContainer1.Panel2.AutoScroll = true; - splitContainer1.Panel2.Controls.Add(tableLayoutPanel2); - splitContainer1.Panel2MinSize = 200; - splitContainer1.Size = new System.Drawing.Size(551, 1085); - splitContainer1.SplitterDistance = 288; - splitContainer1.SplitterWidth = 5; - splitContainer1.TabIndex = 114; - // - // tableLayoutPanel1 - // - tableLayoutPanel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - tableLayoutPanel1.ColumnCount = 2; - tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle()); - tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle()); - tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 1, 6); - tableLayoutPanel1.Controls.Add(tbFolder, 1, 3); - tableLayoutPanel1.Controls.Add(tbAcronym, 1, 2); - tableLayoutPanel1.Controls.Add(tbName, 1, 1); - tableLayoutPanel1.Controls.Add(c_tbID, 1, 0); - tableLayoutPanel1.Controls.Add(label1, 0, 0); - tableLayoutPanel1.Controls.Add(label24, 0, 3); - tableLayoutPanel1.Controls.Add(label2, 0, 2); - tableLayoutPanel1.Controls.Add(label25, 0, 1); - tableLayoutPanel1.Controls.Add(label3, 0, 7); - tableLayoutPanel1.Controls.Add(panel1, 1, 7); - tableLayoutPanel1.Controls.Add(lbDatasetslbl, 0, 8); - tableLayoutPanel1.Controls.Add(lbDatasets, 1, 8); - tableLayoutPanel1.Location = new System.Drawing.Point(31, 179); - tableLayoutPanel1.Name = "tableLayoutPanel1"; - tableLayoutPanel1.Padding = new Padding(0, 0, 5, 0); - tableLayoutPanel1.RowCount = 9; - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle()); - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 112F)); - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 13F)); - tableLayoutPanel1.Size = new System.Drawing.Size(524, 278); - tableLayoutPanel1.TabIndex = 160; - // - // flowLayoutPanel1 - // - flowLayoutPanel1.Anchor = AnchorStyles.Left | AnchorStyles.Right; - flowLayoutPanel1.Controls.Add(cbDeprecated); - flowLayoutPanel1.Controls.Add(cbInternal); - flowLayoutPanel1.Controls.Add(cbColdStorage); - flowLayoutPanel1.Location = new System.Drawing.Point(132, 119); - flowLayoutPanel1.Margin = new Padding(3, 3, 20, 3); - flowLayoutPanel1.Name = "flowLayoutPanel1"; - flowLayoutPanel1.Size = new System.Drawing.Size(367, 23); - flowLayoutPanel1.TabIndex = 159; - // - // cbDeprecated - // - cbDeprecated.AutoSize = true; - cbDeprecated.Location = new System.Drawing.Point(4, 3); - cbDeprecated.Margin = new Padding(4, 3, 4, 3); - cbDeprecated.Name = "cbDeprecated"; - cbDeprecated.Size = new System.Drawing.Size(86, 19); - cbDeprecated.TabIndex = 5; - cbDeprecated.Text = "Deprecated"; - cbDeprecated.UseVisualStyleBackColor = true; - // - // cbInternal - // - cbInternal.AutoSize = true; - cbInternal.Location = new System.Drawing.Point(98, 3); - cbInternal.Margin = new Padding(4, 3, 4, 3); - cbInternal.Name = "cbInternal"; - cbInternal.Size = new System.Drawing.Size(66, 19); - cbInternal.TabIndex = 6; - cbInternal.Text = "Internal"; - cbInternal.UseVisualStyleBackColor = true; - // - // cbColdStorage - // - cbColdStorage.AutoSize = true; - cbColdStorage.Location = new System.Drawing.Point(172, 3); - cbColdStorage.Margin = new Padding(4, 3, 4, 3); - cbColdStorage.Name = "cbColdStorage"; - cbColdStorage.Size = new System.Drawing.Size(91, 19); - cbColdStorage.TabIndex = 7; - cbColdStorage.Text = "ColdStorage"; - cbColdStorage.UseVisualStyleBackColor = true; - // - // tbFolder - // - tbFolder.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbFolder.Location = new System.Drawing.Point(133, 90); - tbFolder.Margin = new Padding(4, 3, 20, 3); - tbFolder.Name = "tbFolder"; - tbFolder.Size = new System.Drawing.Size(366, 23); - tbFolder.TabIndex = 3; - tbFolder.TextChanged += tbFolder_TextChanged; - // - // tbAcronym - // - tbAcronym.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbAcronym.Location = new System.Drawing.Point(133, 61); - tbAcronym.Margin = new Padding(4, 3, 20, 3); - tbAcronym.Name = "tbAcronym"; - tbAcronym.Size = new System.Drawing.Size(366, 23); - tbAcronym.TabIndex = 2; - // - // tbName - // - tbName.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbName.Location = new System.Drawing.Point(133, 32); - tbName.Margin = new Padding(4, 3, 20, 3); - tbName.Name = "tbName"; - tbName.Size = new System.Drawing.Size(366, 23); - tbName.TabIndex = 1; - tbName.TextChanged += tbName_TextChanged; - // - // c_tbID - // - c_tbID.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbID.Location = new System.Drawing.Point(133, 3); - c_tbID.Margin = new Padding(4, 3, 20, 3); - c_tbID.Name = "c_tbID"; - c_tbID.ReadOnly = true; - c_tbID.Size = new System.Drawing.Size(366, 23); - c_tbID.TabIndex = 0; + label14.AutoSize = true; + label14.Location = new System.Drawing.Point(15, 66); + label14.Name = "label14"; + label14.Size = new System.Drawing.Size(87, 15); + label14.TabIndex = 17; + label14.Text = "Data Controller"; // - // label1 + // tbDataController // - label1.Anchor = AnchorStyles.Right; - label1.AutoEllipsis = true; - label1.AutoSize = true; - label1.Location = new System.Drawing.Point(47, 7); - label1.Margin = new Padding(4, 0, 4, 0); - label1.Name = "label1"; - label1.Size = new System.Drawing.Size(78, 15); - label1.TabIndex = 56; - label1.Text = "Catalogue ID:"; - label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label24 - // - label24.Anchor = AnchorStyles.Right; - label24.AutoSize = true; - label24.Location = new System.Drawing.Point(82, 94); - label24.Margin = new Padding(4, 0, 4, 0); - label24.Name = "label24"; - label24.Size = new System.Drawing.Size(43, 15); - label24.TabIndex = 152; - label24.Text = "Folder:"; - label24.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + tbDataController.Location = new System.Drawing.Point(15, 84); + tbDataController.Name = "tbDataController"; + tbDataController.Size = new System.Drawing.Size(366, 23); + tbDataController.TabIndex = 16; // - // label2 + // label13 // - label2.Anchor = AnchorStyles.Right; - label2.AutoSize = true; - label2.Location = new System.Drawing.Point(15, 65); - label2.Margin = new Padding(4, 0, 4, 0); - label2.Name = "label2"; - label2.Size = new System.Drawing.Size(110, 15); - label2.TabIndex = 58; - label2.Text = "Resource Acronym:"; - label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label25 - // - label25.Anchor = AnchorStyles.Right; - label25.AutoSize = true; - label25.Location = new System.Drawing.Point(5, 36); - label25.Margin = new Padding(4, 0, 4, 0); - label25.Name = "label25"; - label25.Size = new System.Drawing.Size(120, 15); - label25.TabIndex = 107; - label25.Text = "Resource Name/Title:"; - label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + label13.AutoSize = true; + label13.Location = new System.Drawing.Point(15, 10); + label13.Name = "label13"; + label13.Size = new System.Drawing.Size(88, 15); + label13.TabIndex = 15; + label13.Text = "Access Contact"; + // + // tbAccessContact + // + tbAccessContact.Location = new System.Drawing.Point(15, 28); + tbAccessContact.Name = "tbAccessContact"; + tbAccessContact.Size = new System.Drawing.Size(366, 23); + tbAccessContact.TabIndex = 14; + // + // tabPage5 + // + tabPage5.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage5.Controls.Add(label19); + tabPage5.Controls.Add(tbControlledVocabulary); + tabPage5.Controls.Add(label18); + tabPage5.Controls.Add(tbDOI); + tabPage5.Controls.Add(label17); + tabPage5.Controls.Add(tbPeople); + tabPage5.Location = new System.Drawing.Point(4, 24); + tabPage5.Name = "tabPage5"; + tabPage5.Size = new System.Drawing.Size(873, 895); + tabPage5.TabIndex = 4; + tabPage5.Text = "Attribution"; // - // label3 + // label19 // - label3.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label3.AutoSize = true; - label3.Location = new System.Drawing.Point(4, 145); - label3.Margin = new Padding(4, 0, 4, 0); - label3.Name = "label3"; - label3.Size = new System.Drawing.Size(121, 15); - label3.TabIndex = 61; - label3.Text = "Resource Description:"; - label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // panel1 - // - panel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - panel1.Location = new System.Drawing.Point(133, 148); - panel1.Margin = new Padding(4, 3, 20, 3); - panel1.Name = "panel1"; - panel1.Size = new System.Drawing.Size(366, 106); - panel1.TabIndex = 153; - // - // lbDatasetslbl - // - lbDatasetslbl.Anchor = AnchorStyles.Top | AnchorStyles.Right; - lbDatasetslbl.AutoSize = true; - lbDatasetslbl.Location = new System.Drawing.Point(72, 257); - lbDatasetslbl.Name = "lbDatasetslbl"; - lbDatasetslbl.Size = new System.Drawing.Size(54, 15); - lbDatasetslbl.TabIndex = 160; - lbDatasetslbl.Text = "Datasets:"; - // - // lbDatasets - // - lbDatasets.AutoSize = true; - lbDatasets.Location = new System.Drawing.Point(132, 257); - lbDatasets.Name = "lbDatasets"; - lbDatasets.Size = new System.Drawing.Size(0, 15); - lbDatasets.TabIndex = 161; - // - // tableLayoutPanel2 - // - tableLayoutPanel2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; - tableLayoutPanel2.ColumnCount = 2; - tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle()); - tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle()); - tableLayoutPanel2.Controls.Add(tbSourceOfDataCollection, 1, 30); - tableLayoutPanel2.Controls.Add(tbEthicsApprover, 1, 29); - tableLayoutPanel2.Controls.Add(label33, 0, 30); - tableLayoutPanel2.Controls.Add(ddExplicitConsent, 1, 28); - tableLayoutPanel2.Controls.Add(label32, 0, 29); - tableLayoutPanel2.Controls.Add(tbAdministrativeContactAddress, 1, 27); - tableLayoutPanel2.Controls.Add(label31, 0, 28); - tableLayoutPanel2.Controls.Add(tbAdministrativeContactTelephone, 1, 26); - tableLayoutPanel2.Controls.Add(label11, 0, 27); - tableLayoutPanel2.Controls.Add(tbAdministrativeContactEmail, 1, 25); - tableLayoutPanel2.Controls.Add(label30, 0, 26); - tableLayoutPanel2.Controls.Add(tbAdministrativeContactName, 1, 24); - tableLayoutPanel2.Controls.Add(label29, 0, 25); - tableLayoutPanel2.Controls.Add(tbDataStandards, 1, 23); - tableLayoutPanel2.Controls.Add(label15, 0, 24); - tableLayoutPanel2.Controls.Add(tbCountryOfOrigin, 1, 22); - tableLayoutPanel2.Controls.Add(label26, 0, 23); - tableLayoutPanel2.Controls.Add(c_tbSourceUrl, 1, 21); - tableLayoutPanel2.Controls.Add(label27, 0, 22); - tableLayoutPanel2.Controls.Add(c_tbQueryToolUrl, 1, 20); - tableLayoutPanel2.Controls.Add(label23, 0, 21); - tableLayoutPanel2.Controls.Add(c_tbBulkDownloadUrl, 1, 19); - tableLayoutPanel2.Controls.Add(label22, 0, 20); - tableLayoutPanel2.Controls.Add(c_tbBrowseUrl, 1, 18); - tableLayoutPanel2.Controls.Add(label21, 0, 19); - tableLayoutPanel2.Controls.Add(c_tbAPIAccessURL, 1, 17); - tableLayoutPanel2.Controls.Add(label20, 0, 18); - tableLayoutPanel2.Controls.Add(c_tbAccessOptions, 1, 16); - tableLayoutPanel2.Controls.Add(label19, 0, 17); - tableLayoutPanel2.Controls.Add(tbDatasetStartDate, 1, 14); - tableLayoutPanel2.Controls.Add(label18, 0, 16); - tableLayoutPanel2.Controls.Add(label17, 0, 15); - tableLayoutPanel2.Controls.Add(c_tbResourceOwner, 1, 13); - tableLayoutPanel2.Controls.Add(label41, 0, 14); - tableLayoutPanel2.Controls.Add(c_tbSubjectNumbers, 1, 12); - tableLayoutPanel2.Controls.Add(label16, 0, 13); - tableLayoutPanel2.Controls.Add(c_tbLastRevisionDate, 1, 11); - tableLayoutPanel2.Controls.Add(label28, 0, 12); - tableLayoutPanel2.Controls.Add(c_tbTimeCoverage, 1, 10); - tableLayoutPanel2.Controls.Add(label14, 0, 11); - tableLayoutPanel2.Controls.Add(c_tbBackgroundSummary, 1, 4); - tableLayoutPanel2.Controls.Add(label13, 0, 10); - tableLayoutPanel2.Controls.Add(c_tbUpdateSchedule, 1, 9); - tableLayoutPanel2.Controls.Add(c_tbUpdateFrequency, 1, 8); - tableLayoutPanel2.Controls.Add(label12, 0, 9); - tableLayoutPanel2.Controls.Add(c_tbTopics, 1, 6); - tableLayoutPanel2.Controls.Add(c_ddPeriodicity, 1, 5); - tableLayoutPanel2.Controls.Add(label10, 0, 8); - tableLayoutPanel2.Controls.Add(c_ddGranularity, 1, 3); - tableLayoutPanel2.Controls.Add(label8, 0, 6); - tableLayoutPanel2.Controls.Add(c_ddType, 1, 1); - tableLayoutPanel2.Controls.Add(label7, 0, 5); - tableLayoutPanel2.Controls.Add(c_tbDetailPageURL, 1, 0); - tableLayoutPanel2.Controls.Add(label64, 0, 3); - tableLayoutPanel2.Controls.Add(label4, 0, 0); - tableLayoutPanel2.Controls.Add(label6, 0, 1); - tableLayoutPanel2.Controls.Add(label5, 0, 2); - tableLayoutPanel2.Controls.Add(c_tbGeographicalCoverage, 1, 2); - tableLayoutPanel2.Controls.Add(label9, 0, 4); - tableLayoutPanel2.Controls.Add(ticketingControl1, 1, 7); - tableLayoutPanel2.Controls.Add(c_tbAttributionCitation, 1, 15); - tableLayoutPanel2.Location = new System.Drawing.Point(3, 3); - tableLayoutPanel2.Name = "tableLayoutPanel2"; - tableLayoutPanel2.RowCount = 31; - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.Size = new System.Drawing.Size(371, 1475); - tableLayoutPanel2.TabIndex = 194; - // - // tbSourceOfDataCollection - // - tbSourceOfDataCollection.AcceptsReturn = true; - tbSourceOfDataCollection.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbSourceOfDataCollection.Location = new System.Drawing.Point(135, 1370); - tbSourceOfDataCollection.Margin = new Padding(4, 3, 20, 3); - tbSourceOfDataCollection.Multiline = true; - tbSourceOfDataCollection.Name = "tbSourceOfDataCollection"; - tbSourceOfDataCollection.ScrollBars = ScrollBars.Vertical; - tbSourceOfDataCollection.Size = new System.Drawing.Size(369, 100); - tbSourceOfDataCollection.TabIndex = 30; - // - // tbEthicsApprover - // - tbEthicsApprover.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbEthicsApprover.Location = new System.Drawing.Point(135, 1340); - tbEthicsApprover.Margin = new Padding(4, 3, 20, 3); - tbEthicsApprover.Name = "tbEthicsApprover"; - tbEthicsApprover.Size = new System.Drawing.Size(369, 23); - tbEthicsApprover.TabIndex = 29; - // - // label33 - // - label33.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label33.AutoSize = true; - label33.Location = new System.Drawing.Point(43, 1366); - label33.Margin = new Padding(4, 0, 4, 0); - label33.Name = "label33"; - label33.Size = new System.Drawing.Size(84, 30); - label33.TabIndex = 163; - label33.Text = "Source of Data\r\nCollection:"; - label33.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // ddExplicitConsent - // - ddExplicitConsent.Anchor = AnchorStyles.Left; - ddExplicitConsent.DropDownStyle = ComboBoxStyle.DropDownList; - ddExplicitConsent.FormattingEnabled = true; - ddExplicitConsent.Items.AddRange(new object[] { "", "Yes", "No" }); - ddExplicitConsent.Location = new System.Drawing.Point(135, 1311); - ddExplicitConsent.Margin = new Padding(4, 3, 20, 3); - ddExplicitConsent.Name = "ddExplicitConsent"; - ddExplicitConsent.Size = new System.Drawing.Size(250, 23); - ddExplicitConsent.TabIndex = 28; - ddExplicitConsent.SelectedIndexChanged += ddExplicitConsent_SelectedIndexChanged; - // - // label32 - // - label32.Anchor = AnchorStyles.Right; - label32.AutoSize = true; - label32.Location = new System.Drawing.Point(34, 1344); - label32.Margin = new Padding(4, 0, 4, 0); - label32.Name = "label32"; - label32.Size = new System.Drawing.Size(93, 15); - label32.TabIndex = 162; - label32.Text = "Ethics Approver:"; - label32.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // tbAdministrativeContactAddress - // - tbAdministrativeContactAddress.AcceptsReturn = true; - tbAdministrativeContactAddress.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbAdministrativeContactAddress.Location = new System.Drawing.Point(135, 1205); - tbAdministrativeContactAddress.Margin = new Padding(4, 3, 20, 3); - tbAdministrativeContactAddress.Multiline = true; - tbAdministrativeContactAddress.Name = "tbAdministrativeContactAddress"; - tbAdministrativeContactAddress.ScrollBars = ScrollBars.Vertical; - tbAdministrativeContactAddress.Size = new System.Drawing.Size(369, 100); - tbAdministrativeContactAddress.TabIndex = 27; - // - // label31 - // - label31.Anchor = AnchorStyles.Right; - label31.AutoSize = true; - label31.Location = new System.Drawing.Point(32, 1315); - label31.Margin = new Padding(4, 0, 4, 0); - label31.Name = "label31"; - label31.Size = new System.Drawing.Size(95, 15); - label31.TabIndex = 161; - label31.Text = "Explicit Consent:"; - label31.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // tbAdministrativeContactTelephone - // - tbAdministrativeContactTelephone.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbAdministrativeContactTelephone.Location = new System.Drawing.Point(135, 1176); - tbAdministrativeContactTelephone.Margin = new Padding(4, 3, 20, 3); - tbAdministrativeContactTelephone.Name = "tbAdministrativeContactTelephone"; - tbAdministrativeContactTelephone.Size = new System.Drawing.Size(369, 23); - tbAdministrativeContactTelephone.TabIndex = 26; + label19.AutoSize = true; + label19.Location = new System.Drawing.Point(14, 124); + label19.Name = "label19"; + label19.Size = new System.Drawing.Size(124, 15); + label19.TabIndex = 21; + label19.Text = "Controlled Vocabulary"; // - // label11 + // tbControlledVocabulary // - label11.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label11.Location = new System.Drawing.Point(7, 1202); - label11.Margin = new Padding(4, 0, 4, 0); - label11.Name = "label11"; - label11.Size = new System.Drawing.Size(120, 20); - label11.TabIndex = 160; - label11.Text = "Admin Address:"; - label11.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // tbAdministrativeContactEmail - // - tbAdministrativeContactEmail.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbAdministrativeContactEmail.Location = new System.Drawing.Point(135, 1147); - tbAdministrativeContactEmail.Margin = new Padding(4, 3, 20, 3); - tbAdministrativeContactEmail.Name = "tbAdministrativeContactEmail"; - tbAdministrativeContactEmail.Size = new System.Drawing.Size(369, 23); - tbAdministrativeContactEmail.TabIndex = 25; - // - // label30 - // - label30.Anchor = AnchorStyles.Right; - label30.AutoSize = true; - label30.Location = new System.Drawing.Point(19, 1180); - label30.Margin = new Padding(4, 0, 4, 0); - label30.Name = "label30"; - label30.Size = new System.Drawing.Size(108, 15); - label30.TabIndex = 159; - label30.Text = "Admin Contact Tel:"; - label30.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // tbAdministrativeContactName - // - tbAdministrativeContactName.Anchor = AnchorStyles.Left | AnchorStyles.Right; - tbAdministrativeContactName.Location = new System.Drawing.Point(135, 1118); - tbAdministrativeContactName.Margin = new Padding(4, 3, 20, 3); - tbAdministrativeContactName.Name = "tbAdministrativeContactName"; - tbAdministrativeContactName.Size = new System.Drawing.Size(369, 23); - tbAdministrativeContactName.TabIndex = 24; - // - // label29 - // - label29.Anchor = AnchorStyles.Right; - label29.AutoSize = true; - label29.Location = new System.Drawing.Point(4, 1151); - label29.Margin = new Padding(4, 0, 4, 0); - label29.Name = "label29"; - label29.Size = new System.Drawing.Size(123, 15); - label29.TabIndex = 158; - label29.Text = "Admin Contact Email:"; - label29.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + tbControlledVocabulary.Location = new System.Drawing.Point(14, 142); + tbControlledVocabulary.Name = "tbControlledVocabulary"; + tbControlledVocabulary.Size = new System.Drawing.Size(366, 23); + tbControlledVocabulary.TabIndex = 20; // - // label15 + // label18 // - label15.Anchor = AnchorStyles.Right; - label15.AutoSize = true; - label15.Location = new System.Drawing.Point(36, 1122); - label15.Margin = new Padding(4, 0, 4, 0); - label15.Name = "label15"; - label15.Size = new System.Drawing.Size(91, 15); - label15.TabIndex = 157; - label15.Text = "Admin Contact:"; - label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + label18.AutoSize = true; + label18.Location = new System.Drawing.Point(14, 65); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(27, 15); + label18.TabIndex = 19; + label18.Text = "DOI"; // - // label5 + // tbDOI // - label5.Anchor = AnchorStyles.Top | AnchorStyles.Right; - label5.AutoSize = true; - label5.ForeColor = System.Drawing.Color.Black; - label5.Location = new System.Drawing.Point(43, 58); - label5.Margin = new Padding(4, 0, 4, 0); - label5.Name = "label5"; - label5.Size = new System.Drawing.Size(84, 15); - label5.TabIndex = 67; - label5.Text = "Geo Coverage:"; - label5.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // c_tbGeographicalCoverage - // - c_tbGeographicalCoverage.Anchor = AnchorStyles.Left | AnchorStyles.Right; - c_tbGeographicalCoverage.Location = new System.Drawing.Point(135, 61); - c_tbGeographicalCoverage.Margin = new Padding(4, 3, 20, 3); - c_tbGeographicalCoverage.Multiline = true; - c_tbGeographicalCoverage.Name = "c_tbGeographicalCoverage"; - c_tbGeographicalCoverage.ScrollBars = ScrollBars.Vertical; - c_tbGeographicalCoverage.Size = new System.Drawing.Size(369, 100); - c_tbGeographicalCoverage.TabIndex = 2; + tbDOI.Location = new System.Drawing.Point(14, 83); + tbDOI.Name = "tbDOI"; + tbDOI.Size = new System.Drawing.Size(366, 23); + tbDOI.TabIndex = 18; // - // ticketingControl1 + // label17 // - ticketingControl1.Anchor = AnchorStyles.Left; - ticketingControl1.Location = new System.Drawing.Point(135, 437); - ticketingControl1.Margin = new Padding(4, 3, 20, 3); - ticketingControl1.Name = "ticketingControl1"; - ticketingControl1.Size = new System.Drawing.Size(350, 57); - ticketingControl1.TabIndex = 8; + label17.AutoSize = true; + label17.Location = new System.Drawing.Point(14, 11); + label17.Name = "label17"; + label17.Size = new System.Drawing.Size(43, 15); + label17.TabIndex = 17; + label17.Text = "People"; + // + // tbPeople + // + tbPeople.Location = new System.Drawing.Point(14, 29); + tbPeople.Name = "tbPeople"; + tbPeople.Size = new System.Drawing.Size(366, 23); + tbPeople.TabIndex = 16; + // + // tabPage6 + // + tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage6.Controls.Add(comboBox5); + tabPage6.Controls.Add(label22); + tabPage6.Controls.Add(tbUpdateLag); + tabPage6.Controls.Add(label21); + tabPage6.Controls.Add(tbInitialReleaseDate); + tabPage6.Controls.Add(label20); + tabPage6.Location = new System.Drawing.Point(4, 24); + tabPage6.Name = "tabPage6"; + tabPage6.Size = new System.Drawing.Size(873, 895); + tabPage6.TabIndex = 5; + tabPage6.Text = "Data Updates"; + // + // comboBox5 + // + comboBox5.FormattingEnabled = true; + comboBox5.Location = new System.Drawing.Point(15, 30); + comboBox5.Name = "comboBox5"; + comboBox5.Size = new System.Drawing.Size(121, 23); + comboBox5.TabIndex = 22; // - // errorProvider1 + // label22 // - errorProvider1.ContainerControl = this; + label22.AutoSize = true; + label22.Location = new System.Drawing.Point(15, 124); + label22.Name = "label22"; + label22.Size = new System.Drawing.Size(67, 15); + label22.TabIndex = 21; + label22.Text = "Update Lag"; // - // panel2 + // tbUpdateLag // - panel2.Controls.Add(editableFolder); - panel2.Controls.Add(editableCatalogueName); - panel2.Location = new System.Drawing.Point(3, 3); - panel2.Name = "panel2"; - panel2.Size = new System.Drawing.Size(541, 170); - panel2.TabIndex = 161; + tbUpdateLag.Location = new System.Drawing.Point(15, 142); + tbUpdateLag.Name = "tbUpdateLag"; + tbUpdateLag.Size = new System.Drawing.Size(366, 23); + tbUpdateLag.TabIndex = 20; // - // editableCatalogueName + // label21 // - editableCatalogueName.Location = new System.Drawing.Point(0, 0); - editableCatalogueName.Name = "editableCatalogueName"; - editableCatalogueName.Size = new System.Drawing.Size(232, 50); - editableCatalogueName.TabIndex = 0; + label21.AutoSize = true; + label21.Location = new System.Drawing.Point(15, 70); + label21.Name = "label21"; + label21.Size = new System.Drawing.Size(105, 15); + label21.TabIndex = 19; + label21.Text = "Initial Release Date"; // - // editableFolder + // tbInitialReleaseDate // - editableFolder.Location = new System.Drawing.Point(3, 56); - editableFolder.Name = "editableFolder"; - editableFolder.Size = new System.Drawing.Size(232, 50); - editableFolder.TabIndex = 1; + tbInitialReleaseDate.Location = new System.Drawing.Point(15, 88); + tbInitialReleaseDate.Name = "tbInitialReleaseDate"; + tbInitialReleaseDate.Size = new System.Drawing.Size(366, 23); + tbInitialReleaseDate.TabIndex = 18; + // + // label20 + // + label20.AutoSize = true; + label20.Location = new System.Drawing.Point(15, 12); + label20.Name = "label20"; + label20.Size = new System.Drawing.Size(99, 15); + label20.TabIndex = 17; + label20.Text = "Update Fequency"; // // CatalogueUI // @@ -1177,107 +663,86 @@ private void InitializeComponent() Controls.Add(splitContainer1); Margin = new Padding(4, 3, 4, 3); Name = "CatalogueUI"; - Size = new System.Drawing.Size(551, 1085); + Size = new System.Drawing.Size(881, 1085); splitContainer1.Panel1.ResumeLayout(false); + splitContainer1.Panel1.PerformLayout(); splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit(); splitContainer1.ResumeLayout(false); - tableLayoutPanel1.ResumeLayout(false); - tableLayoutPanel1.PerformLayout(); - flowLayoutPanel1.ResumeLayout(false); - flowLayoutPanel1.PerformLayout(); - tableLayoutPanel2.ResumeLayout(false); - tableLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)errorProvider1).EndInit(); - panel2.ResumeLayout(false); + tabControl1.ResumeLayout(false); + tabPage1.ResumeLayout(false); + tabPage1.PerformLayout(); + tabPage2.ResumeLayout(false); + tabPage2.PerformLayout(); + tabPage3.ResumeLayout(false); + tabPage3.PerformLayout(); + tabPage4.ResumeLayout(false); + tabPage4.PerformLayout(); + tabPage5.ResumeLayout(false); + tabPage5.PerformLayout(); + tabPage6.ResumeLayout(false); + tabPage6.PerformLayout(); ResumeLayout(false); } #endregion - private System.Windows.Forms.ComboBox c_ddGranularity; - private System.Windows.Forms.Label label64; - private System.Windows.Forms.TextBox c_tbID; - private System.Windows.Forms.Label label25; - private System.Windows.Forms.Label label2; - internal System.Windows.Forms.TextBox tbName; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox c_tbSourceUrl; - private System.Windows.Forms.TextBox c_tbQueryToolUrl; - private System.Windows.Forms.TextBox c_tbBulkDownloadUrl; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox c_tbBrowseUrl; - private System.Windows.Forms.TextBox c_tbAPIAccessURL; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox c_tbAccessOptions; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox c_tbResourceOwner; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.TextBox c_tbAttributionCitation; - private System.Windows.Forms.ComboBox c_ddType; - private System.Windows.Forms.TextBox c_tbLastRevisionDate; - private System.Windows.Forms.ComboBox c_ddPeriodicity; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox c_tbUpdateSchedule; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.TextBox c_tbTimeCoverage; - private System.Windows.Forms.TextBox c_tbBackgroundSummary; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox c_tbTopics; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.TextBox c_tbUpdateFrequency; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.TextBox c_tbNumberOfThese; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.TextBox c_tbDetailPageURL; - private System.Windows.Forms.Label label20; - private System.Windows.Forms.Label label21; - internal System.Windows.Forms.TextBox tbAcronym; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label26; - private System.Windows.Forms.Label label27; - private System.Windows.Forms.TextBox tbCountryOfOrigin; - private System.Windows.Forms.TextBox tbDataStandards; - private System.Windows.Forms.Label label28; - private System.Windows.Forms.TextBox c_tbSubjectNumbers; - private System.Windows.Forms.TextBox tbDatasetStartDate; - private System.Windows.Forms.Label label41; + private SplitContainer splitContainer1; private TicketingControlUI ticketingControl1; - private System.Windows.Forms.Label label24; - private System.Windows.Forms.TextBox tbFolder; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.Label label33; - private System.Windows.Forms.TextBox tbSourceOfDataCollection; - private System.Windows.Forms.Label label32; - private System.Windows.Forms.TextBox tbEthicsApprover; - private System.Windows.Forms.ComboBox ddExplicitConsent; - private System.Windows.Forms.Label label31; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox tbAdministrativeContactAddress; - private System.Windows.Forms.Label label30; - private System.Windows.Forms.TextBox tbAdministrativeContactTelephone; - private System.Windows.Forms.TextBox tbAdministrativeContactEmail; - private System.Windows.Forms.Label label29; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.TextBox tbAdministrativeContactName; - private System.Windows.Forms.CheckBox cbColdStorage; - private System.Windows.Forms.CheckBox cbInternal; - private System.Windows.Forms.CheckBox cbDeprecated; - private System.Windows.Forms.ErrorProvider errorProvider1; - private Panel panel1; - private FlowLayoutPanel flowLayoutPanel1; - private TableLayoutPanel tableLayoutPanel1; - private TextBox c_tbGeographicalCoverage; - private Label label5; - private TableLayoutPanel tableLayoutPanel2; - private Label lbDatasetslbl; - private Label lbDatasets; - private Panel panel2; - private SimpleControls.EditableLabelUI editableCatalogueName; private SimpleControls.EditableLabelUI editableFolder; + private SimpleControls.EditableLabelUI editableCatalogueName; + private CheckBox checkBox3; + private CheckBox checkBox2; + private CheckBox checkBox1; + private TabControl tabControl1; + private TabPage tabPage1; + private TabPage tabPage2; + private TabPage tabPage3; + private TabPage tabPage4; + private TabPage tabPage5; + private TabPage tabPage6; + private Label label1; + private Label label2; + private TextBox tbDescription; + private Label label7; + private TextBox tbDataSource; + private Label label6; + private ComboBox comboBox3; + private Label label5; + private ComboBox comboBox2; + private Label label4; + private TextBox tbKeywords; + private Label label3; + private ComboBox comboBox1; + private Label label8; + private TextBox tbDataSourceSetting; + private Label label12; + private Label label11; + private Label label10; + private ComboBox comboBox4; + private Label label9; + private TextBox tbGeoCoverage; + private Label label16; + private TextBox tbJuristiction; + private Label label15; + private TextBox tbDataProcessor; + private Label label14; + private TextBox tbDataController; + private Label label13; + private TextBox tbAccessContact; + private Label label19; + private TextBox tbControlledVocabulary; + private Label label18; + private TextBox tbDOI; + private Label label17; + private TextBox tbPeople; + private ComboBox comboBox5; + private Label label22; + private TextBox tbUpdateLag; + private Label label21; + private TextBox tbInitialReleaseDate; + private Label label20; + private TextBox tbAbstract; + private DateTimePicker dtpStart; + private DateTimePicker dtpEndDate; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 8057b91b1f..e4154a6e1f 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -11,6 +11,7 @@ using System.Windows.Forms; using Rdmp.Core; using Rdmp.Core.Curation.Data; +using Rdmp.Core.Icons.IconProvision; using Rdmp.UI.ItemActivation; using Rdmp.UI.Rules; using Rdmp.UI.ScintillaHelper; @@ -47,9 +48,9 @@ public CatalogueUI() AssociatedCollection = RDMPCollection.Catalogue; - c_ddType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); - c_ddPeriodicity.DataSource = Enum.GetValues(typeof(Catalogue.CataloguePeriodicity)); - c_ddGranularity.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueGranularity)); + //c_ddType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); + //c_ddPeriodicity.DataSource = Enum.GetValues(typeof(Catalogue.CataloguePeriodicity)); + //c_ddGranularity.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueGranularity)); UseCommitSystem = true; } @@ -75,38 +76,38 @@ private void c_ddOverrideChildren_Click(object sender, EventArgs e) } } - private void tbName_TextChanged(object sender, EventArgs e) - { - if (!Catalogue.IsAcceptableName(tbName.Text, out var reasonInvalid)) - errorProvider1.SetError(tbName, reasonInvalid); - else - errorProvider1.Clear(); - } - - private void ddExplicitConsent_SelectedIndexChanged(object sender, EventArgs e) - { - if (ddExplicitConsent.Text.Equals("Yes")) - _catalogue.Explicit_consent = true; - - if (ddExplicitConsent.Text.Equals("No")) - _catalogue.Explicit_consent = false; - - if (string.IsNullOrWhiteSpace(ddExplicitConsent.Text)) - _catalogue.Explicit_consent = null; - } - - private void tbFolder_TextChanged(object sender, EventArgs e) - { - try - { - _catalogue.Folder = tbFolder.Text; - tbFolder.ForeColor = Color.Black; - } - catch (Exception) - { - tbFolder.ForeColor = Color.Red; - } - } + //private void tbName_TextChanged(object sender, EventArgs e) + //{ + // if (!Catalogue.IsAcceptableName(tbName.Text, out var reasonInvalid)) + // errorProvider1.SetError(tbName, reasonInvalid); + // else + // errorProvider1.Clear(); + //} + + //private void ddExplicitConsent_SelectedIndexChanged(object sender, EventArgs e) + //{ + // if (ddExplicitConsent.Text.Equals("Yes")) + // _catalogue.Explicit_consent = true; + + // if (ddExplicitConsent.Text.Equals("No")) + // _catalogue.Explicit_consent = false; + + // if (string.IsNullOrWhiteSpace(ddExplicitConsent.Text)) + // _catalogue.Explicit_consent = null; + //} + + //private void tbFolder_TextChanged(object sender, EventArgs e) + //{ + // try + // { + // _catalogue.Folder = tbFolder.Text; + // tbFolder.ForeColor = Color.Black; + // } + // catch (Exception) + // { + // tbFolder.ForeColor = Color.Red; + // } + //} public override void SetDatabaseObject(IActivateItems activator, Catalogue databaseObject) { @@ -116,7 +117,7 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab _scintillaDescription = f.Create(null, SyntaxLanguage.None, null, true, false, activator.CurrentDirectory); _scintillaDescription.Font = SystemFonts.DefaultFont; _scintillaDescription.WrapMode = WrapMode.Word; - panel1.Controls.Add(_scintillaDescription); + //panel1.Controls.Add(_scintillaDescription); } base.SetDatabaseObject(activator, databaseObject); @@ -127,23 +128,25 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab .Where(static datasetId => datasetId != null) .Select(datasetId => _catalogue.CatalogueRepository.GetAllObjectsWhere("ID", datasetId).First()) - .Select(static ds=>ds.Name).ToList(); - if (associatedDatasets.Count > 0) - { - lbDatasets.Visible = true; - lbDatasetslbl.Visible = true; - var finalString = associatedDatasets.Count == 1 ? associatedDatasets[0] : string.Join(", ", associatedDatasets.ToArray(), 0, associatedDatasets.Count - 1) + " and " + associatedDatasets.LastOrDefault(); - lbDatasets.Text = $"This catalogues contains data from the datasets:{finalString}"; - } - else - { - lbDatasets.Visible = false; - lbDatasetslbl.Visible = false; - } + .Select(static ds => ds.Name).ToList(); + //if (associatedDatasets.Count > 0) + //{ + // lbDatasets.Visible = true; + // lbDatasetslbl.Visible = true; + // var finalString = associatedDatasets.Count == 1 ? associatedDatasets[0] : string.Join(", ", associatedDatasets.ToArray(), 0, associatedDatasets.Count - 1) + " and " + associatedDatasets.LastOrDefault(); + // lbDatasets.Text = $"This catalogues contains data from the datasets:{finalString}"; + //} + //else + //{ + // lbDatasets.Visible = false; + // lbDatasetslbl.Visible = false; + //} this.editableCatalogueName.TextValue = _catalogue.Name; this.editableCatalogueName.Title = "Name"; + this.editableCatalogueName.Icon = CatalogueIcons.Catalogue.ImageToBitmap(); this.editableFolder.TextValue = _catalogue.Folder; this.editableFolder.Title = "Folder"; + this.editableFolder.Icon = CatalogueIcons.CatalogueFolder.ImageToBitmap(); RefreshUIFromDatabase(); } @@ -151,43 +154,61 @@ protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalo { base.SetBindings(rules, databaseObject); - Bind(tbAcronym, "Text", "Acronym", c => c.Acronym); - Bind(tbName, "Text", "Name", c => c.Name); - Bind(c_tbID, "Text", "ID", c => c.ID); - Bind(_scintillaDescription, "Text", "Description", c => c.Description); - - Bind(c_ddType, "SelectedItem", "Type", c => c.Type); - Bind(c_ddGranularity, "SelectedItem", "Granularity", c => c.Granularity); - Bind(c_ddPeriodicity, "SelectedItem", "Periodicity", c => c.Periodicity); - - Bind(cbColdStorage, "Checked", "IsColdStorageDataset", c => c.IsColdStorageDataset); - Bind(cbDeprecated, "Checked", "IsDeprecated", c => c.IsDeprecated); - Bind(cbInternal, "Checked", "IsInternalDataset", c => c.IsInternalDataset); - - Bind(c_tbGeographicalCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); - Bind(c_tbBackgroundSummary, "Text", "Background_summary", c => c.Background_summary); - Bind(c_tbTopics, "Text", "Search_keywords", c => c.Search_keywords); - Bind(c_tbUpdateFrequency, "Text", "Update_freq", c => c.Update_freq); - Bind(c_tbUpdateSchedule, "Text", "Update_sched", c => c.Update_sched); - Bind(c_tbTimeCoverage, "Text", "Time_coverage", c => c.Time_coverage); - Bind(tbAdministrativeContactName, "Text", "Contact_details", c => c.Contact_details); - Bind(c_tbResourceOwner, "Text", "Resource_owner", c => c.Resource_owner); - Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation); - Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options); - Bind(c_tbSubjectNumbers, "Text", "SubjectNumbers", c => c.SubjectNumbers); - - Bind(tbDataStandards, "Text", "Data_standards", c => c.Data_standards); - Bind(tbAdministrativeContactName, "Text", "Administrative_contact_name", c => c.Administrative_contact_name); - Bind(tbAdministrativeContactEmail, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); - Bind(tbAdministrativeContactTelephone, "Text", "Administrative_contact_telephone", - c => c.Administrative_contact_telephone); - Bind(tbAdministrativeContactAddress, "Text", "Administrative_contact_address", - c => c.Administrative_contact_address); - Bind(tbCountryOfOrigin, "Text", "Country_of_origin", c => c.Country_of_origin); - Bind(tbEthicsApprover, "Text", "Ethics_approver", c => c.Ethics_approver); - Bind(tbSourceOfDataCollection, "Text", "Source_of_data_collection", c => c.Source_of_data_collection); - Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation); - Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options); + + Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); + Bind(tbDescription, "Text", "Description", c => c.Description); + Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); + Bind(tbDataSource,"Text","DataSource", c => c.DataSource); + Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); + Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); + //Bind(dtpStart, "Value", "StartDate", c => c.StartDate); + //Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + Bind(tbAccessContact, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); + Bind(tbDataController, "Text", "DataController", c => c.DataController); + Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); + Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); + Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); + Bind(tbDOI, "Text", "Doi", c => c.Doi); + Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); + Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); + + //Bind(tbAcronym, "Text", "Acronym", c => c.Acronym); + //Bind(tbName, "Text", "Name", c => c.Name); + //Bind(c_tbID, "Text", "ID", c => c.ID); + //Bind(_scintillaDescription, "Text", "Description", c => c.Description); + + //Bind(c_ddType, "SelectedItem", "Type", c => c.Type); + //Bind(c_ddGranularity, "SelectedItem", "Granularity", c => c.Granularity); + //Bind(c_ddPeriodicity, "SelectedItem", "Periodicity", c => c.Periodicity); + + //Bind(cbColdStorage, "Checked", "IsColdStorageDataset", c => c.IsColdStorageDataset); + //Bind(cbDeprecated, "Checked", "IsDeprecated", c => c.IsDeprecated); + //Bind(cbInternal, "Checked", "IsInternalDataset", c => c.IsInternalDataset); + + //Bind(c_tbGeographicalCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); + //Bind(c_tbBackgroundSummary, "Text", "Background_summary", c => c.Background_summary); + //Bind(c_tbTopics, "Text", "Search_keywords", c => c.Search_keywords); + //Bind(c_tbUpdateFrequency, "Text", "Update_freq", c => c.Update_freq); + //Bind(c_tbUpdateSchedule, "Text", "Update_sched", c => c.Update_sched); + //Bind(c_tbTimeCoverage, "Text", "Time_coverage", c => c.Time_coverage); + //Bind(tbAdministrativeContactName, "Text", "Contact_details", c => c.Contact_details); + //Bind(c_tbResourceOwner, "Text", "Resource_owner", c => c.Resource_owner); + //Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation); + //Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options); + //Bind(c_tbSubjectNumbers, "Text", "SubjectNumbers", c => c.SubjectNumbers); + + //Bind(tbDataStandards, "Text", "Data_standards", c => c.Data_standards); + //Bind(tbAdministrativeContactName, "Text", "Administrative_contact_name", c => c.Administrative_contact_name); + //Bind(tbAdministrativeContactEmail, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); + //Bind(tbAdministrativeContactTelephone, "Text", "Administrative_contact_telephone", + // c => c.Administrative_contact_telephone); + //Bind(tbAdministrativeContactAddress, "Text", "Administrative_contact_address", + // c => c.Administrative_contact_address); + //Bind(tbCountryOfOrigin, "Text", "Country_of_origin", c => c.Country_of_origin); + //Bind(tbEthicsApprover, "Text", "Ethics_approver", c => c.Ethics_approver); + //Bind(tbSourceOfDataCollection, "Text", "Source_of_data_collection", c => c.Source_of_data_collection); + //Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation); + //Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options); } public override void SetItemActivator(IActivateItems activator) @@ -212,35 +233,35 @@ private void RefreshUIFromDatabase() ticketingControl1.TicketText = _catalogue.Ticket; - tbFolder.Text = _catalogue.Folder; + //tbFolder.Text = _catalogue.Folder; - if (_catalogue.Explicit_consent == null) - ddExplicitConsent.Text = ""; - else if (_catalogue.Explicit_consent == true) - ddExplicitConsent.Text = "Yes"; - else - ddExplicitConsent.Text = "No"; + //if (_catalogue.Explicit_consent == null) + // ddExplicitConsent.Text = ""; + //else if (_catalogue.Explicit_consent == true) + // ddExplicitConsent.Text = "Yes"; + //else + // ddExplicitConsent.Text = "No"; - c_tbLastRevisionDate.Text = _catalogue.Last_revision_date.ToString(); - tbDatasetStartDate.Text = _catalogue.DatasetStartDate.ToString(); + //c_tbLastRevisionDate.Text = _catalogue.Last_revision_date.ToString(); + //tbDatasetStartDate.Text = _catalogue.DatasetStartDate.ToString(); - c_tbAPIAccessURL.Text = _catalogue.API_access_URL != null ? _catalogue.API_access_URL.ToString() : ""; - c_tbBrowseUrl.Text = _catalogue.Browse_URL != null ? _catalogue.Browse_URL.ToString() : ""; - c_tbBulkDownloadUrl.Text = _catalogue.Bulk_Download_URL != null ? _catalogue.Bulk_Download_URL.ToString() : ""; - c_tbQueryToolUrl.Text = _catalogue.Query_tool_URL != null ? _catalogue.Query_tool_URL.ToString() : ""; - c_tbSourceUrl.Text = _catalogue.Source_URL != null ? _catalogue.Source_URL.ToString() : ""; - c_tbDetailPageURL.Text = _catalogue.Detail_Page_URL != null ? _catalogue.Detail_Page_URL.ToString() : ""; + //c_tbAPIAccessURL.Text = _catalogue.API_access_URL != null ? _catalogue.API_access_URL.ToString() : ""; + //c_tbBrowseUrl.Text = _catalogue.Browse_URL != null ? _catalogue.Browse_URL.ToString() : ""; + //c_tbBulkDownloadUrl.Text = _catalogue.Bulk_Download_URL != null ? _catalogue.Bulk_Download_URL.ToString() : ""; + //c_tbQueryToolUrl.Text = _catalogue.Query_tool_URL != null ? _catalogue.Query_tool_URL.ToString() : ""; + //c_tbSourceUrl.Text = _catalogue.Source_URL != null ? _catalogue.Source_URL.ToString() : ""; + //c_tbDetailPageURL.Text = _catalogue.Detail_Page_URL != null ? _catalogue.Detail_Page_URL.ToString() : ""; } private void c_tbLastRevisionDate_TextChanged(object sender, EventArgs e) { - SetDate(c_tbLastRevisionDate, v => _catalogue.Last_revision_date = v); + //SetDate(c_tbLastRevisionDate, v => _catalogue.Last_revision_date = v); } private void tbDatasetStartDate_TextChanged(object sender, EventArgs e) { - SetDate(tbDatasetStartDate, v => _catalogue.DatasetStartDate = v); + //SetDate(tbDatasetStartDate, v => _catalogue.DatasetStartDate = v); } private void c_tbDetailPageURL_TextChanged(object sender, EventArgs e) @@ -272,6 +293,21 @@ private void c_tbSourceUrl_TextChanged(object sender, EventArgs e) { SetUrl((TextBox)sender, v => _catalogue.Source_URL = v); } + + private void ticketingControl1_Load(object sender, EventArgs e) + { + + } + + private void checkBox2_CheckedChanged(object sender, EventArgs e) + { + + } + + private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) + { + + } } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.resx b/Rdmp.UI/MainFormUITabs/CatalogueUI.resx index b82edb862b..8b2ff64a11 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.resx +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.resx @@ -117,7 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - \ No newline at end of file diff --git a/Rdmp.UI/SimpleControls/EditableLabelUI.Designer.cs b/Rdmp.UI/SimpleControls/EditableLabelUI.Designer.cs index 07a34bba35..763c4f4161 100644 --- a/Rdmp.UI/SimpleControls/EditableLabelUI.Designer.cs +++ b/Rdmp.UI/SimpleControls/EditableLabelUI.Designer.cs @@ -33,13 +33,16 @@ private void InitializeComponent() lblEditable = new System.Windows.Forms.Label(); tbEditable = new System.Windows.Forms.TextBox(); lblTitle = new System.Windows.Forms.Label(); + pbIcon = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)pbIcon).BeginInit(); SuspendLayout(); // // pictureBox1 // + pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand; pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image"); - pictureBox1.Location = new System.Drawing.Point(219, 30); + pictureBox1.Location = new System.Drawing.Point(235, 30); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new System.Drawing.Size(19, 19); pictureBox1.TabIndex = 0; @@ -49,7 +52,7 @@ private void InitializeComponent() // lblEditable // lblEditable.AutoSize = true; - lblEditable.Location = new System.Drawing.Point(15, 32); + lblEditable.Location = new System.Drawing.Point(31, 32); lblEditable.Name = "lblEditable"; lblEditable.Size = new System.Drawing.Size(38, 15); lblEditable.TabIndex = 1; @@ -57,7 +60,7 @@ private void InitializeComponent() // // tbEditable // - tbEditable.Location = new System.Drawing.Point(15, 28); + tbEditable.Location = new System.Drawing.Point(31, 28); tbEditable.Name = "tbEditable"; tbEditable.Size = new System.Drawing.Size(201, 23); tbEditable.TabIndex = 2; @@ -67,15 +70,24 @@ private void InitializeComponent() // lblTitle.AutoSize = true; lblTitle.Font = new System.Drawing.Font("Segoe UI", 12F); - lblTitle.Location = new System.Drawing.Point(3, 3); + lblTitle.Location = new System.Drawing.Point(25, 3); lblTitle.Name = "lblTitle"; lblTitle.Size = new System.Drawing.Size(0, 21); lblTitle.TabIndex = 3; // + // pbIcon + // + pbIcon.Location = new System.Drawing.Point(0, 3); + pbIcon.Name = "pbIcon"; + pbIcon.Size = new System.Drawing.Size(22, 22); + pbIcon.TabIndex = 4; + pbIcon.TabStop = false; + // // EditableLabelUI // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(pbIcon); Controls.Add(lblTitle); Controls.Add(tbEditable); Controls.Add(lblEditable); @@ -83,6 +95,7 @@ private void InitializeComponent() Name = "EditableLabelUI"; Size = new System.Drawing.Size(278, 59); ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); + ((System.ComponentModel.ISupportInitialize)pbIcon).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -93,5 +106,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblEditable; private System.Windows.Forms.TextBox tbEditable; private System.Windows.Forms.Label lblTitle; + private System.Windows.Forms.PictureBox pbIcon; } } diff --git a/Rdmp.UI/SimpleControls/EditableLabelUI.cs b/Rdmp.UI/SimpleControls/EditableLabelUI.cs index 779ea7c3a5..eaa9bde0fc 100644 --- a/Rdmp.UI/SimpleControls/EditableLabelUI.cs +++ b/Rdmp.UI/SimpleControls/EditableLabelUI.cs @@ -15,6 +15,7 @@ public partial class EditableLabelUI : UserControl { private string _value = ""; private string _title = ""; + private Image _image; [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string TextValue @@ -40,6 +41,17 @@ public string Title } } + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public Image Icon + { + get => _image; + set + { + _image = value; + pbIcon.Image = _image; + } + } + public EditableLabelUI() { InitializeComponent(); From 09fe0bdf4fc3baa257ae5f4e382b8ad9faecf80a Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 21 Jan 2025 13:55:23 +0000 Subject: [PATCH 03/36] smarter binding --- .../MainFormUITabs/CatalogueUI.Designer.cs | 4 +- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 84 +++++++++++++++---- 2 files changed, 69 insertions(+), 19 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index d73ef69d67..e9f4d19ebb 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -1,4 +1,5 @@ -using System.Windows.Forms; +using System; +using System.Windows.Forms; using Rdmp.UI.LocationsMenu.Ticketing; namespace Rdmp.UI.MainFormUITabs @@ -194,6 +195,7 @@ private void InitializeComponent() tabControl1.SelectedIndex = 0; tabControl1.Size = new System.Drawing.Size(881, 923); tabControl1.TabIndex = 0; + tabControl1.SelectedIndexChanged += tabControl1_SelectedIndexChanged; // // tabPage1 // diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index e4154a6e1f..415cd6adfa 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -5,10 +5,12 @@ // You should have received a copy of the GNU General Public License along with RDMP. If not, see . using System; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Windows.Forms; +using NPOI.HSSF.Record.Chart; using Rdmp.Core; using Rdmp.Core.Curation.Data; using Rdmp.Core.Icons.IconProvision; @@ -148,30 +150,15 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab this.editableFolder.Title = "Folder"; this.editableFolder.Icon = CatalogueIcons.CatalogueFolder.ImageToBitmap(); RefreshUIFromDatabase(); + } protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalogue databaseObject) { base.SetBindings(rules, databaseObject); + tabControl1_SelectedIndexChanged(this.tabControl1, null); - - Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); - Bind(tbDescription, "Text", "Description", c => c.Description); - Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); - Bind(tbDataSource,"Text","DataSource", c => c.DataSource); - Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); - Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); - //Bind(dtpStart, "Value", "StartDate", c => c.StartDate); - //Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); - Bind(tbAccessContact, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); - Bind(tbDataController, "Text", "DataController", c => c.DataController); - Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); - Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); - Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); - Bind(tbDOI, "Text", "Doi", c => c.Doi); - Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); - Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); - + //-------------------------------- //Bind(tbAcronym, "Text", "Acronym", c => c.Acronym); //Bind(tbName, "Text", "Name", c => c.Name); //Bind(c_tbID, "Text", "ID", c => c.ID); @@ -308,6 +295,67 @@ private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) { } + + private List setTabBindings = new(); + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + var tabControl = (TabControl)sender; + var selectedIndex = tabControl.SelectedIndex; + if (setTabBindings.Contains(selectedIndex)) return; + switch (selectedIndex) + { + case 0: + Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); + Bind(tbDescription, "Text", "Description", c => c.Description); + break; + case 1: + Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); + Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); + Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); + break; + case 2: + Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); + //Bind(dtpStart, "Value", "StartDate", c => c.StartDate); + //Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + break; + case 3: + Bind(tbAccessContact, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); + Bind(tbDataController, "Text", "DataController", c => c.DataController); + Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); + Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); + break; + case 4: + Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); + Bind(tbDOI, "Text", "Doi", c => c.Doi); + break; + case 5: + Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); + Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); + break; + default: + break; + } + setTabBindings.Add(selectedIndex); + + //Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); + //Bind(tbDescription, "Text", "Description", c => c.Description); + //Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); + //Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); + //Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); + //Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); + ////Bind(dtpStart, "Value", "StartDate", c => c.StartDate); + ////Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + //Bind(tbAccessContact, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); + //Bind(tbDataController, "Text", "DataController", c => c.DataController); + //Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); + //Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); + //Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); + //Bind(tbDOI, "Text", "Doi", c => c.Doi); + //Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); + //Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); + } + } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] From c07ae96bc98932e08d8a1358bfa548c1310181d6 Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 22 Jan 2025 10:24:06 +0000 Subject: [PATCH 04/36] tab updates --- Rdmp.Core/Curation/Data/Catalogue.cs | 56 +++++++++++++++++++ .../MainFormUITabs/CatalogueUI.Designer.cs | 36 ++++++------ Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 54 ++++++++++++++++++ 3 files changed, 128 insertions(+), 18 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index fed222b50f..4188bf930e 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -699,6 +699,61 @@ public enum CatalogueGranularity Clinic } + /// + /// Notional user declared type of data catalogue contains. Copied from the HDR Gateway + /// + public enum DatasetType + { + /// + /// Includes any data related to mental health, cardiovascular, cancer, rare diseases, metabolic and endocrine, neurological, reproductive, maternity and neonatology, respiratory, immunity, musculoskeletal, vision, renal and urogenital, oral and gastrointestinal, cognitive function or hearing. + /// + HealthcareAndDisease, + /// + /// Includes any data related to treatment or interventions related to vaccines or which are preventative or therapeutic in nature. + /// + TreatmentsAndInterventions, + /// + /// Includes any data related to laboratory or other diagnostics. + /// + MeasurementsAndTests, + /// + /// Includes any data related to CT, MRI, PET, x-ray, ultrasound or pathology imaging. + /// + ImagingTypes, + /// + /// Indicates whether the dataset relates to head, chest, arm abdomen or leg imaging. + /// + ImagingAreaOfTheBody, + /// + /// Includes any data related to proteomics, transcriptomics, epigenomics, metabolomics, multiomics, metagenomics or genomics. + /// + Omics, + /// + /// Includes any data related to education, crime and justice, ethnicity, housing, labour, ageing, economics, marital status, social support, deprivation, religion, occupation, finances or family circumstances. + /// + Socioeconomic, + /// + /// Includes any data related to smoking, physical activity, dietary habits or alcohol. + /// + Lifestyle, + /// + /// Includes any data related to disease registries for research, national disease registries, audits, or birth and deaths records. + /// + Registry, + /// + /// Includes any data related to the monitoring or study of environmental or energy factors or events. + /// + EnvironmentalAndEnergy, + /// + /// Includes any data related to the study or application of information and communication. + /// + InformationAndCommunication, + /// + /// Includes any data related to political views, activities, voting, etc. + /// + Politics + } + #endregion /// @@ -867,6 +922,7 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) Folder = r["Folder"].ToString(); + ShortDescription = r["ShortDescription"].ToString(); DataSource = r["DataSource"].ToString(); DataSourceSetting = r["DataSourceSetting"].ToString(); StartDate = !string.IsNullOrEmpty(r["StartDate"].ToString())? DateTime.Parse(r["StartDate"].ToString()) :null; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index e9f4d19ebb..0ed6785b4e 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -53,11 +53,11 @@ private void InitializeComponent() label6 = new Label(); comboBox3 = new ComboBox(); label5 = new Label(); - comboBox2 = new ComboBox(); + cb_datasetType = new ComboBox(); label4 = new Label(); tbKeywords = new TextBox(); label3 = new Label(); - comboBox1 = new ComboBox(); + cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); dtpEndDate = new DateTimePicker(); dtpStart = new DateTimePicker(); @@ -257,11 +257,11 @@ private void InitializeComponent() tabPage2.Controls.Add(label6); tabPage2.Controls.Add(comboBox3); tabPage2.Controls.Add(label5); - tabPage2.Controls.Add(comboBox2); + tabPage2.Controls.Add(cb_datasetType); tabPage2.Controls.Add(label4); tabPage2.Controls.Add(tbKeywords); tabPage2.Controls.Add(label3); - tabPage2.Controls.Add(comboBox1); + tabPage2.Controls.Add(cb_resourceType); tabPage2.Location = new System.Drawing.Point(4, 24); tabPage2.Name = "tabPage2"; tabPage2.Padding = new Padding(3); @@ -327,13 +327,13 @@ private void InitializeComponent() label5.TabIndex = 5; label5.Text = "Dataset Type"; // - // comboBox2 + // cb_datasetType // - comboBox2.FormattingEnabled = true; - comboBox2.Location = new System.Drawing.Point(6, 125); - comboBox2.Name = "comboBox2"; - comboBox2.Size = new System.Drawing.Size(121, 23); - comboBox2.TabIndex = 4; + cb_datasetType.FormattingEnabled = true; + cb_datasetType.Location = new System.Drawing.Point(6, 125); + cb_datasetType.Name = "cb_datasetType"; + cb_datasetType.Size = new System.Drawing.Size(121, 23); + cb_datasetType.TabIndex = 4; // // label4 // @@ -360,13 +360,13 @@ private void InitializeComponent() label3.TabIndex = 1; label3.Text = "Resource Type"; // - // comboBox1 + // cb_resourceType // - comboBox1.FormattingEnabled = true; - comboBox1.Location = new System.Drawing.Point(6, 27); - comboBox1.Name = "comboBox1"; - comboBox1.Size = new System.Drawing.Size(121, 23); - comboBox1.TabIndex = 0; + cb_resourceType.FormattingEnabled = true; + cb_resourceType.Location = new System.Drawing.Point(6, 27); + cb_resourceType.Name = "cb_resourceType"; + cb_resourceType.Size = new System.Drawing.Size(121, 23); + cb_resourceType.TabIndex = 0; // // tabPage3 // @@ -710,11 +710,11 @@ private void InitializeComponent() private Label label6; private ComboBox comboBox3; private Label label5; - private ComboBox comboBox2; + private ComboBox cb_datasetType; private Label label4; private TextBox tbKeywords; private Label label3; - private ComboBox comboBox1; + private ComboBox cb_resourceType; private Label label8; private TextBox tbDataSourceSetting; private Label label12; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 415cd6adfa..6a0e38ff57 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -306,32 +306,86 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) switch (selectedIndex) { case 0: + foreach (Control item in tabPage1.Controls) + { + item.Visible = false; + } Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); Bind(tbDescription, "Text", "Description", c => c.Description); + foreach (Control item in tabPage1.Controls) + { + item.Visible = true; + } break; case 1: + foreach (Control item in tabPage2.Controls) + { + item.Visible = false; + } + cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); + cb_datasetType.DataSource = Enum.GetValues(typeof(Catalogue.DatasetType)); Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); + Bind(cb_resourceType, "SelectedItem", "Type", c => c.Type); + Bind(cb_datasetType, "SelectedItem", "DataType", c => c.DataType); Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); + + + foreach (Control item in tabPage2.Controls) + { + item.Visible = true; + } break; case 2: + foreach (Control item in tabPage3.Controls) + { + item.Visible = false; + } Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); //Bind(dtpStart, "Value", "StartDate", c => c.StartDate); //Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + foreach (Control item in tabPage3.Controls) + { + item.Visible = true; + } break; case 3: + foreach (Control item in tabPage4.Controls) + { + item.Visible = false; + } Bind(tbAccessContact, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); Bind(tbDataController, "Text", "DataController", c => c.DataController); Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); + foreach (Control item in tabPage4.Controls) + { + item.Visible = true; + } break; case 4: + foreach (Control item in tabPage5.Controls) + { + item.Visible = false; + } Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); Bind(tbDOI, "Text", "Doi", c => c.Doi); + foreach (Control item in tabPage5.Controls) + { + item.Visible = true; + } break; case 5: + foreach (Control item in tabPage6.Controls) + { + item.Visible = false; + } Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); + foreach (Control item in tabPage6.Controls) + { + item.Visible = true; + } break; default: break; From f471c24deccbabff673027530555ca2f9e94110e Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 22 Jan 2025 10:24:25 +0000 Subject: [PATCH 05/36] remove unused --- Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs | 18 +++++++++--------- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 0ed6785b4e..966b2eadee 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -51,7 +51,7 @@ private void InitializeComponent() label7 = new Label(); tbDataSource = new TextBox(); label6 = new Label(); - comboBox3 = new ComboBox(); + cb_datasetSubtype = new ComboBox(); label5 = new Label(); cb_datasetType = new ComboBox(); label4 = new Label(); @@ -255,7 +255,7 @@ private void InitializeComponent() tabPage2.Controls.Add(label7); tabPage2.Controls.Add(tbDataSource); tabPage2.Controls.Add(label6); - tabPage2.Controls.Add(comboBox3); + tabPage2.Controls.Add(cb_datasetSubtype); tabPage2.Controls.Add(label5); tabPage2.Controls.Add(cb_datasetType); tabPage2.Controls.Add(label4); @@ -310,13 +310,13 @@ private void InitializeComponent() label6.TabIndex = 7; label6.Text = "Dataset Subtype"; // - // comboBox3 + // cb_datasetSubtype // - comboBox3.FormattingEnabled = true; - comboBox3.Location = new System.Drawing.Point(6, 174); - comboBox3.Name = "comboBox3"; - comboBox3.Size = new System.Drawing.Size(121, 23); - comboBox3.TabIndex = 6; + cb_datasetSubtype.FormattingEnabled = true; + cb_datasetSubtype.Location = new System.Drawing.Point(6, 174); + cb_datasetSubtype.Name = "cb_datasetSubtype"; + cb_datasetSubtype.Size = new System.Drawing.Size(121, 23); + cb_datasetSubtype.TabIndex = 6; // // label5 // @@ -708,7 +708,7 @@ private void InitializeComponent() private Label label7; private TextBox tbDataSource; private Label label6; - private ComboBox comboBox3; + private ComboBox cb_datasetSubtype; private Label label5; private ComboBox cb_datasetType; private Label label4; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 6a0e38ff57..8f930e49bc 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -324,9 +324,11 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) } cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); cb_datasetType.DataSource = Enum.GetValues(typeof(Catalogue.DatasetType)); + cb_datasetSubtype.DataSource = Enum.GetValues(typeof(Catalogue.DatasetSubType)); Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); Bind(cb_resourceType, "SelectedItem", "Type", c => c.Type); Bind(cb_datasetType, "SelectedItem", "DataType", c => c.DataType); + Bind(cb_datasetSubtype, "SelectedItem", "DataSubtype", c => c.DataSubtype); Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); From f05d08325bb4239daf0284017d7bbba7736c7701 Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 22 Jan 2025 14:09:17 +0000 Subject: [PATCH 06/36] workign dropdowns --- Rdmp.Core/Curation/Data/Catalogue.cs | 81 ++++++++++-- Rdmp.Core/Curation/Data/ICatalogue.cs | 1 - .../MainFormUITabs/CatalogueUI.Designer.cs | 118 ++++++++++++------ Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 116 ++++++++++++++++- 4 files changed, 262 insertions(+), 54 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 4188bf930e..e502ca77ef 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -10,6 +10,7 @@ using System.IO; using System.Linq; using System.Text; +using Amazon.S3.Model; using FAnsi; using FAnsi.Discovery; using FAnsi.Discovery.QuerySyntax; @@ -51,7 +52,7 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private string _geographicalCoverage; private string _backgroundSummary; private string _searchKeywords; - private string _updateFreq; + private UpdateFrequencies _updateFreq; private string _updateSched; private string _timeCoverage; private DateTime? _lastRevisionDate; @@ -95,7 +96,7 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private DateTime? _datasetReleaseDate; private DateTime? _startDate; private DateTime? _endDate; - private string _updateLag; + private UpdateLagTimes _updateLag; private string _juristiction; private string _dataController; private string _dataProcessor; @@ -210,7 +211,7 @@ public string Search_keywords /// User specified free text field. Not used for anything by RDMP. /// /// - public string Update_freq + public UpdateFrequencies Update_freq { get => _updateFreq; set => SetField(ref _updateFreq, value); @@ -504,7 +505,7 @@ public DateTime? DatasetStartDate } /// - public string ShortDescription { get => _shortDescription; set => SetField(ref _shortDescription,value); } + public string ShortDescription { get => _shortDescription; set => SetField(ref _shortDescription, value); } /// public string DataType { get => _dataType; set => SetField(ref _dataType, value); } /// @@ -520,7 +521,7 @@ public DateTime? DatasetStartDate /// public DateTime? EndDate { get => _endDate; set => SetField(ref _endDate, value); } /// - public string UpdateLag { get => _updateLag; set => SetField(ref _updateLag, value); } + public UpdateLagTimes UpdateLag { get => _updateLag; set => SetField(ref _updateLag, value); } /// public string Juristiction { get => _juristiction; set => SetField(ref _juristiction, value); } /// @@ -576,7 +577,7 @@ public LoadMetadata[] LoadMetadatas() ? null : Repository.GetObjectByID(PivotCategory_ExtractionInformation_ID.Value); - #endregion + #endregion #region Enums @@ -754,6 +755,39 @@ public enum DatasetType Politics } + public enum DatasetSubType { } + + + public enum UpdateFrequencies + { + Static, + Irregular, + Continuous, + Biennial, + Annual, + Biannual, + Quarterly, + Bimonthly, + Monthly, + Biweekly, + Weekly, + TwiceWeekly, + Daily, + Other + } + + public enum UpdateLagTimes + { + LessThanAWeek, + OneToTwoWeeks, + TwoToFourWeeks, + OneToTwoMonths, + TwoToSixMonths, + SixMonthsPlus, + Variable, + NotApplicable, + Other + } #endregion /// @@ -868,7 +902,19 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) Geographical_coverage = r["Geographical_coverage"].ToString(); Background_summary = r["Background_summary"].ToString(); Search_keywords = r["Search_keywords"].ToString(); - Update_freq = r["Update_freq"].ToString(); + var updateFreq = r["Update_freq"]; + if (updateFreq == null || updateFreq == DBNull.Value) + { + Update_freq = UpdateFrequencies.Other; + } + else + { + if (Enum.TryParse(updateFreq.ToString(), true, out UpdateFrequencies updateFreqAsEnum)) + Update_freq = updateFreqAsEnum; + else + throw new Exception( + $" r[\"Update_freq\"] had value {updateFreq} which is not contained in Enum UpdateFrequencies"); + } Update_sched = r["Update_sched"].ToString(); Time_coverage = r["Time_coverage"].ToString(); SubjectNumbers = r["SubjectNumbers"].ToString(); @@ -925,13 +971,28 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) ShortDescription = r["ShortDescription"].ToString(); DataSource = r["DataSource"].ToString(); DataSourceSetting = r["DataSourceSetting"].ToString(); - StartDate = !string.IsNullOrEmpty(r["StartDate"].ToString())? DateTime.Parse(r["StartDate"].ToString()) :null; - EndDate = !string.IsNullOrEmpty(r["EndDate"].ToString())? DateTime.Parse(r["EndDate"].ToString()) : null; + StartDate = !string.IsNullOrEmpty(r["StartDate"].ToString()) ? DateTime.Parse(r["StartDate"].ToString()) : null; + EndDate = !string.IsNullOrEmpty(r["EndDate"].ToString()) ? DateTime.Parse(r["EndDate"].ToString()) : null; DataController = r["DataController"].ToString(); DataProcessor = r["DataProcessor"].ToString(); Juristiction = r["Juristiction"].ToString(); + AssociatedPeople = r["AssociatedPeople"].ToString(); + ControlledVocabulary = r["ControlledVocabulary"].ToString(); Doi = r["Doi"].ToString(); - + //UpdateLag = r["UpdateLag"].ToString(); + var updateLag = r["UpdateLag"]; + if (updateLag == null || updateLag == DBNull.Value) + { + UpdateLag = UpdateLagTimes.Other; + } + else + { + if (Enum.TryParse(updateLag.ToString(), true, out UpdateLagTimes updateLagAsEnum)) + UpdateLag = updateLagAsEnum; + else + throw new Exception( + $" r[\"UpdateLag\"] had value {updateLag} which is not contained in Enum UpdateLagTimes"); + } ClearAllInjections(); } diff --git a/Rdmp.Core/Curation/Data/ICatalogue.cs b/Rdmp.Core/Curation/Data/ICatalogue.cs index e0f515645b..50cd16172b 100644 --- a/Rdmp.Core/Curation/Data/ICatalogue.cs +++ b/Rdmp.Core/Curation/Data/ICatalogue.cs @@ -111,7 +111,6 @@ public interface ICatalogue : IHasDependencies, IHasQuerySyntaxHelper, INamed, I DateTime? DatasetReleaseDate { get; set; } DateTime? StartDate { get; set; } DateTime? EndDate { get; set; } - string UpdateLag { get; set; } string Juristiction { get; set; } string DataController { get; set; } string DataProcessor { get; set; } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 966b2eadee..d5f5482ce1 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -59,12 +59,14 @@ private void InitializeComponent() label3 = new Label(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); + btnEndDateClear = new Button(); + btnStartDateClear = new Button(); dtpEndDate = new DateTimePicker(); dtpStart = new DateTimePicker(); label12 = new Label(); label11 = new Label(); label10 = new Label(); - comboBox4 = new ComboBox(); + cb_granularity = new ComboBox(); label9 = new Label(); tbGeoCoverage = new TextBox(); tabPage4 = new TabPage(); @@ -84,12 +86,13 @@ private void InitializeComponent() label17 = new Label(); tbPeople = new TextBox(); tabPage6 = new TabPage(); - comboBox5 = new ComboBox(); + dtpReleaseDate = new DateTimePicker(); + cbUpdateLag = new ComboBox(); + cb_updateFrequency = new ComboBox(); label22 = new Label(); - tbUpdateLag = new TextBox(); label21 = new Label(); - tbInitialReleaseDate = new TextBox(); label20 = new Label(); + btnReleaseDateClear = new Button(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); @@ -371,12 +374,14 @@ private void InitializeComponent() // tabPage3 // tabPage3.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage3.Controls.Add(btnEndDateClear); + tabPage3.Controls.Add(btnStartDateClear); tabPage3.Controls.Add(dtpEndDate); tabPage3.Controls.Add(dtpStart); tabPage3.Controls.Add(label12); tabPage3.Controls.Add(label11); tabPage3.Controls.Add(label10); - tabPage3.Controls.Add(comboBox4); + tabPage3.Controls.Add(cb_granularity); tabPage3.Controls.Add(label9); tabPage3.Controls.Add(tbGeoCoverage); tabPage3.Location = new System.Drawing.Point(4, 24); @@ -385,6 +390,26 @@ private void InitializeComponent() tabPage3.TabIndex = 2; tabPage3.Text = "Geospacial & Temporal"; // + // btnEndDateClear + // + btnEndDateClear.Location = new System.Drawing.Point(220, 194); + btnEndDateClear.Name = "btnEndDateClear"; + btnEndDateClear.Size = new System.Drawing.Size(75, 23); + btnEndDateClear.TabIndex = 25; + btnEndDateClear.Text = "Clear"; + btnEndDateClear.UseVisualStyleBackColor = true; + btnEndDateClear.Click += btnEndDateClear_Click; + // + // btnStartDateClear + // + btnStartDateClear.Location = new System.Drawing.Point(220, 140); + btnStartDateClear.Name = "btnStartDateClear"; + btnStartDateClear.Size = new System.Drawing.Size(75, 23); + btnStartDateClear.TabIndex = 24; + btnStartDateClear.Text = "Clear"; + btnStartDateClear.UseVisualStyleBackColor = true; + btnStartDateClear.Click += btnStartDateClear_Click; + // // dtpEndDate // dtpEndDate.Location = new System.Drawing.Point(14, 194); @@ -426,13 +451,13 @@ private void InitializeComponent() label10.TabIndex = 15; label10.Text = "Granularity"; // - // comboBox4 + // cb_granularity // - comboBox4.FormattingEnabled = true; - comboBox4.Location = new System.Drawing.Point(14, 86); - comboBox4.Name = "comboBox4"; - comboBox4.Size = new System.Drawing.Size(121, 23); - comboBox4.TabIndex = 14; + cb_granularity.FormattingEnabled = true; + cb_granularity.Location = new System.Drawing.Point(14, 86); + cb_granularity.Name = "cb_granularity"; + cb_granularity.Size = new System.Drawing.Size(121, 23); + cb_granularity.TabIndex = 14; // // label9 // @@ -597,11 +622,12 @@ private void InitializeComponent() // tabPage6 // tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage6.Controls.Add(comboBox5); + tabPage6.Controls.Add(btnReleaseDateClear); + tabPage6.Controls.Add(dtpReleaseDate); + tabPage6.Controls.Add(cbUpdateLag); + tabPage6.Controls.Add(cb_updateFrequency); tabPage6.Controls.Add(label22); - tabPage6.Controls.Add(tbUpdateLag); tabPage6.Controls.Add(label21); - tabPage6.Controls.Add(tbInitialReleaseDate); tabPage6.Controls.Add(label20); tabPage6.Location = new System.Drawing.Point(4, 24); tabPage6.Name = "tabPage6"; @@ -609,13 +635,30 @@ private void InitializeComponent() tabPage6.TabIndex = 5; tabPage6.Text = "Data Updates"; // - // comboBox5 + // dtpReleaseDate + // + dtpReleaseDate.Location = new System.Drawing.Point(15, 88); + dtpReleaseDate.Name = "dtpReleaseDate"; + dtpReleaseDate.Size = new System.Drawing.Size(200, 23); + dtpReleaseDate.TabIndex = 24; + // + // cbUpdateLag + // + cbUpdateLag.FormattingEnabled = true; + cbUpdateLag.Location = new System.Drawing.Point(15, 142); + cbUpdateLag.Name = "cbUpdateLag"; + cbUpdateLag.Size = new System.Drawing.Size(140, 23); + cbUpdateLag.TabIndex = 23; + cbUpdateLag.Format += FormatCB; // - comboBox5.FormattingEnabled = true; - comboBox5.Location = new System.Drawing.Point(15, 30); - comboBox5.Name = "comboBox5"; - comboBox5.Size = new System.Drawing.Size(121, 23); - comboBox5.TabIndex = 22; + // cb_updateFrequency + // + cb_updateFrequency.FormattingEnabled = true; + cb_updateFrequency.Location = new System.Drawing.Point(15, 30); + cb_updateFrequency.Name = "cb_updateFrequency"; + cb_updateFrequency.Size = new System.Drawing.Size(121, 23); + cb_updateFrequency.TabIndex = 22; + cb_updateFrequency.Format += FormatCB; // // label22 // @@ -626,13 +669,6 @@ private void InitializeComponent() label22.TabIndex = 21; label22.Text = "Update Lag"; // - // tbUpdateLag - // - tbUpdateLag.Location = new System.Drawing.Point(15, 142); - tbUpdateLag.Name = "tbUpdateLag"; - tbUpdateLag.Size = new System.Drawing.Size(366, 23); - tbUpdateLag.TabIndex = 20; - // // label21 // label21.AutoSize = true; @@ -642,13 +678,6 @@ private void InitializeComponent() label21.TabIndex = 19; label21.Text = "Initial Release Date"; // - // tbInitialReleaseDate - // - tbInitialReleaseDate.Location = new System.Drawing.Point(15, 88); - tbInitialReleaseDate.Name = "tbInitialReleaseDate"; - tbInitialReleaseDate.Size = new System.Drawing.Size(366, 23); - tbInitialReleaseDate.TabIndex = 18; - // // label20 // label20.AutoSize = true; @@ -658,6 +687,16 @@ private void InitializeComponent() label20.TabIndex = 17; label20.Text = "Update Fequency"; // + // btnReleaseDateClear + // + btnReleaseDateClear.Location = new System.Drawing.Point(221, 88); + btnReleaseDateClear.Name = "btnReleaseDateClear"; + btnReleaseDateClear.Size = new System.Drawing.Size(75, 23); + btnReleaseDateClear.TabIndex = 25; + btnReleaseDateClear.Text = "Clear"; + btnReleaseDateClear.UseVisualStyleBackColor = true; + btnReleaseDateClear.Click += btnReleaseDateClear_Click; + // // CatalogueUI // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -720,7 +759,7 @@ private void InitializeComponent() private Label label12; private Label label11; private Label label10; - private ComboBox comboBox4; + private ComboBox cb_granularity; private Label label9; private TextBox tbGeoCoverage; private Label label16; @@ -737,14 +776,17 @@ private void InitializeComponent() private TextBox tbDOI; private Label label17; private TextBox tbPeople; - private ComboBox comboBox5; + private ComboBox cb_updateFrequency; private Label label22; - private TextBox tbUpdateLag; private Label label21; - private TextBox tbInitialReleaseDate; private Label label20; private TextBox tbAbstract; private DateTimePicker dtpStart; private DateTimePicker dtpEndDate; + private Button btnEndDateClear; + private Button btnStartDateClear; + private ComboBox cbUpdateLag; + private DateTimePicker dtpReleaseDate; + private Button btnReleaseDateClear; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 8f930e49bc..4f157c3a9b 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -9,6 +9,7 @@ using System.ComponentModel; using System.Drawing; using System.Linq; +using System.Text; using System.Windows.Forms; using NPOI.HSSF.Record.Chart; using Rdmp.Core; @@ -150,7 +151,7 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab this.editableFolder.Title = "Folder"; this.editableFolder.Icon = CatalogueIcons.CatalogueFolder.ImageToBitmap(); RefreshUIFromDatabase(); - + } protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalogue databaseObject) @@ -298,6 +299,30 @@ private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) private List setTabBindings = new(); + private void UpdateStartDate(object sender, EventArgs e) + { + dtpStart.ValueChanged -= UpdateStartDate; + _catalogue.StartDate = dtpStart.Value; + dtpStart.CustomFormat = "yyyy/MM/dd"; + Bind(dtpStart, "Value", "StartDate", c => c.StartDate); + } + + private void UpdateEndDate(object sender, EventArgs e) + { + dtpEndDate.ValueChanged -= UpdateEndDate; + _catalogue.EndDate = dtpEndDate.Value; + dtpEndDate.CustomFormat = "yyyy/MM/dd"; + Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + } + + private void UpdateReleaseDate(object sender, EventArgs e) + { + dtpReleaseDate.ValueChanged -= UpdateReleaseDate; + _catalogue.DatasetReleaseDate = dtpReleaseDate.Value; + dtpReleaseDate.CustomFormat = "yyyy/MM/dd"; + Bind(dtpReleaseDate, "Value", "DatasetReleaseDate", c => c.DatasetReleaseDate); + } + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { var tabControl = (TabControl)sender; @@ -344,8 +369,28 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) item.Visible = false; } Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); - //Bind(dtpStart, "Value", "StartDate", c => c.StartDate); - //Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + cb_granularity.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueGranularity)); + Bind(cb_granularity, "SelectedItem", "Granularity", c => c.Granularity); + dtpStart.Format = DateTimePickerFormat.Custom; + dtpStart.CustomFormat = _catalogue.StartDate != null ? "yyyy/MM/dd" : " "; + dtpEndDate.Format = DateTimePickerFormat.Custom; + dtpEndDate.CustomFormat = _catalogue.EndDate != null ? "yyyy/MM/dd" : " "; + if (_catalogue.StartDate != null) + { + Bind(dtpStart, "Value", "StartDate", c => c.StartDate); + } + else + { + dtpStart.ValueChanged += UpdateStartDate; + } + if (_catalogue.EndDate != null) + { + Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); + } + else + { + dtpEndDate.ValueChanged += UpdateEndDate; + } foreach (Control item in tabPage3.Controls) { item.Visible = true; @@ -371,6 +416,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) item.Visible = false; } Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); + Bind(tbControlledVocabulary, "Text", "ControlledVocabulary", c => c.ControlledVocabulary); Bind(tbDOI, "Text", "Doi", c => c.Doi); foreach (Control item in tabPage5.Controls) { @@ -382,8 +428,23 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { item.Visible = false; } - Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); - Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); + + cb_updateFrequency.DataSource = Enum.GetValues(typeof(Catalogue.UpdateFrequencies)); + cbUpdateLag.DataSource = Enum.GetValues(typeof(Catalogue.UpdateLagTimes)); + //todo cb not being set correctly + + Bind(cbUpdateLag, "SelectedItem", "UpdateLag", c => c.UpdateLag); + Bind(cb_updateFrequency, "SelectedItem", "Update_freq", c => c.Update_freq); + dtpReleaseDate.Format = DateTimePickerFormat.Custom; + dtpReleaseDate.CustomFormat = _catalogue.StartDate != null ? "yyyy/MM/dd" : " "; + if (_catalogue.DatasetReleaseDate != null) + { + Bind(dtpReleaseDate, "Value", "DatasetReleaseDate", c => c.DatasetReleaseDate); + } + else + { + dtpReleaseDate.ValueChanged += UpdateReleaseDate; + } foreach (Control item in tabPage6.Controls) { item.Visible = true; @@ -412,6 +473,51 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) //Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); } + private void btnStartDateClear_Click(object sender, EventArgs e) + { + dtpStart.CustomFormat = " "; + dtpStart.DataBindings.Clear(); + _catalogue.StartDate = null; + dtpStart.ValueChanged += UpdateStartDate; + } + + private void btnEndDateClear_Click(object sender, EventArgs e) + { + dtpEndDate.CustomFormat = " "; + dtpEndDate.DataBindings.Clear(); + _catalogue.EndDate = null; + dtpEndDate.ValueChanged += UpdateEndDate; + } + + private void btnReleaseDateClear_Click(object sender, EventArgs e) + { + dtpReleaseDate.CustomFormat = " "; + dtpReleaseDate.DataBindings.Clear(); + _catalogue.DatasetReleaseDate = null; + dtpReleaseDate.ValueChanged += UpdateReleaseDate; + } + + string AddSpacesToSentence(string text) + { + if (string.IsNullOrWhiteSpace(text)) + return ""; + StringBuilder newText = new StringBuilder(text.Length * 2); + newText.Append(text[0]); + for (int i = 1; i < text.Length; i++) + { + if (char.IsUpper(text[i]) && text[i - 1] != ' ') + newText.Append(' '); + newText.Append(text[i]); + } + return newText.ToString(); + } + + + private void FormatCB(object sender, ListControlConvertEventArgs e) + { + e.Value = AddSpacesToSentence(e.Value.ToString()); + } + } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] From 05a5b214b1b121bda89a75a8777e11f0ad97f2c2 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 23 Jan 2025 08:24:44 +0000 Subject: [PATCH 07/36] finish bindings --- .../MainFormUITabs/CatalogueUI.Designer.cs | 104 +++++++++--------- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 5 + Rdmp.UI/SimpleControls/EditableLabelUI.cs | 1 - 3 files changed, 57 insertions(+), 53 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index d5f5482ce1..de649cc2a7 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -33,9 +33,9 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { splitContainer1 = new SplitContainer(); - checkBox3 = new CheckBox(); - checkBox2 = new CheckBox(); - checkBox1 = new CheckBox(); + cbColdStorage = new CheckBox(); + cbInternal = new CheckBox(); + cbDeprecated = new CheckBox(); editableFolder = new SimpleControls.EditableLabelUI(); editableCatalogueName = new SimpleControls.EditableLabelUI(); ticketingControl1 = new TicketingControlUI(); @@ -86,13 +86,13 @@ private void InitializeComponent() label17 = new Label(); tbPeople = new TextBox(); tabPage6 = new TabPage(); + btnReleaseDateClear = new Button(); dtpReleaseDate = new DateTimePicker(); cbUpdateLag = new ComboBox(); cb_updateFrequency = new ComboBox(); label22 = new Label(); label21 = new Label(); label20 = new Label(); - btnReleaseDateClear = new Button(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); @@ -115,9 +115,9 @@ private void InitializeComponent() // // splitContainer1.Panel1 // - splitContainer1.Panel1.Controls.Add(checkBox3); - splitContainer1.Panel1.Controls.Add(checkBox2); - splitContainer1.Panel1.Controls.Add(checkBox1); + splitContainer1.Panel1.Controls.Add(cbColdStorage); + splitContainer1.Panel1.Controls.Add(cbInternal); + splitContainer1.Panel1.Controls.Add(cbDeprecated); splitContainer1.Panel1.Controls.Add(editableFolder); splitContainer1.Panel1.Controls.Add(editableCatalogueName); splitContainer1.Panel1.Controls.Add(ticketingControl1); @@ -129,48 +129,48 @@ private void InitializeComponent() splitContainer1.SplitterDistance = 158; splitContainer1.TabIndex = 0; // - // checkBox3 - // - checkBox3.AutoSize = true; - checkBox3.Location = new System.Drawing.Point(695, 75); - checkBox3.Name = "checkBox3"; - checkBox3.Size = new System.Drawing.Size(94, 19); - checkBox3.TabIndex = 5; - checkBox3.Text = "Cold Storage"; - checkBox3.UseVisualStyleBackColor = true; - // - // checkBox2 - // - checkBox2.AutoSize = true; - checkBox2.Location = new System.Drawing.Point(623, 74); - checkBox2.Name = "checkBox2"; - checkBox2.Size = new System.Drawing.Size(66, 19); - checkBox2.TabIndex = 4; - checkBox2.Text = "Internal"; - checkBox2.UseVisualStyleBackColor = true; - checkBox2.CheckedChanged += checkBox2_CheckedChanged; - // - // checkBox1 - // - checkBox1.AutoSize = true; - checkBox1.Location = new System.Drawing.Point(531, 73); - checkBox1.Name = "checkBox1"; - checkBox1.Size = new System.Drawing.Size(86, 19); - checkBox1.TabIndex = 3; - checkBox1.Text = "Deprecated"; - checkBox1.UseVisualStyleBackColor = true; + // cbColdStorage + // + cbColdStorage.AutoSize = true; + cbColdStorage.Location = new System.Drawing.Point(695, 75); + cbColdStorage.Name = "cbColdStorage"; + cbColdStorage.Size = new System.Drawing.Size(94, 19); + cbColdStorage.TabIndex = 5; + cbColdStorage.Text = "Cold Storage"; + cbColdStorage.UseVisualStyleBackColor = true; + // + // cbInternal + // + cbInternal.AutoSize = true; + cbInternal.Location = new System.Drawing.Point(623, 74); + cbInternal.Name = "cbInternal"; + cbInternal.Size = new System.Drawing.Size(66, 19); + cbInternal.TabIndex = 4; + cbInternal.Text = "Internal"; + cbInternal.UseVisualStyleBackColor = true; + cbInternal.CheckedChanged += checkBox2_CheckedChanged; + // + // cbDeprecated + // + cbDeprecated.AutoSize = true; + cbDeprecated.Location = new System.Drawing.Point(531, 73); + cbDeprecated.Name = "cbDeprecated"; + cbDeprecated.Size = new System.Drawing.Size(86, 19); + cbDeprecated.TabIndex = 3; + cbDeprecated.Text = "Deprecated"; + cbDeprecated.UseVisualStyleBackColor = true; // // editableFolder // editableFolder.AutoValidate = AutoValidate.EnableAllowFocusChange; - editableFolder.Location = new System.Drawing.Point(9, 65); + editableFolder.Location = new System.Drawing.Point(11, 63); editableFolder.Name = "editableFolder"; editableFolder.Size = new System.Drawing.Size(278, 48); editableFolder.TabIndex = 2; // // editableCatalogueName // - editableCatalogueName.Location = new System.Drawing.Point(9, 7); + editableCatalogueName.Location = new System.Drawing.Point(11, 5); editableCatalogueName.Name = "editableCatalogueName"; editableCatalogueName.Size = new System.Drawing.Size(278, 59); editableCatalogueName.TabIndex = 1; @@ -635,6 +635,16 @@ private void InitializeComponent() tabPage6.TabIndex = 5; tabPage6.Text = "Data Updates"; // + // btnReleaseDateClear + // + btnReleaseDateClear.Location = new System.Drawing.Point(221, 88); + btnReleaseDateClear.Name = "btnReleaseDateClear"; + btnReleaseDateClear.Size = new System.Drawing.Size(75, 23); + btnReleaseDateClear.TabIndex = 25; + btnReleaseDateClear.Text = "Clear"; + btnReleaseDateClear.UseVisualStyleBackColor = true; + btnReleaseDateClear.Click += btnReleaseDateClear_Click; + // // dtpReleaseDate // dtpReleaseDate.Location = new System.Drawing.Point(15, 88); @@ -687,16 +697,6 @@ private void InitializeComponent() label20.TabIndex = 17; label20.Text = "Update Fequency"; // - // btnReleaseDateClear - // - btnReleaseDateClear.Location = new System.Drawing.Point(221, 88); - btnReleaseDateClear.Name = "btnReleaseDateClear"; - btnReleaseDateClear.Size = new System.Drawing.Size(75, 23); - btnReleaseDateClear.TabIndex = 25; - btnReleaseDateClear.Text = "Clear"; - btnReleaseDateClear.UseVisualStyleBackColor = true; - btnReleaseDateClear.Click += btnReleaseDateClear_Click; - // // CatalogueUI // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -731,9 +731,9 @@ private void InitializeComponent() private TicketingControlUI ticketingControl1; private SimpleControls.EditableLabelUI editableFolder; private SimpleControls.EditableLabelUI editableCatalogueName; - private CheckBox checkBox3; - private CheckBox checkBox2; - private CheckBox checkBox1; + private CheckBox cbColdStorage; + private CheckBox cbInternal; + private CheckBox cbDeprecated; private TabControl tabControl1; private TabPage tabPage1; private TabPage tabPage2; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 4f157c3a9b..09df7f1797 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -157,6 +157,11 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalogue databaseObject) { base.SetBindings(rules, databaseObject); + Bind(cbColdStorage, "Checked", "IsColdStorageDataset", c => c.IsColdStorageDataset); + Bind(cbDeprecated, "Checked", "IsDeprecated", c => c.IsDeprecated); + Bind(cbInternal, "Checked", "IsInternalDataset", c => c.IsInternalDataset); + Bind(editableCatalogueName, "TextValue", "Name", c => c.Name); + Bind(editableFolder, "TextValue", "Folder", c => c.Folder); tabControl1_SelectedIndexChanged(this.tabControl1, null); //-------------------------------- diff --git a/Rdmp.UI/SimpleControls/EditableLabelUI.cs b/Rdmp.UI/SimpleControls/EditableLabelUI.cs index eaa9bde0fc..e883b46483 100644 --- a/Rdmp.UI/SimpleControls/EditableLabelUI.cs +++ b/Rdmp.UI/SimpleControls/EditableLabelUI.cs @@ -26,7 +26,6 @@ public string TextValue _value = value; lblEditable.Text = _value; pictureBox1.Location = new Point(lblEditable.Location.X + lblEditable.Width + 5, pictureBox1.Location.Y); - //pictureBox1.Location.X = lblEditable.Location.X + lblEditable.Width+5; } } From 14d53f4f50150495a86823a644877301efa52494 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 23 Jan 2025 08:46:31 +0000 Subject: [PATCH 08/36] update tests --- Rdmp.Core.Tests/Curation/Integration/CatalogueTests.cs | 4 ++-- Rdmp.UI.Tests/CatalogueUITests.cs | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Rdmp.Core.Tests/Curation/Integration/CatalogueTests.cs b/Rdmp.Core.Tests/Curation/Integration/CatalogueTests.cs index 5674203e00..1751bc981c 100644 --- a/Rdmp.Core.Tests/Curation/Integration/CatalogueTests.cs +++ b/Rdmp.Core.Tests/Curation/Integration/CatalogueTests.cs @@ -108,7 +108,7 @@ public void update_changeAllProperties_pass() catalogue.Time_coverage = "comprehensive"; catalogue.Search_keywords = "excitement,fishmongery"; catalogue.Type = Catalogue.CatalogueType.ResearchStudy; - catalogue.Update_freq = "Every darmn second!"; + catalogue.Update_freq =Catalogue.UpdateFrequencies.Daily; catalogue.Update_sched = "periodically on request"; catalogue.Country_of_origin = "United Kingdom"; @@ -154,7 +154,7 @@ public void update_changeAllProperties_pass() Assert.That(catalogue.Time_coverage, Is.EqualTo("comprehensive")); Assert.That(catalogue.Search_keywords, Is.EqualTo("excitement,fishmongery")); Assert.That(catalogue.Type, Is.EqualTo(Catalogue.CatalogueType.ResearchStudy)); - Assert.That(catalogue.Update_freq, Is.EqualTo("Every darmn second!")); + Assert.That(catalogue.Update_freq, Is.EqualTo(Catalogue.UpdateFrequencies.Daily)); Assert.That(catalogue.Update_sched, Is.EqualTo("periodically on request")); diff --git a/Rdmp.UI.Tests/CatalogueUITests.cs b/Rdmp.UI.Tests/CatalogueUITests.cs index aba095465a..0630dcaac1 100644 --- a/Rdmp.UI.Tests/CatalogueUITests.cs +++ b/Rdmp.UI.Tests/CatalogueUITests.cs @@ -113,15 +113,9 @@ public void Test_CatalogueUI_AcronymDuplicates() AssertNoErrors(ExpectedErrorType.Any); - //when I type the Acronym of another Catalogue - ui.tbAcronym.Text = "AB"; - //it tells me that I have to make it unique AssertErrorWasShown(ExpectedErrorType.ErrorProvider, "Must be unique"); - //so I make it unique - ui.tbAcronym.Text = "ABC"; - //and all is good again AssertNoErrors(ExpectedErrorType.Any); } From f0b70189a52edcfdcc6d96997865d1c0d225ee36 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 23 Jan 2025 12:50:35 +0000 Subject: [PATCH 09/36] update chips --- .../MainFormUITabs/CatalogueUI.Designer.cs | 111 +++++++------ Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 23 ++- Rdmp.UI/Rdmp.UI.csproj | 3 + .../MultiSelectChips/Chip.Designer.cs | 77 +++++++++ .../SimpleControls/MultiSelectChips/Chip.cs | 79 ++++++++++ .../SimpleControls/MultiSelectChips/Chip.resx | 146 ++++++++++++++++++ .../DropdownOptionsChipDisplay.Designer.cs | 74 +++++++++ .../DropdownOptionsChipDisplay.cs | 74 +++++++++ .../DropdownOptionsChipDisplay.resx | 120 ++++++++++++++ .../FreeFormTextChipDisplay.Designer.cs | 77 +++++++++ .../FreeFormTextChipDisplay.cs | 57 +++++++ .../FreeFormTextChipDisplay.resx | 120 ++++++++++++++ 12 files changed, 915 insertions(+), 46 deletions(-) create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/Chip.resx create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.resx create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.Designer.cs create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs create mode 100644 Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.resx diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index de649cc2a7..b456a3a421 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -46,6 +46,8 @@ private void InitializeComponent() label1 = new Label(); tbAbstract = new TextBox(); tabPage2 = new TabPage(); + ddchipDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + ffcKeywords = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); label8 = new Label(); tbDataSourceSetting = new TextBox(); label7 = new Label(); @@ -55,7 +57,6 @@ private void InitializeComponent() label5 = new Label(); cb_datasetType = new ComboBox(); label4 = new Label(); - tbKeywords = new TextBox(); label3 = new Label(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); @@ -79,12 +80,12 @@ private void InitializeComponent() label13 = new Label(); tbAccessContact = new TextBox(); tabPage5 = new TabPage(); + fftControlledVocab = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + ffcPeople = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); label19 = new Label(); - tbControlledVocabulary = new TextBox(); label18 = new Label(); tbDOI = new TextBox(); label17 = new Label(); - tbPeople = new TextBox(); tabPage6 = new TabPage(); btnReleaseDateClear = new Button(); dtpReleaseDate = new DateTimePicker(); @@ -253,6 +254,8 @@ private void InitializeComponent() // tabPage2 // tabPage2.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage2.Controls.Add(ddchipDatasetType); + tabPage2.Controls.Add(ffcKeywords); tabPage2.Controls.Add(label8); tabPage2.Controls.Add(tbDataSourceSetting); tabPage2.Controls.Add(label7); @@ -262,7 +265,6 @@ private void InitializeComponent() tabPage2.Controls.Add(label5); tabPage2.Controls.Add(cb_datasetType); tabPage2.Controls.Add(label4); - tabPage2.Controls.Add(tbKeywords); tabPage2.Controls.Add(label3); tabPage2.Controls.Add(cb_resourceType); tabPage2.Location = new System.Drawing.Point(4, 24); @@ -272,10 +274,31 @@ private void InitializeComponent() tabPage2.TabIndex = 1; tabPage2.Text = "Data Details"; // + // ddchipDatasetType + // + ddchipDatasetType.AutoScroll = true; + ddchipDatasetType.AutoSize = true; + ddchipDatasetType.Location = new System.Drawing.Point(431, 65); + ddchipDatasetType.MinimumSize = new System.Drawing.Size(100, 20); + ddchipDatasetType.Name = "ddchipDatasetType"; + ddchipDatasetType.Size = new System.Drawing.Size(286, 83); + ddchipDatasetType.TabIndex = 13; + // + // ffcKeywords + // + ffcKeywords.AutoScroll = true; + ffcKeywords.AutoSize = true; + ffcKeywords.Location = new System.Drawing.Point(7, 275); + ffcKeywords.MaximumSize = new System.Drawing.Size(300, 0); + ffcKeywords.MinimumSize = new System.Drawing.Size(100, 20); + ffcKeywords.Name = "ffcKeywords"; + ffcKeywords.Size = new System.Drawing.Size(300, 53); + ffcKeywords.TabIndex = 12; + // // label8 // label8.AutoSize = true; - label8.Location = new System.Drawing.Point(6, 258); + label8.Location = new System.Drawing.Point(6, 209); label8.Name = "label8"; label8.Size = new System.Drawing.Size(110, 15); label8.TabIndex = 11; @@ -283,7 +306,7 @@ private void InitializeComponent() // // tbDataSourceSetting // - tbDataSourceSetting.Location = new System.Drawing.Point(6, 276); + tbDataSourceSetting.Location = new System.Drawing.Point(6, 227); tbDataSourceSetting.Name = "tbDataSourceSetting"; tbDataSourceSetting.Size = new System.Drawing.Size(366, 23); tbDataSourceSetting.TabIndex = 10; @@ -291,7 +314,7 @@ private void InitializeComponent() // label7 // label7.AutoSize = true; - label7.Location = new System.Drawing.Point(6, 207); + label7.Location = new System.Drawing.Point(6, 158); label7.Name = "label7"; label7.Size = new System.Drawing.Size(70, 15); label7.TabIndex = 9; @@ -299,7 +322,7 @@ private void InitializeComponent() // // tbDataSource // - tbDataSource.Location = new System.Drawing.Point(6, 225); + tbDataSource.Location = new System.Drawing.Point(6, 176); tbDataSource.Name = "tbDataSource"; tbDataSource.Size = new System.Drawing.Size(366, 23); tbDataSource.TabIndex = 8; @@ -307,7 +330,7 @@ private void InitializeComponent() // label6 // label6.AutoSize = true; - label6.Location = new System.Drawing.Point(6, 156); + label6.Location = new System.Drawing.Point(6, 107); label6.Name = "label6"; label6.Size = new System.Drawing.Size(92, 15); label6.TabIndex = 7; @@ -316,7 +339,7 @@ private void InitializeComponent() // cb_datasetSubtype // cb_datasetSubtype.FormattingEnabled = true; - cb_datasetSubtype.Location = new System.Drawing.Point(6, 174); + cb_datasetSubtype.Location = new System.Drawing.Point(6, 125); cb_datasetSubtype.Name = "cb_datasetSubtype"; cb_datasetSubtype.Size = new System.Drawing.Size(121, 23); cb_datasetSubtype.TabIndex = 6; @@ -324,7 +347,7 @@ private void InitializeComponent() // label5 // label5.AutoSize = true; - label5.Location = new System.Drawing.Point(6, 107); + label5.Location = new System.Drawing.Point(6, 58); label5.Name = "label5"; label5.Size = new System.Drawing.Size(73, 15); label5.TabIndex = 5; @@ -333,7 +356,7 @@ private void InitializeComponent() // cb_datasetType // cb_datasetType.FormattingEnabled = true; - cb_datasetType.Location = new System.Drawing.Point(6, 125); + cb_datasetType.Location = new System.Drawing.Point(6, 76); cb_datasetType.Name = "cb_datasetType"; cb_datasetType.Size = new System.Drawing.Size(121, 23); cb_datasetType.TabIndex = 4; @@ -341,19 +364,12 @@ private void InitializeComponent() // label4 // label4.AutoSize = true; - label4.Location = new System.Drawing.Point(6, 57); + label4.Location = new System.Drawing.Point(6, 257); label4.Name = "label4"; label4.Size = new System.Drawing.Size(58, 15); label4.TabIndex = 3; label4.Text = "Keywords"; // - // tbKeywords - // - tbKeywords.Location = new System.Drawing.Point(6, 75); - tbKeywords.Name = "tbKeywords"; - tbKeywords.Size = new System.Drawing.Size(845, 23); - tbKeywords.TabIndex = 2; - // // label3 // label3.AutoSize = true; @@ -559,38 +575,53 @@ private void InitializeComponent() // tabPage5 // tabPage5.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage5.Controls.Add(fftControlledVocab); + tabPage5.Controls.Add(ffcPeople); tabPage5.Controls.Add(label19); - tabPage5.Controls.Add(tbControlledVocabulary); tabPage5.Controls.Add(label18); tabPage5.Controls.Add(tbDOI); tabPage5.Controls.Add(label17); - tabPage5.Controls.Add(tbPeople); tabPage5.Location = new System.Drawing.Point(4, 24); tabPage5.Name = "tabPage5"; tabPage5.Size = new System.Drawing.Size(873, 895); tabPage5.TabIndex = 4; tabPage5.Text = "Attribution"; // + // fftControlledVocab + // + fftControlledVocab.AutoScroll = true; + fftControlledVocab.AutoSize = true; + fftControlledVocab.Location = new System.Drawing.Point(14, 98); + fftControlledVocab.MaximumSize = new System.Drawing.Size(300, 0); + fftControlledVocab.MinimumSize = new System.Drawing.Size(100, 20); + fftControlledVocab.Name = "fftControlledVocab"; + fftControlledVocab.Size = new System.Drawing.Size(300, 26); + fftControlledVocab.TabIndex = 23; + // + // ffcPeople + // + ffcPeople.AutoScroll = true; + ffcPeople.AutoSize = true; + ffcPeople.Location = new System.Drawing.Point(14, 195); + ffcPeople.MaximumSize = new System.Drawing.Size(300, 0); + ffcPeople.MinimumSize = new System.Drawing.Size(100, 20); + ffcPeople.Name = "ffcPeople"; + ffcPeople.Size = new System.Drawing.Size(300, 53); + ffcPeople.TabIndex = 22; + // // label19 // label19.AutoSize = true; - label19.Location = new System.Drawing.Point(14, 124); + label19.Location = new System.Drawing.Point(14, 74); label19.Name = "label19"; label19.Size = new System.Drawing.Size(124, 15); label19.TabIndex = 21; label19.Text = "Controlled Vocabulary"; // - // tbControlledVocabulary - // - tbControlledVocabulary.Location = new System.Drawing.Point(14, 142); - tbControlledVocabulary.Name = "tbControlledVocabulary"; - tbControlledVocabulary.Size = new System.Drawing.Size(366, 23); - tbControlledVocabulary.TabIndex = 20; - // // label18 // label18.AutoSize = true; - label18.Location = new System.Drawing.Point(14, 65); + label18.Location = new System.Drawing.Point(14, 15); label18.Name = "label18"; label18.Size = new System.Drawing.Size(27, 15); label18.TabIndex = 19; @@ -598,7 +629,7 @@ private void InitializeComponent() // // tbDOI // - tbDOI.Location = new System.Drawing.Point(14, 83); + tbDOI.Location = new System.Drawing.Point(14, 33); tbDOI.Name = "tbDOI"; tbDOI.Size = new System.Drawing.Size(366, 23); tbDOI.TabIndex = 18; @@ -606,19 +637,12 @@ private void InitializeComponent() // label17 // label17.AutoSize = true; - label17.Location = new System.Drawing.Point(14, 11); + label17.Location = new System.Drawing.Point(14, 177); label17.Name = "label17"; label17.Size = new System.Drawing.Size(43, 15); label17.TabIndex = 17; label17.Text = "People"; // - // tbPeople - // - tbPeople.Location = new System.Drawing.Point(14, 29); - tbPeople.Name = "tbPeople"; - tbPeople.Size = new System.Drawing.Size(366, 23); - tbPeople.TabIndex = 16; - // // tabPage6 // tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; @@ -751,7 +775,6 @@ private void InitializeComponent() private Label label5; private ComboBox cb_datasetType; private Label label4; - private TextBox tbKeywords; private Label label3; private ComboBox cb_resourceType; private Label label8; @@ -771,11 +794,9 @@ private void InitializeComponent() private Label label13; private TextBox tbAccessContact; private Label label19; - private TextBox tbControlledVocabulary; private Label label18; private TextBox tbDOI; private Label label17; - private TextBox tbPeople; private ComboBox cb_updateFrequency; private Label label22; private Label label21; @@ -788,5 +809,9 @@ private void InitializeComponent() private ComboBox cbUpdateLag; private DateTimePicker dtpReleaseDate; private Button btnReleaseDateClear; + private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffcKeywords; + private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffcPeople; + private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddchipDatasetType; + private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay fftControlledVocab; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 09df7f1797..c7cbe18aa6 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -355,7 +355,10 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); cb_datasetType.DataSource = Enum.GetValues(typeof(Catalogue.DatasetType)); cb_datasetSubtype.DataSource = Enum.GetValues(typeof(Catalogue.DatasetSubType)); - Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); + + ddchipDatasetType.Options = Enum.GetNames(typeof(Catalogue.DatasetType)); + + Bind(ffcKeywords, "Value", "Search_keywords", c => c.Search_keywords); Bind(cb_resourceType, "SelectedItem", "Type", c => c.Type); Bind(cb_datasetType, "SelectedItem", "DataType", c => c.DataType); Bind(cb_datasetSubtype, "SelectedItem", "DataSubtype", c => c.DataSubtype); @@ -420,8 +423,8 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { item.Visible = false; } - Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); - Bind(tbControlledVocabulary, "Text", "ControlledVocabulary", c => c.ControlledVocabulary); + Bind(ffcPeople, "Value", "AssociatedPeople", c => c.AssociatedPeople); + Bind(fftControlledVocab, "Value", "ControlledVocabulary", c => c.ControlledVocabulary); Bind(tbDOI, "Text", "Doi", c => c.Doi); foreach (Control item in tabPage5.Controls) { @@ -523,6 +526,20 @@ private void FormatCB(object sender, ListControlConvertEventArgs e) e.Value = AddSpacesToSentence(e.Value.ToString()); } + private void label18_Click(object sender, EventArgs e) + { + + } + + private void tbDOI_TextChanged(object sender, EventArgs e) + { + + } + + private void groupBox1_Enter(object sender, EventArgs e) + { + + } } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] diff --git a/Rdmp.UI/Rdmp.UI.csproj b/Rdmp.UI/Rdmp.UI.csproj index 42259b7ce8..a17285cf82 100644 --- a/Rdmp.UI/Rdmp.UI.csproj +++ b/Rdmp.UI/Rdmp.UI.csproj @@ -137,6 +137,9 @@ DatabaseTypeUI.cs + + UserControl + UserControl diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs new file mode 100644 index 0000000000..ad140d13a2 --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs @@ -0,0 +1,77 @@ +namespace Rdmp.UI.SimpleControls.MultiSelectChips +{ + partial class Chip + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Chip)); + lblText = new System.Windows.Forms.Label(); + btnClear = new System.Windows.Forms.Button(); + SuspendLayout(); + // + // lblText + // + lblText.AutoSize = true; + lblText.Location = new System.Drawing.Point(4, 4); + lblText.Name = "lblText"; + lblText.Size = new System.Drawing.Size(38, 15); + lblText.TabIndex = 0; + lblText.Text = "label1"; + // + // btnClear + // + btnClear.BackgroundImage = (System.Drawing.Image)resources.GetObject("btnClear.BackgroundImage"); + btnClear.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + btnClear.FlatAppearance.BorderSize = 0; + btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + btnClear.Location = new System.Drawing.Point(46, 2); + btnClear.Name = "btnClear"; + btnClear.Size = new System.Drawing.Size(20, 20); + btnClear.TabIndex = 1; + btnClear.UseVisualStyleBackColor = true; + btnClear.Click += btnClear_Click; + // + // Chip + // + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + BackColor = System.Drawing.SystemColors.ControlDark; + BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + Controls.Add(btnClear); + Controls.Add(lblText); + Name = "Chip"; + Size = new System.Drawing.Size(76, 24); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.Label lblText; + private System.Windows.Forms.Button btnClear; + } +} diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs new file mode 100644 index 0000000000..26a71f08bd --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Rdmp.UI.SimpleControls.MultiSelectChips +{ + public partial class Chip : UserControl + { + private Func _clear; + public Chip(string value, Func clear) + { + InitializeComponent(); + lblText.Text = value; + btnClear.Location = new Point(lblText.Width + lblText.Location.X+5, btnClear.Location.Y); + this.Size = new System.Drawing.Size(lblText.Width + lblText.Location.X + btnClear.Width+15, this.Size.Height); + _clear = clear; + } + + private void btnClear_Click(object sender, EventArgs e) + { + _clear(lblText.Text); + } + + private int radius = 20; + [DefaultValue(20)] + public int Radius + { + get { return radius; } + set + { + radius = value; + this.RecreateRegion(); + } + } + + [System.Runtime.InteropServices.DllImport("gdi32.dll")] + private static extern IntPtr CreateRoundRectRgn(int nLeftRect, int nTopRect, + int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse); + + private GraphicsPath GetRoundRectagle(Rectangle bounds, int radius) + { + float r = radius; + GraphicsPath path = new GraphicsPath(); + path.StartFigure(); + path.AddArc(bounds.Left, bounds.Top, r, r, 180, 90); + path.AddArc(bounds.Right - r, bounds.Top, r, r, 270, 90); + path.AddArc(bounds.Right - r, bounds.Bottom - r, r, r, 0, 90); + path.AddArc(bounds.Left, bounds.Bottom - r, r, r, 90, 90); + path.CloseFigure(); + return path; + } + + private void RecreateRegion() + { + var bounds = ClientRectangle; + + //using (var path = GetRoundRectagle(bounds, this.Radius)) + // this.Region = new Region(path); + + //Better round rectangle + this.Region = Region.FromHrgn(CreateRoundRectRgn(bounds.Left, bounds.Top, + bounds.Right, bounds.Bottom, Radius, radius)); + this.Invalidate(); + } + + protected override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged(e); + this.RecreateRegion(); + } + } +} diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.resx b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.resx new file mode 100644 index 0000000000..4ab11405fb --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.resx @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAABGdBTUEAAK/INwWK6QAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH4QURDyAsnYnScQAAABl0RVh0 + U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAQWSURBVDhPdZPLTxtXFIfvJYukTRVIBMSlOKQW + UXiWNLQ8goHwMoYSEzsGg7F5GPzgZWMwBjdpozYJYpPsWXVTqfsu0q7aXStl1T+gVAQaoOAXY+wZ45k5 + PTOMKxopR/pkW3Pn8++cey/JFgRWslAF+ffZ4sYcWSjyPjs6cT5hMNLk4LCyQilYCkpcQK6iRIXkvEOW + g6jYEbsuNTzSjqKi/8nAHyAwMEQhGDIiP4rLqxuCP6DmPbM5gtcvr+FGJwhnG5VEam58coObdP2eso1+ + n+g3mRlDfy5juE9PW1sKvocSE4Qe/QJffgXi6sMYyp7z8wuapNlC05MuwlislLWPa1D2PO30xDI+P6Rd + nsPkwNB3cX1vQ7y759zpjJaCubC8+gPKAB5/CyIiBFY4fs739MTlKU3odJS1jZWi6CmKOd63CMLyCqSd + bjg2W36Ndem1CMqkWX39DRX9gXUxsJIQHz0GeLIGAibEZHDimn7G2se02OaztMMJGe8CilYB2wSm38TE + u/Rr7NAIibZ3nQ6edTgJJruASUK8188LwRCmewLS54lnNsmNO2Kcw5nMzPlAxETcxBQw9+7zmCYUa+88 + f6T/gkTbOuXZysXPzBNhznf5xD3jQ0TeHwBRml/oIQpWZYmwGEDRJDB9/SKKfCi4HOvQKYa3CtuQKMB/ + 9iGMiMnA6weYcgPMzgOPLaKIiXV2+6J3Owrk1t5Vx8YBkna7ScpircJzFBEWgwA4J3gwCDDmAH5mDnBG + kUhLW5U45SS7n9xW3nyrUpYRwhqGaWpopDRlta1xYxNJ3BQA9wyAfVxOJ0zPQqLPkIy2tq0d1jWW/kYI + 3a2uUQxKJS1WcmQcpJhIgyJp98SMaxpwhnIa3uU5ZcoF3NAwxDu6xHDDnWd71TWaP8g5unOjTBHhVcCD + R1GoxuvxgrWNihmnB0Q8Fvgdjnr7mEhr20Gso4tJGc0g4AawpgcQ1baIB5/Wvvj7Rpl666qK7lzXyDLp + oqow1QYezGQGD6KAw2atdjjq7hGjbR0LYW1L8UFdw0K4USse9/YBb7ND6l4/ROobk/sVVRvb6hIVyihJ + mAZowjhQiele4t2DE8cUcFYbxHU9LO6YN6JtKTisv0P2b9UW7N+67T2o/Zw91ukh1WeAWFMz7FdWv3z9 + kbpy+9p1lBnNKDPnJ0xmJ97DV8fYCorC2FoIE+WHm1vlcbwpqyBvbpbn75ZXhv6prglH6xsh/Fndq72b + 5U6U5WM6Ki+UDl70bmcunmRXXKf/GQXrKLqYFWVLmgtyEVnfK6v4CXH9mXcld0tVpKxQKtzULFGIaLaL + S+lm7odkq7BEeXpam5fyyOYHl8hfeVfo66JiDVKIKE/PVARTIFTisKGJZDlbOyUf/8d28TWqoDwl5F9c + dXPV7Ht66QAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs new file mode 100644 index 0000000000..ffe9d32a22 --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs @@ -0,0 +1,74 @@ +namespace Rdmp.UI.SimpleControls.MultiSelectChips +{ + partial class DropdownOptionsChipDisplay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + comboBox1 = new System.Windows.Forms.ComboBox(); + SuspendLayout(); + // + // flowLayoutPanel1 + // + flowLayoutPanel1.AutoScroll = true; + flowLayoutPanel1.AutoSize = true; + flowLayoutPanel1.Location = new System.Drawing.Point(0, 29); + flowLayoutPanel1.MaximumSize = new System.Drawing.Size(0, 80); + flowLayoutPanel1.Name = "flowLayoutPanel1"; + flowLayoutPanel1.Size = new System.Drawing.Size(283, 51); + flowLayoutPanel1.TabIndex = 1; + // + // comboBox1 + // + comboBox1.FormattingEnabled = true; + comboBox1.Location = new System.Drawing.Point(0, 0); + comboBox1.Name = "comboBox1"; + comboBox1.Size = new System.Drawing.Size(283, 23); + comboBox1.TabIndex = 2; + comboBox1.TextChanged += comboBox1_TextChanged; + // + // DropdownOptionsChipDisplay + // + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + AutoScroll = true; + AutoSize = true; + Controls.Add(comboBox1); + Controls.Add(flowLayoutPanel1); + Location = new System.Drawing.Point(0, 40); + MinimumSize = new System.Drawing.Size(100, 20); + Name = "DropdownOptionsChipDisplay"; + Size = new System.Drawing.Size(286, 83); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.ComboBox comboBox1; + } +} diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs new file mode 100644 index 0000000000..ea7784f905 --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Rdmp.UI.SimpleControls.MultiSelectChips +{ + public partial class DropdownOptionsChipDisplay : UserControl + { + private string _value; + private string[] _options; + + private String[] defaultValueArray = [""]; + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public string Value + { + get => _value; + set + { + _value = value; + flowLayoutPanel1.Controls.Clear(); + var splitValues = _value.Split(','); + comboBox1.Text = ""; + comboBox1.DataSource = defaultValueArray.Concat(_options.Where(o => !splitValues.Contains(o)).ToList()); + foreach (var splitValue in splitValues) + { + if (!string.IsNullOrWhiteSpace(splitValue)) + flowLayoutPanel1.Controls.Add(new Chip(splitValue, Remove)); + } + } + } + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public String[] Options + { + get => _options; + set + { + _options = value; + comboBox1.Text = ""; + comboBox1.DataSource = defaultValueArray.Concat(_options); + } + } + + private int Remove(string value) + { + Value = string.Join(',', Value.Split(",").Where(v => v != value)); + return 1; + } + + public DropdownOptionsChipDisplay() + { + InitializeComponent(); + } + + + public void comboBox1_TextChanged(object sender, EventArgs e) + { + if (comboBox1.Text != "") + { + var value = comboBox1.SelectedItem as string; + Value = Value + $",{value}"; + comboBox1.Text = ""; + } + + } + } +} diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.resx b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.resx new file mode 100644 index 0000000000..8b2ff64a11 --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.Designer.cs new file mode 100644 index 0000000000..eb9d9826c7 --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.Designer.cs @@ -0,0 +1,77 @@ +namespace Rdmp.UI.SimpleControls.MultiSelectChips +{ + partial class FreeFormTextChipDisplay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + textBox1 = new System.Windows.Forms.TextBox(); + flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + SuspendLayout(); + // + // textBox1 + // + textBox1.Dock = System.Windows.Forms.DockStyle.Top; + textBox1.Location = new System.Drawing.Point(0, 0); + textBox1.Name = "textBox1"; + textBox1.Size = new System.Drawing.Size(300, 23); + textBox1.TabIndex = 0; + textBox1.KeyPress += textBox1_KeyPressed; + // + // flowLayoutPanel1 + // + flowLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + flowLayoutPanel1.AutoScroll = true; + flowLayoutPanel1.AutoSize = true; + flowLayoutPanel1.Location = new System.Drawing.Point(0, 23); + flowLayoutPanel1.MaximumSize = new System.Drawing.Size(350, 0); + flowLayoutPanel1.Name = "flowLayoutPanel1"; + flowLayoutPanel1.Size = new System.Drawing.Size(300, 0); + flowLayoutPanel1.TabIndex = 1; + // + // FreeFormTextChipDisplay + // + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + AutoScroll = true; + AutoSize = true; + Controls.Add(flowLayoutPanel1); + Controls.Add(textBox1); + Location = new System.Drawing.Point(0, 40); + MaximumSize = new System.Drawing.Size(300, 0); + MinimumSize = new System.Drawing.Size(100, 20); + Name = "FreeFormTextChipDisplay"; + Size = new System.Drawing.Size(300, 26); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + } +} diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs new file mode 100644 index 0000000000..d707465c0c --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Rdmp.UI.SimpleControls.MultiSelectChips +{ + public partial class FreeFormTextChipDisplay : UserControl + { + private string _value; + + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public string Value + { + get => _value; + set + { + _value = value; + flowLayoutPanel1.Controls.Clear(); + var splitValues = _value.Split(','); + foreach (var splitValue in splitValues) { + if(!string.IsNullOrWhiteSpace(splitValue)) + flowLayoutPanel1.Controls.Add(new Chip(splitValue, Remove)); + } + } + } + + private int Remove(string value) + { + Value = string.Join(',',Value.Split(",").Where(v => v != value)); + return 1; + } + + public FreeFormTextChipDisplay() + { + InitializeComponent(); + } + + private void textBox1_KeyPressed(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == (char)Keys.Return) + { + if (!_value.Split(',').Contains(textBox1.Text)) + { + Value = Value + $",{textBox1.Text.Trim()}"; + } + textBox1.Text = ""; + } + } + } +} diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.resx b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.resx new file mode 100644 index 0000000000..8b2ff64a11 --- /dev/null +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file From c4370788cabe2c01f238f5582c9a73fbbf2d77e7 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 23 Jan 2025 13:13:47 +0000 Subject: [PATCH 10/36] use group boxes --- .../MainFormUITabs/CatalogueUI.Designer.cs | 718 ++++++++++-------- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 5 + 2 files changed, 402 insertions(+), 321 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index b456a3a421..17491cca45 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -41,59 +41,60 @@ private void InitializeComponent() ticketingControl1 = new TicketingControlUI(); tabControl1 = new TabControl(); tabPage1 = new TabPage(); - label2 = new Label(); tbDescription = new TextBox(); - label1 = new Label(); tbAbstract = new TextBox(); tabPage2 = new TabPage(); ddchipDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); ffcKeywords = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); - label8 = new Label(); tbDataSourceSetting = new TextBox(); - label7 = new Label(); tbDataSource = new TextBox(); - label6 = new Label(); cb_datasetSubtype = new ComboBox(); - label5 = new Label(); cb_datasetType = new ComboBox(); - label4 = new Label(); - label3 = new Label(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); btnEndDateClear = new Button(); btnStartDateClear = new Button(); dtpEndDate = new DateTimePicker(); dtpStart = new DateTimePicker(); - label12 = new Label(); - label11 = new Label(); - label10 = new Label(); cb_granularity = new ComboBox(); - label9 = new Label(); tbGeoCoverage = new TextBox(); tabPage4 = new TabPage(); - label16 = new Label(); tbJuristiction = new TextBox(); - label15 = new Label(); tbDataProcessor = new TextBox(); - label14 = new Label(); tbDataController = new TextBox(); - label13 = new Label(); tbAccessContact = new TextBox(); tabPage5 = new TabPage(); + tableLayoutPanel1 = new TableLayoutPanel(); + groupBox2 = new GroupBox(); fftControlledVocab = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + groupBox1 = new GroupBox(); ffcPeople = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); - label19 = new Label(); - label18 = new Label(); tbDOI = new TextBox(); - label17 = new Label(); tabPage6 = new TabPage(); btnReleaseDateClear = new Button(); dtpReleaseDate = new DateTimePicker(); cbUpdateLag = new ComboBox(); cb_updateFrequency = new ComboBox(); - label22 = new Label(); - label21 = new Label(); - label20 = new Label(); + groupBox3 = new GroupBox(); + groupBox4 = new GroupBox(); + groupBox5 = new GroupBox(); + groupBox6 = new GroupBox(); + groupBox7 = new GroupBox(); + groupBox8 = new GroupBox(); + groupBox9 = new GroupBox(); + groupBox10 = new GroupBox(); + groupBox11 = new GroupBox(); + groupBox12 = new GroupBox(); + groupBox13 = new GroupBox(); + groupBox14 = new GroupBox(); + groupBox15 = new GroupBox(); + groupBox16 = new GroupBox(); + groupBox17 = new GroupBox(); + groupBox18 = new GroupBox(); + groupBox19 = new GroupBox(); + groupBox20 = new GroupBox(); + groupBox21 = new GroupBox(); + groupBox22 = new GroupBox(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); @@ -104,7 +105,30 @@ private void InitializeComponent() tabPage3.SuspendLayout(); tabPage4.SuspendLayout(); tabPage5.SuspendLayout(); + tableLayoutPanel1.SuspendLayout(); + groupBox2.SuspendLayout(); + groupBox1.SuspendLayout(); tabPage6.SuspendLayout(); + groupBox3.SuspendLayout(); + groupBox4.SuspendLayout(); + groupBox5.SuspendLayout(); + groupBox6.SuspendLayout(); + groupBox7.SuspendLayout(); + groupBox8.SuspendLayout(); + groupBox9.SuspendLayout(); + groupBox10.SuspendLayout(); + groupBox11.SuspendLayout(); + groupBox12.SuspendLayout(); + groupBox13.SuspendLayout(); + groupBox14.SuspendLayout(); + groupBox15.SuspendLayout(); + groupBox16.SuspendLayout(); + groupBox17.SuspendLayout(); + groupBox18.SuspendLayout(); + groupBox19.SuspendLayout(); + groupBox20.SuspendLayout(); + groupBox21.SuspendLayout(); + groupBox22.SuspendLayout(); SuspendLayout(); // // splitContainer1 @@ -204,69 +228,44 @@ private void InitializeComponent() // tabPage1 // tabPage1.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage1.Controls.Add(label2); - tabPage1.Controls.Add(tbDescription); - tabPage1.Controls.Add(label1); - tabPage1.Controls.Add(tbAbstract); + tabPage1.Controls.Add(groupBox16); + tabPage1.Controls.Add(groupBox15); tabPage1.Location = new System.Drawing.Point(4, 24); tabPage1.Name = "tabPage1"; tabPage1.Padding = new Padding(3); tabPage1.Size = new System.Drawing.Size(873, 895); tabPage1.TabIndex = 0; tabPage1.Text = "Descriptions"; - // - // label2 - // - label2.AutoSize = true; - label2.Location = new System.Drawing.Point(6, 143); - label2.Name = "label2"; - label2.Size = new System.Drawing.Size(67, 15); - label2.TabIndex = 3; - label2.Text = "Description"; + tabPage1.Click += tabPage1_Click; // // tbDescription // - tbDescription.Location = new System.Drawing.Point(6, 158); + tbDescription.Location = new System.Drawing.Point(6, 22); tbDescription.MaxLength = 250; tbDescription.Multiline = true; tbDescription.Name = "tbDescription"; - tbDescription.Size = new System.Drawing.Size(861, 116); + tbDescription.Size = new System.Drawing.Size(851, 116); tbDescription.TabIndex = 2; // - // label1 - // - label1.AutoSize = true; - label1.Location = new System.Drawing.Point(6, 3); - label1.Name = "label1"; - label1.Size = new System.Drawing.Size(98, 15); - label1.TabIndex = 1; - label1.Text = "Short Description"; - // // tbAbstract // - tbAbstract.Location = new System.Drawing.Point(6, 18); + tbAbstract.Location = new System.Drawing.Point(6, 22); tbAbstract.MaxLength = 250; tbAbstract.Multiline = true; tbAbstract.Name = "tbAbstract"; - tbAbstract.Size = new System.Drawing.Size(861, 116); + tbAbstract.Size = new System.Drawing.Size(851, 116); tbAbstract.TabIndex = 0; // // tabPage2 // tabPage2.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage2.Controls.Add(groupBox22); + tabPage2.Controls.Add(groupBox21); + tabPage2.Controls.Add(groupBox20); + tabPage2.Controls.Add(groupBox19); + tabPage2.Controls.Add(groupBox18); + tabPage2.Controls.Add(groupBox17); tabPage2.Controls.Add(ddchipDatasetType); - tabPage2.Controls.Add(ffcKeywords); - tabPage2.Controls.Add(label8); - tabPage2.Controls.Add(tbDataSourceSetting); - tabPage2.Controls.Add(label7); - tabPage2.Controls.Add(tbDataSource); - tabPage2.Controls.Add(label6); - tabPage2.Controls.Add(cb_datasetSubtype); - tabPage2.Controls.Add(label5); - tabPage2.Controls.Add(cb_datasetType); - tabPage2.Controls.Add(label4); - tabPage2.Controls.Add(label3); - tabPage2.Controls.Add(cb_resourceType); tabPage2.Location = new System.Drawing.Point(4, 24); tabPage2.Name = "tabPage2"; tabPage2.Padding = new Padding(3); @@ -278,7 +277,7 @@ private void InitializeComponent() // ddchipDatasetType.AutoScroll = true; ddchipDatasetType.AutoSize = true; - ddchipDatasetType.Location = new System.Drawing.Point(431, 65); + ddchipDatasetType.Location = new System.Drawing.Point(581, 16); ddchipDatasetType.MinimumSize = new System.Drawing.Size(100, 20); ddchipDatasetType.Name = "ddchipDatasetType"; ddchipDatasetType.Size = new System.Drawing.Size(286, 83); @@ -288,101 +287,47 @@ private void InitializeComponent() // ffcKeywords.AutoScroll = true; ffcKeywords.AutoSize = true; - ffcKeywords.Location = new System.Drawing.Point(7, 275); + ffcKeywords.Location = new System.Drawing.Point(6, 22); ffcKeywords.MaximumSize = new System.Drawing.Size(300, 0); ffcKeywords.MinimumSize = new System.Drawing.Size(100, 20); ffcKeywords.Name = "ffcKeywords"; ffcKeywords.Size = new System.Drawing.Size(300, 53); ffcKeywords.TabIndex = 12; // - // label8 - // - label8.AutoSize = true; - label8.Location = new System.Drawing.Point(6, 209); - label8.Name = "label8"; - label8.Size = new System.Drawing.Size(110, 15); - label8.TabIndex = 11; - label8.Text = "Data Source Setting"; - // // tbDataSourceSetting // - tbDataSourceSetting.Location = new System.Drawing.Point(6, 227); + tbDataSourceSetting.Location = new System.Drawing.Point(6, 22); tbDataSourceSetting.Name = "tbDataSourceSetting"; tbDataSourceSetting.Size = new System.Drawing.Size(366, 23); tbDataSourceSetting.TabIndex = 10; // - // label7 - // - label7.AutoSize = true; - label7.Location = new System.Drawing.Point(6, 158); - label7.Name = "label7"; - label7.Size = new System.Drawing.Size(70, 15); - label7.TabIndex = 9; - label7.Text = "Data Source"; - // // tbDataSource // - tbDataSource.Location = new System.Drawing.Point(6, 176); + tbDataSource.Location = new System.Drawing.Point(6, 22); tbDataSource.Name = "tbDataSource"; tbDataSource.Size = new System.Drawing.Size(366, 23); tbDataSource.TabIndex = 8; // - // label6 - // - label6.AutoSize = true; - label6.Location = new System.Drawing.Point(6, 107); - label6.Name = "label6"; - label6.Size = new System.Drawing.Size(92, 15); - label6.TabIndex = 7; - label6.Text = "Dataset Subtype"; - // // cb_datasetSubtype // cb_datasetSubtype.FormattingEnabled = true; - cb_datasetSubtype.Location = new System.Drawing.Point(6, 125); + cb_datasetSubtype.Location = new System.Drawing.Point(6, 19); cb_datasetSubtype.Name = "cb_datasetSubtype"; cb_datasetSubtype.Size = new System.Drawing.Size(121, 23); cb_datasetSubtype.TabIndex = 6; // - // label5 - // - label5.AutoSize = true; - label5.Location = new System.Drawing.Point(6, 58); - label5.Name = "label5"; - label5.Size = new System.Drawing.Size(73, 15); - label5.TabIndex = 5; - label5.Text = "Dataset Type"; - // // cb_datasetType // cb_datasetType.FormattingEnabled = true; - cb_datasetType.Location = new System.Drawing.Point(6, 76); + cb_datasetType.Location = new System.Drawing.Point(6, 22); cb_datasetType.Name = "cb_datasetType"; cb_datasetType.Size = new System.Drawing.Size(121, 23); cb_datasetType.TabIndex = 4; // - // label4 - // - label4.AutoSize = true; - label4.Location = new System.Drawing.Point(6, 257); - label4.Name = "label4"; - label4.Size = new System.Drawing.Size(58, 15); - label4.TabIndex = 3; - label4.Text = "Keywords"; - // - // label3 - // - label3.AutoSize = true; - label3.Location = new System.Drawing.Point(6, 9); - label3.Name = "label3"; - label3.Size = new System.Drawing.Size(82, 15); - label3.TabIndex = 1; - label3.Text = "Resource Type"; - // // cb_resourceType // cb_resourceType.FormattingEnabled = true; - cb_resourceType.Location = new System.Drawing.Point(6, 27); + cb_resourceType.Location = new System.Drawing.Point(6, 22); cb_resourceType.Name = "cb_resourceType"; cb_resourceType.Size = new System.Drawing.Size(121, 23); cb_resourceType.TabIndex = 0; @@ -390,16 +335,10 @@ private void InitializeComponent() // tabPage3 // tabPage3.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage3.Controls.Add(btnEndDateClear); - tabPage3.Controls.Add(btnStartDateClear); - tabPage3.Controls.Add(dtpEndDate); - tabPage3.Controls.Add(dtpStart); - tabPage3.Controls.Add(label12); - tabPage3.Controls.Add(label11); - tabPage3.Controls.Add(label10); - tabPage3.Controls.Add(cb_granularity); - tabPage3.Controls.Add(label9); - tabPage3.Controls.Add(tbGeoCoverage); + tabPage3.Controls.Add(groupBox14); + tabPage3.Controls.Add(groupBox13); + tabPage3.Controls.Add(groupBox12); + tabPage3.Controls.Add(groupBox11); tabPage3.Location = new System.Drawing.Point(4, 24); tabPage3.Name = "tabPage3"; tabPage3.Size = new System.Drawing.Size(873, 895); @@ -408,7 +347,7 @@ private void InitializeComponent() // // btnEndDateClear // - btnEndDateClear.Location = new System.Drawing.Point(220, 194); + btnEndDateClear.Location = new System.Drawing.Point(212, 22); btnEndDateClear.Name = "btnEndDateClear"; btnEndDateClear.Size = new System.Drawing.Size(75, 23); btnEndDateClear.TabIndex = 25; @@ -418,7 +357,7 @@ private void InitializeComponent() // // btnStartDateClear // - btnStartDateClear.Location = new System.Drawing.Point(220, 140); + btnStartDateClear.Location = new System.Drawing.Point(212, 16); btnStartDateClear.Name = "btnStartDateClear"; btnStartDateClear.Size = new System.Drawing.Size(75, 23); btnStartDateClear.TabIndex = 24; @@ -428,65 +367,29 @@ private void InitializeComponent() // // dtpEndDate // - dtpEndDate.Location = new System.Drawing.Point(14, 194); + dtpEndDate.Location = new System.Drawing.Point(6, 22); dtpEndDate.Name = "dtpEndDate"; dtpEndDate.Size = new System.Drawing.Size(200, 23); dtpEndDate.TabIndex = 23; // // dtpStart // - dtpStart.Location = new System.Drawing.Point(14, 140); + dtpStart.Location = new System.Drawing.Point(6, 16); dtpStart.Name = "dtpStart"; dtpStart.Size = new System.Drawing.Size(200, 23); dtpStart.TabIndex = 20; // - // label12 - // - label12.AutoSize = true; - label12.Location = new System.Drawing.Point(14, 176); - label12.Name = "label12"; - label12.Size = new System.Drawing.Size(54, 15); - label12.TabIndex = 19; - label12.Text = "End Date"; - // - // label11 - // - label11.AutoSize = true; - label11.Location = new System.Drawing.Point(14, 122); - label11.Name = "label11"; - label11.Size = new System.Drawing.Size(58, 15); - label11.TabIndex = 17; - label11.Text = "Start Date"; - // - // label10 - // - label10.AutoSize = true; - label10.Location = new System.Drawing.Point(14, 68); - label10.Name = "label10"; - label10.Size = new System.Drawing.Size(65, 15); - label10.TabIndex = 15; - label10.Text = "Granularity"; - // // cb_granularity // cb_granularity.FormattingEnabled = true; - cb_granularity.Location = new System.Drawing.Point(14, 86); + cb_granularity.Location = new System.Drawing.Point(6, 22); cb_granularity.Name = "cb_granularity"; cb_granularity.Size = new System.Drawing.Size(121, 23); cb_granularity.TabIndex = 14; // - // label9 - // - label9.AutoSize = true; - label9.Location = new System.Drawing.Point(14, 17); - label9.Name = "label9"; - label9.Size = new System.Drawing.Size(130, 15); - label9.TabIndex = 13; - label9.Text = "Geographical Coverage"; - // // tbGeoCoverage // - tbGeoCoverage.Location = new System.Drawing.Point(14, 35); + tbGeoCoverage.Location = new System.Drawing.Point(8, 22); tbGeoCoverage.Name = "tbGeoCoverage"; tbGeoCoverage.Size = new System.Drawing.Size(366, 23); tbGeoCoverage.TabIndex = 12; @@ -494,80 +397,40 @@ private void InitializeComponent() // tabPage4 // tabPage4.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage4.Controls.Add(label16); - tabPage4.Controls.Add(tbJuristiction); - tabPage4.Controls.Add(label15); - tabPage4.Controls.Add(tbDataProcessor); - tabPage4.Controls.Add(label14); - tabPage4.Controls.Add(tbDataController); - tabPage4.Controls.Add(label13); - tabPage4.Controls.Add(tbAccessContact); + tabPage4.Controls.Add(groupBox10); + tabPage4.Controls.Add(groupBox9); + tabPage4.Controls.Add(groupBox8); + tabPage4.Controls.Add(groupBox7); tabPage4.Location = new System.Drawing.Point(4, 24); tabPage4.Name = "tabPage4"; tabPage4.Size = new System.Drawing.Size(873, 895); tabPage4.TabIndex = 3; tabPage4.Text = "Access"; // - // label16 - // - label16.AutoSize = true; - label16.Location = new System.Drawing.Point(15, 169); - label16.Name = "label16"; - label16.Size = new System.Drawing.Size(64, 15); - label16.TabIndex = 21; - label16.Text = "Juristiction"; - // // tbJuristiction // - tbJuristiction.Location = new System.Drawing.Point(15, 187); + tbJuristiction.Location = new System.Drawing.Point(6, 22); tbJuristiction.Name = "tbJuristiction"; tbJuristiction.Size = new System.Drawing.Size(366, 23); tbJuristiction.TabIndex = 20; // - // label15 - // - label15.AutoSize = true; - label15.Location = new System.Drawing.Point(15, 116); - label15.Name = "label15"; - label15.Size = new System.Drawing.Size(85, 15); - label15.TabIndex = 19; - label15.Text = "Data Processor"; - // // tbDataProcessor // - tbDataProcessor.Location = new System.Drawing.Point(15, 134); + tbDataProcessor.Location = new System.Drawing.Point(6, 22); tbDataProcessor.Name = "tbDataProcessor"; tbDataProcessor.Size = new System.Drawing.Size(366, 23); tbDataProcessor.TabIndex = 18; // - // label14 - // - label14.AutoSize = true; - label14.Location = new System.Drawing.Point(15, 66); - label14.Name = "label14"; - label14.Size = new System.Drawing.Size(87, 15); - label14.TabIndex = 17; - label14.Text = "Data Controller"; - // // tbDataController // - tbDataController.Location = new System.Drawing.Point(15, 84); + tbDataController.Location = new System.Drawing.Point(6, 22); tbDataController.Name = "tbDataController"; tbDataController.Size = new System.Drawing.Size(366, 23); tbDataController.TabIndex = 16; // - // label13 - // - label13.AutoSize = true; - label13.Location = new System.Drawing.Point(15, 10); - label13.Name = "label13"; - label13.Size = new System.Drawing.Size(88, 15); - label13.TabIndex = 15; - label13.Text = "Access Contact"; - // // tbAccessContact // - tbAccessContact.Location = new System.Drawing.Point(15, 28); + tbAccessContact.Location = new System.Drawing.Point(5, 19); tbAccessContact.Name = "tbAccessContact"; tbAccessContact.Size = new System.Drawing.Size(366, 23); tbAccessContact.TabIndex = 14; @@ -575,84 +438,86 @@ private void InitializeComponent() // tabPage5 // tabPage5.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage5.Controls.Add(fftControlledVocab); - tabPage5.Controls.Add(ffcPeople); - tabPage5.Controls.Add(label19); - tabPage5.Controls.Add(label18); - tabPage5.Controls.Add(tbDOI); - tabPage5.Controls.Add(label17); + tabPage5.Controls.Add(groupBox3); + tabPage5.Controls.Add(tableLayoutPanel1); tabPage5.Location = new System.Drawing.Point(4, 24); tabPage5.Name = "tabPage5"; tabPage5.Size = new System.Drawing.Size(873, 895); tabPage5.TabIndex = 4; tabPage5.Text = "Attribution"; // + // tableLayoutPanel1 + // + tableLayoutPanel1.AutoSize = true; + tableLayoutPanel1.ColumnCount = 1; + tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); + tableLayoutPanel1.Controls.Add(groupBox2, 0, 0); + tableLayoutPanel1.Controls.Add(groupBox1, 0, 1); + tableLayoutPanel1.Location = new System.Drawing.Point(14, 71); + tableLayoutPanel1.Name = "tableLayoutPanel1"; + tableLayoutPanel1.RowCount = 2; + tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); + tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); + tableLayoutPanel1.Size = new System.Drawing.Size(318, 206); + tableLayoutPanel1.TabIndex = 26; + // + // groupBox2 + // + groupBox2.AutoSize = true; + groupBox2.Controls.Add(fftControlledVocab); + groupBox2.Location = new System.Drawing.Point(3, 3); + groupBox2.Name = "groupBox2"; + groupBox2.Size = new System.Drawing.Size(312, 70); + groupBox2.TabIndex = 25; + groupBox2.TabStop = false; + groupBox2.Text = "ControlledGroup"; + // // fftControlledVocab // fftControlledVocab.AutoScroll = true; fftControlledVocab.AutoSize = true; - fftControlledVocab.Location = new System.Drawing.Point(14, 98); + fftControlledVocab.Location = new System.Drawing.Point(6, 22); fftControlledVocab.MaximumSize = new System.Drawing.Size(300, 0); fftControlledVocab.MinimumSize = new System.Drawing.Size(100, 20); fftControlledVocab.Name = "fftControlledVocab"; fftControlledVocab.Size = new System.Drawing.Size(300, 26); fftControlledVocab.TabIndex = 23; // + // groupBox1 + // + groupBox1.AutoSize = true; + groupBox1.Controls.Add(ffcPeople); + groupBox1.Location = new System.Drawing.Point(3, 106); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new System.Drawing.Size(312, 97); + groupBox1.TabIndex = 24; + groupBox1.TabStop = false; + groupBox1.Text = "People"; + // // ffcPeople // ffcPeople.AutoScroll = true; ffcPeople.AutoSize = true; - ffcPeople.Location = new System.Drawing.Point(14, 195); + ffcPeople.Location = new System.Drawing.Point(6, 22); ffcPeople.MaximumSize = new System.Drawing.Size(300, 0); ffcPeople.MinimumSize = new System.Drawing.Size(100, 20); ffcPeople.Name = "ffcPeople"; ffcPeople.Size = new System.Drawing.Size(300, 53); ffcPeople.TabIndex = 22; // - // label19 - // - label19.AutoSize = true; - label19.Location = new System.Drawing.Point(14, 74); - label19.Name = "label19"; - label19.Size = new System.Drawing.Size(124, 15); - label19.TabIndex = 21; - label19.Text = "Controlled Vocabulary"; - // - // label18 - // - label18.AutoSize = true; - label18.Location = new System.Drawing.Point(14, 15); - label18.Name = "label18"; - label18.Size = new System.Drawing.Size(27, 15); - label18.TabIndex = 19; - label18.Text = "DOI"; - // // tbDOI // - tbDOI.Location = new System.Drawing.Point(14, 33); + tbDOI.Location = new System.Drawing.Point(6, 22); tbDOI.Name = "tbDOI"; - tbDOI.Size = new System.Drawing.Size(366, 23); + tbDOI.Size = new System.Drawing.Size(303, 23); tbDOI.TabIndex = 18; // - // label17 - // - label17.AutoSize = true; - label17.Location = new System.Drawing.Point(14, 177); - label17.Name = "label17"; - label17.Size = new System.Drawing.Size(43, 15); - label17.TabIndex = 17; - label17.Text = "People"; - // // tabPage6 // tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage6.Controls.Add(btnReleaseDateClear); - tabPage6.Controls.Add(dtpReleaseDate); - tabPage6.Controls.Add(cbUpdateLag); - tabPage6.Controls.Add(cb_updateFrequency); - tabPage6.Controls.Add(label22); - tabPage6.Controls.Add(label21); - tabPage6.Controls.Add(label20); + tabPage6.Controls.Add(groupBox6); + tabPage6.Controls.Add(groupBox5); + tabPage6.Controls.Add(groupBox4); tabPage6.Location = new System.Drawing.Point(4, 24); tabPage6.Name = "tabPage6"; tabPage6.Size = new System.Drawing.Size(873, 895); @@ -661,7 +526,7 @@ private void InitializeComponent() // // btnReleaseDateClear // - btnReleaseDateClear.Location = new System.Drawing.Point(221, 88); + btnReleaseDateClear.Location = new System.Drawing.Point(212, 22); btnReleaseDateClear.Name = "btnReleaseDateClear"; btnReleaseDateClear.Size = new System.Drawing.Size(75, 23); btnReleaseDateClear.TabIndex = 25; @@ -671,7 +536,7 @@ private void InitializeComponent() // // dtpReleaseDate // - dtpReleaseDate.Location = new System.Drawing.Point(15, 88); + dtpReleaseDate.Location = new System.Drawing.Point(6, 22); dtpReleaseDate.Name = "dtpReleaseDate"; dtpReleaseDate.Size = new System.Drawing.Size(200, 23); dtpReleaseDate.TabIndex = 24; @@ -679,7 +544,7 @@ private void InitializeComponent() // cbUpdateLag // cbUpdateLag.FormattingEnabled = true; - cbUpdateLag.Location = new System.Drawing.Point(15, 142); + cbUpdateLag.Location = new System.Drawing.Point(6, 22); cbUpdateLag.Name = "cbUpdateLag"; cbUpdateLag.Size = new System.Drawing.Size(140, 23); cbUpdateLag.TabIndex = 23; @@ -688,38 +553,215 @@ private void InitializeComponent() // cb_updateFrequency // cb_updateFrequency.FormattingEnabled = true; - cb_updateFrequency.Location = new System.Drawing.Point(15, 30); + cb_updateFrequency.Location = new System.Drawing.Point(6, 15); cb_updateFrequency.Name = "cb_updateFrequency"; cb_updateFrequency.Size = new System.Drawing.Size(121, 23); cb_updateFrequency.TabIndex = 22; cb_updateFrequency.Format += FormatCB; // - // label22 - // - label22.AutoSize = true; - label22.Location = new System.Drawing.Point(15, 124); - label22.Name = "label22"; - label22.Size = new System.Drawing.Size(67, 15); - label22.TabIndex = 21; - label22.Text = "Update Lag"; - // - // label21 - // - label21.AutoSize = true; - label21.Location = new System.Drawing.Point(15, 70); - label21.Name = "label21"; - label21.Size = new System.Drawing.Size(105, 15); - label21.TabIndex = 19; - label21.Text = "Initial Release Date"; - // - // label20 - // - label20.AutoSize = true; - label20.Location = new System.Drawing.Point(15, 12); - label20.Name = "label20"; - label20.Size = new System.Drawing.Size(99, 15); - label20.TabIndex = 17; - label20.Text = "Update Fequency"; + // groupBox3 + // + groupBox3.Controls.Add(tbDOI); + groupBox3.Location = new System.Drawing.Point(14, 12); + groupBox3.Name = "groupBox3"; + groupBox3.Size = new System.Drawing.Size(318, 56); + groupBox3.TabIndex = 27; + groupBox3.TabStop = false; + groupBox3.Text = "DOI"; + // + // groupBox4 + // + groupBox4.Controls.Add(cb_updateFrequency); + groupBox4.Location = new System.Drawing.Point(15, 19); + groupBox4.Name = "groupBox4"; + groupBox4.Size = new System.Drawing.Size(137, 47); + groupBox4.TabIndex = 26; + groupBox4.TabStop = false; + groupBox4.Text = "Update Frequency"; + // + // groupBox5 + // + groupBox5.Controls.Add(dtpReleaseDate); + groupBox5.Controls.Add(btnReleaseDateClear); + groupBox5.Location = new System.Drawing.Point(15, 72); + groupBox5.Name = "groupBox5"; + groupBox5.Size = new System.Drawing.Size(293, 53); + groupBox5.TabIndex = 27; + groupBox5.TabStop = false; + groupBox5.Text = "Initial Release Date"; + // + // groupBox6 + // + groupBox6.Controls.Add(cbUpdateLag); + groupBox6.Location = new System.Drawing.Point(15, 131); + groupBox6.Name = "groupBox6"; + groupBox6.Size = new System.Drawing.Size(155, 59); + groupBox6.TabIndex = 28; + groupBox6.TabStop = false; + groupBox6.Text = "Update Lag"; + // + // groupBox7 + // + groupBox7.Controls.Add(tbAccessContact); + groupBox7.Location = new System.Drawing.Point(15, 7); + groupBox7.Name = "groupBox7"; + groupBox7.Size = new System.Drawing.Size(398, 56); + groupBox7.TabIndex = 22; + groupBox7.TabStop = false; + groupBox7.Text = "Access Contact"; + // + // groupBox8 + // + groupBox8.Controls.Add(tbDataController); + groupBox8.Location = new System.Drawing.Point(15, 69); + groupBox8.Name = "groupBox8"; + groupBox8.Size = new System.Drawing.Size(398, 63); + groupBox8.TabIndex = 23; + groupBox8.TabStop = false; + groupBox8.Text = "Data Controller"; + // + // groupBox9 + // + groupBox9.Controls.Add(tbDataProcessor); + groupBox9.Location = new System.Drawing.Point(15, 138); + groupBox9.Name = "groupBox9"; + groupBox9.Size = new System.Drawing.Size(398, 66); + groupBox9.TabIndex = 24; + groupBox9.TabStop = false; + groupBox9.Text = "Data Processor"; + // + // groupBox10 + // + groupBox10.Controls.Add(tbJuristiction); + groupBox10.Location = new System.Drawing.Point(15, 210); + groupBox10.Name = "groupBox10"; + groupBox10.Size = new System.Drawing.Size(398, 72); + groupBox10.TabIndex = 25; + groupBox10.TabStop = false; + groupBox10.Text = "Juristiction"; + // + // groupBox11 + // + groupBox11.Controls.Add(tbGeoCoverage); + groupBox11.Location = new System.Drawing.Point(14, 10); + groupBox11.Name = "groupBox11"; + groupBox11.Size = new System.Drawing.Size(393, 55); + groupBox11.TabIndex = 26; + groupBox11.TabStop = false; + groupBox11.Text = "Geographical Coverage"; + // + // groupBox12 + // + groupBox12.Controls.Add(cb_granularity); + groupBox12.Location = new System.Drawing.Point(14, 71); + groupBox12.Name = "groupBox12"; + groupBox12.Size = new System.Drawing.Size(146, 62); + groupBox12.TabIndex = 27; + groupBox12.TabStop = false; + groupBox12.Text = "Granularity"; + // + // groupBox13 + // + groupBox13.Controls.Add(dtpStart); + groupBox13.Controls.Add(btnStartDateClear); + groupBox13.Location = new System.Drawing.Point(14, 139); + groupBox13.Name = "groupBox13"; + groupBox13.Size = new System.Drawing.Size(296, 49); + groupBox13.TabIndex = 28; + groupBox13.TabStop = false; + groupBox13.Text = "Start Date"; + // + // groupBox14 + // + groupBox14.Controls.Add(dtpEndDate); + groupBox14.Controls.Add(btnEndDateClear); + groupBox14.Location = new System.Drawing.Point(14, 194); + groupBox14.Name = "groupBox14"; + groupBox14.Size = new System.Drawing.Size(296, 62); + groupBox14.TabIndex = 29; + groupBox14.TabStop = false; + groupBox14.Text = "End Date"; + // + // groupBox15 + // + groupBox15.Controls.Add(tbAbstract); + groupBox15.Location = new System.Drawing.Point(7, 6); + groupBox15.Name = "groupBox15"; + groupBox15.Size = new System.Drawing.Size(863, 155); + groupBox15.TabIndex = 4; + groupBox15.TabStop = false; + groupBox15.Text = "Short Description"; + // + // groupBox16 + // + groupBox16.Controls.Add(tbDescription); + groupBox16.Location = new System.Drawing.Point(7, 167); + groupBox16.Name = "groupBox16"; + groupBox16.Size = new System.Drawing.Size(866, 165); + groupBox16.TabIndex = 5; + groupBox16.TabStop = false; + groupBox16.Text = "Description"; + // + // groupBox17 + // + groupBox17.Controls.Add(cb_resourceType); + groupBox17.Location = new System.Drawing.Point(7, 6); + groupBox17.Name = "groupBox17"; + groupBox17.Size = new System.Drawing.Size(137, 58); + groupBox17.TabIndex = 14; + groupBox17.TabStop = false; + groupBox17.Text = "Resource Type"; + // + // groupBox18 + // + groupBox18.Controls.Add(cb_datasetType); + groupBox18.Location = new System.Drawing.Point(7, 70); + groupBox18.Name = "groupBox18"; + groupBox18.Size = new System.Drawing.Size(365, 85); + groupBox18.TabIndex = 15; + groupBox18.TabStop = false; + groupBox18.Text = "Dataset Type"; + // + // groupBox19 + // + groupBox19.Controls.Add(cb_datasetSubtype); + groupBox19.Location = new System.Drawing.Point(7, 161); + groupBox19.Name = "groupBox19"; + groupBox19.Size = new System.Drawing.Size(365, 82); + groupBox19.TabIndex = 16; + groupBox19.TabStop = false; + groupBox19.Text = "Dataset Subtype"; + // + // groupBox20 + // + groupBox20.Controls.Add(tbDataSource); + groupBox20.Location = new System.Drawing.Point(7, 249); + groupBox20.Name = "groupBox20"; + groupBox20.Size = new System.Drawing.Size(407, 57); + groupBox20.TabIndex = 17; + groupBox20.TabStop = false; + groupBox20.Text = "Data Source"; + // + // groupBox21 + // + groupBox21.Controls.Add(tbDataSourceSetting); + groupBox21.Location = new System.Drawing.Point(7, 312); + groupBox21.Name = "groupBox21"; + groupBox21.Size = new System.Drawing.Size(407, 71); + groupBox21.TabIndex = 18; + groupBox21.TabStop = false; + groupBox21.Text = "Data Source Setting"; + // + // groupBox22 + // + groupBox22.AutoSize = true; + groupBox22.Controls.Add(ffcKeywords); + groupBox22.Location = new System.Drawing.Point(7, 389); + groupBox22.Name = "groupBox22"; + groupBox22.Size = new System.Drawing.Size(365, 115); + groupBox22.TabIndex = 19; + groupBox22.TabStop = false; + groupBox22.Text = "Keywords"; // // CatalogueUI // @@ -736,17 +778,50 @@ private void InitializeComponent() splitContainer1.ResumeLayout(false); tabControl1.ResumeLayout(false); tabPage1.ResumeLayout(false); - tabPage1.PerformLayout(); tabPage2.ResumeLayout(false); tabPage2.PerformLayout(); tabPage3.ResumeLayout(false); - tabPage3.PerformLayout(); tabPage4.ResumeLayout(false); - tabPage4.PerformLayout(); tabPage5.ResumeLayout(false); tabPage5.PerformLayout(); + tableLayoutPanel1.ResumeLayout(false); + tableLayoutPanel1.PerformLayout(); + groupBox2.ResumeLayout(false); + groupBox2.PerformLayout(); + groupBox1.ResumeLayout(false); + groupBox1.PerformLayout(); tabPage6.ResumeLayout(false); - tabPage6.PerformLayout(); + groupBox3.ResumeLayout(false); + groupBox3.PerformLayout(); + groupBox4.ResumeLayout(false); + groupBox5.ResumeLayout(false); + groupBox6.ResumeLayout(false); + groupBox7.ResumeLayout(false); + groupBox7.PerformLayout(); + groupBox8.ResumeLayout(false); + groupBox8.PerformLayout(); + groupBox9.ResumeLayout(false); + groupBox9.PerformLayout(); + groupBox10.ResumeLayout(false); + groupBox10.PerformLayout(); + groupBox11.ResumeLayout(false); + groupBox11.PerformLayout(); + groupBox12.ResumeLayout(false); + groupBox13.ResumeLayout(false); + groupBox14.ResumeLayout(false); + groupBox15.ResumeLayout(false); + groupBox15.PerformLayout(); + groupBox16.ResumeLayout(false); + groupBox16.PerformLayout(); + groupBox17.ResumeLayout(false); + groupBox18.ResumeLayout(false); + groupBox19.ResumeLayout(false); + groupBox20.ResumeLayout(false); + groupBox20.PerformLayout(); + groupBox21.ResumeLayout(false); + groupBox21.PerformLayout(); + groupBox22.ResumeLayout(false); + groupBox22.PerformLayout(); ResumeLayout(false); } @@ -765,42 +840,20 @@ private void InitializeComponent() private TabPage tabPage4; private TabPage tabPage5; private TabPage tabPage6; - private Label label1; - private Label label2; private TextBox tbDescription; - private Label label7; private TextBox tbDataSource; - private Label label6; private ComboBox cb_datasetSubtype; - private Label label5; private ComboBox cb_datasetType; - private Label label4; - private Label label3; private ComboBox cb_resourceType; - private Label label8; private TextBox tbDataSourceSetting; - private Label label12; - private Label label11; - private Label label10; private ComboBox cb_granularity; - private Label label9; private TextBox tbGeoCoverage; - private Label label16; private TextBox tbJuristiction; - private Label label15; private TextBox tbDataProcessor; - private Label label14; private TextBox tbDataController; - private Label label13; private TextBox tbAccessContact; - private Label label19; - private Label label18; private TextBox tbDOI; - private Label label17; private ComboBox cb_updateFrequency; - private Label label22; - private Label label21; - private Label label20; private TextBox tbAbstract; private DateTimePicker dtpStart; private DateTimePicker dtpEndDate; @@ -813,5 +866,28 @@ private void InitializeComponent() private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffcPeople; private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddchipDatasetType; private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay fftControlledVocab; + private TableLayoutPanel tableLayoutPanel1; + private GroupBox groupBox2; + private GroupBox groupBox1; + private GroupBox groupBox3; + private GroupBox groupBox6; + private GroupBox groupBox5; + private GroupBox groupBox4; + private GroupBox groupBox8; + private GroupBox groupBox7; + private GroupBox groupBox10; + private GroupBox groupBox9; + private GroupBox groupBox14; + private GroupBox groupBox13; + private GroupBox groupBox12; + private GroupBox groupBox11; + private GroupBox groupBox16; + private GroupBox groupBox15; + private GroupBox groupBox22; + private GroupBox groupBox21; + private GroupBox groupBox20; + private GroupBox groupBox19; + private GroupBox groupBox18; + private GroupBox groupBox17; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index c7cbe18aa6..60b197d469 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -540,6 +540,11 @@ private void groupBox1_Enter(object sender, EventArgs e) { } + + private void tabPage1_Click(object sender, EventArgs e) + { + + } } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] From 9e0207b8b0907cdb2e14fcc00c0a2d1b21dc692d Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 23 Jan 2025 13:14:06 +0000 Subject: [PATCH 11/36] use group boxes --- Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 17491cca45..ec245a6829 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -277,7 +277,7 @@ private void InitializeComponent() // ddchipDatasetType.AutoScroll = true; ddchipDatasetType.AutoSize = true; - ddchipDatasetType.Location = new System.Drawing.Point(581, 16); + ddchipDatasetType.Location = new System.Drawing.Point(542, 56); ddchipDatasetType.MinimumSize = new System.Drawing.Size(100, 20); ddchipDatasetType.Name = "ddchipDatasetType"; ddchipDatasetType.Size = new System.Drawing.Size(286, 83); From 01e87d8f58e35018e133476fa6f29b61200728f3 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 23 Jan 2025 15:14:07 +0000 Subject: [PATCH 12/36] better layout --- .../MainFormUITabs/CatalogueUI.Designer.cs | 701 +++++++++--------- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 9 +- .../DropdownOptionsChipDisplay.Designer.cs | 8 +- .../DropdownOptionsChipDisplay.cs | 20 +- 4 files changed, 379 insertions(+), 359 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index ec245a6829..a849e68dfc 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -41,94 +41,95 @@ private void InitializeComponent() ticketingControl1 = new TicketingControlUI(); tabControl1 = new TabControl(); tabPage1 = new TabPage(); + groupBox16 = new GroupBox(); tbDescription = new TextBox(); + groupBox15 = new GroupBox(); tbAbstract = new TextBox(); tabPage2 = new TabPage(); - ddchipDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + tableLayoutPanel2 = new TableLayoutPanel(); + groupBox18 = new GroupBox(); + ddDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + groupBox22 = new GroupBox(); ffcKeywords = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + groupBox19 = new GroupBox(); + ddDatasetSubtype = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + groupBox21 = new GroupBox(); tbDataSourceSetting = new TextBox(); + groupBox20 = new GroupBox(); tbDataSource = new TextBox(); - cb_datasetSubtype = new ComboBox(); - cb_datasetType = new ComboBox(); + groupBox17 = new GroupBox(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); - btnEndDateClear = new Button(); - btnStartDateClear = new Button(); + groupBox14 = new GroupBox(); dtpEndDate = new DateTimePicker(); + btnEndDateClear = new Button(); + groupBox13 = new GroupBox(); dtpStart = new DateTimePicker(); + btnStartDateClear = new Button(); + groupBox12 = new GroupBox(); cb_granularity = new ComboBox(); + groupBox11 = new GroupBox(); tbGeoCoverage = new TextBox(); tabPage4 = new TabPage(); + groupBox10 = new GroupBox(); tbJuristiction = new TextBox(); + groupBox9 = new GroupBox(); tbDataProcessor = new TextBox(); + groupBox8 = new GroupBox(); tbDataController = new TextBox(); + groupBox7 = new GroupBox(); tbAccessContact = new TextBox(); tabPage5 = new TabPage(); + groupBox3 = new GroupBox(); + tbDOI = new TextBox(); tableLayoutPanel1 = new TableLayoutPanel(); groupBox2 = new GroupBox(); fftControlledVocab = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox1 = new GroupBox(); ffcPeople = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); - tbDOI = new TextBox(); tabPage6 = new TabPage(); - btnReleaseDateClear = new Button(); - dtpReleaseDate = new DateTimePicker(); + groupBox6 = new GroupBox(); cbUpdateLag = new ComboBox(); - cb_updateFrequency = new ComboBox(); - groupBox3 = new GroupBox(); - groupBox4 = new GroupBox(); groupBox5 = new GroupBox(); - groupBox6 = new GroupBox(); - groupBox7 = new GroupBox(); - groupBox8 = new GroupBox(); - groupBox9 = new GroupBox(); - groupBox10 = new GroupBox(); - groupBox11 = new GroupBox(); - groupBox12 = new GroupBox(); - groupBox13 = new GroupBox(); - groupBox14 = new GroupBox(); - groupBox15 = new GroupBox(); - groupBox16 = new GroupBox(); - groupBox17 = new GroupBox(); - groupBox18 = new GroupBox(); - groupBox19 = new GroupBox(); - groupBox20 = new GroupBox(); - groupBox21 = new GroupBox(); - groupBox22 = new GroupBox(); + dtpReleaseDate = new DateTimePicker(); + btnReleaseDateClear = new Button(); + groupBox4 = new GroupBox(); + cb_updateFrequency = new ComboBox(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); splitContainer1.SuspendLayout(); tabControl1.SuspendLayout(); tabPage1.SuspendLayout(); + groupBox16.SuspendLayout(); + groupBox15.SuspendLayout(); tabPage2.SuspendLayout(); + tableLayoutPanel2.SuspendLayout(); + groupBox18.SuspendLayout(); + groupBox22.SuspendLayout(); + groupBox19.SuspendLayout(); + groupBox21.SuspendLayout(); + groupBox20.SuspendLayout(); + groupBox17.SuspendLayout(); tabPage3.SuspendLayout(); + groupBox14.SuspendLayout(); + groupBox13.SuspendLayout(); + groupBox12.SuspendLayout(); + groupBox11.SuspendLayout(); tabPage4.SuspendLayout(); + groupBox10.SuspendLayout(); + groupBox9.SuspendLayout(); + groupBox8.SuspendLayout(); + groupBox7.SuspendLayout(); tabPage5.SuspendLayout(); + groupBox3.SuspendLayout(); tableLayoutPanel1.SuspendLayout(); groupBox2.SuspendLayout(); groupBox1.SuspendLayout(); tabPage6.SuspendLayout(); - groupBox3.SuspendLayout(); - groupBox4.SuspendLayout(); - groupBox5.SuspendLayout(); groupBox6.SuspendLayout(); - groupBox7.SuspendLayout(); - groupBox8.SuspendLayout(); - groupBox9.SuspendLayout(); - groupBox10.SuspendLayout(); - groupBox11.SuspendLayout(); - groupBox12.SuspendLayout(); - groupBox13.SuspendLayout(); - groupBox14.SuspendLayout(); - groupBox15.SuspendLayout(); - groupBox16.SuspendLayout(); - groupBox17.SuspendLayout(); - groupBox18.SuspendLayout(); - groupBox19.SuspendLayout(); - groupBox20.SuspendLayout(); - groupBox21.SuspendLayout(); - groupBox22.SuspendLayout(); + groupBox5.SuspendLayout(); + groupBox4.SuspendLayout(); SuspendLayout(); // // splitContainer1 @@ -238,6 +239,16 @@ private void InitializeComponent() tabPage1.Text = "Descriptions"; tabPage1.Click += tabPage1_Click; // + // groupBox16 + // + groupBox16.Controls.Add(tbDescription); + groupBox16.Location = new System.Drawing.Point(7, 167); + groupBox16.Name = "groupBox16"; + groupBox16.Size = new System.Drawing.Size(866, 165); + groupBox16.TabIndex = 5; + groupBox16.TabStop = false; + groupBox16.Text = "Description"; + // // tbDescription // tbDescription.Location = new System.Drawing.Point(6, 22); @@ -247,6 +258,16 @@ private void InitializeComponent() tbDescription.Size = new System.Drawing.Size(851, 116); tbDescription.TabIndex = 2; // + // groupBox15 + // + groupBox15.Controls.Add(tbAbstract); + groupBox15.Location = new System.Drawing.Point(7, 6); + groupBox15.Name = "groupBox15"; + groupBox15.Size = new System.Drawing.Size(863, 155); + groupBox15.TabIndex = 4; + groupBox15.TabStop = false; + groupBox15.Text = "Short Description"; + // // tbAbstract // tbAbstract.Location = new System.Drawing.Point(6, 22); @@ -259,13 +280,8 @@ private void InitializeComponent() // tabPage2 // tabPage2.BackColor = System.Drawing.Color.WhiteSmoke; - tabPage2.Controls.Add(groupBox22); - tabPage2.Controls.Add(groupBox21); - tabPage2.Controls.Add(groupBox20); - tabPage2.Controls.Add(groupBox19); - tabPage2.Controls.Add(groupBox18); + tabPage2.Controls.Add(tableLayoutPanel2); tabPage2.Controls.Add(groupBox17); - tabPage2.Controls.Add(ddchipDatasetType); tabPage2.Location = new System.Drawing.Point(4, 24); tabPage2.Name = "tabPage2"; tabPage2.Padding = new Padding(3); @@ -273,15 +289,59 @@ private void InitializeComponent() tabPage2.TabIndex = 1; tabPage2.Text = "Data Details"; // - // ddchipDatasetType + // tableLayoutPanel2 + // + tableLayoutPanel2.AutoSize = true; + tableLayoutPanel2.ColumnCount = 1; + tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); + tableLayoutPanel2.Controls.Add(groupBox18, 0, 0); + tableLayoutPanel2.Controls.Add(groupBox22, 0, 4); + tableLayoutPanel2.Controls.Add(groupBox19, 0, 1); + tableLayoutPanel2.Controls.Add(groupBox21, 0, 3); + tableLayoutPanel2.Controls.Add(groupBox20, 0, 2); + tableLayoutPanel2.Location = new System.Drawing.Point(7, 70); + tableLayoutPanel2.Name = "tableLayoutPanel2"; + tableLayoutPanel2.RowCount = 5; + tableLayoutPanel2.RowStyles.Add(new RowStyle()); + tableLayoutPanel2.RowStyles.Add(new RowStyle()); + tableLayoutPanel2.RowStyles.Add(new RowStyle()); + tableLayoutPanel2.RowStyles.Add(new RowStyle()); + tableLayoutPanel2.RowStyles.Add(new RowStyle()); + tableLayoutPanel2.Size = new System.Drawing.Size(496, 513); + tableLayoutPanel2.TabIndex = 20; + // + // groupBox18 + // + groupBox18.AutoSize = true; + groupBox18.Controls.Add(ddDatasetType); + groupBox18.Location = new System.Drawing.Point(3, 3); + groupBox18.Name = "groupBox18"; + groupBox18.Size = new System.Drawing.Size(298, 126); + groupBox18.TabIndex = 15; + groupBox18.TabStop = false; + groupBox18.Text = "Dataset Type"; + // + // ddDatasetType // - ddchipDatasetType.AutoScroll = true; - ddchipDatasetType.AutoSize = true; - ddchipDatasetType.Location = new System.Drawing.Point(542, 56); - ddchipDatasetType.MinimumSize = new System.Drawing.Size(100, 20); - ddchipDatasetType.Name = "ddchipDatasetType"; - ddchipDatasetType.Size = new System.Drawing.Size(286, 83); - ddchipDatasetType.TabIndex = 13; + ddDatasetType.AutoScroll = true; + ddDatasetType.AutoSize = true; + ddDatasetType.Location = new System.Drawing.Point(6, 21); + ddDatasetType.MaximumSize = new System.Drawing.Size(400, 300); + ddDatasetType.MinimumSize = new System.Drawing.Size(100, 20); + ddDatasetType.Name = "ddDatasetType"; + ddDatasetType.Size = new System.Drawing.Size(286, 83); + ddDatasetType.TabIndex = 0; + // + // groupBox22 + // + groupBox22.AutoSize = true; + groupBox22.Controls.Add(ffcKeywords); + groupBox22.Location = new System.Drawing.Point(3, 413); + groupBox22.Name = "groupBox22"; + groupBox22.Size = new System.Drawing.Size(312, 97); + groupBox22.TabIndex = 19; + groupBox22.TabStop = false; + groupBox22.Text = "Keywords"; // // ffcKeywords // @@ -294,6 +354,39 @@ private void InitializeComponent() ffcKeywords.Size = new System.Drawing.Size(300, 53); ffcKeywords.TabIndex = 12; // + // groupBox19 + // + groupBox19.AutoSize = true; + groupBox19.Controls.Add(ddDatasetSubtype); + groupBox19.Location = new System.Drawing.Point(3, 135); + groupBox19.Name = "groupBox19"; + groupBox19.Size = new System.Drawing.Size(298, 126); + groupBox19.TabIndex = 16; + groupBox19.TabStop = false; + groupBox19.Text = "Dataset Subtype"; + // + // ddDatasetSubtype + // + ddDatasetSubtype.AutoScroll = true; + ddDatasetSubtype.AutoSize = true; + ddDatasetSubtype.Location = new System.Drawing.Point(6, 21); + ddDatasetSubtype.MaximumSize = new System.Drawing.Size(400, 300); + ddDatasetSubtype.MinimumSize = new System.Drawing.Size(100, 20); + ddDatasetSubtype.Name = "ddDatasetSubtype"; + ddDatasetSubtype.Size = new System.Drawing.Size(286, 83); + ddDatasetSubtype.TabIndex = 0; + // + // groupBox21 + // + groupBox21.AutoSize = true; + groupBox21.Controls.Add(tbDataSourceSetting); + groupBox21.Location = new System.Drawing.Point(3, 340); + groupBox21.Name = "groupBox21"; + groupBox21.Size = new System.Drawing.Size(378, 67); + groupBox21.TabIndex = 18; + groupBox21.TabStop = false; + groupBox21.Text = "Data Source Setting"; + // // tbDataSourceSetting // tbDataSourceSetting.Location = new System.Drawing.Point(6, 22); @@ -301,6 +394,17 @@ private void InitializeComponent() tbDataSourceSetting.Size = new System.Drawing.Size(366, 23); tbDataSourceSetting.TabIndex = 10; // + // groupBox20 + // + groupBox20.AutoSize = true; + groupBox20.Controls.Add(tbDataSource); + groupBox20.Location = new System.Drawing.Point(3, 267); + groupBox20.Name = "groupBox20"; + groupBox20.Size = new System.Drawing.Size(378, 67); + groupBox20.TabIndex = 17; + groupBox20.TabStop = false; + groupBox20.Text = "Data Source"; + // // tbDataSource // tbDataSource.Location = new System.Drawing.Point(6, 22); @@ -308,21 +412,15 @@ private void InitializeComponent() tbDataSource.Size = new System.Drawing.Size(366, 23); tbDataSource.TabIndex = 8; // - // cb_datasetSubtype - // - cb_datasetSubtype.FormattingEnabled = true; - cb_datasetSubtype.Location = new System.Drawing.Point(6, 19); - cb_datasetSubtype.Name = "cb_datasetSubtype"; - cb_datasetSubtype.Size = new System.Drawing.Size(121, 23); - cb_datasetSubtype.TabIndex = 6; - // - // cb_datasetType + // groupBox17 // - cb_datasetType.FormattingEnabled = true; - cb_datasetType.Location = new System.Drawing.Point(6, 22); - cb_datasetType.Name = "cb_datasetType"; - cb_datasetType.Size = new System.Drawing.Size(121, 23); - cb_datasetType.TabIndex = 4; + groupBox17.Controls.Add(cb_resourceType); + groupBox17.Location = new System.Drawing.Point(7, 6); + groupBox17.Name = "groupBox17"; + groupBox17.Size = new System.Drawing.Size(137, 58); + groupBox17.TabIndex = 14; + groupBox17.TabStop = false; + groupBox17.Text = "Resource Type"; // // cb_resourceType // @@ -345,6 +443,24 @@ private void InitializeComponent() tabPage3.TabIndex = 2; tabPage3.Text = "Geospacial & Temporal"; // + // groupBox14 + // + groupBox14.Controls.Add(dtpEndDate); + groupBox14.Controls.Add(btnEndDateClear); + groupBox14.Location = new System.Drawing.Point(14, 194); + groupBox14.Name = "groupBox14"; + groupBox14.Size = new System.Drawing.Size(296, 62); + groupBox14.TabIndex = 29; + groupBox14.TabStop = false; + groupBox14.Text = "End Date"; + // + // dtpEndDate + // + dtpEndDate.Location = new System.Drawing.Point(6, 22); + dtpEndDate.Name = "dtpEndDate"; + dtpEndDate.Size = new System.Drawing.Size(200, 23); + dtpEndDate.TabIndex = 23; + // // btnEndDateClear // btnEndDateClear.Location = new System.Drawing.Point(212, 22); @@ -355,6 +471,24 @@ private void InitializeComponent() btnEndDateClear.UseVisualStyleBackColor = true; btnEndDateClear.Click += btnEndDateClear_Click; // + // groupBox13 + // + groupBox13.Controls.Add(dtpStart); + groupBox13.Controls.Add(btnStartDateClear); + groupBox13.Location = new System.Drawing.Point(14, 139); + groupBox13.Name = "groupBox13"; + groupBox13.Size = new System.Drawing.Size(296, 49); + groupBox13.TabIndex = 28; + groupBox13.TabStop = false; + groupBox13.Text = "Start Date"; + // + // dtpStart + // + dtpStart.Location = new System.Drawing.Point(6, 16); + dtpStart.Name = "dtpStart"; + dtpStart.Size = new System.Drawing.Size(200, 23); + dtpStart.TabIndex = 20; + // // btnStartDateClear // btnStartDateClear.Location = new System.Drawing.Point(212, 16); @@ -365,19 +499,15 @@ private void InitializeComponent() btnStartDateClear.UseVisualStyleBackColor = true; btnStartDateClear.Click += btnStartDateClear_Click; // - // dtpEndDate - // - dtpEndDate.Location = new System.Drawing.Point(6, 22); - dtpEndDate.Name = "dtpEndDate"; - dtpEndDate.Size = new System.Drawing.Size(200, 23); - dtpEndDate.TabIndex = 23; - // - // dtpStart + // groupBox12 // - dtpStart.Location = new System.Drawing.Point(6, 16); - dtpStart.Name = "dtpStart"; - dtpStart.Size = new System.Drawing.Size(200, 23); - dtpStart.TabIndex = 20; + groupBox12.Controls.Add(cb_granularity); + groupBox12.Location = new System.Drawing.Point(14, 71); + groupBox12.Name = "groupBox12"; + groupBox12.Size = new System.Drawing.Size(146, 62); + groupBox12.TabIndex = 27; + groupBox12.TabStop = false; + groupBox12.Text = "Granularity"; // // cb_granularity // @@ -387,6 +517,16 @@ private void InitializeComponent() cb_granularity.Size = new System.Drawing.Size(121, 23); cb_granularity.TabIndex = 14; // + // groupBox11 + // + groupBox11.Controls.Add(tbGeoCoverage); + groupBox11.Location = new System.Drawing.Point(14, 10); + groupBox11.Name = "groupBox11"; + groupBox11.Size = new System.Drawing.Size(393, 55); + groupBox11.TabIndex = 26; + groupBox11.TabStop = false; + groupBox11.Text = "Geographical Coverage"; + // // tbGeoCoverage // tbGeoCoverage.Location = new System.Drawing.Point(8, 22); @@ -407,6 +547,16 @@ private void InitializeComponent() tabPage4.TabIndex = 3; tabPage4.Text = "Access"; // + // groupBox10 + // + groupBox10.Controls.Add(tbJuristiction); + groupBox10.Location = new System.Drawing.Point(15, 210); + groupBox10.Name = "groupBox10"; + groupBox10.Size = new System.Drawing.Size(398, 72); + groupBox10.TabIndex = 25; + groupBox10.TabStop = false; + groupBox10.Text = "Juristiction"; + // // tbJuristiction // tbJuristiction.Location = new System.Drawing.Point(6, 22); @@ -414,6 +564,16 @@ private void InitializeComponent() tbJuristiction.Size = new System.Drawing.Size(366, 23); tbJuristiction.TabIndex = 20; // + // groupBox9 + // + groupBox9.Controls.Add(tbDataProcessor); + groupBox9.Location = new System.Drawing.Point(15, 138); + groupBox9.Name = "groupBox9"; + groupBox9.Size = new System.Drawing.Size(398, 66); + groupBox9.TabIndex = 24; + groupBox9.TabStop = false; + groupBox9.Text = "Data Processor"; + // // tbDataProcessor // tbDataProcessor.Location = new System.Drawing.Point(6, 22); @@ -421,6 +581,16 @@ private void InitializeComponent() tbDataProcessor.Size = new System.Drawing.Size(366, 23); tbDataProcessor.TabIndex = 18; // + // groupBox8 + // + groupBox8.Controls.Add(tbDataController); + groupBox8.Location = new System.Drawing.Point(15, 69); + groupBox8.Name = "groupBox8"; + groupBox8.Size = new System.Drawing.Size(398, 63); + groupBox8.TabIndex = 23; + groupBox8.TabStop = false; + groupBox8.Text = "Data Controller"; + // // tbDataController // tbDataController.Location = new System.Drawing.Point(6, 22); @@ -428,6 +598,16 @@ private void InitializeComponent() tbDataController.Size = new System.Drawing.Size(366, 23); tbDataController.TabIndex = 16; // + // groupBox7 + // + groupBox7.Controls.Add(tbAccessContact); + groupBox7.Location = new System.Drawing.Point(15, 7); + groupBox7.Name = "groupBox7"; + groupBox7.Size = new System.Drawing.Size(398, 56); + groupBox7.TabIndex = 22; + groupBox7.TabStop = false; + groupBox7.Text = "Access Contact"; + // // tbAccessContact // tbAccessContact.Location = new System.Drawing.Point(5, 19); @@ -446,18 +626,35 @@ private void InitializeComponent() tabPage5.TabIndex = 4; tabPage5.Text = "Attribution"; // + // groupBox3 + // + groupBox3.Controls.Add(tbDOI); + groupBox3.Location = new System.Drawing.Point(14, 12); + groupBox3.Name = "groupBox3"; + groupBox3.Size = new System.Drawing.Size(318, 56); + groupBox3.TabIndex = 27; + groupBox3.TabStop = false; + groupBox3.Text = "DOI"; + // + // tbDOI + // + tbDOI.Location = new System.Drawing.Point(6, 22); + tbDOI.Name = "tbDOI"; + tbDOI.Size = new System.Drawing.Size(303, 23); + tbDOI.TabIndex = 18; + // // tableLayoutPanel1 // tableLayoutPanel1.AutoSize = true; tableLayoutPanel1.ColumnCount = 1; - tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); + tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutPanel1.Controls.Add(groupBox2, 0, 0); tableLayoutPanel1.Controls.Add(groupBox1, 0, 1); tableLayoutPanel1.Location = new System.Drawing.Point(14, 71); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 2; - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); + tableLayoutPanel1.RowStyles.Add(new RowStyle()); + tableLayoutPanel1.RowStyles.Add(new RowStyle()); tableLayoutPanel1.Size = new System.Drawing.Size(318, 206); tableLayoutPanel1.TabIndex = 26; // @@ -487,7 +684,7 @@ private void InitializeComponent() // groupBox1.AutoSize = true; groupBox1.Controls.Add(ffcPeople); - groupBox1.Location = new System.Drawing.Point(3, 106); + groupBox1.Location = new System.Drawing.Point(3, 79); groupBox1.Name = "groupBox1"; groupBox1.Size = new System.Drawing.Size(312, 97); groupBox1.TabIndex = 24; @@ -505,13 +702,6 @@ private void InitializeComponent() ffcPeople.Size = new System.Drawing.Size(300, 53); ffcPeople.TabIndex = 22; // - // tbDOI - // - tbDOI.Location = new System.Drawing.Point(6, 22); - tbDOI.Name = "tbDOI"; - tbDOI.Size = new System.Drawing.Size(303, 23); - tbDOI.TabIndex = 18; - // // tabPage6 // tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; @@ -524,22 +714,15 @@ private void InitializeComponent() tabPage6.TabIndex = 5; tabPage6.Text = "Data Updates"; // - // btnReleaseDateClear - // - btnReleaseDateClear.Location = new System.Drawing.Point(212, 22); - btnReleaseDateClear.Name = "btnReleaseDateClear"; - btnReleaseDateClear.Size = new System.Drawing.Size(75, 23); - btnReleaseDateClear.TabIndex = 25; - btnReleaseDateClear.Text = "Clear"; - btnReleaseDateClear.UseVisualStyleBackColor = true; - btnReleaseDateClear.Click += btnReleaseDateClear_Click; - // - // dtpReleaseDate + // groupBox6 // - dtpReleaseDate.Location = new System.Drawing.Point(6, 22); - dtpReleaseDate.Name = "dtpReleaseDate"; - dtpReleaseDate.Size = new System.Drawing.Size(200, 23); - dtpReleaseDate.TabIndex = 24; + groupBox6.Controls.Add(cbUpdateLag); + groupBox6.Location = new System.Drawing.Point(15, 131); + groupBox6.Name = "groupBox6"; + groupBox6.Size = new System.Drawing.Size(155, 59); + groupBox6.TabIndex = 28; + groupBox6.TabStop = false; + groupBox6.Text = "Update Lag"; // // cbUpdateLag // @@ -550,35 +733,6 @@ private void InitializeComponent() cbUpdateLag.TabIndex = 23; cbUpdateLag.Format += FormatCB; // - // cb_updateFrequency - // - cb_updateFrequency.FormattingEnabled = true; - cb_updateFrequency.Location = new System.Drawing.Point(6, 15); - cb_updateFrequency.Name = "cb_updateFrequency"; - cb_updateFrequency.Size = new System.Drawing.Size(121, 23); - cb_updateFrequency.TabIndex = 22; - cb_updateFrequency.Format += FormatCB; - // - // groupBox3 - // - groupBox3.Controls.Add(tbDOI); - groupBox3.Location = new System.Drawing.Point(14, 12); - groupBox3.Name = "groupBox3"; - groupBox3.Size = new System.Drawing.Size(318, 56); - groupBox3.TabIndex = 27; - groupBox3.TabStop = false; - groupBox3.Text = "DOI"; - // - // groupBox4 - // - groupBox4.Controls.Add(cb_updateFrequency); - groupBox4.Location = new System.Drawing.Point(15, 19); - groupBox4.Name = "groupBox4"; - groupBox4.Size = new System.Drawing.Size(137, 47); - groupBox4.TabIndex = 26; - groupBox4.TabStop = false; - groupBox4.Text = "Update Frequency"; - // // groupBox5 // groupBox5.Controls.Add(dtpReleaseDate); @@ -590,178 +744,41 @@ private void InitializeComponent() groupBox5.TabStop = false; groupBox5.Text = "Initial Release Date"; // - // groupBox6 - // - groupBox6.Controls.Add(cbUpdateLag); - groupBox6.Location = new System.Drawing.Point(15, 131); - groupBox6.Name = "groupBox6"; - groupBox6.Size = new System.Drawing.Size(155, 59); - groupBox6.TabIndex = 28; - groupBox6.TabStop = false; - groupBox6.Text = "Update Lag"; - // - // groupBox7 - // - groupBox7.Controls.Add(tbAccessContact); - groupBox7.Location = new System.Drawing.Point(15, 7); - groupBox7.Name = "groupBox7"; - groupBox7.Size = new System.Drawing.Size(398, 56); - groupBox7.TabIndex = 22; - groupBox7.TabStop = false; - groupBox7.Text = "Access Contact"; - // - // groupBox8 - // - groupBox8.Controls.Add(tbDataController); - groupBox8.Location = new System.Drawing.Point(15, 69); - groupBox8.Name = "groupBox8"; - groupBox8.Size = new System.Drawing.Size(398, 63); - groupBox8.TabIndex = 23; - groupBox8.TabStop = false; - groupBox8.Text = "Data Controller"; - // - // groupBox9 - // - groupBox9.Controls.Add(tbDataProcessor); - groupBox9.Location = new System.Drawing.Point(15, 138); - groupBox9.Name = "groupBox9"; - groupBox9.Size = new System.Drawing.Size(398, 66); - groupBox9.TabIndex = 24; - groupBox9.TabStop = false; - groupBox9.Text = "Data Processor"; - // - // groupBox10 - // - groupBox10.Controls.Add(tbJuristiction); - groupBox10.Location = new System.Drawing.Point(15, 210); - groupBox10.Name = "groupBox10"; - groupBox10.Size = new System.Drawing.Size(398, 72); - groupBox10.TabIndex = 25; - groupBox10.TabStop = false; - groupBox10.Text = "Juristiction"; - // - // groupBox11 - // - groupBox11.Controls.Add(tbGeoCoverage); - groupBox11.Location = new System.Drawing.Point(14, 10); - groupBox11.Name = "groupBox11"; - groupBox11.Size = new System.Drawing.Size(393, 55); - groupBox11.TabIndex = 26; - groupBox11.TabStop = false; - groupBox11.Text = "Geographical Coverage"; - // - // groupBox12 - // - groupBox12.Controls.Add(cb_granularity); - groupBox12.Location = new System.Drawing.Point(14, 71); - groupBox12.Name = "groupBox12"; - groupBox12.Size = new System.Drawing.Size(146, 62); - groupBox12.TabIndex = 27; - groupBox12.TabStop = false; - groupBox12.Text = "Granularity"; - // - // groupBox13 - // - groupBox13.Controls.Add(dtpStart); - groupBox13.Controls.Add(btnStartDateClear); - groupBox13.Location = new System.Drawing.Point(14, 139); - groupBox13.Name = "groupBox13"; - groupBox13.Size = new System.Drawing.Size(296, 49); - groupBox13.TabIndex = 28; - groupBox13.TabStop = false; - groupBox13.Text = "Start Date"; - // - // groupBox14 - // - groupBox14.Controls.Add(dtpEndDate); - groupBox14.Controls.Add(btnEndDateClear); - groupBox14.Location = new System.Drawing.Point(14, 194); - groupBox14.Name = "groupBox14"; - groupBox14.Size = new System.Drawing.Size(296, 62); - groupBox14.TabIndex = 29; - groupBox14.TabStop = false; - groupBox14.Text = "End Date"; - // - // groupBox15 - // - groupBox15.Controls.Add(tbAbstract); - groupBox15.Location = new System.Drawing.Point(7, 6); - groupBox15.Name = "groupBox15"; - groupBox15.Size = new System.Drawing.Size(863, 155); - groupBox15.TabIndex = 4; - groupBox15.TabStop = false; - groupBox15.Text = "Short Description"; - // - // groupBox16 - // - groupBox16.Controls.Add(tbDescription); - groupBox16.Location = new System.Drawing.Point(7, 167); - groupBox16.Name = "groupBox16"; - groupBox16.Size = new System.Drawing.Size(866, 165); - groupBox16.TabIndex = 5; - groupBox16.TabStop = false; - groupBox16.Text = "Description"; - // - // groupBox17 - // - groupBox17.Controls.Add(cb_resourceType); - groupBox17.Location = new System.Drawing.Point(7, 6); - groupBox17.Name = "groupBox17"; - groupBox17.Size = new System.Drawing.Size(137, 58); - groupBox17.TabIndex = 14; - groupBox17.TabStop = false; - groupBox17.Text = "Resource Type"; - // - // groupBox18 - // - groupBox18.Controls.Add(cb_datasetType); - groupBox18.Location = new System.Drawing.Point(7, 70); - groupBox18.Name = "groupBox18"; - groupBox18.Size = new System.Drawing.Size(365, 85); - groupBox18.TabIndex = 15; - groupBox18.TabStop = false; - groupBox18.Text = "Dataset Type"; - // - // groupBox19 + // dtpReleaseDate // - groupBox19.Controls.Add(cb_datasetSubtype); - groupBox19.Location = new System.Drawing.Point(7, 161); - groupBox19.Name = "groupBox19"; - groupBox19.Size = new System.Drawing.Size(365, 82); - groupBox19.TabIndex = 16; - groupBox19.TabStop = false; - groupBox19.Text = "Dataset Subtype"; + dtpReleaseDate.Location = new System.Drawing.Point(6, 22); + dtpReleaseDate.Name = "dtpReleaseDate"; + dtpReleaseDate.Size = new System.Drawing.Size(200, 23); + dtpReleaseDate.TabIndex = 24; // - // groupBox20 + // btnReleaseDateClear // - groupBox20.Controls.Add(tbDataSource); - groupBox20.Location = new System.Drawing.Point(7, 249); - groupBox20.Name = "groupBox20"; - groupBox20.Size = new System.Drawing.Size(407, 57); - groupBox20.TabIndex = 17; - groupBox20.TabStop = false; - groupBox20.Text = "Data Source"; + btnReleaseDateClear.Location = new System.Drawing.Point(212, 22); + btnReleaseDateClear.Name = "btnReleaseDateClear"; + btnReleaseDateClear.Size = new System.Drawing.Size(75, 23); + btnReleaseDateClear.TabIndex = 25; + btnReleaseDateClear.Text = "Clear"; + btnReleaseDateClear.UseVisualStyleBackColor = true; + btnReleaseDateClear.Click += btnReleaseDateClear_Click; // - // groupBox21 + // groupBox4 // - groupBox21.Controls.Add(tbDataSourceSetting); - groupBox21.Location = new System.Drawing.Point(7, 312); - groupBox21.Name = "groupBox21"; - groupBox21.Size = new System.Drawing.Size(407, 71); - groupBox21.TabIndex = 18; - groupBox21.TabStop = false; - groupBox21.Text = "Data Source Setting"; + groupBox4.Controls.Add(cb_updateFrequency); + groupBox4.Location = new System.Drawing.Point(15, 19); + groupBox4.Name = "groupBox4"; + groupBox4.Size = new System.Drawing.Size(137, 47); + groupBox4.TabIndex = 26; + groupBox4.TabStop = false; + groupBox4.Text = "Update Frequency"; // - // groupBox22 + // cb_updateFrequency // - groupBox22.AutoSize = true; - groupBox22.Controls.Add(ffcKeywords); - groupBox22.Location = new System.Drawing.Point(7, 389); - groupBox22.Name = "groupBox22"; - groupBox22.Size = new System.Drawing.Size(365, 115); - groupBox22.TabIndex = 19; - groupBox22.TabStop = false; - groupBox22.Text = "Keywords"; + cb_updateFrequency.FormattingEnabled = true; + cb_updateFrequency.Location = new System.Drawing.Point(6, 15); + cb_updateFrequency.Name = "cb_updateFrequency"; + cb_updateFrequency.Size = new System.Drawing.Size(121, 23); + cb_updateFrequency.TabIndex = 22; + cb_updateFrequency.Format += FormatCB; // // CatalogueUI // @@ -778,12 +795,44 @@ private void InitializeComponent() splitContainer1.ResumeLayout(false); tabControl1.ResumeLayout(false); tabPage1.ResumeLayout(false); + groupBox16.ResumeLayout(false); + groupBox16.PerformLayout(); + groupBox15.ResumeLayout(false); + groupBox15.PerformLayout(); tabPage2.ResumeLayout(false); tabPage2.PerformLayout(); + tableLayoutPanel2.ResumeLayout(false); + tableLayoutPanel2.PerformLayout(); + groupBox18.ResumeLayout(false); + groupBox18.PerformLayout(); + groupBox22.ResumeLayout(false); + groupBox22.PerformLayout(); + groupBox19.ResumeLayout(false); + groupBox19.PerformLayout(); + groupBox21.ResumeLayout(false); + groupBox21.PerformLayout(); + groupBox20.ResumeLayout(false); + groupBox20.PerformLayout(); + groupBox17.ResumeLayout(false); tabPage3.ResumeLayout(false); + groupBox14.ResumeLayout(false); + groupBox13.ResumeLayout(false); + groupBox12.ResumeLayout(false); + groupBox11.ResumeLayout(false); + groupBox11.PerformLayout(); tabPage4.ResumeLayout(false); + groupBox10.ResumeLayout(false); + groupBox10.PerformLayout(); + groupBox9.ResumeLayout(false); + groupBox9.PerformLayout(); + groupBox8.ResumeLayout(false); + groupBox8.PerformLayout(); + groupBox7.ResumeLayout(false); + groupBox7.PerformLayout(); tabPage5.ResumeLayout(false); tabPage5.PerformLayout(); + groupBox3.ResumeLayout(false); + groupBox3.PerformLayout(); tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel1.PerformLayout(); groupBox2.ResumeLayout(false); @@ -791,37 +840,9 @@ private void InitializeComponent() groupBox1.ResumeLayout(false); groupBox1.PerformLayout(); tabPage6.ResumeLayout(false); - groupBox3.ResumeLayout(false); - groupBox3.PerformLayout(); - groupBox4.ResumeLayout(false); - groupBox5.ResumeLayout(false); groupBox6.ResumeLayout(false); - groupBox7.ResumeLayout(false); - groupBox7.PerformLayout(); - groupBox8.ResumeLayout(false); - groupBox8.PerformLayout(); - groupBox9.ResumeLayout(false); - groupBox9.PerformLayout(); - groupBox10.ResumeLayout(false); - groupBox10.PerformLayout(); - groupBox11.ResumeLayout(false); - groupBox11.PerformLayout(); - groupBox12.ResumeLayout(false); - groupBox13.ResumeLayout(false); - groupBox14.ResumeLayout(false); - groupBox15.ResumeLayout(false); - groupBox15.PerformLayout(); - groupBox16.ResumeLayout(false); - groupBox16.PerformLayout(); - groupBox17.ResumeLayout(false); - groupBox18.ResumeLayout(false); - groupBox19.ResumeLayout(false); - groupBox20.ResumeLayout(false); - groupBox20.PerformLayout(); - groupBox21.ResumeLayout(false); - groupBox21.PerformLayout(); - groupBox22.ResumeLayout(false); - groupBox22.PerformLayout(); + groupBox5.ResumeLayout(false); + groupBox4.ResumeLayout(false); ResumeLayout(false); } @@ -842,8 +863,6 @@ private void InitializeComponent() private TabPage tabPage6; private TextBox tbDescription; private TextBox tbDataSource; - private ComboBox cb_datasetSubtype; - private ComboBox cb_datasetType; private ComboBox cb_resourceType; private TextBox tbDataSourceSetting; private ComboBox cb_granularity; @@ -864,7 +883,6 @@ private void InitializeComponent() private Button btnReleaseDateClear; private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffcKeywords; private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffcPeople; - private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddchipDatasetType; private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay fftControlledVocab; private TableLayoutPanel tableLayoutPanel1; private GroupBox groupBox2; @@ -889,5 +907,8 @@ private void InitializeComponent() private GroupBox groupBox19; private GroupBox groupBox18; private GroupBox groupBox17; + private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDatasetSubtype; + private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDatasetType; + private TableLayoutPanel tableLayoutPanel2; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 60b197d469..5a9c70097f 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -353,15 +353,14 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) item.Visible = false; } cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); - cb_datasetType.DataSource = Enum.GetValues(typeof(Catalogue.DatasetType)); - cb_datasetSubtype.DataSource = Enum.GetValues(typeof(Catalogue.DatasetSubType)); + ddDatasetType.Options= Enum.GetNames(typeof(Catalogue.DatasetType)); + ddDatasetSubtype.Options= Enum.GetNames(typeof(Catalogue.DatasetSubType)); - ddchipDatasetType.Options = Enum.GetNames(typeof(Catalogue.DatasetType)); Bind(ffcKeywords, "Value", "Search_keywords", c => c.Search_keywords); Bind(cb_resourceType, "SelectedItem", "Type", c => c.Type); - Bind(cb_datasetType, "SelectedItem", "DataType", c => c.DataType); - Bind(cb_datasetSubtype, "SelectedItem", "DataSubtype", c => c.DataSubtype); + Bind(ddDatasetType, "Value", "DataType", c => c.DataType); + Bind(ddDatasetSubtype, "Value", "DataSubtype", c => c.DataSubtype); Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs index ffe9d32a22..89bc664b7f 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs @@ -34,16 +34,16 @@ private void InitializeComponent() // // flowLayoutPanel1 // - flowLayoutPanel1.AutoScroll = true; flowLayoutPanel1.AutoSize = true; flowLayoutPanel1.Location = new System.Drawing.Point(0, 29); - flowLayoutPanel1.MaximumSize = new System.Drawing.Size(0, 80); + flowLayoutPanel1.MaximumSize = new System.Drawing.Size(400, 400); flowLayoutPanel1.Name = "flowLayoutPanel1"; flowLayoutPanel1.Size = new System.Drawing.Size(283, 51); flowLayoutPanel1.TabIndex = 1; // // comboBox1 // + comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; comboBox1.FormattingEnabled = true; comboBox1.Location = new System.Drawing.Point(0, 0); comboBox1.Name = "comboBox1"; @@ -55,14 +55,14 @@ private void InitializeComponent() // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - AutoScroll = true; AutoSize = true; Controls.Add(comboBox1); Controls.Add(flowLayoutPanel1); Location = new System.Drawing.Point(0, 40); + MaximumSize = new System.Drawing.Size(400, 300); MinimumSize = new System.Drawing.Size(100, 20); Name = "DropdownOptionsChipDisplay"; - Size = new System.Drawing.Size(286, 83); + Size = new System.Drawing.Size(303, 83); ResumeLayout(false); PerformLayout(); } diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs index ea7784f905..ad8bd325a0 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs @@ -15,7 +15,6 @@ public partial class DropdownOptionsChipDisplay : UserControl private string _value; private string[] _options; - private String[] defaultValueArray = [""]; [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string Value @@ -26,8 +25,11 @@ public string Value _value = value; flowLayoutPanel1.Controls.Clear(); var splitValues = _value.Split(','); - comboBox1.Text = ""; - comboBox1.DataSource = defaultValueArray.Concat(_options.Where(o => !splitValues.Contains(o)).ToList()); + comboBox1.Items.Clear(); + foreach(var option in _options.Where(o => !splitValues.Contains(o)).ToList()) + { + comboBox1.Items.Add(option); + } foreach (var splitValue in splitValues) { if (!string.IsNullOrWhiteSpace(splitValue)) @@ -43,8 +45,11 @@ public String[] Options set { _options = value; - comboBox1.Text = ""; - comboBox1.DataSource = defaultValueArray.Concat(_options); + comboBox1.Items.Clear(); + foreach(var option in _options) + { + comboBox1.Items.Add(option); + } } } @@ -62,13 +67,8 @@ public DropdownOptionsChipDisplay() public void comboBox1_TextChanged(object sender, EventArgs e) { - if (comboBox1.Text != "") - { var value = comboBox1.SelectedItem as string; Value = Value + $",{value}"; - comboBox1.Text = ""; - } - } } } From 46404a7f43b2ce42a0d812aa8ed43b479e4c6767 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 24 Jan 2025 09:37:41 +0000 Subject: [PATCH 13/36] working ui --- Rdmp.Core/Curation/Data/Catalogue.cs | 69 ++++++++++++++++++- .../CreateCatalogue.sql | 15 ++++ .../up/089_UpdateCatalogueMetadata.sql | 32 ++++----- .../MainFormUITabs/CatalogueUI.Designer.cs | 4 +- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 29 ++------ .../DropdownOptionsChipDisplay.Designer.cs | 2 +- .../DropdownOptionsChipDisplay.cs | 10 +-- .../FreeFormTextChipDisplay.cs | 2 +- 8 files changed, 113 insertions(+), 50 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index e502ca77ef..24bf83a64d 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Data.Common; using System.IO; using System.Linq; @@ -755,7 +756,69 @@ public enum DatasetType Politics } - public enum DatasetSubType { } + public enum DatasetSubType { + NotApplicable, + BirthsAndDeaths, + NationalDiseaseRegistryAndAudits, + ResearchDiseaseRegistry, + Alcohol, + DietaryHabits, + PhysicalActivity, + FamilyCircumstance, + Finances, + Occupation, + Religion, + Deprivation, + SocialSupport, + MaritalStatus, + Economics, + Ageing, + Labour, + Housing, + Ethnicity, + CrimeAndJustice, + Education, + Lipidomics, + Genomics, + Metagenomics, + Metabolomics, + Epigenomics, + Transcriptomics, + Proteomics, + Leg, + Abdomen, + Arm, + MentalHealth, + Cardiovascular, + Cancer, + RareDiseases, + MetabolicAndEndocrine, + Neurological, + Reproductve, + MaternityAndNeonatology, + Chest, + Head, + Pathology, + Ultrasound, + XRay, + PET, + MRI, + CT, + CognitiveFunction, + Hearing, + Others, + Vaccines, + Preventative, + Theraputic, + Laboratory, + OtherDiagnosis, + Respiratory, + Immunity, + Musculoskeletal, + Vision, + RenalAndUrogenital, + OralAndGastrointestinal + } public enum UpdateFrequencies @@ -973,13 +1036,15 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) DataSourceSetting = r["DataSourceSetting"].ToString(); StartDate = !string.IsNullOrEmpty(r["StartDate"].ToString()) ? DateTime.Parse(r["StartDate"].ToString()) : null; EndDate = !string.IsNullOrEmpty(r["EndDate"].ToString()) ? DateTime.Parse(r["EndDate"].ToString()) : null; + DatasetReleaseDate = !string.IsNullOrEmpty(r["DatasetReleaseDate"].ToString()) ? DateTime.Parse(r["DatasetReleaseDate"].ToString()) : null; DataController = r["DataController"].ToString(); DataProcessor = r["DataProcessor"].ToString(); Juristiction = r["Juristiction"].ToString(); AssociatedPeople = r["AssociatedPeople"].ToString(); ControlledVocabulary = r["ControlledVocabulary"].ToString(); + DataType = r["DataType"].ToString(); + DataSubtype = r["DataSubtype"].ToString(); Doi = r["Doi"].ToString(); - //UpdateLag = r["UpdateLag"].ToString(); var updateLag = r["UpdateLag"]; if (updateLag == null || updateLag == DBNull.Value) { diff --git a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql index 3d3c8ce877..3fe5b9da02 100644 --- a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql +++ b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql @@ -273,6 +273,21 @@ CREATE TABLE [dbo].[Catalogue]( [LiveLoggingServer_ID] [int] NULL, [TestLoggingServer_ID] [int] NULL, [SoftwareVersion] [nvarchar](50) NOT NULL, + [ShortDescription] [nvarchar](250) NULL, + [DataType] [nvarchar](255) NULL, + [DataSubType] [nvarchar](255) NULL, + [DataSource] [nvarchar](100) NULL, + [DataSourceSetting] [nvarchar](100) NULL, + [DatasetReleaseDate] [datetime] NULL, + [StartDate] [datetime] NULL, + [EndDate] [datetime] NULL, + [UpdateLag] [nvarchar](255) NULL, + [Juristiction] [nvarchar](255) NULL, + [DataController] [nvarchar](255) NULL, + [DataProcessor] [nvarchar](255) NULL, + [ControlledVocabulary] [nvarchar](MAX) NULL, + [AssociatedPeople] [nvarchar](MAX) NULL, + [Doi] [nvarchar](50) NULL CONSTRAINT [PK_Data_Catalogue] PRIMARY KEY CLUSTERED ( [ID] ASC diff --git a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql index 4fa095c21e..e967eb5881 100644 --- a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql +++ b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql @@ -2,23 +2,23 @@ --Description: Add new metadata fields for catalogues if not exists (select 1 from sys.columns where name = 'ControlledVocabulary' and OBJECT_NAME(object_id) = 'Catalogue') BEGIN -ALTER TABLE dbo.[Catalogue] +ALTER TABLE [dbo].[Catalogue] ADD -ShortDescription [nvarchar](250), -DataType [nvarchar](30), -DataSubType [nvarchar](30), -DataSource [nvarchar](100), -DataSourceSetting [nvarchar](100), -DatasetReleaseDate [datetime], -StartDate [datetime], -EndDate [datetime], -UpdateLag [nvarchar](255), -Juristiction [nvarchar](255), -DataController [nvarchar](255), -DataProcessor [nvarchar](255), -ControlledVocabulary [nvarchar](MAX), -AssociatedPeople [nvarchar](MAX), -Doi [nvarchar](50) +[ShortDescription] [nvarchar](250) NULL, +[DataType] [nvarchar](255) NULL, +[DataSubType] [nvarchar](255) NULL, +[DataSource] [nvarchar](100) NULL, +[DataSourceSetting] [nvarchar](100) NULL, +[DatasetReleaseDate] [datetime] NULL, +[StartDate] [datetime] NULL, +[EndDate] [datetime] NULL, +[UpdateLag] [nvarchar](255) NULL, +[Juristiction] [nvarchar](255) NULL, +[DataController] [nvarchar](255) NULL, +[DataProcessor] [nvarchar](255) NULL, +[ControlledVocabulary] [nvarchar](MAX) NULL, +[AssociatedPeople] [nvarchar](MAX) NULL, +[Doi] [nvarchar](50) NULL END GO diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index a849e68dfc..d8908aaa42 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -417,7 +417,7 @@ private void InitializeComponent() groupBox17.Controls.Add(cb_resourceType); groupBox17.Location = new System.Drawing.Point(7, 6); groupBox17.Name = "groupBox17"; - groupBox17.Size = new System.Drawing.Size(137, 58); + groupBox17.Size = new System.Drawing.Size(194, 58); groupBox17.TabIndex = 14; groupBox17.TabStop = false; groupBox17.Text = "Resource Type"; @@ -427,7 +427,7 @@ private void InitializeComponent() cb_resourceType.FormattingEnabled = true; cb_resourceType.Location = new System.Drawing.Point(6, 22); cb_resourceType.Name = "cb_resourceType"; - cb_resourceType.Size = new System.Drawing.Size(121, 23); + cb_resourceType.Size = new System.Drawing.Size(182, 23); cb_resourceType.TabIndex = 0; // // tabPage3 diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 5a9c70097f..e6c087f345 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -308,7 +308,7 @@ private void UpdateStartDate(object sender, EventArgs e) { dtpStart.ValueChanged -= UpdateStartDate; _catalogue.StartDate = dtpStart.Value; - dtpStart.CustomFormat = "yyyy/MM/dd"; + dtpStart.CustomFormat = "dd/MM/yyyy"; Bind(dtpStart, "Value", "StartDate", c => c.StartDate); } @@ -316,7 +316,7 @@ private void UpdateEndDate(object sender, EventArgs e) { dtpEndDate.ValueChanged -= UpdateEndDate; _catalogue.EndDate = dtpEndDate.Value; - dtpEndDate.CustomFormat = "yyyy/MM/dd"; + dtpEndDate.CustomFormat = "dd/MM/yyyy"; Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); } @@ -324,7 +324,7 @@ private void UpdateReleaseDate(object sender, EventArgs e) { dtpReleaseDate.ValueChanged -= UpdateReleaseDate; _catalogue.DatasetReleaseDate = dtpReleaseDate.Value; - dtpReleaseDate.CustomFormat = "yyyy/MM/dd"; + dtpReleaseDate.CustomFormat = "dd/MM/yyyy"; Bind(dtpReleaseDate, "Value", "DatasetReleaseDate", c => c.DatasetReleaseDate); } @@ -379,9 +379,9 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) cb_granularity.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueGranularity)); Bind(cb_granularity, "SelectedItem", "Granularity", c => c.Granularity); dtpStart.Format = DateTimePickerFormat.Custom; - dtpStart.CustomFormat = _catalogue.StartDate != null ? "yyyy/MM/dd" : " "; + dtpStart.CustomFormat = _catalogue.StartDate != null ? "dd/MM/yyyy" : " "; dtpEndDate.Format = DateTimePickerFormat.Custom; - dtpEndDate.CustomFormat = _catalogue.EndDate != null ? "yyyy/MM/dd" : " "; + dtpEndDate.CustomFormat = _catalogue.EndDate != null ? "dd/MM/yyyy" : " "; if (_catalogue.StartDate != null) { Bind(dtpStart, "Value", "StartDate", c => c.StartDate); @@ -443,7 +443,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(cbUpdateLag, "SelectedItem", "UpdateLag", c => c.UpdateLag); Bind(cb_updateFrequency, "SelectedItem", "Update_freq", c => c.Update_freq); dtpReleaseDate.Format = DateTimePickerFormat.Custom; - dtpReleaseDate.CustomFormat = _catalogue.StartDate != null ? "yyyy/MM/dd" : " "; + dtpReleaseDate.CustomFormat = _catalogue.DatasetReleaseDate != null ? "dd/MM/yyyy" : " "; if (_catalogue.DatasetReleaseDate != null) { Bind(dtpReleaseDate, "Value", "DatasetReleaseDate", c => c.DatasetReleaseDate); @@ -461,23 +461,6 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) break; } setTabBindings.Add(selectedIndex); - - //Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); - //Bind(tbDescription, "Text", "Description", c => c.Description); - //Bind(tbKeywords, "Text", "Search_keywords", c => c.Search_keywords); - //Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); - //Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); - //Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); - ////Bind(dtpStart, "Value", "StartDate", c => c.StartDate); - ////Bind(dtpEndDate, "Value", "EndDate", c => c.EndDate); - //Bind(tbAccessContact, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); - //Bind(tbDataController, "Text", "DataController", c => c.DataController); - //Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); - //Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); - //Bind(tbPeople, "Text", "AssociatedPeople", c => c.AssociatedPeople); - //Bind(tbDOI, "Text", "Doi", c => c.Doi); - //Bind(tbInitialReleaseDate, "Text", "DatasetReleaseDate", c => c.DatasetReleaseDate); - //Bind(tbUpdateLag, "Text", "UpdateLag", c => c.UpdateLag); } private void btnStartDateClear_Click(object sender, EventArgs e) diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs index 89bc664b7f..b39930219b 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs @@ -49,7 +49,7 @@ private void InitializeComponent() comboBox1.Name = "comboBox1"; comboBox1.Size = new System.Drawing.Size(283, 23); comboBox1.TabIndex = 2; - comboBox1.TextChanged += comboBox1_TextChanged; + comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged; // // DropdownOptionsChipDisplay // diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs index ad8bd325a0..7034498d5e 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs @@ -26,7 +26,7 @@ public string Value flowLayoutPanel1.Controls.Clear(); var splitValues = _value.Split(','); comboBox1.Items.Clear(); - foreach(var option in _options.Where(o => !splitValues.Contains(o)).ToList()) + foreach (var option in _options.Where(o => !splitValues.Contains(o)).ToList()) { comboBox1.Items.Add(option); } @@ -46,7 +46,7 @@ public String[] Options { _options = value; comboBox1.Items.Clear(); - foreach(var option in _options) + foreach (var option in _options) { comboBox1.Items.Add(option); } @@ -65,10 +65,10 @@ public DropdownOptionsChipDisplay() } - public void comboBox1_TextChanged(object sender, EventArgs e) + public void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { - var value = comboBox1.SelectedItem as string; - Value = Value + $",{value}"; + var value = comboBox1.SelectedItem as string; + Value = Value + $"{(Value.Length>0?",":"")}{value}"; } } } diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs index d707465c0c..d06f854772 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs @@ -48,7 +48,7 @@ private void textBox1_KeyPressed(object sender, KeyPressEventArgs e) { if (!_value.Split(',').Contains(textBox1.Text)) { - Value = Value + $",{textBox1.Text.Trim()}"; + Value = Value + $"{(Value.Length>0?",":"")}{textBox1.Text.Trim()}"; } textBox1.Text = ""; } From b2112d441c165820169b3cffc136a66b51a9ad80 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 24 Jan 2025 10:35:49 +0000 Subject: [PATCH 14/36] update tests --- .../WindowManagement/HomePane/HomeUI.cs | 4 +-- Rdmp.UI.Tests/CatalogueUITests.cs | 16 +++++++--- Rdmp.UI/Collections/CatalogueCollectionUI.cs | 2 -- Rdmp.UI/Collections/DataExportCollectionUI.cs | 3 -- Rdmp.UI/Collections/FavouritesCollectionUI.cs | 1 - .../MainFormUITabs/CatalogueUI.Designer.cs | 31 +++++++++++++++++-- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 5 +-- .../SimpleControls/MultiSelectChips/Chip.cs | 17 ---------- 8 files changed, 41 insertions(+), 38 deletions(-) diff --git a/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs b/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs index 232eeac29b..4f57024a56 100644 --- a/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs +++ b/Application/ResearchDataManagementPlatform/WindowManagement/HomePane/HomeUI.cs @@ -81,8 +81,6 @@ protected override void OnLoad(EventArgs e) public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { - - //todo what does this do? - //BuildCommandLists(); + BuildCommandLists(); } } \ No newline at end of file diff --git a/Rdmp.UI.Tests/CatalogueUITests.cs b/Rdmp.UI.Tests/CatalogueUITests.cs index 0630dcaac1..a6175672c4 100644 --- a/Rdmp.UI.Tests/CatalogueUITests.cs +++ b/Rdmp.UI.Tests/CatalogueUITests.cs @@ -26,7 +26,7 @@ public void Test_CatalogueUI_NormalState() Assert.That(cata.HasLocalChanges().Evaluation, Is.EqualTo(ChangeDescription.NoChanges)); //but when I type text - ui._scintillaDescription.Text = "amagad zombies"; + ui.tbDescription.Text = "amagad zombies"; Assert.Multiple(() => { @@ -42,7 +42,7 @@ public void Test_CatalogueUI_NormalState() Assert.Multiple(() => { //it should set the text editor back to blank - Assert.That(ui._scintillaDescription.Text, Is.EqualTo("")); + Assert.That(ui.tbDescription.Text, Is.EqualTo("")); //and clear my class property Assert.That(cata.Description, Is.EqualTo(null)); }); @@ -51,7 +51,7 @@ public void Test_CatalogueUI_NormalState() saver.Redo(); Assert.Multiple(() => { - Assert.That(ui._scintillaDescription.Text, Is.EqualTo("amagad zombies")); + Assert.That(ui.tbDescription.Text, Is.EqualTo("amagad zombies")); Assert.That(cata.Description, Is.EqualTo("amagad zombies")); }); @@ -59,14 +59,14 @@ public void Test_CatalogueUI_NormalState() saver.Undo(); Assert.Multiple(() => { - Assert.That(ui._scintillaDescription.Text, Is.EqualTo("")); + Assert.That(ui.tbDescription.Text, Is.EqualTo("")); Assert.That(cata.Description, Is.EqualTo(null)); }); saver.Redo(); Assert.Multiple(() => { - Assert.That(ui._scintillaDescription.Text, Is.EqualTo("amagad zombies")); + Assert.That(ui.tbDescription.Text, Is.EqualTo("amagad zombies")); Assert.That(cata.Description, Is.EqualTo("amagad zombies")); }); @@ -113,9 +113,15 @@ public void Test_CatalogueUI_AcronymDuplicates() AssertNoErrors(ExpectedErrorType.Any); + //when I type the Acronym of another Catalogue + ui.tbAcronym.Text = "AB"; + //it tells me that I have to make it unique AssertErrorWasShown(ExpectedErrorType.ErrorProvider, "Must be unique"); + //so I make it unique + ui.tbAcronym.Text = "ABC"; + //and all is good again AssertNoErrors(ExpectedErrorType.Any); } diff --git a/Rdmp.UI/Collections/CatalogueCollectionUI.cs b/Rdmp.UI/Collections/CatalogueCollectionUI.cs index 2bd6ea9d71..7a1c34deb4 100644 --- a/Rdmp.UI/Collections/CatalogueCollectionUI.cs +++ b/Rdmp.UI/Collections/CatalogueCollectionUI.cs @@ -38,8 +38,6 @@ namespace Rdmp.UI.Collections; /// /// Pressing the Del key will prompt you to delete the selected item. /// -/// By default Deprecated, Internal and ColdStorage Catalogues do not appear, you can turn visibility of these on by selecting the relevant tick boxes. -/// /// Finally you can launch 'Checking' for every dataset, this will attempt to verify the extraction SQL you /// have configured for each dataset and to ensure that it runs and that at least 1 row of data is returned. Checking all the datasets can take a while so runs asynchronously. /// diff --git a/Rdmp.UI/Collections/DataExportCollectionUI.cs b/Rdmp.UI/Collections/DataExportCollectionUI.cs index cf82915fc4..425a7bca07 100644 --- a/Rdmp.UI/Collections/DataExportCollectionUI.cs +++ b/Rdmp.UI/Collections/DataExportCollectionUI.cs @@ -126,10 +126,7 @@ public override void SetItemActivator(IActivateItems activator) public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { - if (e.Object.GetType() == typeof(Project)) - { SetupToolStrip(); - } } private void SetupToolStrip() diff --git a/Rdmp.UI/Collections/FavouritesCollectionUI.cs b/Rdmp.UI/Collections/FavouritesCollectionUI.cs index 57a9c1d233..0609422418 100644 --- a/Rdmp.UI/Collections/FavouritesCollectionUI.cs +++ b/Rdmp.UI/Collections/FavouritesCollectionUI.cs @@ -57,7 +57,6 @@ public override void SetItemActivator(IActivateItems activator) public void RefreshBus_RefreshObject(object sender, RefreshObjectEventArgs e) { - //maybe this? RefreshFavourites(); } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index d8908aaa42..d4408732e4 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -41,6 +41,8 @@ private void InitializeComponent() ticketingControl1 = new TicketingControlUI(); tabControl1 = new TabControl(); tabPage1 = new TabPage(); + groupBox23 = new GroupBox(); + tbAcronym = new TextBox(); groupBox16 = new GroupBox(); tbDescription = new TextBox(); groupBox15 = new GroupBox(); @@ -101,6 +103,7 @@ private void InitializeComponent() splitContainer1.SuspendLayout(); tabControl1.SuspendLayout(); tabPage1.SuspendLayout(); + groupBox23.SuspendLayout(); groupBox16.SuspendLayout(); groupBox15.SuspendLayout(); tabPage2.SuspendLayout(); @@ -229,6 +232,7 @@ private void InitializeComponent() // tabPage1 // tabPage1.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage1.Controls.Add(groupBox23); tabPage1.Controls.Add(groupBox16); tabPage1.Controls.Add(groupBox15); tabPage1.Location = new System.Drawing.Point(4, 24); @@ -239,10 +243,27 @@ private void InitializeComponent() tabPage1.Text = "Descriptions"; tabPage1.Click += tabPage1_Click; // + // groupBox23 + // + groupBox23.Controls.Add(tbAcronym); + groupBox23.Location = new System.Drawing.Point(7, 6); + groupBox23.Name = "groupBox23"; + groupBox23.Size = new System.Drawing.Size(231, 56); + groupBox23.TabIndex = 6; + groupBox23.TabStop = false; + groupBox23.Text = "Acronym"; + // + // tbAcronym + // + tbAcronym.Location = new System.Drawing.Point(6, 22); + tbAcronym.Name = "tbAcronym"; + tbAcronym.Size = new System.Drawing.Size(201, 23); + tbAcronym.TabIndex = 0; + // // groupBox16 // groupBox16.Controls.Add(tbDescription); - groupBox16.Location = new System.Drawing.Point(7, 167); + groupBox16.Location = new System.Drawing.Point(7, 225); groupBox16.Name = "groupBox16"; groupBox16.Size = new System.Drawing.Size(866, 165); groupBox16.TabIndex = 5; @@ -261,7 +282,7 @@ private void InitializeComponent() // groupBox15 // groupBox15.Controls.Add(tbAbstract); - groupBox15.Location = new System.Drawing.Point(7, 6); + groupBox15.Location = new System.Drawing.Point(7, 64); groupBox15.Name = "groupBox15"; groupBox15.Size = new System.Drawing.Size(863, 155); groupBox15.TabIndex = 4; @@ -795,6 +816,8 @@ private void InitializeComponent() splitContainer1.ResumeLayout(false); tabControl1.ResumeLayout(false); tabPage1.ResumeLayout(false); + groupBox23.ResumeLayout(false); + groupBox23.PerformLayout(); groupBox16.ResumeLayout(false); groupBox16.PerformLayout(); groupBox15.ResumeLayout(false); @@ -861,7 +884,7 @@ private void InitializeComponent() private TabPage tabPage4; private TabPage tabPage5; private TabPage tabPage6; - private TextBox tbDescription; + public TextBox tbDescription; private TextBox tbDataSource; private ComboBox cb_resourceType; private TextBox tbDataSourceSetting; @@ -910,5 +933,7 @@ private void InitializeComponent() private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDatasetSubtype; private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDatasetType; private TableLayoutPanel tableLayoutPanel2; + private GroupBox groupBox23; + public TextBox tbAcronym; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index e6c087f345..c9563b460f 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -51,10 +51,6 @@ public CatalogueUI() AssociatedCollection = RDMPCollection.Catalogue; - //c_ddType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); - //c_ddPeriodicity.DataSource = Enum.GetValues(typeof(Catalogue.CataloguePeriodicity)); - //c_ddGranularity.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueGranularity)); - UseCommitSystem = true; } @@ -340,6 +336,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { item.Visible = false; } + Bind(tbAcronym, "Text", "Acronym", c => c.Acronym); Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); Bind(tbDescription, "Text", "Description", c => c.Description); foreach (Control item in tabPage1.Controls) diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs index 26a71f08bd..0d755a131e 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs @@ -44,27 +44,10 @@ public int Radius private static extern IntPtr CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse); - private GraphicsPath GetRoundRectagle(Rectangle bounds, int radius) - { - float r = radius; - GraphicsPath path = new GraphicsPath(); - path.StartFigure(); - path.AddArc(bounds.Left, bounds.Top, r, r, 180, 90); - path.AddArc(bounds.Right - r, bounds.Top, r, r, 270, 90); - path.AddArc(bounds.Right - r, bounds.Bottom - r, r, r, 0, 90); - path.AddArc(bounds.Left, bounds.Bottom - r, r, r, 90, 90); - path.CloseFigure(); - return path; - } - private void RecreateRegion() { var bounds = ClientRectangle; - //using (var path = GetRoundRectagle(bounds, this.Radius)) - // this.Region = new Region(path); - - //Better round rectangle this.Region = Region.FromHrgn(CreateRoundRectRgn(bounds.Left, bounds.Top, bounds.Right, bounds.Bottom, Radius, radius)); this.Invalidate(); From 969158db048ad0515e32d495177f325d9e10c609 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 24 Jan 2025 11:28:04 +0000 Subject: [PATCH 15/36] update tests --- CHANGELOG.md | 3 ++- Rdmp.Core/Curation/Data/Catalogue.cs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3dec610b5..115e4ff303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,12 @@ 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). -## [Unreleased] +## [8.4.3] - Unreleased - Build on and target .Net 9 rather than 8 - Simplify DB Patching Interface - Fix issue with Simple File Extractor pipeline component checking +- Update Catalogue metadata options ## [8.4.2] - 2024-12-18 diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 24bf83a64d..d5ae074530 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -823,6 +823,7 @@ public enum DatasetSubType { public enum UpdateFrequencies { + Other, Static, Irregular, Continuous, @@ -835,12 +836,12 @@ public enum UpdateFrequencies Biweekly, Weekly, TwiceWeekly, - Daily, - Other + Daily } public enum UpdateLagTimes { + Other, LessThanAWeek, OneToTwoWeeks, TwoToFourWeeks, @@ -848,8 +849,7 @@ public enum UpdateLagTimes TwoToSixMonths, SixMonthsPlus, Variable, - NotApplicable, - Other + NotApplicable } #endregion From caffc91f0221ca994aee9138c77884c4612f33e3 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 24 Jan 2025 13:27:53 +0000 Subject: [PATCH 16/36] add missing file --- Rdmp.UI/SimpleDialogs/SelectDialog`1.resx | 63 +++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Rdmp.UI/SimpleDialogs/SelectDialog`1.resx diff --git a/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx b/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx new file mode 100644 index 0000000000..9363dcf294 --- /dev/null +++ b/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + From 3cddc635b59747420c15121742454a7a3fee76f7 Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 4 Feb 2025 08:32:37 +0000 Subject: [PATCH 17/36] tidy up --- .../WindowManagement/ActivateItems.cs | 2 +- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 2 +- Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs | 2 +- .../MultiSelectChips/DropdownOptionsChipDisplay.cs | 3 +-- .../MultiSelectChips/FreeFormTextChipDisplay.cs | 10 +++++----- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs b/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs index 9b3609bbe8..11fcb75d81 100644 --- a/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs +++ b/Application/ResearchDataManagementPlatform/WindowManagement/ActivateItems.cs @@ -386,7 +386,7 @@ private T Activate(T2 databaseObject, Image tabImage) uiInstance.SetDatabaseObject(this, databaseObject); - if (insertIndex is not null) + if (insertIndex is not null && _mainDockPanel.ActivePane is not null) { _mainDockPanel.ActivePane.SetContentIndex(floatable, (int)insertIndex); } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index c9563b460f..4211683893 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -298,7 +298,7 @@ private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) } - private List setTabBindings = new(); + private readonly List setTabBindings = new(); private void UpdateStartDate(object sender, EventArgs e) { diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs index 0d755a131e..3e9fe9a7f9 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs @@ -13,7 +13,7 @@ namespace Rdmp.UI.SimpleControls.MultiSelectChips { public partial class Chip : UserControl { - private Func _clear; + private readonly Func _clear; public Chip(string value, Func clear) { InitializeComponent(); diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs index 7034498d5e..0c1637dbcf 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs @@ -30,9 +30,8 @@ public string Value { comboBox1.Items.Add(option); } - foreach (var splitValue in splitValues) + foreach (var splitValue in splitValues.Where(sv => !string.IsNullOrWhiteSpace(sv))) { - if (!string.IsNullOrWhiteSpace(splitValue)) flowLayoutPanel1.Controls.Add(new Chip(splitValue, Remove)); } } diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs index d06f854772..ea5f9330d1 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/FreeFormTextChipDisplay.cs @@ -24,16 +24,16 @@ public string Value _value = value; flowLayoutPanel1.Controls.Clear(); var splitValues = _value.Split(','); - foreach (var splitValue in splitValues) { - if(!string.IsNullOrWhiteSpace(splitValue)) - flowLayoutPanel1.Controls.Add(new Chip(splitValue, Remove)); + foreach (var splitValue in splitValues.Where(sv => !string.IsNullOrWhiteSpace(sv))) + { + flowLayoutPanel1.Controls.Add(new Chip(splitValue, Remove)); } } } private int Remove(string value) { - Value = string.Join(',',Value.Split(",").Where(v => v != value)); + Value = string.Join(',', Value.Split(",").Where(v => v != value)); return 1; } @@ -48,7 +48,7 @@ private void textBox1_KeyPressed(object sender, KeyPressEventArgs e) { if (!_value.Split(',').Contains(textBox1.Text)) { - Value = Value + $"{(Value.Length>0?",":"")}{textBox1.Text.Trim()}"; + Value = Value + $"{(Value.Length > 0 ? "," : "")}{textBox1.Text.Trim()}"; } textBox1.Text = ""; } From 0a13d679ca2bddc5ee553967f64dc86cbf4eb7d8 Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 4 Feb 2025 14:09:53 +0000 Subject: [PATCH 18/36] add scroll --- Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index d4408732e4..112bcc7f60 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -231,6 +231,7 @@ private void InitializeComponent() // // tabPage1 // + tabPage1.AutoScroll = true; tabPage1.BackColor = System.Drawing.Color.WhiteSmoke; tabPage1.Controls.Add(groupBox23); tabPage1.Controls.Add(groupBox16); @@ -300,6 +301,7 @@ private void InitializeComponent() // // tabPage2 // + tabPage2.AutoScroll = true; tabPage2.BackColor = System.Drawing.Color.WhiteSmoke; tabPage2.Controls.Add(tableLayoutPanel2); tabPage2.Controls.Add(groupBox17); @@ -453,6 +455,7 @@ private void InitializeComponent() // // tabPage3 // + tabPage3.AutoScroll = true; tabPage3.BackColor = System.Drawing.Color.WhiteSmoke; tabPage3.Controls.Add(groupBox14); tabPage3.Controls.Add(groupBox13); @@ -557,6 +560,7 @@ private void InitializeComponent() // // tabPage4 // + tabPage4.AutoScroll = true; tabPage4.BackColor = System.Drawing.Color.WhiteSmoke; tabPage4.Controls.Add(groupBox10); tabPage4.Controls.Add(groupBox9); @@ -638,6 +642,7 @@ private void InitializeComponent() // // tabPage5 // + tabPage5.AutoScroll = true; tabPage5.BackColor = System.Drawing.Color.WhiteSmoke; tabPage5.Controls.Add(groupBox3); tabPage5.Controls.Add(tableLayoutPanel1); @@ -725,6 +730,7 @@ private void InitializeComponent() // // tabPage6 // + tabPage6.AutoScroll = true; tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; tabPage6.Controls.Add(groupBox6); tabPage6.Controls.Add(groupBox5); From 5613b6fdc3635c2e9fe21ba917582670e49e61ac Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 4 Feb 2025 15:27:01 +0000 Subject: [PATCH 19/36] fix up scroll bars --- Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs | 10 +++++----- .../SimpleControls/MultiSelectChips/Chip.Designer.cs | 4 +++- .../DropdownOptionsChipDisplay.Designer.cs | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 112bcc7f60..f0132b903b 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -330,7 +330,7 @@ private void InitializeComponent() tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.Size = new System.Drawing.Size(496, 513); + tableLayoutPanel2.Size = new System.Drawing.Size(843, 513); tableLayoutPanel2.TabIndex = 20; // // groupBox18 @@ -339,7 +339,7 @@ private void InitializeComponent() groupBox18.Controls.Add(ddDatasetType); groupBox18.Location = new System.Drawing.Point(3, 3); groupBox18.Name = "groupBox18"; - groupBox18.Size = new System.Drawing.Size(298, 126); + groupBox18.Size = new System.Drawing.Size(412, 126); groupBox18.TabIndex = 15; groupBox18.TabStop = false; groupBox18.Text = "Dataset Type"; @@ -352,7 +352,7 @@ private void InitializeComponent() ddDatasetType.MaximumSize = new System.Drawing.Size(400, 300); ddDatasetType.MinimumSize = new System.Drawing.Size(100, 20); ddDatasetType.Name = "ddDatasetType"; - ddDatasetType.Size = new System.Drawing.Size(286, 83); + ddDatasetType.Size = new System.Drawing.Size(400, 83); ddDatasetType.TabIndex = 0; // // groupBox22 @@ -383,7 +383,7 @@ private void InitializeComponent() groupBox19.Controls.Add(ddDatasetSubtype); groupBox19.Location = new System.Drawing.Point(3, 135); groupBox19.Name = "groupBox19"; - groupBox19.Size = new System.Drawing.Size(298, 126); + groupBox19.Size = new System.Drawing.Size(412, 126); groupBox19.TabIndex = 16; groupBox19.TabStop = false; groupBox19.Text = "Dataset Subtype"; @@ -396,7 +396,7 @@ private void InitializeComponent() ddDatasetSubtype.MaximumSize = new System.Drawing.Size(400, 300); ddDatasetSubtype.MinimumSize = new System.Drawing.Size(100, 20); ddDatasetSubtype.Name = "ddDatasetSubtype"; - ddDatasetSubtype.Size = new System.Drawing.Size(286, 83); + ddDatasetSubtype.Size = new System.Drawing.Size(400, 83); ddDatasetSubtype.TabIndex = 0; // // groupBox21 diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs index ad140d13a2..41db186351 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.Designer.cs @@ -59,12 +59,14 @@ private void InitializeComponent() // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + AutoSize = true; + AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; BackColor = System.Drawing.SystemColors.ControlDark; BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; Controls.Add(btnClear); Controls.Add(lblText); Name = "Chip"; - Size = new System.Drawing.Size(76, 24); + Size = new System.Drawing.Size(69, 25); ResumeLayout(false); PerformLayout(); } diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs index b39930219b..78770d7e39 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs @@ -62,7 +62,7 @@ private void InitializeComponent() MaximumSize = new System.Drawing.Size(400, 300); MinimumSize = new System.Drawing.Size(100, 20); Name = "DropdownOptionsChipDisplay"; - Size = new System.Drawing.Size(303, 83); + Size = new System.Drawing.Size(342, 117); ResumeLayout(false); PerformLayout(); } From 745c5c8a16924d26929debdbe4523e8b33ac7eca Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 5 Feb 2025 08:32:35 +0000 Subject: [PATCH 20/36] downward scroll --- .../MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs index 78770d7e39..cc63d47952 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.Designer.cs @@ -35,6 +35,7 @@ private void InitializeComponent() // flowLayoutPanel1 // flowLayoutPanel1.AutoSize = true; + flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; flowLayoutPanel1.Location = new System.Drawing.Point(0, 29); flowLayoutPanel1.MaximumSize = new System.Drawing.Size(400, 400); flowLayoutPanel1.Name = "flowLayoutPanel1"; From d3ee642d41d8ffa35a9bcdc4a7f46ff1d10e7298 Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 5 Feb 2025 08:34:33 +0000 Subject: [PATCH 21/36] tidy up --- Rdmp.Core/Curation/Data/Catalogue.cs | 2 - Rdmp.UI/SimpleDialogs/SelectDialog`1.resx | 63 ----------------------- 2 files changed, 65 deletions(-) delete mode 100644 Rdmp.UI/SimpleDialogs/SelectDialog`1.resx diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index d5ae074530..2e9b5220d1 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -6,12 +6,10 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Data.Common; using System.IO; using System.Linq; using System.Text; -using Amazon.S3.Model; using FAnsi; using FAnsi.Discovery; using FAnsi.Discovery.QuerySyntax; diff --git a/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx b/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx deleted file mode 100644 index 9363dcf294..0000000000 --- a/Rdmp.UI/SimpleDialogs/SelectDialog`1.resx +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - From b824ae14b122584760568ac1aa9ad084544ed1e8 Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 5 Feb 2025 14:31:02 +0000 Subject: [PATCH 22/36] tidy up --- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 104 -------------------------- 1 file changed, 104 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 4211683893..433fb49e75 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -75,39 +75,6 @@ private void c_ddOverrideChildren_Click(object sender, EventArgs e) } } - //private void tbName_TextChanged(object sender, EventArgs e) - //{ - // if (!Catalogue.IsAcceptableName(tbName.Text, out var reasonInvalid)) - // errorProvider1.SetError(tbName, reasonInvalid); - // else - // errorProvider1.Clear(); - //} - - //private void ddExplicitConsent_SelectedIndexChanged(object sender, EventArgs e) - //{ - // if (ddExplicitConsent.Text.Equals("Yes")) - // _catalogue.Explicit_consent = true; - - // if (ddExplicitConsent.Text.Equals("No")) - // _catalogue.Explicit_consent = false; - - // if (string.IsNullOrWhiteSpace(ddExplicitConsent.Text)) - // _catalogue.Explicit_consent = null; - //} - - //private void tbFolder_TextChanged(object sender, EventArgs e) - //{ - // try - // { - // _catalogue.Folder = tbFolder.Text; - // tbFolder.ForeColor = Color.Black; - // } - // catch (Exception) - // { - // tbFolder.ForeColor = Color.Red; - // } - //} - public override void SetDatabaseObject(IActivateItems activator, Catalogue databaseObject) { if (_scintillaDescription == null) @@ -128,18 +95,6 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab .Select(datasetId => _catalogue.CatalogueRepository.GetAllObjectsWhere("ID", datasetId).First()) .Select(static ds => ds.Name).ToList(); - //if (associatedDatasets.Count > 0) - //{ - // lbDatasets.Visible = true; - // lbDatasetslbl.Visible = true; - // var finalString = associatedDatasets.Count == 1 ? associatedDatasets[0] : string.Join(", ", associatedDatasets.ToArray(), 0, associatedDatasets.Count - 1) + " and " + associatedDatasets.LastOrDefault(); - // lbDatasets.Text = $"This catalogues contains data from the datasets:{finalString}"; - //} - //else - //{ - // lbDatasets.Visible = false; - // lbDatasetslbl.Visible = false; - //} this.editableCatalogueName.TextValue = _catalogue.Name; this.editableCatalogueName.Title = "Name"; this.editableCatalogueName.Icon = CatalogueIcons.Catalogue.ImageToBitmap(); @@ -160,44 +115,6 @@ protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalo Bind(editableFolder, "TextValue", "Folder", c => c.Folder); tabControl1_SelectedIndexChanged(this.tabControl1, null); - //-------------------------------- - //Bind(tbAcronym, "Text", "Acronym", c => c.Acronym); - //Bind(tbName, "Text", "Name", c => c.Name); - //Bind(c_tbID, "Text", "ID", c => c.ID); - //Bind(_scintillaDescription, "Text", "Description", c => c.Description); - - //Bind(c_ddType, "SelectedItem", "Type", c => c.Type); - //Bind(c_ddGranularity, "SelectedItem", "Granularity", c => c.Granularity); - //Bind(c_ddPeriodicity, "SelectedItem", "Periodicity", c => c.Periodicity); - - //Bind(cbColdStorage, "Checked", "IsColdStorageDataset", c => c.IsColdStorageDataset); - //Bind(cbDeprecated, "Checked", "IsDeprecated", c => c.IsDeprecated); - //Bind(cbInternal, "Checked", "IsInternalDataset", c => c.IsInternalDataset); - - //Bind(c_tbGeographicalCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); - //Bind(c_tbBackgroundSummary, "Text", "Background_summary", c => c.Background_summary); - //Bind(c_tbTopics, "Text", "Search_keywords", c => c.Search_keywords); - //Bind(c_tbUpdateFrequency, "Text", "Update_freq", c => c.Update_freq); - //Bind(c_tbUpdateSchedule, "Text", "Update_sched", c => c.Update_sched); - //Bind(c_tbTimeCoverage, "Text", "Time_coverage", c => c.Time_coverage); - //Bind(tbAdministrativeContactName, "Text", "Contact_details", c => c.Contact_details); - //Bind(c_tbResourceOwner, "Text", "Resource_owner", c => c.Resource_owner); - //Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation); - //Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options); - //Bind(c_tbSubjectNumbers, "Text", "SubjectNumbers", c => c.SubjectNumbers); - - //Bind(tbDataStandards, "Text", "Data_standards", c => c.Data_standards); - //Bind(tbAdministrativeContactName, "Text", "Administrative_contact_name", c => c.Administrative_contact_name); - //Bind(tbAdministrativeContactEmail, "Text", "Administrative_contact_email", c => c.Administrative_contact_email); - //Bind(tbAdministrativeContactTelephone, "Text", "Administrative_contact_telephone", - // c => c.Administrative_contact_telephone); - //Bind(tbAdministrativeContactAddress, "Text", "Administrative_contact_address", - // c => c.Administrative_contact_address); - //Bind(tbCountryOfOrigin, "Text", "Country_of_origin", c => c.Country_of_origin); - //Bind(tbEthicsApprover, "Text", "Ethics_approver", c => c.Ethics_approver); - //Bind(tbSourceOfDataCollection, "Text", "Source_of_data_collection", c => c.Source_of_data_collection); - //Bind(c_tbAttributionCitation, "Text", "Attribution_citation", c => c.Attribution_citation); - //Bind(c_tbAccessOptions, "Text", "Access_options", c => c.Access_options); } public override void SetItemActivator(IActivateItems activator) @@ -222,35 +139,15 @@ private void RefreshUIFromDatabase() ticketingControl1.TicketText = _catalogue.Ticket; - //tbFolder.Text = _catalogue.Folder; - - //if (_catalogue.Explicit_consent == null) - // ddExplicitConsent.Text = ""; - //else if (_catalogue.Explicit_consent == true) - // ddExplicitConsent.Text = "Yes"; - //else - // ddExplicitConsent.Text = "No"; - - //c_tbLastRevisionDate.Text = _catalogue.Last_revision_date.ToString(); - //tbDatasetStartDate.Text = _catalogue.DatasetStartDate.ToString(); - - //c_tbAPIAccessURL.Text = _catalogue.API_access_URL != null ? _catalogue.API_access_URL.ToString() : ""; - //c_tbBrowseUrl.Text = _catalogue.Browse_URL != null ? _catalogue.Browse_URL.ToString() : ""; - //c_tbBulkDownloadUrl.Text = _catalogue.Bulk_Download_URL != null ? _catalogue.Bulk_Download_URL.ToString() : ""; - //c_tbQueryToolUrl.Text = _catalogue.Query_tool_URL != null ? _catalogue.Query_tool_URL.ToString() : ""; - //c_tbSourceUrl.Text = _catalogue.Source_URL != null ? _catalogue.Source_URL.ToString() : ""; - //c_tbDetailPageURL.Text = _catalogue.Detail_Page_URL != null ? _catalogue.Detail_Page_URL.ToString() : ""; } private void c_tbLastRevisionDate_TextChanged(object sender, EventArgs e) { - //SetDate(c_tbLastRevisionDate, v => _catalogue.Last_revision_date = v); } private void tbDatasetStartDate_TextChanged(object sender, EventArgs e) { - //SetDate(tbDatasetStartDate, v => _catalogue.DatasetStartDate = v); } private void c_tbDetailPageURL_TextChanged(object sender, EventArgs e) @@ -435,7 +332,6 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) cb_updateFrequency.DataSource = Enum.GetValues(typeof(Catalogue.UpdateFrequencies)); cbUpdateLag.DataSource = Enum.GetValues(typeof(Catalogue.UpdateLagTimes)); - //todo cb not being set correctly Bind(cbUpdateLag, "SelectedItem", "UpdateLag", c => c.UpdateLag); Bind(cb_updateFrequency, "SelectedItem", "Update_freq", c => c.Update_freq); From f975ce62324d272988b17755d48fce6f4d0354b2 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 6 Feb 2025 13:53:49 +0000 Subject: [PATCH 23/36] add purpose of dataset --- Rdmp.Core/Curation/Data/Catalogue.cs | 36 +++++++++++++++++++ .../CreateCatalogue.sql | 3 +- .../up/089_UpdateCatalogueMetadata.sql | 25 ------------- Rdmp.Core/Rdmp.Core.csproj | 2 +- .../MainFormUITabs/CatalogueUI.Designer.cs | 30 ++++++++++++++-- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 12 +++++-- 6 files changed, 77 insertions(+), 31 deletions(-) delete mode 100644 Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 2e9b5220d1..3a5538c83c 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -46,6 +46,7 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private string _description; private Uri _detailPageUrl; private CatalogueType _type; + private DatasetPurpose _purpose; private CataloguePeriodicity _periodicity; private CatalogueGranularity _granularity; private string _geographicalCoverage; @@ -163,6 +164,15 @@ public CatalogueType Type set => SetField(ref _type, value); } + /// + /// User defined classification of the Type of dataset the Catalogue is e.g. Cohort, ResearchStudy etc + /// + public DatasetPurpose Purpose + { + get => _purpose; + set => SetField(ref _purpose, value); + } + /// public CataloguePeriodicity Periodicity { @@ -849,6 +859,20 @@ public enum UpdateLagTimes Variable, NotApplicable } + + public enum DatasetPurpose + { + ResearchCohort, + Study, + DiseaseRegistry, + Trial, + Care, + Audit, + Administrative, + Finantial, + Statutory, + Other + } #endregion /// @@ -930,6 +954,18 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) else throw new Exception($" r[\"Type\"] had value {type} which is not contained in Enum CatalogueType"); } + var purpose = r["Purpose"]; + if (purpose == null || purpose == DBNull.Value) + { + Purpose = DatasetPurpose.Other; + } + else + { + if (Enum.TryParse(purpose.ToString(), true, out DatasetPurpose purposeAsEnum)) + Purpose = purposeAsEnum; + else + throw new Exception($" r[\"Purpose\"] had value {purpose} which is not contained in Enum DatasetPurpose"); + } //Periodicity - with handling for invalid enum values listed in database var periodicity = r["Periodicity"]; diff --git a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql index 3fe5b9da02..a6b16d39ad 100644 --- a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql +++ b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql @@ -287,7 +287,8 @@ CREATE TABLE [dbo].[Catalogue]( [DataProcessor] [nvarchar](255) NULL, [ControlledVocabulary] [nvarchar](MAX) NULL, [AssociatedPeople] [nvarchar](MAX) NULL, - [Doi] [nvarchar](50) NULL + [Doi] [nvarchar](50) NULL, + [Purpose] [nvarchar](255) NULL CONSTRAINT [PK_Data_Catalogue] PRIMARY KEY CLUSTERED ( [ID] ASC diff --git a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql b/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql deleted file mode 100644 index e967eb5881..0000000000 --- a/Rdmp.Core/Databases/CatalogueDatabase/up/089_UpdateCatalogueMetadata.sql +++ /dev/null @@ -1,25 +0,0 @@ ---Version: 8.4.3 ---Description: Add new metadata fields for catalogues -if not exists (select 1 from sys.columns where name = 'ControlledVocabulary' and OBJECT_NAME(object_id) = 'Catalogue') -BEGIN -ALTER TABLE [dbo].[Catalogue] -ADD -[ShortDescription] [nvarchar](250) NULL, -[DataType] [nvarchar](255) NULL, -[DataSubType] [nvarchar](255) NULL, -[DataSource] [nvarchar](100) NULL, -[DataSourceSetting] [nvarchar](100) NULL, -[DatasetReleaseDate] [datetime] NULL, -[StartDate] [datetime] NULL, -[EndDate] [datetime] NULL, -[UpdateLag] [nvarchar](255) NULL, -[Juristiction] [nvarchar](255) NULL, -[DataController] [nvarchar](255) NULL, -[DataProcessor] [nvarchar](255) NULL, -[ControlledVocabulary] [nvarchar](MAX) NULL, -[AssociatedPeople] [nvarchar](MAX) NULL, -[Doi] [nvarchar](50) NULL -END -GO - - diff --git a/Rdmp.Core/Rdmp.Core.csproj b/Rdmp.Core/Rdmp.Core.csproj index 583c294ce6..28cb19fa90 100644 --- a/Rdmp.Core/Rdmp.Core.csproj +++ b/Rdmp.Core/Rdmp.Core.csproj @@ -256,7 +256,7 @@ - + diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index f0132b903b..f9373f9ccd 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -97,6 +97,8 @@ private void InitializeComponent() btnReleaseDateClear = new Button(); groupBox4 = new GroupBox(); cb_updateFrequency = new ComboBox(); + groupBox24 = new GroupBox(); + cbPurpose = new ComboBox(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); @@ -133,6 +135,7 @@ private void InitializeComponent() groupBox6.SuspendLayout(); groupBox5.SuspendLayout(); groupBox4.SuspendLayout(); + groupBox24.SuspendLayout(); SuspendLayout(); // // splitContainer1 @@ -322,15 +325,17 @@ private void InitializeComponent() tableLayoutPanel2.Controls.Add(groupBox19, 0, 1); tableLayoutPanel2.Controls.Add(groupBox21, 0, 3); tableLayoutPanel2.Controls.Add(groupBox20, 0, 2); + tableLayoutPanel2.Controls.Add(groupBox24, 0, 5); tableLayoutPanel2.Location = new System.Drawing.Point(7, 70); tableLayoutPanel2.Name = "tableLayoutPanel2"; - tableLayoutPanel2.RowCount = 5; + tableLayoutPanel2.RowCount = 6; tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); - tableLayoutPanel2.Size = new System.Drawing.Size(843, 513); + tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); + tableLayoutPanel2.Size = new System.Drawing.Size(843, 618); tableLayoutPanel2.TabIndex = 20; // // groupBox18 @@ -807,6 +812,24 @@ private void InitializeComponent() cb_updateFrequency.TabIndex = 22; cb_updateFrequency.Format += FormatCB; // + // groupBox24 + // + groupBox24.Controls.Add(cbPurpose); + groupBox24.Location = new System.Drawing.Point(3, 516); + groupBox24.Name = "groupBox24"; + groupBox24.Size = new System.Drawing.Size(372, 83); + groupBox24.TabIndex = 20; + groupBox24.TabStop = false; + groupBox24.Text = "Purpose of Dataset"; + // + // cbPurpose + // + cbPurpose.FormattingEnabled = true; + cbPurpose.Location = new System.Drawing.Point(6, 22); + cbPurpose.Name = "cbPurpose"; + cbPurpose.Size = new System.Drawing.Size(182, 23); + cbPurpose.TabIndex = 1; + // // CatalogueUI // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -872,6 +895,7 @@ private void InitializeComponent() groupBox6.ResumeLayout(false); groupBox5.ResumeLayout(false); groupBox4.ResumeLayout(false); + groupBox24.ResumeLayout(false); ResumeLayout(false); } @@ -941,5 +965,7 @@ private void InitializeComponent() private TableLayoutPanel tableLayoutPanel2; private GroupBox groupBox23; public TextBox tbAcronym; + private GroupBox groupBox24; + private ComboBox cbPurpose; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 433fb49e75..95d338a536 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -247,12 +247,15 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) item.Visible = false; } cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); - ddDatasetType.Options= Enum.GetNames(typeof(Catalogue.DatasetType)); - ddDatasetSubtype.Options= Enum.GetNames(typeof(Catalogue.DatasetSubType)); + cbPurpose.DataSource = Enum.GetValues(typeof(Catalogue.DatasetPurpose)); + //cbPurpose.Items.AddRange(Enum.GetValues(typeof(Catalogue.DatasetPurpose))); + ddDatasetType.Options = Enum.GetNames(typeof(Catalogue.DatasetType)); + ddDatasetSubtype.Options = Enum.GetNames(typeof(Catalogue.DatasetSubType)); Bind(ffcKeywords, "Value", "Search_keywords", c => c.Search_keywords); Bind(cb_resourceType, "SelectedItem", "Type", c => c.Type); + Bind(cbPurpose, "SelectedItem", "Purpose", c => c.Purpose); Bind(ddDatasetType, "Value", "DataType", c => c.DataType); Bind(ddDatasetSubtype, "Value", "DataSubtype", c => c.DataSubtype); Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); @@ -420,6 +423,11 @@ private void tabPage1_Click(object sender, EventArgs e) { } + + private void freeFormTextChipDisplay1_Load(object sender, EventArgs e) + { + + } } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] From e3f39323d89b3d61aa5db51cc9fb109a6c47c0d4 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 6 Feb 2025 14:45:23 +0000 Subject: [PATCH 24/36] add additional info --- Rdmp.Core/Curation/Data/Catalogue.cs | 5 ++ Rdmp.Core/Curation/Data/ICatalogue.cs | 1 + .../CreateCatalogue.sql | 3 +- .../MainFormUITabs/CatalogueUI.Designer.cs | 85 ++++++++++++++----- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 5 +- 5 files changed, 76 insertions(+), 23 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 3a5538c83c..673524706e 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -102,6 +102,7 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private string _dataProcessor; private string _controlledVocabulary; private string _associatedPeople; + private string _associatedMedia; private string _doi; private Lazy _knownCatalogueItems; @@ -541,6 +542,9 @@ public DateTime? DatasetStartDate public string ControlledVocabulary { get => _controlledVocabulary; set => SetField(ref _controlledVocabulary, value); } /// public string AssociatedPeople { get => _associatedPeople; set => SetField(ref _associatedPeople, value); } + /// + + public string AssociatedMedia { get => _associatedMedia; set => SetField(ref _associatedMedia, value); } public string Doi { get => _doi; set => SetField(ref _doi, value); } @@ -1075,6 +1079,7 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) DataProcessor = r["DataProcessor"].ToString(); Juristiction = r["Juristiction"].ToString(); AssociatedPeople = r["AssociatedPeople"].ToString(); + AssociatedMedia = r["AssociatedMedia"].ToString(); ControlledVocabulary = r["ControlledVocabulary"].ToString(); DataType = r["DataType"].ToString(); DataSubtype = r["DataSubtype"].ToString(); diff --git a/Rdmp.Core/Curation/Data/ICatalogue.cs b/Rdmp.Core/Curation/Data/ICatalogue.cs index 50cd16172b..76aa7004c7 100644 --- a/Rdmp.Core/Curation/Data/ICatalogue.cs +++ b/Rdmp.Core/Curation/Data/ICatalogue.cs @@ -116,6 +116,7 @@ public interface ICatalogue : IHasDependencies, IHasQuerySyntaxHelper, INamed, I string DataProcessor { get; set; } string ControlledVocabulary { get;set; } string AssociatedPeople { get; set; } + string AssociatedMedia{ get; set; } string Doi { get; set; } /// diff --git a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql index a6b16d39ad..f77a6ab953 100644 --- a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql +++ b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql @@ -288,7 +288,8 @@ CREATE TABLE [dbo].[Catalogue]( [ControlledVocabulary] [nvarchar](MAX) NULL, [AssociatedPeople] [nvarchar](MAX) NULL, [Doi] [nvarchar](50) NULL, - [Purpose] [nvarchar](255) NULL + [Purpose] [nvarchar](255) NULL, + [AssociatedMedia] [nvarchar](max) NULL CONSTRAINT [PK_Data_Catalogue] PRIMARY KEY CLUSTERED ( [ID] ASC diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index f9373f9ccd..de3cbb836f 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -59,6 +59,8 @@ private void InitializeComponent() tbDataSourceSetting = new TextBox(); groupBox20 = new GroupBox(); tbDataSource = new TextBox(); + groupBox24 = new GroupBox(); + cbPurpose = new ComboBox(); groupBox17 = new GroupBox(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); @@ -97,8 +99,9 @@ private void InitializeComponent() btnReleaseDateClear = new Button(); groupBox4 = new GroupBox(); cb_updateFrequency = new ComboBox(); - groupBox24 = new GroupBox(); - cbPurpose = new ComboBox(); + tabPage7 = new TabPage(); + groupBox25 = new GroupBox(); + ffAssociatedMedia = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); @@ -115,6 +118,7 @@ private void InitializeComponent() groupBox19.SuspendLayout(); groupBox21.SuspendLayout(); groupBox20.SuspendLayout(); + groupBox24.SuspendLayout(); groupBox17.SuspendLayout(); tabPage3.SuspendLayout(); groupBox14.SuspendLayout(); @@ -135,7 +139,8 @@ private void InitializeComponent() groupBox6.SuspendLayout(); groupBox5.SuspendLayout(); groupBox4.SuspendLayout(); - groupBox24.SuspendLayout(); + tabPage7.SuspendLayout(); + groupBox25.SuspendLayout(); SuspendLayout(); // // splitContainer1 @@ -224,6 +229,7 @@ private void InitializeComponent() tabControl1.Controls.Add(tabPage4); tabControl1.Controls.Add(tabPage5); tabControl1.Controls.Add(tabPage6); + tabControl1.Controls.Add(tabPage7); tabControl1.Dock = DockStyle.Fill; tabControl1.Location = new System.Drawing.Point(0, 0); tabControl1.Name = "tabControl1"; @@ -440,6 +446,24 @@ private void InitializeComponent() tbDataSource.Size = new System.Drawing.Size(366, 23); tbDataSource.TabIndex = 8; // + // groupBox24 + // + groupBox24.Controls.Add(cbPurpose); + groupBox24.Location = new System.Drawing.Point(3, 516); + groupBox24.Name = "groupBox24"; + groupBox24.Size = new System.Drawing.Size(372, 83); + groupBox24.TabIndex = 20; + groupBox24.TabStop = false; + groupBox24.Text = "Purpose of Dataset"; + // + // cbPurpose + // + cbPurpose.FormattingEnabled = true; + cbPurpose.Location = new System.Drawing.Point(6, 22); + cbPurpose.Name = "cbPurpose"; + cbPurpose.Size = new System.Drawing.Size(182, 23); + cbPurpose.TabIndex = 1; + // // groupBox17 // groupBox17.Controls.Add(cb_resourceType); @@ -812,23 +836,36 @@ private void InitializeComponent() cb_updateFrequency.TabIndex = 22; cb_updateFrequency.Format += FormatCB; // - // groupBox24 - // - groupBox24.Controls.Add(cbPurpose); - groupBox24.Location = new System.Drawing.Point(3, 516); - groupBox24.Name = "groupBox24"; - groupBox24.Size = new System.Drawing.Size(372, 83); - groupBox24.TabIndex = 20; - groupBox24.TabStop = false; - groupBox24.Text = "Purpose of Dataset"; - // - // cbPurpose - // - cbPurpose.FormattingEnabled = true; - cbPurpose.Location = new System.Drawing.Point(6, 22); - cbPurpose.Name = "cbPurpose"; - cbPurpose.Size = new System.Drawing.Size(182, 23); - cbPurpose.TabIndex = 1; + // tabPage7 + // + tabPage7.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage7.Controls.Add(groupBox25); + tabPage7.Location = new System.Drawing.Point(4, 24); + tabPage7.Name = "tabPage7"; + tabPage7.Size = new System.Drawing.Size(873, 895); + tabPage7.TabIndex = 6; + tabPage7.Text = "Additional Info"; + // + // groupBox25 + // + groupBox25.Controls.Add(ffAssociatedMedia); + groupBox25.Location = new System.Drawing.Point(7, 12); + groupBox25.Name = "groupBox25"; + groupBox25.Size = new System.Drawing.Size(700, 217); + groupBox25.TabIndex = 0; + groupBox25.TabStop = false; + groupBox25.Text = "Associated Media"; + // + // ffAssociatedMedia + // + ffAssociatedMedia.AutoScroll = true; + ffAssociatedMedia.AutoSize = true; + ffAssociatedMedia.Location = new System.Drawing.Point(6, 22); + ffAssociatedMedia.MaximumSize = new System.Drawing.Size(300, 0); + ffAssociatedMedia.MinimumSize = new System.Drawing.Size(100, 20); + ffAssociatedMedia.Name = "ffAssociatedMedia"; + ffAssociatedMedia.Size = new System.Drawing.Size(300, 189); + ffAssociatedMedia.TabIndex = 0; // // CatalogueUI // @@ -865,6 +902,7 @@ private void InitializeComponent() groupBox21.PerformLayout(); groupBox20.ResumeLayout(false); groupBox20.PerformLayout(); + groupBox24.ResumeLayout(false); groupBox17.ResumeLayout(false); tabPage3.ResumeLayout(false); groupBox14.ResumeLayout(false); @@ -895,7 +933,9 @@ private void InitializeComponent() groupBox6.ResumeLayout(false); groupBox5.ResumeLayout(false); groupBox4.ResumeLayout(false); - groupBox24.ResumeLayout(false); + tabPage7.ResumeLayout(false); + groupBox25.ResumeLayout(false); + groupBox25.PerformLayout(); ResumeLayout(false); } @@ -967,5 +1007,8 @@ private void InitializeComponent() public TextBox tbAcronym; private GroupBox groupBox24; private ComboBox cbPurpose; + private TabPage tabPage7; + private GroupBox groupBox25; + private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffAssociatedMedia; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 95d338a536..dea780f165 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -248,7 +248,6 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) } cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); cbPurpose.DataSource = Enum.GetValues(typeof(Catalogue.DatasetPurpose)); - //cbPurpose.Items.AddRange(Enum.GetValues(typeof(Catalogue.DatasetPurpose))); ddDatasetType.Options = Enum.GetNames(typeof(Catalogue.DatasetType)); ddDatasetSubtype.Options = Enum.GetNames(typeof(Catalogue.DatasetSubType)); @@ -352,6 +351,10 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { item.Visible = true; } + break; + case 6: + Bind(ffAssociatedMedia, "Value", "AssociatedMedia", c => c.AssociatedMedia); + break; default: break; From b7b4a486c22695df4504bf4871c8c2e66ce1aae5 Mon Sep 17 00:00:00 2001 From: James Friel Date: Thu, 6 Feb 2025 14:49:35 +0000 Subject: [PATCH 25/36] add missing file --- .../up/090_UpdateCatalogueMetadata.sql | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Rdmp.Core/Databases/CatalogueDatabase/up/090_UpdateCatalogueMetadata.sql diff --git a/Rdmp.Core/Databases/CatalogueDatabase/up/090_UpdateCatalogueMetadata.sql b/Rdmp.Core/Databases/CatalogueDatabase/up/090_UpdateCatalogueMetadata.sql new file mode 100644 index 0000000000..f1f2a42660 --- /dev/null +++ b/Rdmp.Core/Databases/CatalogueDatabase/up/090_UpdateCatalogueMetadata.sql @@ -0,0 +1,27 @@ +--Version: 8.4.3 +--Description: Add new metadata fields for catalogues +if not exists (select 1 from sys.columns where name = 'ControlledVocabulary' and OBJECT_NAME(object_id) = 'Catalogue') +BEGIN +ALTER TABLE [dbo].[Catalogue] +ADD +[ShortDescription] [nvarchar](250) NULL, +[DataType] [nvarchar](255) NULL, +[DataSubType] [nvarchar](255) NULL, +[DataSource] [nvarchar](100) NULL, +[DataSourceSetting] [nvarchar](100) NULL, +[DatasetReleaseDate] [datetime] NULL, +[StartDate] [datetime] NULL, +[EndDate] [datetime] NULL, +[UpdateLag] [nvarchar](255) NULL, +[Juristiction] [nvarchar](255) NULL, +[DataController] [nvarchar](255) NULL, +[DataProcessor] [nvarchar](255) NULL, +[ControlledVocabulary] [nvarchar](MAX) NULL, +[AssociatedPeople] [nvarchar](MAX) NULL, +[Doi] [nvarchar](50) NULL, +[Purpose] [nvarchar](255) NULL, +[AssociatedMedia] [nvarchar](max) NULL +END +GO + + From 350080289be4038001dc7b9c5b8f3423eb69bdc5 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 7 Feb 2025 07:56:42 +0000 Subject: [PATCH 26/36] attempt to fix test --- Rdmp.Core/Curation/Data/Catalogue.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 673524706e..e92ff60466 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -866,6 +866,7 @@ public enum UpdateLagTimes public enum DatasetPurpose { + Other, ResearchCohort, Study, DiseaseRegistry, @@ -874,8 +875,7 @@ public enum DatasetPurpose Audit, Administrative, Finantial, - Statutory, - Other + Statutory } #endregion From a5dacc2adcc786ca7f00f5d003352bbbfc443953 Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 10 Feb 2025 08:35:50 +0000 Subject: [PATCH 27/36] add tooltips --- .../MainFormUITabs/CatalogueUI.Designer.cs | 268 +++++++++++++++++- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 31 +- .../MainFormUITabs/CatalogueUIHelperText.cs | 37 +++ 3 files changed, 324 insertions(+), 12 deletions(-) create mode 100644 Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index de3cbb836f..4152488be3 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -42,65 +42,90 @@ private void InitializeComponent() tabControl1 = new TabControl(); tabPage1 = new TabPage(); groupBox23 = new GroupBox(); + aiAcronym = new SimpleControls.AdditionalInfomation(); tbAcronym = new TextBox(); groupBox16 = new GroupBox(); + aiDescription = new SimpleControls.AdditionalInfomation(); tbDescription = new TextBox(); groupBox15 = new GroupBox(); + aiShortDescription = new SimpleControls.AdditionalInfomation(); tbAbstract = new TextBox(); tabPage2 = new TabPage(); tableLayoutPanel2 = new TableLayoutPanel(); groupBox18 = new GroupBox(); + aiDatasetType = new SimpleControls.AdditionalInfomation(); ddDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox22 = new GroupBox(); + aiKeywords = new SimpleControls.AdditionalInfomation(); ffcKeywords = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox19 = new GroupBox(); + aiDatasetSubtype = new SimpleControls.AdditionalInfomation(); ddDatasetSubtype = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox21 = new GroupBox(); + aiDataSourceSetting = new SimpleControls.AdditionalInfomation(); tbDataSourceSetting = new TextBox(); groupBox20 = new GroupBox(); + aiDataSource = new SimpleControls.AdditionalInfomation(); tbDataSource = new TextBox(); groupBox24 = new GroupBox(); + aiPurposeOfDataset = new SimpleControls.AdditionalInfomation(); cbPurpose = new ComboBox(); groupBox17 = new GroupBox(); + aiResourceType = new SimpleControls.AdditionalInfomation(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); groupBox14 = new GroupBox(); + aiEndDate = new SimpleControls.AdditionalInfomation(); dtpEndDate = new DateTimePicker(); btnEndDateClear = new Button(); groupBox13 = new GroupBox(); + aiStartDate = new SimpleControls.AdditionalInfomation(); dtpStart = new DateTimePicker(); btnStartDateClear = new Button(); groupBox12 = new GroupBox(); + aiGranularity = new SimpleControls.AdditionalInfomation(); cb_granularity = new ComboBox(); groupBox11 = new GroupBox(); + aiGeographicalCoverage = new SimpleControls.AdditionalInfomation(); tbGeoCoverage = new TextBox(); tabPage4 = new TabPage(); groupBox10 = new GroupBox(); + aiJuristiction = new SimpleControls.AdditionalInfomation(); tbJuristiction = new TextBox(); groupBox9 = new GroupBox(); + aiDataProcessor = new SimpleControls.AdditionalInfomation(); tbDataProcessor = new TextBox(); groupBox8 = new GroupBox(); + aiDataController = new SimpleControls.AdditionalInfomation(); tbDataController = new TextBox(); groupBox7 = new GroupBox(); + aiAccessContact = new SimpleControls.AdditionalInfomation(); tbAccessContact = new TextBox(); tabPage5 = new TabPage(); groupBox3 = new GroupBox(); + aiDOI = new SimpleControls.AdditionalInfomation(); tbDOI = new TextBox(); tableLayoutPanel1 = new TableLayoutPanel(); groupBox2 = new GroupBox(); + aiControlledGroup = new SimpleControls.AdditionalInfomation(); fftControlledVocab = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox1 = new GroupBox(); + aiPeople = new SimpleControls.AdditionalInfomation(); ffcPeople = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); tabPage6 = new TabPage(); + aiUpdateFrequency = new SimpleControls.AdditionalInfomation(); groupBox6 = new GroupBox(); + aiUpdateLag = new SimpleControls.AdditionalInfomation(); cbUpdateLag = new ComboBox(); groupBox5 = new GroupBox(); + aiInitialReleaseDate = new SimpleControls.AdditionalInfomation(); dtpReleaseDate = new DateTimePicker(); btnReleaseDateClear = new Button(); groupBox4 = new GroupBox(); cb_updateFrequency = new ComboBox(); tabPage7 = new TabPage(); groupBox25 = new GroupBox(); + aiAssociatedMedia = new SimpleControls.AdditionalInfomation(); ffAssociatedMedia = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); @@ -255,6 +280,7 @@ private void InitializeComponent() // // groupBox23 // + groupBox23.Controls.Add(aiAcronym); groupBox23.Controls.Add(tbAcronym); groupBox23.Location = new System.Drawing.Point(7, 6); groupBox23.Name = "groupBox23"; @@ -263,6 +289,13 @@ private void InitializeComponent() groupBox23.TabStop = false; groupBox23.Text = "Acronym"; // + // aiAcronym + // + aiAcronym.Location = new System.Drawing.Point(61, 0); + aiAcronym.Name = "aiAcronym"; + aiAcronym.Size = new System.Drawing.Size(20, 20); + aiAcronym.TabIndex = 7; + // // tbAcronym // tbAcronym.Location = new System.Drawing.Point(6, 22); @@ -272,6 +305,7 @@ private void InitializeComponent() // // groupBox16 // + groupBox16.Controls.Add(aiDescription); groupBox16.Controls.Add(tbDescription); groupBox16.Location = new System.Drawing.Point(7, 225); groupBox16.Name = "groupBox16"; @@ -280,6 +314,13 @@ private void InitializeComponent() groupBox16.TabStop = false; groupBox16.Text = "Description"; // + // aiDescription + // + aiDescription.Location = new System.Drawing.Point(72, 0); + aiDescription.Name = "aiDescription"; + aiDescription.Size = new System.Drawing.Size(20, 20); + aiDescription.TabIndex = 8; + // // tbDescription // tbDescription.Location = new System.Drawing.Point(6, 22); @@ -291,6 +332,7 @@ private void InitializeComponent() // // groupBox15 // + groupBox15.Controls.Add(aiShortDescription); groupBox15.Controls.Add(tbAbstract); groupBox15.Location = new System.Drawing.Point(7, 64); groupBox15.Name = "groupBox15"; @@ -299,6 +341,13 @@ private void InitializeComponent() groupBox15.TabStop = false; groupBox15.Text = "Short Description"; // + // aiShortDescription + // + aiShortDescription.Location = new System.Drawing.Point(104, 0); + aiShortDescription.Name = "aiShortDescription"; + aiShortDescription.Size = new System.Drawing.Size(20, 20); + aiShortDescription.TabIndex = 8; + // // tbAbstract // tbAbstract.Location = new System.Drawing.Point(6, 22); @@ -347,6 +396,7 @@ private void InitializeComponent() // groupBox18 // groupBox18.AutoSize = true; + groupBox18.Controls.Add(aiDatasetType); groupBox18.Controls.Add(ddDatasetType); groupBox18.Location = new System.Drawing.Point(3, 3); groupBox18.Name = "groupBox18"; @@ -355,6 +405,13 @@ private void InitializeComponent() groupBox18.TabStop = false; groupBox18.Text = "Dataset Type"; // + // aiDatasetType + // + aiDatasetType.Location = new System.Drawing.Point(84, 0); + aiDatasetType.Name = "aiDatasetType"; + aiDatasetType.Size = new System.Drawing.Size(20, 20); + aiDatasetType.TabIndex = 22; + // // ddDatasetType // ddDatasetType.AutoScroll = true; @@ -369,6 +426,7 @@ private void InitializeComponent() // groupBox22 // groupBox22.AutoSize = true; + groupBox22.Controls.Add(aiKeywords); groupBox22.Controls.Add(ffcKeywords); groupBox22.Location = new System.Drawing.Point(3, 413); groupBox22.Name = "groupBox22"; @@ -377,6 +435,13 @@ private void InitializeComponent() groupBox22.TabStop = false; groupBox22.Text = "Keywords"; // + // aiKeywords + // + aiKeywords.Location = new System.Drawing.Point(65, 0); + aiKeywords.Name = "aiKeywords"; + aiKeywords.Size = new System.Drawing.Size(20, 20); + aiKeywords.TabIndex = 26; + // // ffcKeywords // ffcKeywords.AutoScroll = true; @@ -391,6 +456,7 @@ private void InitializeComponent() // groupBox19 // groupBox19.AutoSize = true; + groupBox19.Controls.Add(aiDatasetSubtype); groupBox19.Controls.Add(ddDatasetSubtype); groupBox19.Location = new System.Drawing.Point(3, 135); groupBox19.Name = "groupBox19"; @@ -399,6 +465,13 @@ private void InitializeComponent() groupBox19.TabStop = false; groupBox19.Text = "Dataset Subtype"; // + // aiDatasetSubtype + // + aiDatasetSubtype.Location = new System.Drawing.Point(95, 0); + aiDatasetSubtype.Name = "aiDatasetSubtype"; + aiDatasetSubtype.Size = new System.Drawing.Size(20, 20); + aiDatasetSubtype.TabIndex = 23; + // // ddDatasetSubtype // ddDatasetSubtype.AutoScroll = true; @@ -413,6 +486,7 @@ private void InitializeComponent() // groupBox21 // groupBox21.AutoSize = true; + groupBox21.Controls.Add(aiDataSourceSetting); groupBox21.Controls.Add(tbDataSourceSetting); groupBox21.Location = new System.Drawing.Point(3, 340); groupBox21.Name = "groupBox21"; @@ -421,6 +495,13 @@ private void InitializeComponent() groupBox21.TabStop = false; groupBox21.Text = "Data Source Setting"; // + // aiDataSourceSetting + // + aiDataSourceSetting.Location = new System.Drawing.Point(114, 0); + aiDataSourceSetting.Name = "aiDataSourceSetting"; + aiDataSourceSetting.Size = new System.Drawing.Size(20, 20); + aiDataSourceSetting.TabIndex = 25; + // // tbDataSourceSetting // tbDataSourceSetting.Location = new System.Drawing.Point(6, 22); @@ -431,6 +512,7 @@ private void InitializeComponent() // groupBox20 // groupBox20.AutoSize = true; + groupBox20.Controls.Add(aiDataSource); groupBox20.Controls.Add(tbDataSource); groupBox20.Location = new System.Drawing.Point(3, 267); groupBox20.Name = "groupBox20"; @@ -439,6 +521,13 @@ private void InitializeComponent() groupBox20.TabStop = false; groupBox20.Text = "Data Source"; // + // aiDataSource + // + aiDataSource.Location = new System.Drawing.Point(75, 0); + aiDataSource.Name = "aiDataSource"; + aiDataSource.Size = new System.Drawing.Size(20, 20); + aiDataSource.TabIndex = 24; + // // tbDataSource // tbDataSource.Location = new System.Drawing.Point(6, 22); @@ -448,6 +537,7 @@ private void InitializeComponent() // // groupBox24 // + groupBox24.Controls.Add(aiPurposeOfDataset); groupBox24.Controls.Add(cbPurpose); groupBox24.Location = new System.Drawing.Point(3, 516); groupBox24.Name = "groupBox24"; @@ -456,6 +546,13 @@ private void InitializeComponent() groupBox24.TabStop = false; groupBox24.Text = "Purpose of Dataset"; // + // aiPurposeOfDataset + // + aiPurposeOfDataset.Location = new System.Drawing.Point(114, 0); + aiPurposeOfDataset.Name = "aiPurposeOfDataset"; + aiPurposeOfDataset.Size = new System.Drawing.Size(20, 20); + aiPurposeOfDataset.TabIndex = 27; + // // cbPurpose // cbPurpose.FormattingEnabled = true; @@ -466,6 +563,7 @@ private void InitializeComponent() // // groupBox17 // + groupBox17.Controls.Add(aiResourceType); groupBox17.Controls.Add(cb_resourceType); groupBox17.Location = new System.Drawing.Point(7, 6); groupBox17.Name = "groupBox17"; @@ -474,6 +572,13 @@ private void InitializeComponent() groupBox17.TabStop = false; groupBox17.Text = "Resource Type"; // + // aiResourceType + // + aiResourceType.Location = new System.Drawing.Point(87, 0); + aiResourceType.Name = "aiResourceType"; + aiResourceType.Size = new System.Drawing.Size(20, 20); + aiResourceType.TabIndex = 21; + // // cb_resourceType // cb_resourceType.FormattingEnabled = true; @@ -498,15 +603,23 @@ private void InitializeComponent() // // groupBox14 // + groupBox14.Controls.Add(aiEndDate); groupBox14.Controls.Add(dtpEndDate); groupBox14.Controls.Add(btnEndDateClear); - groupBox14.Location = new System.Drawing.Point(14, 194); + groupBox14.Location = new System.Drawing.Point(13, 199); groupBox14.Name = "groupBox14"; groupBox14.Size = new System.Drawing.Size(296, 62); groupBox14.TabIndex = 29; groupBox14.TabStop = false; groupBox14.Text = "End Date"; // + // aiEndDate + // + aiEndDate.Location = new System.Drawing.Point(61, 0); + aiEndDate.Name = "aiEndDate"; + aiEndDate.Size = new System.Drawing.Size(20, 20); + aiEndDate.TabIndex = 32; + // // dtpEndDate // dtpEndDate.Location = new System.Drawing.Point(6, 22); @@ -526,25 +639,33 @@ private void InitializeComponent() // // groupBox13 // + groupBox13.Controls.Add(aiStartDate); groupBox13.Controls.Add(dtpStart); groupBox13.Controls.Add(btnStartDateClear); - groupBox13.Location = new System.Drawing.Point(14, 139); + groupBox13.Location = new System.Drawing.Point(13, 139); groupBox13.Name = "groupBox13"; - groupBox13.Size = new System.Drawing.Size(296, 49); + groupBox13.Size = new System.Drawing.Size(296, 54); groupBox13.TabIndex = 28; groupBox13.TabStop = false; groupBox13.Text = "Start Date"; // + // aiStartDate + // + aiStartDate.Location = new System.Drawing.Point(63, 0); + aiStartDate.Name = "aiStartDate"; + aiStartDate.Size = new System.Drawing.Size(20, 20); + aiStartDate.TabIndex = 31; + // // dtpStart // - dtpStart.Location = new System.Drawing.Point(6, 16); + dtpStart.Location = new System.Drawing.Point(6, 20); dtpStart.Name = "dtpStart"; dtpStart.Size = new System.Drawing.Size(200, 23); dtpStart.TabIndex = 20; // // btnStartDateClear // - btnStartDateClear.Location = new System.Drawing.Point(212, 16); + btnStartDateClear.Location = new System.Drawing.Point(212, 20); btnStartDateClear.Name = "btnStartDateClear"; btnStartDateClear.Size = new System.Drawing.Size(75, 23); btnStartDateClear.TabIndex = 24; @@ -554,6 +675,7 @@ private void InitializeComponent() // // groupBox12 // + groupBox12.Controls.Add(aiGranularity); groupBox12.Controls.Add(cb_granularity); groupBox12.Location = new System.Drawing.Point(14, 71); groupBox12.Name = "groupBox12"; @@ -562,6 +684,13 @@ private void InitializeComponent() groupBox12.TabStop = false; groupBox12.Text = "Granularity"; // + // aiGranularity + // + aiGranularity.Location = new System.Drawing.Point(71, 0); + aiGranularity.Name = "aiGranularity"; + aiGranularity.Size = new System.Drawing.Size(20, 20); + aiGranularity.TabIndex = 30; + // // cb_granularity // cb_granularity.FormattingEnabled = true; @@ -572,6 +701,7 @@ private void InitializeComponent() // // groupBox11 // + groupBox11.Controls.Add(aiGeographicalCoverage); groupBox11.Controls.Add(tbGeoCoverage); groupBox11.Location = new System.Drawing.Point(14, 10); groupBox11.Name = "groupBox11"; @@ -580,6 +710,13 @@ private void InitializeComponent() groupBox11.TabStop = false; groupBox11.Text = "Geographical Coverage"; // + // aiGeographicalCoverage + // + aiGeographicalCoverage.Location = new System.Drawing.Point(135, 0); + aiGeographicalCoverage.Name = "aiGeographicalCoverage"; + aiGeographicalCoverage.Size = new System.Drawing.Size(20, 20); + aiGeographicalCoverage.TabIndex = 30; + // // tbGeoCoverage // tbGeoCoverage.Location = new System.Drawing.Point(8, 22); @@ -603,6 +740,7 @@ private void InitializeComponent() // // groupBox10 // + groupBox10.Controls.Add(aiJuristiction); groupBox10.Controls.Add(tbJuristiction); groupBox10.Location = new System.Drawing.Point(15, 210); groupBox10.Name = "groupBox10"; @@ -611,6 +749,13 @@ private void InitializeComponent() groupBox10.TabStop = false; groupBox10.Text = "Juristiction"; // + // aiJuristiction + // + aiJuristiction.Location = new System.Drawing.Point(70, 0); + aiJuristiction.Name = "aiJuristiction"; + aiJuristiction.Size = new System.Drawing.Size(20, 20); + aiJuristiction.TabIndex = 33; + // // tbJuristiction // tbJuristiction.Location = new System.Drawing.Point(6, 22); @@ -620,6 +765,7 @@ private void InitializeComponent() // // groupBox9 // + groupBox9.Controls.Add(aiDataProcessor); groupBox9.Controls.Add(tbDataProcessor); groupBox9.Location = new System.Drawing.Point(15, 138); groupBox9.Name = "groupBox9"; @@ -628,6 +774,13 @@ private void InitializeComponent() groupBox9.TabStop = false; groupBox9.Text = "Data Processor"; // + // aiDataProcessor + // + aiDataProcessor.Location = new System.Drawing.Point(89, 0); + aiDataProcessor.Name = "aiDataProcessor"; + aiDataProcessor.Size = new System.Drawing.Size(20, 20); + aiDataProcessor.TabIndex = 32; + // // tbDataProcessor // tbDataProcessor.Location = new System.Drawing.Point(6, 22); @@ -637,6 +790,7 @@ private void InitializeComponent() // // groupBox8 // + groupBox8.Controls.Add(aiDataController); groupBox8.Controls.Add(tbDataController); groupBox8.Location = new System.Drawing.Point(15, 69); groupBox8.Name = "groupBox8"; @@ -645,6 +799,13 @@ private void InitializeComponent() groupBox8.TabStop = false; groupBox8.Text = "Data Controller"; // + // aiDataController + // + aiDataController.Location = new System.Drawing.Point(91, 0); + aiDataController.Name = "aiDataController"; + aiDataController.Size = new System.Drawing.Size(20, 20); + aiDataController.TabIndex = 31; + // // tbDataController // tbDataController.Location = new System.Drawing.Point(6, 22); @@ -654,6 +815,7 @@ private void InitializeComponent() // // groupBox7 // + groupBox7.Controls.Add(aiAccessContact); groupBox7.Controls.Add(tbAccessContact); groupBox7.Location = new System.Drawing.Point(15, 7); groupBox7.Name = "groupBox7"; @@ -662,6 +824,13 @@ private void InitializeComponent() groupBox7.TabStop = false; groupBox7.Text = "Access Contact"; // + // aiAccessContact + // + aiAccessContact.Location = new System.Drawing.Point(93, -1); + aiAccessContact.Name = "aiAccessContact"; + aiAccessContact.Size = new System.Drawing.Size(20, 20); + aiAccessContact.TabIndex = 34; + // // tbAccessContact // tbAccessContact.Location = new System.Drawing.Point(5, 19); @@ -683,6 +852,7 @@ private void InitializeComponent() // // groupBox3 // + groupBox3.Controls.Add(aiDOI); groupBox3.Controls.Add(tbDOI); groupBox3.Location = new System.Drawing.Point(14, 12); groupBox3.Name = "groupBox3"; @@ -691,6 +861,13 @@ private void InitializeComponent() groupBox3.TabStop = false; groupBox3.Text = "DOI"; // + // aiDOI + // + aiDOI.Location = new System.Drawing.Point(33, 0); + aiDOI.Name = "aiDOI"; + aiDOI.Size = new System.Drawing.Size(20, 20); + aiDOI.TabIndex = 33; + // // tbDOI // tbDOI.Location = new System.Drawing.Point(6, 22); @@ -716,13 +893,21 @@ private void InitializeComponent() // groupBox2 // groupBox2.AutoSize = true; + groupBox2.Controls.Add(aiControlledGroup); groupBox2.Controls.Add(fftControlledVocab); groupBox2.Location = new System.Drawing.Point(3, 3); groupBox2.Name = "groupBox2"; groupBox2.Size = new System.Drawing.Size(312, 70); groupBox2.TabIndex = 25; groupBox2.TabStop = false; - groupBox2.Text = "ControlledGroup"; + groupBox2.Text = "Controlled Vocabulary"; + // + // aiControlledGroup + // + aiControlledGroup.Location = new System.Drawing.Point(131, 0); + aiControlledGroup.Name = "aiControlledGroup"; + aiControlledGroup.Size = new System.Drawing.Size(20, 20); + aiControlledGroup.TabIndex = 32; // // fftControlledVocab // @@ -738,6 +923,7 @@ private void InitializeComponent() // groupBox1 // groupBox1.AutoSize = true; + groupBox1.Controls.Add(aiPeople); groupBox1.Controls.Add(ffcPeople); groupBox1.Location = new System.Drawing.Point(3, 79); groupBox1.Name = "groupBox1"; @@ -746,6 +932,13 @@ private void InitializeComponent() groupBox1.TabStop = false; groupBox1.Text = "People"; // + // aiPeople + // + aiPeople.Location = new System.Drawing.Point(52, 0); + aiPeople.Name = "aiPeople"; + aiPeople.Size = new System.Drawing.Size(20, 20); + aiPeople.TabIndex = 31; + // // ffcPeople // ffcPeople.AutoScroll = true; @@ -761,6 +954,7 @@ private void InitializeComponent() // tabPage6.AutoScroll = true; tabPage6.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage6.Controls.Add(aiUpdateFrequency); tabPage6.Controls.Add(groupBox6); tabPage6.Controls.Add(groupBox5); tabPage6.Controls.Add(groupBox4); @@ -770,8 +964,16 @@ private void InitializeComponent() tabPage6.TabIndex = 5; tabPage6.Text = "Data Updates"; // + // aiUpdateFrequency + // + aiUpdateFrequency.Location = new System.Drawing.Point(122, 13); + aiUpdateFrequency.Name = "aiUpdateFrequency"; + aiUpdateFrequency.Size = new System.Drawing.Size(20, 20); + aiUpdateFrequency.TabIndex = 33; + // // groupBox6 // + groupBox6.Controls.Add(aiUpdateLag); groupBox6.Controls.Add(cbUpdateLag); groupBox6.Location = new System.Drawing.Point(15, 131); groupBox6.Name = "groupBox6"; @@ -780,6 +982,13 @@ private void InitializeComponent() groupBox6.TabStop = false; groupBox6.Text = "Update Lag"; // + // aiUpdateLag + // + aiUpdateLag.Location = new System.Drawing.Point(74, 0); + aiUpdateLag.Name = "aiUpdateLag"; + aiUpdateLag.Size = new System.Drawing.Size(20, 20); + aiUpdateLag.TabIndex = 35; + // // cbUpdateLag // cbUpdateLag.FormattingEnabled = true; @@ -791,6 +1000,7 @@ private void InitializeComponent() // // groupBox5 // + groupBox5.Controls.Add(aiInitialReleaseDate); groupBox5.Controls.Add(dtpReleaseDate); groupBox5.Controls.Add(btnReleaseDateClear); groupBox5.Location = new System.Drawing.Point(15, 72); @@ -800,6 +1010,13 @@ private void InitializeComponent() groupBox5.TabStop = false; groupBox5.Text = "Initial Release Date"; // + // aiInitialReleaseDate + // + aiInitialReleaseDate.Location = new System.Drawing.Point(109, 0); + aiInitialReleaseDate.Name = "aiInitialReleaseDate"; + aiInitialReleaseDate.Size = new System.Drawing.Size(20, 20); + aiInitialReleaseDate.TabIndex = 34; + // // dtpReleaseDate // dtpReleaseDate.Location = new System.Drawing.Point(6, 22); @@ -820,9 +1037,9 @@ private void InitializeComponent() // groupBox4 // groupBox4.Controls.Add(cb_updateFrequency); - groupBox4.Location = new System.Drawing.Point(15, 19); + groupBox4.Location = new System.Drawing.Point(15, 13); groupBox4.Name = "groupBox4"; - groupBox4.Size = new System.Drawing.Size(137, 47); + groupBox4.Size = new System.Drawing.Size(137, 53); groupBox4.TabIndex = 26; groupBox4.TabStop = false; groupBox4.Text = "Update Frequency"; @@ -830,7 +1047,7 @@ private void InitializeComponent() // cb_updateFrequency // cb_updateFrequency.FormattingEnabled = true; - cb_updateFrequency.Location = new System.Drawing.Point(6, 15); + cb_updateFrequency.Location = new System.Drawing.Point(6, 21); cb_updateFrequency.Name = "cb_updateFrequency"; cb_updateFrequency.Size = new System.Drawing.Size(121, 23); cb_updateFrequency.TabIndex = 22; @@ -848,6 +1065,7 @@ private void InitializeComponent() // // groupBox25 // + groupBox25.Controls.Add(aiAssociatedMedia); groupBox25.Controls.Add(ffAssociatedMedia); groupBox25.Location = new System.Drawing.Point(7, 12); groupBox25.Name = "groupBox25"; @@ -856,6 +1074,13 @@ private void InitializeComponent() groupBox25.TabStop = false; groupBox25.Text = "Associated Media"; // + // aiAssociatedMedia + // + aiAssociatedMedia.Location = new System.Drawing.Point(105, -1); + aiAssociatedMedia.Name = "aiAssociatedMedia"; + aiAssociatedMedia.Size = new System.Drawing.Size(20, 20); + aiAssociatedMedia.TabIndex = 36; + // // ffAssociatedMedia // ffAssociatedMedia.AutoScroll = true; @@ -1010,5 +1235,30 @@ private void InitializeComponent() private TabPage tabPage7; private GroupBox groupBox25; private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffAssociatedMedia; + private SimpleControls.AdditionalInfomation aiAcronym; + private SimpleControls.AdditionalInfomation aiShortDescription; + private SimpleControls.AdditionalInfomation aiDescription; + private SimpleControls.AdditionalInfomation aiDatasetType; + private SimpleControls.AdditionalInfomation aiKeywords; + private SimpleControls.AdditionalInfomation aiDatasetSubtype; + private SimpleControls.AdditionalInfomation aiDataSourceSetting; + private SimpleControls.AdditionalInfomation aiDataSource; + private SimpleControls.AdditionalInfomation aiPurposeOfDataset; + private SimpleControls.AdditionalInfomation aiResourceType; + private SimpleControls.AdditionalInfomation aiEndDate; + private SimpleControls.AdditionalInfomation aiStartDate; + private SimpleControls.AdditionalInfomation aiGranularity; + private SimpleControls.AdditionalInfomation aiGeographicalCoverage; + private SimpleControls.AdditionalInfomation aiJuristiction; + private SimpleControls.AdditionalInfomation aiDataProcessor; + private SimpleControls.AdditionalInfomation aiDataController; + private SimpleControls.AdditionalInfomation aiAccessContact; + private SimpleControls.AdditionalInfomation aiControlledGroup; + private SimpleControls.AdditionalInfomation aiPeople; + private SimpleControls.AdditionalInfomation aiDOI; + private SimpleControls.AdditionalInfomation aiUpdateFrequency; + private SimpleControls.AdditionalInfomation aiUpdateLag; + private SimpleControls.AdditionalInfomation aiInitialReleaseDate; + private SimpleControls.AdditionalInfomation aiAssociatedMedia; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index dea780f165..42950d9441 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -236,6 +236,9 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(tbAcronym, "Text", "Acronym", c => c.Acronym); Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); Bind(tbDescription, "Text", "Description", c => c.Description); + this.aiAcronym.TooltipText = CatalogueUIHelperText.Acronym; + this.aiShortDescription.TooltipText = CatalogueUIHelperText.ShortDescription; + this.aiDescription.TooltipText = CatalogueUIHelperText.Description; foreach (Control item in tabPage1.Controls) { item.Visible = true; @@ -259,8 +262,13 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(ddDatasetSubtype, "Value", "DataSubtype", c => c.DataSubtype); Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); - - + this.aiKeywords.TooltipText = CatalogueUIHelperText.Keywords; + this.aiResourceType.TooltipText = CatalogueUIHelperText.ResourceType; + this.aiPurposeOfDataset.TooltipText = CatalogueUIHelperText.PurposeOfDataset; + this.aiDatasetType.TooltipText = CatalogueUIHelperText.DatasetType; + this.aiDatasetSubtype.TooltipText = CatalogueUIHelperText.DatasetSubtype; + this.aiDataSource.TooltipText = CatalogueUIHelperText.DataSource; + this.aiDataSourceSetting.TooltipText = CatalogueUIHelperText.DataSourceSetting; foreach (Control item in tabPage2.Controls) { item.Visible = true; @@ -294,6 +302,11 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { dtpEndDate.ValueChanged += UpdateEndDate; } + this.aiGeographicalCoverage.TooltipText = CatalogueUIHelperText.GeographicalCoverage; + this.aiGranularity.TooltipText = CatalogueUIHelperText.Granularity; + this.aiStartDate.TooltipText = CatalogueUIHelperText.StartDate; + this.aiEndDate.TooltipText = CatalogueUIHelperText.EndDate; + foreach (Control item in tabPage3.Controls) { item.Visible = true; @@ -308,6 +321,11 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(tbDataController, "Text", "DataController", c => c.DataController); Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); + this.aiAccessContact.TooltipText = CatalogueUIHelperText.AccessContact; + this.aiDataController.TooltipText = CatalogueUIHelperText.DataController; + this.aiDataProcessor.TooltipText = CatalogueUIHelperText.DataProcessor; + this.aiJuristiction.TooltipText = CatalogueUIHelperText.Juristiction; + foreach (Control item in tabPage4.Controls) { item.Visible = true; @@ -321,6 +339,10 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(ffcPeople, "Value", "AssociatedPeople", c => c.AssociatedPeople); Bind(fftControlledVocab, "Value", "ControlledVocabulary", c => c.ControlledVocabulary); Bind(tbDOI, "Text", "Doi", c => c.Doi); + this.aiPeople.TooltipText = CatalogueUIHelperText.People; + this.aiControlledGroup.TooltipText = CatalogueUIHelperText.ControlledVocabulary; + this.aiDOI.TooltipText = CatalogueUIHelperText.DOI; + foreach (Control item in tabPage5.Controls) { item.Visible = true; @@ -347,6 +369,9 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { dtpReleaseDate.ValueChanged += UpdateReleaseDate; } + this.aiUpdateLag.TooltipText = CatalogueUIHelperText.UpdateLag; + this.aiUpdateFrequency.TooltipText = CatalogueUIHelperText.UpdateFrequency; + this.aiInitialReleaseDate.TooltipText = CatalogueUIHelperText.InitialReleaseDate; foreach (Control item in tabPage6.Controls) { item.Visible = true; @@ -354,7 +379,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) break; case 6: Bind(ffAssociatedMedia, "Value", "AssociatedMedia", c => c.AssociatedMedia); - + this.aiAssociatedMedia.TooltipText = CatalogueUIHelperText.AssociatedMedia; break; default: break; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs new file mode 100644 index 0000000000..37be8cd18e --- /dev/null +++ b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Rdmp.UI.MainFormUITabs +{ + public static class CatalogueUIHelperText + { + public static readonly string Acronym = "TODO"; + public static readonly string ShortDescription = "TODO"; + public static readonly string Description = "TODO"; + public static readonly string ResourceType = "TODO"; + public static readonly string DatasetType = "TODO"; + public static readonly string DatasetSubtype = "TODO"; + public static readonly string DataSource = "TODO"; + public static readonly string DataSourceSetting = "TODO"; + public static readonly string Keywords = "TODO"; + public static readonly string PurposeOfDataset = "TODO"; + public static readonly string GeographicalCoverage = "TODO"; + public static readonly string Granularity = "TODO"; + public static readonly string StartDate = "TODO"; + public static readonly string EndDate = "TODO"; + public static readonly string AccessContact = "TODO"; + public static readonly string DataController = "TODO"; + public static readonly string DataProcessor = "TODO"; + public static readonly string Juristiction = "TODO"; + public static readonly string DOI = "TODO"; + public static readonly string ControlledVocabulary = "TODO"; + public static readonly string People = "TODO"; + public static readonly string UpdateFrequency = "TODO"; + public static readonly string InitialReleaseDate = "TODO"; + public static readonly string UpdateLag = "TODO"; + public static readonly string AssociatedMedia = "TODO"; + } +} From 5ce7abd9536fe0bcf73d2c984c1f00f5e888c858 Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 10 Feb 2025 08:49:29 +0000 Subject: [PATCH 28/36] add missing file --- .../AdditionalInfomation.Designer.cs | 65 ++++++ .../SimpleControls/AdditionalInfomation.cs | 34 +++ .../SimpleControls/AdditionalInfomation.resx | 208 ++++++++++++++++++ 3 files changed, 307 insertions(+) create mode 100644 Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs create mode 100644 Rdmp.UI/SimpleControls/AdditionalInfomation.cs create mode 100644 Rdmp.UI/SimpleControls/AdditionalInfomation.resx diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs b/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs new file mode 100644 index 0000000000..41248233b8 --- /dev/null +++ b/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs @@ -0,0 +1,65 @@ +namespace Rdmp.UI.SimpleControls +{ + partial class AdditionalInfomation + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdditionalInfomation)); + pictureBox1 = new System.Windows.Forms.PictureBox(); + toolTip1 = new System.Windows.Forms.ToolTip(components); + ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); + SuspendLayout(); + // + // pictureBox1 + // + pictureBox1.ErrorImage = (System.Drawing.Image)resources.GetObject("pictureBox1.ErrorImage"); + pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image"); + pictureBox1.InitialImage = (System.Drawing.Image)resources.GetObject("pictureBox1.InitialImage"); + pictureBox1.Location = new System.Drawing.Point(0, 0); + pictureBox1.Name = "pictureBox1"; + pictureBox1.Size = new System.Drawing.Size(20, 20); + pictureBox1.TabIndex = 0; + pictureBox1.TabStop = false; + // + // AdditionalInfomation + // + AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + Controls.Add(pictureBox1); + Name = "AdditionalInfomation"; + Size = new System.Drawing.Size(20, 20); + ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.ToolTip toolTip1; + } +} diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.cs b/Rdmp.UI/SimpleControls/AdditionalInfomation.cs new file mode 100644 index 0000000000..07970967d9 --- /dev/null +++ b/Rdmp.UI/SimpleControls/AdditionalInfomation.cs @@ -0,0 +1,34 @@ +using MongoDB.Driver; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Rdmp.UI.SimpleControls +{ + public partial class AdditionalInfomation : UserControl + { + private string _text = null; + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public string TooltipText + { + get => _text; + set { + _text = value; + this.toolTip1.SetToolTip(this.pictureBox1, this._text); + + } + } + + public AdditionalInfomation() + { + InitializeComponent(); + } + } +} diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.resx b/Rdmp.UI/SimpleControls/AdditionalInfomation.resx new file mode 100644 index 0000000000..98ef597e7a --- /dev/null +++ b/Rdmp.UI/SimpleControls/AdditionalInfomation.resx @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAABGdBTUEAAK/INwWK6QAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH4QURDyAuc4ezXQAAABl0RVh0 + U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAATWSURBVDhPbZPpU1NnGMVvJpN8hf8A/oEuwXtD + pyNiF8ctQC7SuKSudFAMoJCiUEEUhJCEsCWEhLAlpbIUlSUGvIR9kyUXA2EJKLZadWo70zhTx6YdPH2t + 2OnimTkfn9+c8zzvS/1T8ZYVap/VT8mrlwUxZp9QZpwX7SydE3+inxV/pJ8Wb9dPibbrJ4XbiicEW4vG + qCjN+ObkW5RQs0rtt62JWMty+N4qn3JPxbz10xLeuV03w0Vpp51RutvWbbpJJXF4tHZSRLw5+R+x1mUq + odYfutvok+2p9DqO1Xr5nHZ/oLBjbaOoYw0F1/0b55sXA4rKST4yb8Ahye2XSa8MhjL5A5uETcVaFinW + thyyo8yrYE3zXIpjMVjiXEVD/3dodN9HPbeOOmJL713kty3gqHkqGH2B495VdSoiM7pCmPSu16AY0wLF + Vi0Kd1Z4ZXKjl1PZF1HrXkfL6ANU99xDaecq9Df80F5fhqFjhUDvwXhzBUdKRhCt7uYkJ9tlkSdbhMyp + NooilQR7jN6wXaUeu6pxIWjrW0fT8PfIa1tCVpMXDQP30cM/ISnXkWmfQ/Y3XlS7/KhwLuGIbiDIJLXZ + 6WNXw5gTzQJqZwUv3FHOKw9bPLyu04+moQfIbfYhy+6Fun4OY0tP8fy3PzC69CPO1s0go34GWQ4PqbyK + HMc0YnO6+IiDDiX9eZOQ+rh0RhRtmLFmtSwFbLfWUU5qZTbeISAe6bWzqOXW4Jr9ATW3/FBZJ5BSM4FU + 4oLWOyhzLiKtcigQkVBnZfY3iKio4knxh0UTrnyyl7q+e8gh1TLqPUizTSHFOglu7hGe/PKCVH2IU+ZR + JJtHkFw1irO2cZhcS8ixjkLCml10gkVMfXB5REznDbsLyIJt3F1kNHiQartNUoyTwTEMLzzGy5fAzOpT + JFUO/e2TlYMwOn3IqyGw2Ao3zRrFFHNxQCzJ6XddbPORKndxzs5DZRnHaQJKMo7g2tg6fnr2AmO+xziu + d+MLgxuJxMkVAyjvnsdXliFIYspctLyCwHLdoogLfdZ0uydgIicvJO9IVT2B06SK2jYBzvMQz57/Dn7t + KdTmYSTqenFc24NzJJHm21moDD2BiNhSK8OWiygmq1e45Xyvki1283nNPCzk7GcsZNGmUdi5Faw9Cvx1 + zUc//4qOsTUkal04rrkJbcsMvqwaxN60Jn5LnEHJsGVCilF3CWh1d5g0pd1+WD8QLOvywdjpg8o0hFTT + INSWYWSSKmqTG6cNPThW1I1LjRPIb53GgQstQYbV2+k4fRgj1wsoJq2disy8IZQktsiiklo5ZZ4L+g4v + yogzbaM4oe/BoYIuHC3sxhmjG5qrt3G5ZQr7s79B1KFSTiIrkklZjZCRa15/KfKCKfKSQ95h6xRbj37N + HbzYFTz/aiftPEpuEF/zQNc+i4LmKaSThIrsq8GoQwbuvV2XFJHxJSGMXPsa9Ea0ooGSHnCEvs9aZbTC + 6pBltPKqUi6QXd2/kWtxI9vct5GsdwZ2pzbytFzjkOy9IpPG60P/B3ojJqGakn5mEdHxVeER8kqlJK7c + KonROUmVV3WcETEa65ZYjZKJKwyPZPNFUvmVzcm36BWMSbAQmwX0PpOQjq8U0axBTMdpiYvFJIWIWCiV + Fwmk8gLq3zCK+hO7uP48aP6ypwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAABGdBTUEAAK/INwWK6QAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH4QURDyAuc4ezXQAAABl0RVh0 + U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAATWSURBVDhPbZPpU1NnGMVvJpN8hf8A/oEuwXtD + pyNiF8ctQC7SuKSudFAMoJCiUEEUhJCEsCWEhLAlpbIUlSUGvIR9kyUXA2EJKLZadWo70zhTx6YdPH2t + 2OnimTkfn9+c8zzvS/1T8ZYVap/VT8mrlwUxZp9QZpwX7SydE3+inxV/pJ8Wb9dPibbrJ4XbiicEW4vG + qCjN+ObkW5RQs0rtt62JWMty+N4qn3JPxbz10xLeuV03w0Vpp51RutvWbbpJJXF4tHZSRLw5+R+x1mUq + odYfutvok+2p9DqO1Xr5nHZ/oLBjbaOoYw0F1/0b55sXA4rKST4yb8Ahye2XSa8MhjL5A5uETcVaFinW + thyyo8yrYE3zXIpjMVjiXEVD/3dodN9HPbeOOmJL713kty3gqHkqGH2B495VdSoiM7pCmPSu16AY0wLF + Vi0Kd1Z4ZXKjl1PZF1HrXkfL6ANU99xDaecq9Df80F5fhqFjhUDvwXhzBUdKRhCt7uYkJ9tlkSdbhMyp + NooilQR7jN6wXaUeu6pxIWjrW0fT8PfIa1tCVpMXDQP30cM/ISnXkWmfQ/Y3XlS7/KhwLuGIbiDIJLXZ + 6WNXw5gTzQJqZwUv3FHOKw9bPLyu04+moQfIbfYhy+6Fun4OY0tP8fy3PzC69CPO1s0go34GWQ4PqbyK + HMc0YnO6+IiDDiX9eZOQ+rh0RhRtmLFmtSwFbLfWUU5qZTbeISAe6bWzqOXW4Jr9ATW3/FBZJ5BSM4FU + 4oLWOyhzLiKtcigQkVBnZfY3iKio4knxh0UTrnyyl7q+e8gh1TLqPUizTSHFOglu7hGe/PKCVH2IU+ZR + JJtHkFw1irO2cZhcS8ixjkLCml10gkVMfXB5REznDbsLyIJt3F1kNHiQartNUoyTwTEMLzzGy5fAzOpT + JFUO/e2TlYMwOn3IqyGw2Ao3zRrFFHNxQCzJ6XddbPORKndxzs5DZRnHaQJKMo7g2tg6fnr2AmO+xziu + d+MLgxuJxMkVAyjvnsdXliFIYspctLyCwHLdoogLfdZ0uydgIicvJO9IVT2B06SK2jYBzvMQz57/Dn7t + KdTmYSTqenFc24NzJJHm21moDD2BiNhSK8OWiygmq1e45Xyvki1283nNPCzk7GcsZNGmUdi5Faw9Cvx1 + zUc//4qOsTUkal04rrkJbcsMvqwaxN60Jn5LnEHJsGVCilF3CWh1d5g0pd1+WD8QLOvywdjpg8o0hFTT + INSWYWSSKmqTG6cNPThW1I1LjRPIb53GgQstQYbV2+k4fRgj1wsoJq2disy8IZQktsiiklo5ZZ4L+g4v + yogzbaM4oe/BoYIuHC3sxhmjG5qrt3G5ZQr7s79B1KFSTiIrkklZjZCRa15/KfKCKfKSQ95h6xRbj37N + HbzYFTz/aiftPEpuEF/zQNc+i4LmKaSThIrsq8GoQwbuvV2XFJHxJSGMXPsa9Ea0ooGSHnCEvs9aZbTC + 6pBltPKqUi6QXd2/kWtxI9vct5GsdwZ2pzbytFzjkOy9IpPG60P/B3ojJqGakn5mEdHxVeER8kqlJK7c + KonROUmVV3WcETEa65ZYjZKJKwyPZPNFUvmVzcm36BWMSbAQmwX0PpOQjq8U0axBTMdpiYvFJIWIWCiV + Fwmk8gLq3zCK+hO7uP48aP6ypwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAABGdBTUEAAK/INwWK6QAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAB3RJTUUH4QURDyAuc4ezXQAAABl0RVh0 + U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAATWSURBVDhPbZPpU1NnGMVvJpN8hf8A/oEuwXtD + pyNiF8ctQC7SuKSudFAMoJCiUEEUhJCEsCWEhLAlpbIUlSUGvIR9kyUXA2EJKLZadWo70zhTx6YdPH2t + 2OnimTkfn9+c8zzvS/1T8ZYVap/VT8mrlwUxZp9QZpwX7SydE3+inxV/pJ8Wb9dPibbrJ4XbiicEW4vG + qCjN+ObkW5RQs0rtt62JWMty+N4qn3JPxbz10xLeuV03w0Vpp51RutvWbbpJJXF4tHZSRLw5+R+x1mUq + odYfutvok+2p9DqO1Xr5nHZ/oLBjbaOoYw0F1/0b55sXA4rKST4yb8Ahye2XSa8MhjL5A5uETcVaFinW + thyyo8yrYE3zXIpjMVjiXEVD/3dodN9HPbeOOmJL713kty3gqHkqGH2B495VdSoiM7pCmPSu16AY0wLF + Vi0Kd1Z4ZXKjl1PZF1HrXkfL6ANU99xDaecq9Df80F5fhqFjhUDvwXhzBUdKRhCt7uYkJ9tlkSdbhMyp + NooilQR7jN6wXaUeu6pxIWjrW0fT8PfIa1tCVpMXDQP30cM/ISnXkWmfQ/Y3XlS7/KhwLuGIbiDIJLXZ + 6WNXw5gTzQJqZwUv3FHOKw9bPLyu04+moQfIbfYhy+6Fun4OY0tP8fy3PzC69CPO1s0go34GWQ4PqbyK + HMc0YnO6+IiDDiX9eZOQ+rh0RhRtmLFmtSwFbLfWUU5qZTbeISAe6bWzqOXW4Jr9ATW3/FBZJ5BSM4FU + 4oLWOyhzLiKtcigQkVBnZfY3iKio4knxh0UTrnyyl7q+e8gh1TLqPUizTSHFOglu7hGe/PKCVH2IU+ZR + JJtHkFw1irO2cZhcS8ixjkLCml10gkVMfXB5REznDbsLyIJt3F1kNHiQartNUoyTwTEMLzzGy5fAzOpT + JFUO/e2TlYMwOn3IqyGw2Ao3zRrFFHNxQCzJ6XddbPORKndxzs5DZRnHaQJKMo7g2tg6fnr2AmO+xziu + d+MLgxuJxMkVAyjvnsdXliFIYspctLyCwHLdoogLfdZ0uydgIicvJO9IVT2B06SK2jYBzvMQz57/Dn7t + KdTmYSTqenFc24NzJJHm21moDD2BiNhSK8OWiygmq1e45Xyvki1283nNPCzk7GcsZNGmUdi5Faw9Cvx1 + zUc//4qOsTUkal04rrkJbcsMvqwaxN60Jn5LnEHJsGVCilF3CWh1d5g0pd1+WD8QLOvywdjpg8o0hFTT + INSWYWSSKmqTG6cNPThW1I1LjRPIb53GgQstQYbV2+k4fRgj1wsoJq2disy8IZQktsiiklo5ZZ4L+g4v + yogzbaM4oe/BoYIuHC3sxhmjG5qrt3G5ZQr7s79B1KFSTiIrkklZjZCRa15/KfKCKfKSQ95h6xRbj37N + HbzYFTz/aiftPEpuEF/zQNc+i4LmKaSThIrsq8GoQwbuvV2XFJHxJSGMXPsa9Ea0ooGSHnCEvs9aZbTC + 6pBltPKqUi6QXd2/kWtxI9vct5GsdwZ2pzbytFzjkOy9IpPG60P/B3ojJqGakn5mEdHxVeER8kqlJK7c + KonROUmVV3WcETEa65ZYjZKJKwyPZPNFUvmVzcm36BWMSbAQmwX0PpOQjq8U0axBTMdpiYvFJIWIWCiV + Fwmk8gLq3zCK+hO7uP48aP6ypwAAAABJRU5ErkJggg== + + + + 17, 17 + + \ No newline at end of file From d1670446977fd29028363807d487f80ae01d46fa Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 11 Feb 2025 10:21:56 +0000 Subject: [PATCH 29/36] improve display --- Rdmp.Core/Curation/Data/Catalogue.cs | 36 ++++ .../MainFormUITabs/CatalogueUI.Designer.cs | 60 +++--- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 36 +++- .../MainFormUITabs/CatalogueUIHelperText.cs | 188 +++++++++++++++--- .../SimpleControls/MultiSelectChips/Chip.cs | 20 +- .../DropdownOptionsChipDisplay.cs | 22 ++ 6 files changed, 305 insertions(+), 57 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index e92ff60466..5b1c5b94dd 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -877,6 +877,42 @@ public enum DatasetPurpose Finantial, Statutory } + + public enum DataSourceTypes { + EPR, + ElectronicSurvey, + LIMS, + PaperBased, + FreeTextNLP, + MachineLearning, + Other + } + public enum DataSourceSettingTypes + { + CohortStudyTrial, + Clinic, + PrimaryCareReferrals, + PrimaryCareClinic, + PrimaryCareOutOfHours, + SecondaryCareAccidentAndEmergency, + SecondaryCareOutpatients, + SecondaryCareInPateints, + SecondaryCareAmbulance, + SecondaryCareICU, + PrescribingCommunityPharmacy, + PateintReportOutcome, + Wearables, + LocalAuthority, + NationalGovernment, + Community, + Services, + Home, + Private, + SocialCareHealthcareAtHome, + SocialCareOthersocialData, + Census, + Other + } #endregion /// diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 4152488be3..3a2afeb339 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -62,11 +62,11 @@ private void InitializeComponent() aiDatasetSubtype = new SimpleControls.AdditionalInfomation(); ddDatasetSubtype = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox21 = new GroupBox(); + ddDataSourceSetting = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); aiDataSourceSetting = new SimpleControls.AdditionalInfomation(); - tbDataSourceSetting = new TextBox(); groupBox20 = new GroupBox(); + ddDataSource = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); aiDataSource = new SimpleControls.AdditionalInfomation(); - tbDataSource = new TextBox(); groupBox24 = new GroupBox(); aiPurposeOfDataset = new SimpleControls.AdditionalInfomation(); cbPurpose = new ComboBox(); @@ -390,7 +390,7 @@ private void InitializeComponent() tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle()); tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); - tableLayoutPanel2.Size = new System.Drawing.Size(843, 618); + tableLayoutPanel2.Size = new System.Drawing.Size(843, 759); tableLayoutPanel2.TabIndex = 20; // // groupBox18 @@ -428,7 +428,7 @@ private void InitializeComponent() groupBox22.AutoSize = true; groupBox22.Controls.Add(aiKeywords); groupBox22.Controls.Add(ffcKeywords); - groupBox22.Location = new System.Drawing.Point(3, 413); + groupBox22.Location = new System.Drawing.Point(3, 533); groupBox22.Name = "groupBox22"; groupBox22.Size = new System.Drawing.Size(312, 97); groupBox22.TabIndex = 19; @@ -486,15 +486,25 @@ private void InitializeComponent() // groupBox21 // groupBox21.AutoSize = true; + groupBox21.Controls.Add(ddDataSourceSetting); groupBox21.Controls.Add(aiDataSourceSetting); - groupBox21.Controls.Add(tbDataSourceSetting); - groupBox21.Location = new System.Drawing.Point(3, 340); + groupBox21.Location = new System.Drawing.Point(3, 400); groupBox21.Name = "groupBox21"; - groupBox21.Size = new System.Drawing.Size(378, 67); + groupBox21.Size = new System.Drawing.Size(412, 127); groupBox21.TabIndex = 18; groupBox21.TabStop = false; groupBox21.Text = "Data Source Setting"; // + // ddDataSourceSetting + // + ddDataSourceSetting.AutoSize = true; + ddDataSourceSetting.Location = new System.Drawing.Point(6, 22); + ddDataSourceSetting.MaximumSize = new System.Drawing.Size(400, 300); + ddDataSourceSetting.MinimumSize = new System.Drawing.Size(100, 20); + ddDataSourceSetting.Name = "ddDataSourceSetting"; + ddDataSourceSetting.Size = new System.Drawing.Size(400, 83); + ddDataSourceSetting.TabIndex = 26; + // // aiDataSourceSetting // aiDataSourceSetting.Location = new System.Drawing.Point(114, 0); @@ -502,25 +512,28 @@ private void InitializeComponent() aiDataSourceSetting.Size = new System.Drawing.Size(20, 20); aiDataSourceSetting.TabIndex = 25; // - // tbDataSourceSetting - // - tbDataSourceSetting.Location = new System.Drawing.Point(6, 22); - tbDataSourceSetting.Name = "tbDataSourceSetting"; - tbDataSourceSetting.Size = new System.Drawing.Size(366, 23); - tbDataSourceSetting.TabIndex = 10; - // // groupBox20 // groupBox20.AutoSize = true; + groupBox20.Controls.Add(ddDataSource); groupBox20.Controls.Add(aiDataSource); - groupBox20.Controls.Add(tbDataSource); groupBox20.Location = new System.Drawing.Point(3, 267); groupBox20.Name = "groupBox20"; - groupBox20.Size = new System.Drawing.Size(378, 67); + groupBox20.Size = new System.Drawing.Size(412, 127); groupBox20.TabIndex = 17; groupBox20.TabStop = false; groupBox20.Text = "Data Source"; // + // ddDataSource + // + ddDataSource.AutoSize = true; + ddDataSource.Location = new System.Drawing.Point(6, 22); + ddDataSource.MaximumSize = new System.Drawing.Size(400, 300); + ddDataSource.MinimumSize = new System.Drawing.Size(100, 20); + ddDataSource.Name = "ddDataSource"; + ddDataSource.Size = new System.Drawing.Size(400, 83); + ddDataSource.TabIndex = 25; + // // aiDataSource // aiDataSource.Location = new System.Drawing.Point(75, 0); @@ -528,20 +541,13 @@ private void InitializeComponent() aiDataSource.Size = new System.Drawing.Size(20, 20); aiDataSource.TabIndex = 24; // - // tbDataSource - // - tbDataSource.Location = new System.Drawing.Point(6, 22); - tbDataSource.Name = "tbDataSource"; - tbDataSource.Size = new System.Drawing.Size(366, 23); - tbDataSource.TabIndex = 8; - // // groupBox24 // groupBox24.Controls.Add(aiPurposeOfDataset); groupBox24.Controls.Add(cbPurpose); - groupBox24.Location = new System.Drawing.Point(3, 516); + groupBox24.Location = new System.Drawing.Point(3, 636); groupBox24.Name = "groupBox24"; - groupBox24.Size = new System.Drawing.Size(372, 83); + groupBox24.Size = new System.Drawing.Size(372, 100); groupBox24.TabIndex = 20; groupBox24.TabStop = false; groupBox24.Text = "Purpose of Dataset"; @@ -1180,9 +1186,7 @@ private void InitializeComponent() private TabPage tabPage5; private TabPage tabPage6; public TextBox tbDescription; - private TextBox tbDataSource; private ComboBox cb_resourceType; - private TextBox tbDataSourceSetting; private ComboBox cb_granularity; private TextBox tbGeoCoverage; private TextBox tbJuristiction; @@ -1260,5 +1264,7 @@ private void InitializeComponent() private SimpleControls.AdditionalInfomation aiUpdateLag; private SimpleControls.AdditionalInfomation aiInitialReleaseDate; private SimpleControls.AdditionalInfomation aiAssociatedMedia; + private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDataSourceSetting; + private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDataSource; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 42950d9441..32c187ff37 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -54,6 +54,24 @@ public CatalogueUI() UseCommitSystem = true; } + private string AddSpacesToSentence(string text, bool preserveAcronyms) + { + if (string.IsNullOrWhiteSpace(text)) + return string.Empty; + StringBuilder newText = new StringBuilder(text.Length * 2); + newText.Append(text[0]); + for (int i = 1; i < text.Length; i++) + { + if (char.IsUpper(text[i])) + if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || + (preserveAcronyms && char.IsUpper(text[i - 1]) && + i < text.Length - 1 && !char.IsUpper(text[i + 1]))) + newText.Append(' '); + newText.Append(text[i]); + } + return newText.ToString(); + } + private void ticketingControl1_TicketTextChanged(object sender, EventArgs e) { if (_catalogue != null) @@ -221,6 +239,11 @@ private void UpdateReleaseDate(object sender, EventArgs e) Bind(dtpReleaseDate, "Value", "DatasetReleaseDate", c => c.DatasetReleaseDate); } + + private void comboBox1_Format(object sender, ListControlConvertEventArgs e) + { + e.Value = AddSpacesToSentence(e.ListItem.ToString(), true); + } private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { var tabControl = (TabControl)sender; @@ -250,18 +273,21 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) item.Visible = false; } cb_resourceType.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueType)); + cb_resourceType.Format += comboBox1_Format; cbPurpose.DataSource = Enum.GetValues(typeof(Catalogue.DatasetPurpose)); + cbPurpose.Format += comboBox1_Format; ddDatasetType.Options = Enum.GetNames(typeof(Catalogue.DatasetType)); ddDatasetSubtype.Options = Enum.GetNames(typeof(Catalogue.DatasetSubType)); - + ddDataSource.Options = Enum.GetNames(typeof(Catalogue.DataSourceTypes)); + ddDataSourceSetting.Options = Enum.GetNames(typeof(Catalogue.DataSourceSettingTypes)); Bind(ffcKeywords, "Value", "Search_keywords", c => c.Search_keywords); Bind(cb_resourceType, "SelectedItem", "Type", c => c.Type); Bind(cbPurpose, "SelectedItem", "Purpose", c => c.Purpose); Bind(ddDatasetType, "Value", "DataType", c => c.DataType); Bind(ddDatasetSubtype, "Value", "DataSubtype", c => c.DataSubtype); - Bind(tbDataSource, "Text", "DataSource", c => c.DataSource); - Bind(tbDataSourceSetting, "Text", "DataSourceSetting", c => c.DataSourceSetting); + Bind(ddDataSource, "Value", "DataSource", c => c.DataSource); + Bind(ddDataSourceSetting, "Value", "DataSourceSetting", c => c.DataSourceSetting); this.aiKeywords.TooltipText = CatalogueUIHelperText.Keywords; this.aiResourceType.TooltipText = CatalogueUIHelperText.ResourceType; this.aiPurposeOfDataset.TooltipText = CatalogueUIHelperText.PurposeOfDataset; @@ -281,6 +307,7 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) } Bind(tbGeoCoverage, "Text", "Geographical_coverage", c => c.Geographical_coverage); cb_granularity.DataSource = Enum.GetValues(typeof(Catalogue.CatalogueGranularity)); + cb_granularity.Format += comboBox1_Format; Bind(cb_granularity, "SelectedItem", "Granularity", c => c.Granularity); dtpStart.Format = DateTimePickerFormat.Custom; dtpStart.CustomFormat = _catalogue.StartDate != null ? "dd/MM/yyyy" : " "; @@ -355,8 +382,9 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) } cb_updateFrequency.DataSource = Enum.GetValues(typeof(Catalogue.UpdateFrequencies)); + cb_updateFrequency.Format += comboBox1_Format; cbUpdateLag.DataSource = Enum.GetValues(typeof(Catalogue.UpdateLagTimes)); - + cbUpdateLag.Format += comboBox1_Format; Bind(cbUpdateLag, "SelectedItem", "UpdateLag", c => c.UpdateLag); Bind(cb_updateFrequency, "SelectedItem", "Update_freq", c => c.Update_freq); dtpReleaseDate.Format = DateTimePickerFormat.Custom; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs index 37be8cd18e..a158a24e92 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs @@ -8,30 +8,168 @@ namespace Rdmp.UI.MainFormUITabs { public static class CatalogueUIHelperText { - public static readonly string Acronym = "TODO"; - public static readonly string ShortDescription = "TODO"; - public static readonly string Description = "TODO"; - public static readonly string ResourceType = "TODO"; - public static readonly string DatasetType = "TODO"; - public static readonly string DatasetSubtype = "TODO"; - public static readonly string DataSource = "TODO"; - public static readonly string DataSourceSetting = "TODO"; - public static readonly string Keywords = "TODO"; - public static readonly string PurposeOfDataset = "TODO"; - public static readonly string GeographicalCoverage = "TODO"; - public static readonly string Granularity = "TODO"; - public static readonly string StartDate = "TODO"; - public static readonly string EndDate = "TODO"; - public static readonly string AccessContact = "TODO"; - public static readonly string DataController = "TODO"; - public static readonly string DataProcessor = "TODO"; - public static readonly string Juristiction = "TODO"; - public static readonly string DOI = "TODO"; - public static readonly string ControlledVocabulary = "TODO"; - public static readonly string People = "TODO"; - public static readonly string UpdateFrequency = "TODO"; - public static readonly string InitialReleaseDate = "TODO"; - public static readonly string UpdateLag = "TODO"; - public static readonly string AssociatedMedia = "TODO"; + public static readonly string Acronym = "A shorthand name for the catalogue."; + public static readonly string ShortDescription = """ + The Short Description should provide a clear and brief descriptive signpost for researchers who are searching for data that may be relevant to their research. + The Short Description should allow the reader to determine the scope of the data collection and accurately summarise its content. + Effective Short Descriptions should avoid long sentences and abbreviations where possible. + Note: Researchers will view Titles and the first line of Short Descriptions (list view) when searching for datasets and choosing whether to explore their content further. + Short Descriptions should be different from the full description for a dataset. + Example: CPRD Aurum contains primary care data contributed by General Practitioner (GP) practices using EMIS Web® including patient registration information and all care events that GPs have chosen to record as part of their usual medical practice. + """; + public static readonly string Description = """ + An HTML account of the data that provides context and scope of the data, limited to 10000 characters, and/or a resolvable URL that describes the dataset. + Additional information can be recorded and included using the Associated media field. + """; + public static readonly string ResourceType = """ + Research Study: Data relating to a specific Research Study + Cohort: Data relating to a specific Cohort + National Registry: Data relating to a National Registry + Healthcare Provider Registry: Data relating to a Healthcare Provider + EHR Extract: Data relating to a single EHR Extract + Other: Data relating to some other resource + """; + public static readonly string DatasetType = """ + Types include those listed below. Datasets can have more than one type associated. + Health and disease: Includes any data related to mental health, cardiovascular, cancer, rare diseases, metabolic and endocrine, neurological, reproductive, maternity and neonatology, respiratory, immunity, musculoskeletal, vision, renal and urogenital, oral and gastrointestinal, cognitive function or hearing. + Treatments/Interventions: Includes any data related to treatment or interventions related to vaccines or which are preventative or therapeutic in nature. + Measurements/Tests: Includes any data related to laboratory or other diagnostics. + Imaging types: Includes any data related to CT, MRI, PET, x-ray, ultrasound or pathology imaging. + Imaging area of the body: Indicates whether the dataset relates to head, chest, arm abdomen or leg imaging. + Omics: Includes any data related to proteomics, transcriptomics, epigenomics, metabolomics, multiomics, metagenomics or genomics. + Socioeconomic: Includes any data related to education, crime and justice, ethnicity, housing, labour, ageing, economics, marital status, social support, deprivation, religion, occupation, finances or family circumstances. + Lifestyle: Includes any data related to smoking, physical activity, dietary habits or alcohol. + Registry: Includes any data related to disease registries for research, national disease registries, audits, or birth and deaths records. + Environment and energy: Includes any data related to the monitoring or study of environmental or energy factors or events. + Information and communication: Includes any data related to the study or application of information and communication. + Politics: Includes any data related to political views, activities, voting, etc. + """; + public static readonly string DatasetSubtype = """ + HDR Have not populated this yet... + """; + public static readonly string DataSource = """ + EPR: Data Extracted from Electronic Patient Record. + Electronic survey: Data has been extracted from electronic surveys. + LIMS: Data has been extracted from a laboratory information management system. + Paper-based: Data has been extracted from paper forms. + Free text NLP: Data has been extracted from unstructured freetext using natural language processing. + Machine generated: Data has been machine generated i.e. imaging. + Other: Data has been extracted by other means. + """; + public static readonly string DataSourceSetting = """ + Cohort, study, trial: Cohort, study or trial data collection as part of protocol. + Clinic: Specific clinic such as antenatal clinic. + Primary care - Referrals: General medical practitioner referral to another service. + Primary care - Clinic: General medical practitioner practice. + Primary care - Out of hours: General medical practitioner care or advice outside of standard hours. + Secondary care - Accident and emergency: Accident emergency department. + Secondary care - Outpatients: Outpatient care. + Secondary care - In-patients: In-patient care. + Secondary care - Ambulance: Care provided in association with ambulance service. + Secondary care - ICU: Intensive care units, also referred to as critical care units (CCUs) or intensive therapy units (ITUs). + Prescribing - Community pharmacy: Pharmacy based in the community. + Prescribing - Community pharmacy: Pharmacy based in a hospital setting. + Patient report outcome: Reported by patient. + Wearables: Data collection devices worn on the body. + Local authority: Local authority or entity associated with a local authority. + National government: National government or entity associated with the national government. + Community: Community settings. + Services: Services such as drug misuse or blood transfusion. + Home: Home setting. + Private: Private medical clinic. + Social care - Health care at home: service provided in the home or residence of a person. + Social care - Other social data: service provided in a setting outside of the person's home or residence. + Census: collected as part of census. + Other: Other setting. + """; + public static readonly string Keywords = """ + Please provide relevant and specific keywords that can improve the search engine optimization of your dataset. + Please enter one keyword at a time and click Add New Field to add further keywords. + Text from the title is automatically included in the search, there is no need to include this in the keywords. + Include words that researcher may include in their searches. + """; + public static readonly string PurposeOfDataset = """ + Research cohort: Data collected for a defined group of people. + Study: Data collected for a specific research study. + Disease registry: Data collected as part of a disease registry. + Trial: Data collected for as part of a clinical trial. + Care: Data collected as part of routine clinical care. + Audit: Data collected as part of an audit programme. + Administrative: Data collected for administrative and management information purposes. + Financial: Data collected either for payments or for billing. + Statutory: Data collected in compliance with statutory requirements. + Other: Data collected for other purpose. + """; + public static readonly string GeographicalCoverage = """ + The geographical area covered by the dataset. + Please provide a valid location. + For locations in the UK, this location should conform to ONS standards. + For locations in other countries we use ISO 3166-1 & ISO 3166-2. + """; + public static readonly string Granularity = """ + National: Catalogue contains national level data + Regional: Catalogue contains data for a specific region + HealthBoard: Catalogue contains data for a specific Healthboard + Clinic: Catalogue contains data for a specific clinic + Other:Catalogue contains some other level of granularity + """; + public static readonly string StartDate = "The earliest date found in the catalogue."; + public static readonly string EndDate = "The latest date found in the catalogue."; + public static readonly string AccessContact = """ + Organisations are expected to provide a dedicated email address associated with the data access request process. + If no contact point is provided in this field, this field will be defaulted to the teams support email provided in the teams setting. + Note: An employee's email address can only be provided on a temporary basis and if one is provided, you must obtain explicit consent for this purpose. + """; + public static readonly string DataController = """ + Data Controller means a person/entity who (either alone or jointly or in common with other persons/entities) determines the purposes for which and the way any Data Subject data, specifically personal data or are to be processed. + Notes: For most organisations this will be the same as the Data Custodian of the dataset. If this is not the case, please indicate that there is a different controller. + If there is a different controller please complete the Data Processor attribute to indicate if the Data Custodian is a Processor rather than the Data Controller. + In some cases, there may be multiple Data Controllers i.e. GP data. If this is the case, please indicate the fact in a free-text field and describe the data sharing arrangement or a link to it, so that this can be understood by research users. + Example: NHS England + """; + public static readonly string DataProcessor = """ + Notes: Required to complete if the Data Custodian is the Data Processor rather than the Data Controller. + If the Publisher is also the Data Controller please provide “Not Applicable”. + Examples: Not Applicable, SAIL + """; + public static readonly string Juristiction = """A full list of country codes can be found here (alpha-2 column): https://www.iso.org/obp/ui/#search/code/"""; + public static readonly string DOI = "Please note: This is not the DOI of the publication(s) associated with the dataset."; + public static readonly string ControlledVocabulary = "List any relevant terminologies / ontologies / controlled vocabularies, such as ICD 10 Codes, NHS Data Dictionary National Codes or SNOMED CT International, that are being used by the dataset."; + public static readonly string People = "Please list the email addresses of any people/organisations associated with this catalogue."; + public static readonly string UpdateFrequency = """ + Static: Dataset published once. + Irregular: Dataset published at uneven intervals. + Continuous: Dataset published without interruption. + Biennial: Dataset published every two years. + Annual: Dataset published occurs once a year. + Biannual: Dataset published twice a year. + Quarterly: Dataset published every three months. + Bimonthly: Dataset published every two months. + Monthly: Dataset published once a month. + Biweekly: Dataset published every two weeks. + Weekly: Dataset published once a week. + Twice weekly: Dataset published twice a week. + Daily: Dataset published once a day. + Other: Dataset published using other interval. + """; + public static readonly string InitialReleaseDate = "The date the catalogue was initially made available for research use."; + public static readonly string UpdateLag = """ + Less than 1 week: Typical time lag of less than a week. + 1-2 weeks: Typical time-lag of one to two weeks. + 2-4 weeks: Typical time-lag of two to four weeks. + 1-2 months: Typical time-lag of one to two months. + 2-6 months: Typical time-lag of two to six months. + 6 months plus: Typical time-lag of more than six months. + Variable: Variable time-lag. + Not applicable: Not Applicable i.e. static dataset. + Other: Other time-lag. + """; + public static readonly string AssociatedMedia = """ + Please provide any media associated with the Gateway Organisation using a valid URL for the content. + This is an opportunity to provide additional context that could be useful for researchers wanting to understand more about the dataset and its relevance to their research question. + Note: media assets should be hosted by the organisation. + Example: This could be a link to a PDF Document that describes methodology or further detail about the datasets, or a graph or chart that provides further context about the dataset. + If you are providing multiple links for associated media, we recommend that you separate these with a comma. + """; } } diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs index 3e9fe9a7f9..8cfeb49693 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs @@ -17,7 +17,7 @@ public partial class Chip : UserControl public Chip(string value, Func clear) { InitializeComponent(); - lblText.Text = value; + lblText.Text = AddSpacesToSentence(value,true); btnClear.Location = new Point(lblText.Width + lblText.Location.X+5, btnClear.Location.Y); this.Size = new System.Drawing.Size(lblText.Width + lblText.Location.X + btnClear.Width+15, this.Size.Height); _clear = clear; @@ -28,6 +28,24 @@ private void btnClear_Click(object sender, EventArgs e) _clear(lblText.Text); } + private string AddSpacesToSentence(string text, bool preserveAcronyms) + { + if (string.IsNullOrWhiteSpace(text)) + return string.Empty; + StringBuilder newText = new StringBuilder(text.Length * 2); + newText.Append(text[0]); + for (int i = 1; i < text.Length; i++) + { + if (char.IsUpper(text[i])) + if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || + (preserveAcronyms && char.IsUpper(text[i - 1]) && + i < text.Length - 1 && !char.IsUpper(text[i + 1]))) + newText.Append(' '); + newText.Append(text[i]); + } + return newText.ToString(); + } + private int radius = 20; [DefaultValue(20)] public int Radius diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs index 0c1637dbcf..a365134f1c 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs @@ -15,6 +15,27 @@ public partial class DropdownOptionsChipDisplay : UserControl private string _value; private string[] _options; + private string AddSpacesToSentence(string text, bool preserveAcronyms) + { + if (string.IsNullOrWhiteSpace(text)) + return string.Empty; + StringBuilder newText = new StringBuilder(text.Length * 2); + newText.Append(text[0]); + for (int i = 1; i < text.Length; i++) + { + if (char.IsUpper(text[i])) + if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || + (preserveAcronyms && char.IsUpper(text[i - 1]) && + i < text.Length - 1 && !char.IsUpper(text[i + 1]))) + newText.Append(' '); + newText.Append(text[i]); + } + return newText.ToString(); + } + private void comboBox1_Format(object sender, ListControlConvertEventArgs e) + { + e.Value = AddSpacesToSentence(e.ListItem.ToString(), true); + } [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string Value @@ -26,6 +47,7 @@ public string Value flowLayoutPanel1.Controls.Clear(); var splitValues = _value.Split(','); comboBox1.Items.Clear(); + comboBox1.Format += comboBox1_Format; foreach (var option in _options.Where(o => !splitValues.Contains(o)).ToList()) { comboBox1.Items.Add(option); From d7ab17996dba4837b6673556a87563090a4b5d0b Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 11 Feb 2025 10:49:09 +0000 Subject: [PATCH 30/36] add tooltips --- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 47 ++++++++++++++ .../MainFormUITabs/CatalogueUIHelperText.cs | 63 ++++++++++++++++++- .../AdditionalInfomation.Designer.cs | 2 + .../SimpleControls/AdditionalInfomation.cs | 11 +++- 4 files changed, 120 insertions(+), 3 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 32c187ff37..c2cf823d9a 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -260,8 +260,11 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription); Bind(tbDescription, "Text", "Description", c => c.Description); this.aiAcronym.TooltipText = CatalogueUIHelperText.Acronym; + this.aiAcronym.SetItemActivator(Activator); this.aiShortDescription.TooltipText = CatalogueUIHelperText.ShortDescription; + this.aiShortDescription.SetItemActivator(Activator); this.aiDescription.TooltipText = CatalogueUIHelperText.Description; + this.aiDescription.SetItemActivator(Activator); foreach (Control item in tabPage1.Controls) { item.Visible = true; @@ -289,12 +292,26 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(ddDataSource, "Value", "DataSource", c => c.DataSource); Bind(ddDataSourceSetting, "Value", "DataSourceSetting", c => c.DataSourceSetting); this.aiKeywords.TooltipText = CatalogueUIHelperText.Keywords; + this.aiKeywords.SetItemActivator(Activator); + this.aiResourceType.TooltipText = CatalogueUIHelperText.ResourceType; + this.aiResourceType.SetItemActivator(Activator); + this.aiPurposeOfDataset.TooltipText = CatalogueUIHelperText.PurposeOfDataset; + this.aiPurposeOfDataset.SetItemActivator(Activator); + this.aiDatasetType.TooltipText = CatalogueUIHelperText.DatasetType; + this.aiDatasetType.SetItemActivator(Activator); + this.aiDatasetSubtype.TooltipText = CatalogueUIHelperText.DatasetSubtype; + this.aiDatasetSubtype.SetItemActivator(Activator); + this.aiDataSource.TooltipText = CatalogueUIHelperText.DataSource; + this.aiDataSource.SetItemActivator(Activator); + this.aiDataSourceSetting.TooltipText = CatalogueUIHelperText.DataSourceSetting; + this.aiDataSourceSetting.SetItemActivator(Activator); + foreach (Control item in tabPage2.Controls) { item.Visible = true; @@ -330,9 +347,17 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) dtpEndDate.ValueChanged += UpdateEndDate; } this.aiGeographicalCoverage.TooltipText = CatalogueUIHelperText.GeographicalCoverage; + this.aiGeographicalCoverage.SetItemActivator(Activator); + this.aiGranularity.TooltipText = CatalogueUIHelperText.Granularity; + this.aiGranularity.SetItemActivator(Activator); + this.aiStartDate.TooltipText = CatalogueUIHelperText.StartDate; + this.aiStartDate.SetItemActivator(Activator); + this.aiEndDate.TooltipText = CatalogueUIHelperText.EndDate; + this.aiEndDate.SetItemActivator(Activator); + foreach (Control item in tabPage3.Controls) { @@ -349,9 +374,17 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(tbDataProcessor, "Text", "DataProcessor", c => c.DataProcessor); Bind(tbJuristiction, "Text", "Juristiction", c => c.Juristiction); this.aiAccessContact.TooltipText = CatalogueUIHelperText.AccessContact; + this.aiAccessContact.SetItemActivator(Activator); + this.aiDataController.TooltipText = CatalogueUIHelperText.DataController; + this.aiDataController.SetItemActivator(Activator); + this.aiDataProcessor.TooltipText = CatalogueUIHelperText.DataProcessor; + this.aiDataProcessor.SetItemActivator(Activator); + this.aiJuristiction.TooltipText = CatalogueUIHelperText.Juristiction; + this.aiJuristiction.SetItemActivator(Activator); + foreach (Control item in tabPage4.Controls) { @@ -367,8 +400,14 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Bind(fftControlledVocab, "Value", "ControlledVocabulary", c => c.ControlledVocabulary); Bind(tbDOI, "Text", "Doi", c => c.Doi); this.aiPeople.TooltipText = CatalogueUIHelperText.People; + this.aiPeople.SetItemActivator(Activator); + this.aiControlledGroup.TooltipText = CatalogueUIHelperText.ControlledVocabulary; + this.aiControlledGroup.SetItemActivator(Activator); + this.aiDOI.TooltipText = CatalogueUIHelperText.DOI; + this.aiDOI.SetItemActivator(Activator); + foreach (Control item in tabPage5.Controls) { @@ -398,8 +437,14 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) dtpReleaseDate.ValueChanged += UpdateReleaseDate; } this.aiUpdateLag.TooltipText = CatalogueUIHelperText.UpdateLag; + this.aiUpdateLag.SetItemActivator(Activator); + this.aiUpdateFrequency.TooltipText = CatalogueUIHelperText.UpdateFrequency; + this.aiUpdateFrequency.SetItemActivator(Activator); + this.aiInitialReleaseDate.TooltipText = CatalogueUIHelperText.InitialReleaseDate; + this.aiInitialReleaseDate.SetItemActivator(Activator); + foreach (Control item in tabPage6.Controls) { item.Visible = true; @@ -408,6 +453,8 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) case 6: Bind(ffAssociatedMedia, "Value", "AssociatedMedia", c => c.AssociatedMedia); this.aiAssociatedMedia.TooltipText = CatalogueUIHelperText.AssociatedMedia; + this.aiAssociatedMedia.SetItemActivator(Activator); + break; default: break; diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs index a158a24e92..e57b006d8f 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs @@ -45,7 +45,68 @@ Types include those listed below. Datasets can have more than one type associate Politics: Includes any data related to political views, activities, voting, etc. """; public static readonly string DatasetSubtype = """ - HDR Have not populated this yet... + Mental health: + Cardiovascular: + Cancer: + Rare diseases: + Metabolic and endocrine: + Neurological: + Reproductive: + Maternity and neonatology: + Respiratory: + Immunity: + Musculoskeletal: + Vision: + Renal and urogenital: + Oral and gastrointestinal: + Cognitive function: + Hearing: + Others: + Vaccines: + Preventive: + Therapeutic: + Laboratory: + Other diagnostics: + CT: + MRI: + PET: + X-ray: + Ultrasound: + Pathology: + Head: + Chest: + Arm: + Abdomen: + Leg: + Proteomics: + Transcriptomics: + Epigenomics: + Metabolomics: + Metagenomics: + Genomics: + Lipidomics: + Education: + Crime and justice: + Ethnicity: + Housing: + Labour: + Ageing : + Economics: + Marital status: + Social support: + Deprivation: + Religion: + Occupation: + Finances: + Family circumstance: + Smoking: + Physical activity: + Dietary habits: + Alcohol: + Disease registry (research): + National disease registries and audits: + Births and deaths: + Not applicable: """; public static readonly string DataSource = """ EPR: Data Extracted from Electronic Patient Record. diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs b/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs index 41248233b8..81d3d95508 100644 --- a/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs +++ b/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs @@ -37,6 +37,7 @@ private void InitializeComponent() // // pictureBox1 // + pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand; pictureBox1.ErrorImage = (System.Drawing.Image)resources.GetObject("pictureBox1.ErrorImage"); pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image"); pictureBox1.InitialImage = (System.Drawing.Image)resources.GetObject("pictureBox1.InitialImage"); @@ -45,6 +46,7 @@ private void InitializeComponent() pictureBox1.Size = new System.Drawing.Size(20, 20); pictureBox1.TabIndex = 0; pictureBox1.TabStop = false; + pictureBox1.Click += pictureBox1_Click; // // AdditionalInfomation // diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.cs b/Rdmp.UI/SimpleControls/AdditionalInfomation.cs index 07970967d9..4ab786b90e 100644 --- a/Rdmp.UI/SimpleControls/AdditionalInfomation.cs +++ b/Rdmp.UI/SimpleControls/AdditionalInfomation.cs @@ -1,4 +1,5 @@ using MongoDB.Driver; +using Rdmp.UI.TestsAndSetup.ServicePropogation; using System; using System.Collections.Generic; using System.ComponentModel; @@ -11,7 +12,7 @@ namespace Rdmp.UI.SimpleControls { - public partial class AdditionalInfomation : UserControl + public partial class AdditionalInfomation : RDMPUserControl { private string _text = null; @@ -19,7 +20,8 @@ public partial class AdditionalInfomation : UserControl public string TooltipText { get => _text; - set { + set + { _text = value; this.toolTip1.SetToolTip(this.pictureBox1, this._text); @@ -30,5 +32,10 @@ public AdditionalInfomation() { InitializeComponent(); } + + private void pictureBox1_Click(object sender, EventArgs e) + { + Activator.Show(_text); + } } } From 12a98df6bd49b20a3e6d4ac238b6ae7cf66e4863 Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 11 Feb 2025 10:52:48 +0000 Subject: [PATCH 31/36] update helper text --- .../MainFormUITabs/CatalogueUIHelperText.cs | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs index e57b006d8f..26401855ea 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs @@ -45,68 +45,68 @@ Types include those listed below. Datasets can have more than one type associate Politics: Includes any data related to political views, activities, voting, etc. """; public static readonly string DatasetSubtype = """ - Mental health: - Cardiovascular: - Cancer: - Rare diseases: - Metabolic and endocrine: - Neurological: - Reproductive: - Maternity and neonatology: - Respiratory: - Immunity: - Musculoskeletal: - Vision: - Renal and urogenital: - Oral and gastrointestinal: - Cognitive function: - Hearing: - Others: - Vaccines: - Preventive: - Therapeutic: - Laboratory: - Other diagnostics: - CT: - MRI: - PET: - X-ray: - Ultrasound: - Pathology: - Head: - Chest: - Arm: - Abdomen: - Leg: - Proteomics: - Transcriptomics: - Epigenomics: - Metabolomics: - Metagenomics: - Genomics: - Lipidomics: - Education: - Crime and justice: - Ethnicity: - Housing: - Labour: - Ageing : - Economics: - Marital status: - Social support: - Deprivation: - Religion: - Occupation: - Finances: - Family circumstance: - Smoking: - Physical activity: - Dietary habits: - Alcohol: - Disease registry (research): - National disease registries and audits: - Births and deaths: - Not applicable: + Mental health + Cardiovascular + Cancer + Rare diseases + Metabolic and endocrine + Neurological + Reproductive + Maternity and neonatology + Respiratory + Immunity + Musculoskeletal + Vision + Renal and urogenital + Oral and gastrointestinal + Cognitive function + Hearing + Others + Vaccines + Preventive + Therapeutic + Laboratory + Other diagnostics + CT + MRI + PET + X-ray + Ultrasound + Pathology + Head + Chest + Arm + Abdomen + Leg + Proteomics + Transcriptomics + Epigenomics + Metabolomics + Metagenomics + Genomics + Lipidomics + Education + Crime and justice + Ethnicity + Housing + Labour + Ageing + Economics + Marital status + Social support + Deprivation + Religion + Occupation + Finances + Family circumstance + Smoking + Physical activity + Dietary habits + Alcohol + Disease registry (research) + National disease registries and audits + Births and deaths + Not applicable """; public static readonly string DataSource = """ EPR: Data Extracted from Electronic Patient Record. From f5c4810e63ad47bd99fcabe1ba4b12838acc2185 Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 11 Feb 2025 11:56:14 +0000 Subject: [PATCH 32/36] rename --- .../MainFormUITabs/CatalogueUI.Designer.cs | 100 +++++++++--------- ....cs => AdditionalInfomationUI.Designer.cs} | 4 +- ...nfomation.cs => AdditionalInfomationUI.cs} | 4 +- ...ation.resx => AdditionalInfomationUI.resx} | 0 4 files changed, 54 insertions(+), 54 deletions(-) rename Rdmp.UI/SimpleControls/{AdditionalInfomation.Designer.cs => AdditionalInfomationUI.Designer.cs} (97%) rename Rdmp.UI/SimpleControls/{AdditionalInfomation.cs => AdditionalInfomationUI.cs} (89%) rename Rdmp.UI/SimpleControls/{AdditionalInfomation.resx => AdditionalInfomationUI.resx} (100%) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 3a2afeb339..076ef89886 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -42,90 +42,90 @@ private void InitializeComponent() tabControl1 = new TabControl(); tabPage1 = new TabPage(); groupBox23 = new GroupBox(); - aiAcronym = new SimpleControls.AdditionalInfomation(); + aiAcronym = new SimpleControls.AdditionalInfomationUI(); tbAcronym = new TextBox(); groupBox16 = new GroupBox(); - aiDescription = new SimpleControls.AdditionalInfomation(); + aiDescription = new SimpleControls.AdditionalInfomationUI(); tbDescription = new TextBox(); groupBox15 = new GroupBox(); - aiShortDescription = new SimpleControls.AdditionalInfomation(); + aiShortDescription = new SimpleControls.AdditionalInfomationUI(); tbAbstract = new TextBox(); tabPage2 = new TabPage(); tableLayoutPanel2 = new TableLayoutPanel(); groupBox18 = new GroupBox(); - aiDatasetType = new SimpleControls.AdditionalInfomation(); + aiDatasetType = new SimpleControls.AdditionalInfomationUI(); ddDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox22 = new GroupBox(); - aiKeywords = new SimpleControls.AdditionalInfomation(); + aiKeywords = new SimpleControls.AdditionalInfomationUI(); ffcKeywords = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox19 = new GroupBox(); - aiDatasetSubtype = new SimpleControls.AdditionalInfomation(); + aiDatasetSubtype = new SimpleControls.AdditionalInfomationUI(); ddDatasetSubtype = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox21 = new GroupBox(); ddDataSourceSetting = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); - aiDataSourceSetting = new SimpleControls.AdditionalInfomation(); + aiDataSourceSetting = new SimpleControls.AdditionalInfomationUI(); groupBox20 = new GroupBox(); ddDataSource = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); - aiDataSource = new SimpleControls.AdditionalInfomation(); + aiDataSource = new SimpleControls.AdditionalInfomationUI(); groupBox24 = new GroupBox(); - aiPurposeOfDataset = new SimpleControls.AdditionalInfomation(); + aiPurposeOfDataset = new SimpleControls.AdditionalInfomationUI(); cbPurpose = new ComboBox(); groupBox17 = new GroupBox(); - aiResourceType = new SimpleControls.AdditionalInfomation(); + aiResourceType = new SimpleControls.AdditionalInfomationUI(); cb_resourceType = new ComboBox(); tabPage3 = new TabPage(); groupBox14 = new GroupBox(); - aiEndDate = new SimpleControls.AdditionalInfomation(); + aiEndDate = new SimpleControls.AdditionalInfomationUI(); dtpEndDate = new DateTimePicker(); btnEndDateClear = new Button(); groupBox13 = new GroupBox(); - aiStartDate = new SimpleControls.AdditionalInfomation(); + aiStartDate = new SimpleControls.AdditionalInfomationUI(); dtpStart = new DateTimePicker(); btnStartDateClear = new Button(); groupBox12 = new GroupBox(); - aiGranularity = new SimpleControls.AdditionalInfomation(); + aiGranularity = new SimpleControls.AdditionalInfomationUI(); cb_granularity = new ComboBox(); groupBox11 = new GroupBox(); - aiGeographicalCoverage = new SimpleControls.AdditionalInfomation(); + aiGeographicalCoverage = new SimpleControls.AdditionalInfomationUI(); tbGeoCoverage = new TextBox(); tabPage4 = new TabPage(); groupBox10 = new GroupBox(); - aiJuristiction = new SimpleControls.AdditionalInfomation(); + aiJuristiction = new SimpleControls.AdditionalInfomationUI(); tbJuristiction = new TextBox(); groupBox9 = new GroupBox(); - aiDataProcessor = new SimpleControls.AdditionalInfomation(); + aiDataProcessor = new SimpleControls.AdditionalInfomationUI(); tbDataProcessor = new TextBox(); groupBox8 = new GroupBox(); - aiDataController = new SimpleControls.AdditionalInfomation(); + aiDataController = new SimpleControls.AdditionalInfomationUI(); tbDataController = new TextBox(); groupBox7 = new GroupBox(); - aiAccessContact = new SimpleControls.AdditionalInfomation(); + aiAccessContact = new SimpleControls.AdditionalInfomationUI(); tbAccessContact = new TextBox(); tabPage5 = new TabPage(); groupBox3 = new GroupBox(); - aiDOI = new SimpleControls.AdditionalInfomation(); + aiDOI = new SimpleControls.AdditionalInfomationUI(); tbDOI = new TextBox(); tableLayoutPanel1 = new TableLayoutPanel(); groupBox2 = new GroupBox(); - aiControlledGroup = new SimpleControls.AdditionalInfomation(); + aiControlledGroup = new SimpleControls.AdditionalInfomationUI(); fftControlledVocab = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox1 = new GroupBox(); - aiPeople = new SimpleControls.AdditionalInfomation(); + aiPeople = new SimpleControls.AdditionalInfomationUI(); ffcPeople = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); tabPage6 = new TabPage(); - aiUpdateFrequency = new SimpleControls.AdditionalInfomation(); + aiUpdateFrequency = new SimpleControls.AdditionalInfomationUI(); groupBox6 = new GroupBox(); - aiUpdateLag = new SimpleControls.AdditionalInfomation(); + aiUpdateLag = new SimpleControls.AdditionalInfomationUI(); cbUpdateLag = new ComboBox(); groupBox5 = new GroupBox(); - aiInitialReleaseDate = new SimpleControls.AdditionalInfomation(); + aiInitialReleaseDate = new SimpleControls.AdditionalInfomationUI(); dtpReleaseDate = new DateTimePicker(); btnReleaseDateClear = new Button(); groupBox4 = new GroupBox(); cb_updateFrequency = new ComboBox(); tabPage7 = new TabPage(); groupBox25 = new GroupBox(); - aiAssociatedMedia = new SimpleControls.AdditionalInfomation(); + aiAssociatedMedia = new SimpleControls.AdditionalInfomationUI(); ffAssociatedMedia = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); @@ -1239,31 +1239,31 @@ private void InitializeComponent() private TabPage tabPage7; private GroupBox groupBox25; private SimpleControls.MultiSelectChips.FreeFormTextChipDisplay ffAssociatedMedia; - private SimpleControls.AdditionalInfomation aiAcronym; - private SimpleControls.AdditionalInfomation aiShortDescription; - private SimpleControls.AdditionalInfomation aiDescription; - private SimpleControls.AdditionalInfomation aiDatasetType; - private SimpleControls.AdditionalInfomation aiKeywords; - private SimpleControls.AdditionalInfomation aiDatasetSubtype; - private SimpleControls.AdditionalInfomation aiDataSourceSetting; - private SimpleControls.AdditionalInfomation aiDataSource; - private SimpleControls.AdditionalInfomation aiPurposeOfDataset; - private SimpleControls.AdditionalInfomation aiResourceType; - private SimpleControls.AdditionalInfomation aiEndDate; - private SimpleControls.AdditionalInfomation aiStartDate; - private SimpleControls.AdditionalInfomation aiGranularity; - private SimpleControls.AdditionalInfomation aiGeographicalCoverage; - private SimpleControls.AdditionalInfomation aiJuristiction; - private SimpleControls.AdditionalInfomation aiDataProcessor; - private SimpleControls.AdditionalInfomation aiDataController; - private SimpleControls.AdditionalInfomation aiAccessContact; - private SimpleControls.AdditionalInfomation aiControlledGroup; - private SimpleControls.AdditionalInfomation aiPeople; - private SimpleControls.AdditionalInfomation aiDOI; - private SimpleControls.AdditionalInfomation aiUpdateFrequency; - private SimpleControls.AdditionalInfomation aiUpdateLag; - private SimpleControls.AdditionalInfomation aiInitialReleaseDate; - private SimpleControls.AdditionalInfomation aiAssociatedMedia; + private SimpleControls.AdditionalInfomationUI aiAcronym; + private SimpleControls.AdditionalInfomationUI aiShortDescription; + private SimpleControls.AdditionalInfomationUI aiDescription; + private SimpleControls.AdditionalInfomationUI aiDatasetType; + private SimpleControls.AdditionalInfomationUI aiKeywords; + private SimpleControls.AdditionalInfomationUI aiDatasetSubtype; + private SimpleControls.AdditionalInfomationUI aiDataSourceSetting; + private SimpleControls.AdditionalInfomationUI aiDataSource; + private SimpleControls.AdditionalInfomationUI aiPurposeOfDataset; + private SimpleControls.AdditionalInfomationUI aiResourceType; + private SimpleControls.AdditionalInfomationUI aiEndDate; + private SimpleControls.AdditionalInfomationUI aiStartDate; + private SimpleControls.AdditionalInfomationUI aiGranularity; + private SimpleControls.AdditionalInfomationUI aiGeographicalCoverage; + private SimpleControls.AdditionalInfomationUI aiJuristiction; + private SimpleControls.AdditionalInfomationUI aiDataProcessor; + private SimpleControls.AdditionalInfomationUI aiDataController; + private SimpleControls.AdditionalInfomationUI aiAccessContact; + private SimpleControls.AdditionalInfomationUI aiControlledGroup; + private SimpleControls.AdditionalInfomationUI aiPeople; + private SimpleControls.AdditionalInfomationUI aiDOI; + private SimpleControls.AdditionalInfomationUI aiUpdateFrequency; + private SimpleControls.AdditionalInfomationUI aiUpdateLag; + private SimpleControls.AdditionalInfomationUI aiInitialReleaseDate; + private SimpleControls.AdditionalInfomationUI aiAssociatedMedia; private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDataSourceSetting; private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDataSource; } diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs b/Rdmp.UI/SimpleControls/AdditionalInfomationUI.Designer.cs similarity index 97% rename from Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs rename to Rdmp.UI/SimpleControls/AdditionalInfomationUI.Designer.cs index 81d3d95508..9d5131bce1 100644 --- a/Rdmp.UI/SimpleControls/AdditionalInfomation.Designer.cs +++ b/Rdmp.UI/SimpleControls/AdditionalInfomationUI.Designer.cs @@ -1,6 +1,6 @@ namespace Rdmp.UI.SimpleControls { - partial class AdditionalInfomation + partial class AdditionalInfomationUI { /// /// Required designer variable. @@ -29,7 +29,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdditionalInfomation)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdditionalInfomationUI)); pictureBox1 = new System.Windows.Forms.PictureBox(); toolTip1 = new System.Windows.Forms.ToolTip(components); ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.cs b/Rdmp.UI/SimpleControls/AdditionalInfomationUI.cs similarity index 89% rename from Rdmp.UI/SimpleControls/AdditionalInfomation.cs rename to Rdmp.UI/SimpleControls/AdditionalInfomationUI.cs index 4ab786b90e..2798ec4ced 100644 --- a/Rdmp.UI/SimpleControls/AdditionalInfomation.cs +++ b/Rdmp.UI/SimpleControls/AdditionalInfomationUI.cs @@ -12,7 +12,7 @@ namespace Rdmp.UI.SimpleControls { - public partial class AdditionalInfomation : RDMPUserControl + public partial class AdditionalInfomationUI : RDMPUserControl { private string _text = null; @@ -28,7 +28,7 @@ public string TooltipText } } - public AdditionalInfomation() + public AdditionalInfomationUI() { InitializeComponent(); } diff --git a/Rdmp.UI/SimpleControls/AdditionalInfomation.resx b/Rdmp.UI/SimpleControls/AdditionalInfomationUI.resx similarity index 100% rename from Rdmp.UI/SimpleControls/AdditionalInfomation.resx rename to Rdmp.UI/SimpleControls/AdditionalInfomationUI.resx From 5278d72f6fe4881a1633fedfff79e6b3800ed0db Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 11 Feb 2025 16:09:25 +0000 Subject: [PATCH 33/36] update data source parsing --- Rdmp.Core/Curation/Data/Catalogue.cs | 44 +++++++++++++++++++++------ Rdmp.Core/Curation/Data/ICatalogue.cs | 2 -- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 5b1c5b94dd..7bf8000637 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -91,8 +91,8 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private string _shortDescription; private string _dataType; private string _dataSubtype; - private string _dataSource; - private string _dataSourceSetting; + private DataSourceTypes _dataSource; + private DataSourceSettingTypes _dataSourceSetting; private DateTime? _datasetReleaseDate; private DateTime? _startDate; private DateTime? _endDate; @@ -521,9 +521,9 @@ public DateTime? DatasetStartDate /// public string DataSubtype { get => _dataSubtype; set => SetField(ref _dataSubtype, value); } /// - public string DataSource { get => _dataSource; set => SetField(ref _dataSource, value); } + public DataSourceTypes DataSource { get => _dataSource; set => SetField(ref _dataSource, value); } /// - public string DataSourceSetting { get => _dataSourceSetting; set => SetField(ref _dataSourceSetting, value); } + public DataSourceSettingTypes DataSourceSetting { get => _dataSourceSetting; set => SetField(ref _dataSourceSetting, value); } /// public DateTime? DatasetReleaseDate { get => _datasetReleaseDate; set => SetField(ref _datasetReleaseDate, value); } /// @@ -768,7 +768,8 @@ public enum DatasetType Politics } - public enum DatasetSubType { + public enum DatasetSubType + { NotApplicable, BirthsAndDeaths, NationalDiseaseRegistryAndAudits, @@ -863,7 +864,7 @@ public enum UpdateLagTimes Variable, NotApplicable } - + public enum DatasetPurpose { Other, @@ -878,7 +879,8 @@ public enum DatasetPurpose Statutory } - public enum DataSourceTypes { + public enum DataSourceTypes + { EPR, ElectronicSurvey, LIMS, @@ -1106,8 +1108,32 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) Folder = r["Folder"].ToString(); ShortDescription = r["ShortDescription"].ToString(); - DataSource = r["DataSource"].ToString(); - DataSourceSetting = r["DataSourceSetting"].ToString(); + var dataSource = r["DataSource"]; + if (dataSource == null || dataSource == DBNull.Value) + { + DataSource = DataSourceTypes.Other; + } + else + { + if (Enum.TryParse(dataSource.ToString(), true, out DataSourceTypes dataSourceasEnum)) + DataSource = dataSourceasEnum; + else + throw new Exception( + $" r[\"DataSource\"] had value {dataSource} which is not contained in Enum DataSourceTypes"); + } + var dataSourceSetting = r["DataSourceSetting"]; + if (dataSourceSetting == null || dataSourceSetting == DBNull.Value) + { + DataSourceSetting = DataSourceSettingTypes.Other; + } + else + { + if (Enum.TryParse(dataSourceSetting.ToString(), true, out DataSourceSettingTypes dataSourceasEnum)) + DataSourceSetting = dataSourceasEnum; + else + throw new Exception( + $" r[\"DataSourceSetting\"] had value {dataSourceSetting} which is not contained in Enum DataSourceSettingTypes"); + } StartDate = !string.IsNullOrEmpty(r["StartDate"].ToString()) ? DateTime.Parse(r["StartDate"].ToString()) : null; EndDate = !string.IsNullOrEmpty(r["EndDate"].ToString()) ? DateTime.Parse(r["EndDate"].ToString()) : null; DatasetReleaseDate = !string.IsNullOrEmpty(r["DatasetReleaseDate"].ToString()) ? DateTime.Parse(r["DatasetReleaseDate"].ToString()) : null; diff --git a/Rdmp.Core/Curation/Data/ICatalogue.cs b/Rdmp.Core/Curation/Data/ICatalogue.cs index 76aa7004c7..bde6aced42 100644 --- a/Rdmp.Core/Curation/Data/ICatalogue.cs +++ b/Rdmp.Core/Curation/Data/ICatalogue.cs @@ -106,8 +106,6 @@ public interface ICatalogue : IHasDependencies, IHasQuerySyntaxHelper, INamed, I string ShortDescription { get;set; } string DataType { get; set; } string DataSubtype { get; set; } - string DataSource { get; set; } - string DataSourceSetting { get; set; } DateTime? DatasetReleaseDate { get; set; } DateTime? StartDate { get; set; } DateTime? EndDate { get; set; } From 5680f9b824ec09948383e5a04a69fe54e9dbac2a Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 11 Feb 2025 16:13:23 +0000 Subject: [PATCH 34/36] tidy up --- Rdmp.UI/MainFormUITabs/CatalogueUI.cs | 8 +++----- Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs | 17 ++++++++--------- .../DropdownOptionsChipDisplay.cs | 5 ++--- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index c2cf823d9a..fa386b920b 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -62,11 +62,10 @@ private string AddSpacesToSentence(string text, bool preserveAcronyms) newText.Append(text[0]); for (int i = 1; i < text.Length; i++) { - if (char.IsUpper(text[i])) - if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || + if (char.IsUpper(text[i]) && ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || (preserveAcronyms && char.IsUpper(text[i - 1]) && - i < text.Length - 1 && !char.IsUpper(text[i + 1]))) - newText.Append(' '); + i < text.Length - 1 && !char.IsUpper(text[i + 1])))) + newText.Append(' '); newText.Append(text[i]); } return newText.ToString(); @@ -101,7 +100,6 @@ public override void SetDatabaseObject(IActivateItems activator, Catalogue datab _scintillaDescription = f.Create(null, SyntaxLanguage.None, null, true, false, activator.CurrentDirectory); _scintillaDescription.Font = SystemFonts.DefaultFont; _scintillaDescription.WrapMode = WrapMode.Word; - //panel1.Controls.Add(_scintillaDescription); } base.SetDatabaseObject(activator, databaseObject); diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs index 8cfeb49693..549a794236 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/Chip.cs @@ -13,13 +13,13 @@ namespace Rdmp.UI.SimpleControls.MultiSelectChips { public partial class Chip : UserControl { - private readonly Func _clear; - public Chip(string value, Func clear) + private readonly Func _clear; + public Chip(string value, Func clear) { InitializeComponent(); - lblText.Text = AddSpacesToSentence(value,true); - btnClear.Location = new Point(lblText.Width + lblText.Location.X+5, btnClear.Location.Y); - this.Size = new System.Drawing.Size(lblText.Width + lblText.Location.X + btnClear.Width+15, this.Size.Height); + lblText.Text = AddSpacesToSentence(value, true); + btnClear.Location = new Point(lblText.Width + lblText.Location.X + 5, btnClear.Location.Y); + this.Size = new System.Drawing.Size(lblText.Width + lblText.Location.X + btnClear.Width + 15, this.Size.Height); _clear = clear; } @@ -36,11 +36,10 @@ private string AddSpacesToSentence(string text, bool preserveAcronyms) newText.Append(text[0]); for (int i = 1; i < text.Length; i++) { - if (char.IsUpper(text[i])) - if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || + if (char.IsUpper(text[i]) && ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || (preserveAcronyms && char.IsUpper(text[i - 1]) && - i < text.Length - 1 && !char.IsUpper(text[i + 1]))) - newText.Append(' '); + i < text.Length - 1 && !char.IsUpper(text[i + 1])))) + newText.Append(' '); newText.Append(text[i]); } return newText.ToString(); diff --git a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs index a365134f1c..752399dbb4 100644 --- a/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs +++ b/Rdmp.UI/SimpleControls/MultiSelectChips/DropdownOptionsChipDisplay.cs @@ -23,10 +23,9 @@ private string AddSpacesToSentence(string text, bool preserveAcronyms) newText.Append(text[0]); for (int i = 1; i < text.Length; i++) { - if (char.IsUpper(text[i])) - if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || + if (char.IsUpper(text[i]) && ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) || (preserveAcronyms && char.IsUpper(text[i - 1]) && - i < text.Length - 1 && !char.IsUpper(text[i + 1]))) + i < text.Length - 1 && !char.IsUpper(text[i + 1])))) newText.Append(' '); newText.Append(text[i]); } From e6ba45c7bce1edb90f01bb384bb822dd56cb9589 Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 12 Feb 2025 07:55:49 +0000 Subject: [PATCH 35/36] add other --- Rdmp.Core/Curation/Data/Catalogue.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 7bf8000637..486c573551 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -881,13 +881,13 @@ public enum DatasetPurpose public enum DataSourceTypes { + Other, EPR, ElectronicSurvey, LIMS, PaperBased, FreeTextNLP, MachineLearning, - Other } public enum DataSourceSettingTypes { From 6808cafdc0e0846728e1e403838ae9392e2f6077 Mon Sep 17 00:00:00 2001 From: James Friel Date: Wed, 12 Feb 2025 08:30:58 +0000 Subject: [PATCH 36/36] move other --- Rdmp.Core/Curation/Data/Catalogue.cs | 4 ++-- .../Sources/ExecuteDatasetExtractionSource.cs | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index 486c573551..83008d716d 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -891,6 +891,7 @@ public enum DataSourceTypes } public enum DataSourceSettingTypes { + Other, CohortStudyTrial, Clinic, PrimaryCareReferrals, @@ -912,8 +913,7 @@ public enum DataSourceSettingTypes Private, SocialCareHealthcareAtHome, SocialCareOthersocialData, - Census, - Other + Census } #endregion diff --git a/Rdmp.Core/DataExport/DataExtraction/Pipeline/Sources/ExecuteDatasetExtractionSource.cs b/Rdmp.Core/DataExport/DataExtraction/Pipeline/Sources/ExecuteDatasetExtractionSource.cs index 3daced40fa..7392087dda 100644 --- a/Rdmp.Core/DataExport/DataExtraction/Pipeline/Sources/ExecuteDatasetExtractionSource.cs +++ b/Rdmp.Core/DataExport/DataExtraction/Pipeline/Sources/ExecuteDatasetExtractionSource.cs @@ -198,12 +198,12 @@ private void CreateCohortTempTable(DbConnection con, IDataLoadEventListener list """; break; case DatabaseType.Oracle: - sql= $""" + sql = $""" CREATE TEMPORARY TABLE {_uuid} SELECT * FROM {_externalCohortTable.TableName} WHERE {_whereSQL} """; break; case DatabaseType.PostgreSql: - sql= $""" + sql = $""" CREATE TEMP TABLE {_uuid} AS SELECT * FROM {_externalCohortTable.TableName} WHERE {_whereSQL} """; @@ -222,8 +222,9 @@ CREATE TEMP TABLE {_uuid} AS { cmd.ExecuteNonQuery(); } - catch (Exception ex) { - listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, $"Unable to create temporary table for cohort. Original cohort table will be used",ex)); + catch (Exception ex) + { + listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, $"Unable to create temporary table for cohort. Original cohort table will be used", ex)); _uuid = null; } listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information, $"Cohort successfully copied to temporary table")); @@ -275,7 +276,12 @@ public virtual DataTable GetChunk(IDataLoadEventListener listener, GracefulCance _hostedSource = UseTempTablesWhenExtractingCohort ? new DbDataCommandDataFlowSource(cmdSql, $"ExecuteDatasetExtraction {Request.DatasetBundle.DataSet}", _con, - ExecutionTimeout) : new DbDataCommandDataFlowSource(cmdSql, + ExecutionTimeout) + { + AllowEmptyResultSets = AllowEmptyExtractions || Request.IsBatchResume, + BatchSize = BatchSize + } + : new DbDataCommandDataFlowSource(cmdSql, $"ExecuteDatasetExtraction {Request.DatasetBundle.DataSet}", Request.GetDistinctLiveDatabaseServer().Builder, ExecutionTimeout)