Skip to content

Commit

Permalink
Merge pull request #1184 from HicServices/dont-expand-cic
Browse files Browse the repository at this point in the history
Adds user setting ExpandAllInCohortBuilder
  • Loading branch information
tznind authored May 21, 2022
2 parents 0098f7b + 6464e46 commit 94e12e7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `CrashAtEnd` system for DLE that allows Attachers to flag a load as a failure without halting execution [#1157](https://github.com/HicServices/RDMP/issues/1157)
- Added `SimpleTicketingSystem` which simply opens the given URL+ticket [#775](https://github.com/HicServices/RDMP/issues/775)
- Added UserSettings editing UI to Console Gui
- Added ability to suppress tree expansion when opening Cohort Builder configurations

## [7.0.12] - 2022-05-16

Expand Down
17 changes: 15 additions & 2 deletions Rdmp.UI/SimpleDialogs/UserSettingsUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Rdmp.UI/SimpleDialogs/UserSettingsUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public UserSettingsFileUI(IActivateItems activator)
RegisterCheckbox(cbSelectiveRefresh, nameof(UserSettings.SelectiveRefresh));
RegisterCheckbox(cbAlwaysJoinEverything,nameof(UserSettings.AlwaysJoinEverything));
RegisterCheckbox(cbAutoRunSqlQueries, nameof(UserSettings.AutoRunSqlQueries));
RegisterCheckbox(cbExpandAllInCohortBuilder, nameof(UserSettings.ExpandAllInCohortBuilder));

AddTooltip(label7, nameof(UserSettings.CreateDatabaseTimeout));
AddTooltip(tbCreateDatabaseTimeout, nameof(UserSettings.CreateDatabaseTimeout));
Expand Down Expand Up @@ -190,9 +191,9 @@ private void CheckboxCheckedChanged(object sender, EventArgs e)
{
if (!_bLoaded)
return;

var cb = (CheckBox)sender;
checkboxDictionary[cb].SetValue(null,cb.Checked);
checkboxDictionary[cb].SetValue(null, cb.Checked);
}

private void ddTheme_SelectedIndexChanged(object sender, EventArgs e)
Expand Down
5 changes: 4 additions & 1 deletion Rdmp.UI/SubComponents/CohortIdentificationConfigurationUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
using Rdmp.UI.TestsAndSetup.ServicePropogation;
using ReusableLibraryCode;
using ReusableLibraryCode.Icons.IconProvision;
using ReusableLibraryCode.Settings;
using Timer = System.Windows.Forms.Timer;


Expand Down Expand Up @@ -247,7 +248,9 @@ public override void SetDatabaseObject(IActivateItems activator, CohortIdentific
});
_commonFunctionality.MenuBuilt += MenuBuilt;
tlvCic.AddObject(_configuration);
tlvCic.ExpandAll();

if(UserSettings.ExpandAllInCohortBuilder)
tlvCic.ExpandAll();
}

CommonFunctionality.AddToMenu(cbIncludeCumulative);
Expand Down
10 changes: 10 additions & 0 deletions Reusable/ReusableLibraryCode/Settings/UserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,16 @@ public static bool AutoRunSqlQueries
set { AppSettings.AddOrUpdateValue("AutoRunSqlQueries", value); }
}

/// <summary>
/// Enable to automatically expand the tree when opening or creating cohorts in
/// Cohort Builder
/// </summary>
public static bool ExpandAllInCohortBuilder
{
get { return AppSettings.GetValueOrDefault("ExpandAllInCohortBuilder", true); }
set { AppSettings.AddOrUpdateValue("ExpandAllInCohortBuilder", value); }
}


#endregion

Expand Down

0 comments on commit 94e12e7

Please sign in to comment.