diff --git a/CHANGELOG.md b/CHANGELOG.md index e37327e32e..12b4e4cdf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update Migration strategy to account for all Primary Keys when moving from staging -> live - Fix UI issue with viewing cross-database SQL results - Add UI Steps to deprecate old cohorts when importing a cohort +- Add instance setting to enable and disable Yes/No to all ## [8.3.1] - 2024-10-22 diff --git a/Directory.Packages.props b/Directory.Packages.props index b339697cfe..b08dff98c7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,9 +1,9 @@ - - - - + + + + diff --git a/Rdmp.UI/ChecksUI/ChecksUI.cs b/Rdmp.UI/ChecksUI/ChecksUI.cs index 6762b1490e..01c9b80148 100644 --- a/Rdmp.UI/ChecksUI/ChecksUI.cs +++ b/Rdmp.UI/ChecksUI/ChecksUI.cs @@ -45,7 +45,7 @@ public partial class ChecksUI : UserControl, ICheckNotifier private ConcurrentBag _results = new(); private bool outOfDate; - public ChecksUI() + public ChecksUI() { InitializeComponent(); olvChecks.ItemActivate += olvChecks_ItemActivate; diff --git a/Rdmp.UI/LoadExecutionUIs/ExecuteLoadMetadataUI.cs b/Rdmp.UI/LoadExecutionUIs/ExecuteLoadMetadataUI.cs index 47547f6e58..af64b9cecf 100644 --- a/Rdmp.UI/LoadExecutionUIs/ExecuteLoadMetadataUI.cs +++ b/Rdmp.UI/LoadExecutionUIs/ExecuteLoadMetadataUI.cs @@ -17,7 +17,7 @@ using Rdmp.UI.CommandExecution.AtomicCommands; using Rdmp.UI.ItemActivation; using Rdmp.UI.TestsAndSetup.ServicePropogation; - +using Rdmp.Core.Setting; namespace Rdmp.UI.LoadExecutionUIs; @@ -37,7 +37,6 @@ public partial class ExecuteLoadMetadataUI : DatasetLoadControl_Design private LoadMetadata _loadMetadata; private ILoadProgress[] _allLoadProgresses; - private ToolStripComboBox dd_DebugOptions = new(); @@ -74,6 +73,16 @@ public override void SetDatabaseObject(IActivateItems activator, LoadMetadata da checkAndExecuteUI1.SetItemActivator(activator); + checkAndExecuteUI1.AllowsYesNoToAll = false; + + if (activator.IsInteractive) + { + var ShowYestoAllNotoAlldataloadcheck = false; + var ShowYestoAllNotoAlldataloadcheckSetting = activator.RepositoryLocator.CatalogueRepository.GetAllObjects().Where(s => s.Key == "ToggleYestoAllNotoAlldataloadcheck").FirstOrDefault(); + if (ShowYestoAllNotoAlldataloadcheckSetting is not null) ShowYestoAllNotoAlldataloadcheck = Convert.ToBoolean(ShowYestoAllNotoAlldataloadcheckSetting.Value); + checkAndExecuteUI1.AllowsYesNoToAll = ShowYestoAllNotoAlldataloadcheck; + + } SetButtonStates(null, null); SetLoadProgressGroupBoxState(); diff --git a/Rdmp.UI/SimpleDialogs/InstanceSettings.Designer.cs b/Rdmp.UI/SimpleDialogs/InstanceSettings.Designer.cs index da422a5588..d2ea41272e 100644 --- a/Rdmp.UI/SimpleDialogs/InstanceSettings.Designer.cs +++ b/Rdmp.UI/SimpleDialogs/InstanceSettings.Designer.cs @@ -33,6 +33,7 @@ private void InitializeComponent() instanceSettingsToolTips = new System.Windows.Forms.ToolTip(components); label1 = new System.Windows.Forms.Label(); cbCohortVersioningOnCommit = new System.Windows.Forms.CheckBox(); + cbYesNoAll = new System.Windows.Forms.CheckBox(); SuspendLayout(); // // cbAutoSuggestProjectNumbers @@ -60,16 +61,28 @@ private void InitializeComponent() cbCohortVersioningOnCommit.AutoSize = true; cbCohortVersioningOnCommit.Location = new System.Drawing.Point(12, 65); cbCohortVersioningOnCommit.Name = "cbCohortVersioningOnCommit"; - cbCohortVersioningOnCommit.Size = new System.Drawing.Size(364, 19); + cbCohortVersioningOnCommit.Size = new System.Drawing.Size(400, 19); cbCohortVersioningOnCommit.TabIndex = 3; cbCohortVersioningOnCommit.Text = "Prompt user to create a new version of the cohort before committing it"; cbCohortVersioningOnCommit.UseVisualStyleBackColor = true; // + // cbYesNoAll + // + cbYesNoAll.AutoSize = true; + cbYesNoAll.Location = new System.Drawing.Point(13, 90); + cbYesNoAll.Name = "cbYesNoAll"; + cbYesNoAll.Size = new System.Drawing.Size(320, 19); + cbYesNoAll.TabIndex = 4; + cbYesNoAll.Text = "Show Yes to All and No to All option on data load check"; + cbYesNoAll.UseVisualStyleBackColor = true; + cbYesNoAll.CheckedChanged += checkBox1_CheckedChanged; + // // InstanceSettings // AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; ClientSize = new System.Drawing.Size(800, 450); + Controls.Add(cbYesNoAll); Controls.Add(cbCohortVersioningOnCommit); Controls.Add(label1); Controls.Add(cbAutoSuggestProjectNumbers); @@ -85,5 +98,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolTip instanceSettingsToolTips; private System.Windows.Forms.Label label1; private System.Windows.Forms.CheckBox cbCohortVersioningOnCommit; + private System.Windows.Forms.CheckBox cbYesNoAll; } } \ No newline at end of file diff --git a/Rdmp.UI/SimpleDialogs/InstanceSettings.cs b/Rdmp.UI/SimpleDialogs/InstanceSettings.cs index 9cf1eee4b3..cf00011e75 100644 --- a/Rdmp.UI/SimpleDialogs/InstanceSettings.cs +++ b/Rdmp.UI/SimpleDialogs/InstanceSettings.cs @@ -27,6 +27,7 @@ public InstanceSettings(IActivateItems activator) RegisterCheckbox(cbAutoSuggestProjectNumbers, "AutoSuggestProjectNumbers"); RegisterCheckbox(cbCohortVersioningOnCommit, "PromptForVersionOnCohortCommit"); + RegisterCheckbox(cbYesNoAll, "ToggleYestoAllNotoAlldataloadcheck"); _loaded = true; } @@ -61,7 +62,7 @@ private void RegisterCheckbox(CheckBox cb, string propertyName) var value = false; if (prop is null) { - prop = new Setting(_activator.RepositoryLocator.CatalogueRepository,propertyName, Convert.ToString(false)); + prop = new Setting(_activator.RepositoryLocator.CatalogueRepository, propertyName, Convert.ToString(false)); prop.SaveToDatabase(); } value = Convert.ToBoolean(prop.Value); @@ -75,5 +76,10 @@ private void RegisterCheckbox(CheckBox cb, string propertyName) // add help AddTooltip(cb, propertyName); } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + + } } } diff --git a/Rdmp.UI/SimpleDialogs/InstanceSettings.resx b/Rdmp.UI/SimpleDialogs/InstanceSettings.resx index cf87c79ddd..44c07ffc44 100644 --- a/Rdmp.UI/SimpleDialogs/InstanceSettings.resx +++ b/Rdmp.UI/SimpleDialogs/InstanceSettings.resx @@ -1,7 +1,7 @@