Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/HicServices/RDMP into re…
Browse files Browse the repository at this point in the history
…lease/8.4.0
  • Loading branch information
JFriel committed Oct 10, 2024
2 parents 53596b0 + 13c2ac8 commit c2ce5d3
Show file tree
Hide file tree
Showing 26 changed files with 721 additions and 588 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,24 @@ private T Activate<T, T2>(T2 databaseObject, Image<Rgba32> tabImage)

var uiInstance = new T();
var floatable = WindowFactory.Create(this, RefreshBus, uiInstance, tabImage, databaseObject);

int? insertIndex = null;
var panel = _mainDockPanel.Panes.Where(p => p.IsActiveDocumentPane).SingleOrDefault();
if (panel is not null)
{
var contents = panel.Contents;
insertIndex = contents.IndexOf(panel.ActiveContent)+1;
}

floatable.Show(_mainDockPanel, DockState.Document);

uiInstance.SetDatabaseObject(this, databaseObject);

if (insertIndex is not null)
{
_mainDockPanel.ActivePane.SetContentIndex(floatable, (int)insertIndex);
}

SetTabText(floatable, uiInstance);

return uiInstance;
Expand Down Expand Up @@ -436,32 +451,32 @@ public DockContent Activate(DeserializeInstruction instruction, IActivateItems a
case IObjectCollectionControl uiCollection:
return Activate(uiCollection, instruction.ObjectCollection);
case IRDMPSingleDatabaseObjectControl uiInstance:
{
var databaseObject = instruction.DatabaseObject;

//the database object is gone? deleted maybe
if (databaseObject == null)
return null;

DockContent floatable = WindowFactory.Create(this, RefreshBus, uiInstance,
CoreIconProvider.GetImage(databaseObject), databaseObject);

floatable.Show(_mainDockPanel, DockState.Document);
try
{
uiInstance.SetDatabaseObject(this, (DatabaseEntity)databaseObject);
SetTabText(floatable, uiInstance);
var databaseObject = instruction.DatabaseObject;

//the database object is gone? deleted maybe
if (databaseObject == null)
return null;

DockContent floatable = WindowFactory.Create(this, RefreshBus, uiInstance,
CoreIconProvider.GetImage(databaseObject), databaseObject);

floatable.Show(_mainDockPanel, DockState.Document);
try
{
uiInstance.SetDatabaseObject(this, (DatabaseEntity)databaseObject);
SetTabText(floatable, uiInstance);
}
catch (Exception e)
{
floatable.Close();
throw new Exception(
$"SetDatabaseObject failed on Control of Type '{instruction.UIControlType.Name}', control closed, see inner Exception for details",
e);
}

return floatable;
}
catch (Exception e)
{
floatable.Close();
throw new Exception(
$"SetDatabaseObject failed on Control of Type '{instruction.UIControlType.Name}', control closed, see inner Exception for details",
e);
}

return floatable;
}
default:
return (DockContent)activator.ShowWindow(c, true);
}
Expand Down Expand Up @@ -833,7 +848,7 @@ public void StartSession(string sessionName, IEnumerable<IMapsDirectlyToDatabase
public override IPipelineRunner GetPipelineRunner(DialogArgs args, IPipelineUseCase useCase, IPipeline pipeline)
{

if(useCase is not null && pipeline is not null)
if (useCase is not null && pipeline is not null)
{
return new PipelineRunner(useCase, pipeline);
}
Expand Down Expand Up @@ -868,7 +883,7 @@ public override CohortHoldoutLookupRequest GetCohortHoldoutLookupRequest(Externa
return _mainDockPanel.Invoke(() =>
GetCohortHoldoutLookupRequest(externalCohortTable, project, cic));

var ui = new Rdmp.UI.CohortUI.CreateHoldoutLookup.CreateHoldoutLookupUI(this, externalCohortTable, cic);
var ui = new Rdmp.UI.CohortUI.CreateHoldoutLookup.CreateHoldoutLookupUI(this, externalCohortTable, cic);

if (!string.IsNullOrWhiteSpace(cic.Description))
ui.CohortDescription = $"{cic.Description} ({Environment.UserName} - {DateTime.Now})";
Expand All @@ -878,7 +893,7 @@ public override CohortHoldoutLookupRequest GetCohortHoldoutLookupRequest(Externa
public override ICatalogue CreateAndConfigureCatalogue(ITableInfo tableInfo,
ColumnInfo[] extractionIdentifierColumns, string initialDescription, IProject projectSpecific, string folder)
{
if(extractionIdentifierColumns is not null)
if (extractionIdentifierColumns is not null)
{
return base.CreateAndConfigureCatalogue(tableInfo, extractionIdentifierColumns, initialDescription, projectSpecific, folder);
}
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# Changelog
All notable changes to this project will be documented in this file.

Expand All @@ -13,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [8.3.1] - Unreleased

- Improve Performance of regenerating problems with child providers
- Update UI Tab opening Logic
- Add Filter to Left-Hand Tree View

## [8.3.0] - 2024-09-23

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>11.0</LangVersion>
<Version>8.2.0</Version>
<Version>8.3.0</Version>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
10 changes: 5 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<ItemGroup>
<PackageVersion Include="AWSSDK.S3" Version="3.7.403.1" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.400.22" />
<PackageVersion Include="AWSSDK.SSO" Version="3.7.400.22" />
<PackageVersion Include="AWSSDK.SSOOIDC" Version="3.7.400.22" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.404.5" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.400.33" />
<PackageVersion Include="AWSSDK.SSO" Version="3.7.400.33" />
<PackageVersion Include="AWSSDK.SSOOIDC" Version="3.7.400.33" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="Equ" Version="2.3.0" />
<PackageVersion Include="ExcelNumberFormat" Version="1.1.0" />
Expand All @@ -25,7 +25,7 @@
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
<PackageVersion Include="SSH.NET" Version="2024.1.0" />
<PackageVersion Include="Terminal.Gui" Version="1.17.1" />
<PackageVersion Include="YamlDotNet" Version="16.1.2" />
<PackageVersion Include="YamlDotNet" Version="16.1.3" />
<PackageVersion Include="ConsoleControl" Version="1.3.0" />
<PackageVersion Include="Autoupdater.NET.Official" Version="1.9.2" />
<PackageVersion Include="DockPanelSuite.ThemeVS2015" Version="3.1.1" />
Expand Down
173 changes: 90 additions & 83 deletions Rdmp.UI/Collections/CatalogueCollectionUI.Designer.cs

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

6 changes: 4 additions & 2 deletions Rdmp.UI/Collections/CatalogueCollectionUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ public void RefreshUIFromDatabase(object oRefreshFrom)
Alignment = ToolStripItemAlignment.Right,
ToolTipText = "Refresh Object"
};
_refresh.Click += delegate (object sender, EventArgs e) {
_refresh.Click += delegate (object sender, EventArgs e)
{
var catalogue = Activator.CoreChildProvider.AllCatalogues.First();
if (catalogue is not null)
{
Expand Down Expand Up @@ -225,7 +226,8 @@ public override void SetItemActivator(IActivateItems activator)
Activator,
olvColumn1, //the icon column
//we have our own custom filter logic so no need to pass tbFilter
olvColumn1 //also the renameable column
olvColumn1, //also the renameable column
tbFilter
);

CommonTreeFunctionality.MaintainRootObjects = new[]
Expand Down
Loading

0 comments on commit c2ce5d3

Please sign in to comment.