Skip to content

Commit

Permalink
Merge branch 'release/3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Sep 16, 2019
2 parents 5edb92e + d97c5df commit 13f76b7
Show file tree
Hide file tree
Showing 402 changed files with 6,544 additions and 3,607 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,4 @@ __pycache__/
*.odx.cs
*.xsd.cs
Visual Studio 2013/
Visual Studio 2017/
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<ShowAsAssociation>
<Field Name="ActivateItems" />
<Field Name="_windowFactory" />
<Property Name="Navigation" />
<Property Name="MainForm" />
<Property Name="Navigation" />
</ShowAsAssociation>
</Class>
<Class Name="ResearchDataManagementPlatform.WindowManagement.WindowFactory" Collapsed="true">
Expand All @@ -59,7 +59,7 @@
<Class Name="ResearchDataManagementPlatform.WindowManagement.ActivateItems" Collapsed="true">
<Position X="5.25" Y="2.75" Width="2" />
<TypeIdentifier>
<HashCode>AAQAACAgAAECghDUBAAAoCEgIQQggwNhBFQQQEFAAQA=</HashCode>
<HashCode>AIQAACAgAAEAgBDUBAAAoCEgAAQgAwNgDFQQAEFAAQA=</HashCode>
<FileName>WindowManagement\ActivateItems.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
Expand Down Expand Up @@ -116,7 +116,7 @@
<Compartment Name="Fields" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAEgAAABATGAAAAAAACAAABCAQAIAgEAAAAQAAAAAQA=</HashCode>
<HashCode>AAEgAAABATGAIAAAAACAAABCAQAIAgEAAAAQCAAAAQA=</HashCode>
<FileName>RDMPMainForm.cs</FileName>
</TypeIdentifier>
</Class>
Expand Down Expand Up @@ -144,13 +144,6 @@
<Position X="26.25" Y="9" Width="2" />
<TypeIdentifier />
</Class>
<Class Name="ResearchDataManagementPlatform.WindowManagement.ContentWindowTracking.NavigationTrack" Collapsed="true">
<Position X="5.25" Y="1.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AQCAAAAIAAAAAABCIAAAAAAAAAgABSAEAAAAAAgACAI=</HashCode>
<FileName>WindowManagement\ContentWindowTracking\NavigationTrack.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Rdmp.Core.Curation.Data.Dashboarding.PersistStringHelper" Collapsed="true">
<Position X="7.5" Y="7.5" Width="1.75" />
<TypeIdentifier />
Expand All @@ -165,6 +158,10 @@
<TypeIdentifier />
<Lollipop Position="0.2" />
</Class>
<Class Name="ReusableUIComponents.NavigationTrack&lt;T&gt;" Collapsed="true">
<Position X="5.25" Y="1.5" Width="2.25" />
<TypeIdentifier />
</Class>
<Interface Name="Rdmp.UI.ItemActivation.IActivateItems" Collapsed="true">
<Position X="10.25" Y="5.5" Width="2.75" />
<Compartments>
Expand Down
19 changes: 16 additions & 3 deletions Application/ResearchDataManagementPlatform/Icon/RdmpFlow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
Expand Down Expand Up @@ -223,7 +222,8 @@ private IAtomicCommand[] GetNewCommands()
return new IAtomicCommand[]
{
new ExecuteCommandCreateNewCatalogueByImportingFile(Activator),
new ExecuteCommandCreateNewCatalogueByImportingExistingDataTable(Activator, false),
new ExecuteCommandCreateNewCatalogueByImportingExistingDataTable(Activator),
new ExecuteCommandCreateNewTableInfoByImportingExistingDataTable(Activator),
new ExecuteCommandCreateNewCohortIdentificationConfiguration(Activator),
new ExecuteCommandCreateNewLoadMetadata(Activator),
new ExecuteCommandCreateNewStandardRegex(Activator),
Expand Down
1 change: 0 additions & 1 deletion Application/ResearchDataManagementPlatform/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using CommandLine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@
using MapsDirectlyToDatabaseTable;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.Curation.Data.Cohort;
using Rdmp.Core.Curation.Data.Dashboarding;
using Rdmp.Core.Curation.Data.DataLoad;
using Rdmp.Core.Curation.Data.Defaults;
using Rdmp.Core.Curation.Data.ImportExport;
using Rdmp.Core.Providers;
using Rdmp.Core.QueryBuilding;
using Rdmp.Core.Repositories;
using Rdmp.UI.Collections;
using Rdmp.UI.Collections.Providers;
using Rdmp.UI.CommandExecution;
using Rdmp.UI.CommandExecution.AtomicCommands;
using Rdmp.UI.Copying;
using Rdmp.UI.DataLoadUIs.LoadMetadataUIs.LoadDiagram;
using Rdmp.UI.ExtractionUIs.FilterUIs;
using Rdmp.UI.ExtractionUIs.JoinsAndLookups;
using Rdmp.UI.Icons.IconProvision;
using Rdmp.UI.ItemActivation;
using Rdmp.UI.ItemActivation.Arranging;
Expand All @@ -35,12 +31,13 @@
using Rdmp.UI.Refreshing;
using Rdmp.UI.Rules;
using Rdmp.UI.SimpleDialogs;
using Rdmp.UI.SubComponents.Graphs;
using Rdmp.UI.SubComponents;
using Rdmp.UI.TestsAndSetup.ServicePropogation;
using ResearchDataManagementPlatform.WindowManagement.ContentWindowTracking.Persistence;
using ResearchDataManagementPlatform.WindowManagement.WindowArranging;
using ReusableLibraryCode.Checks;
using ReusableLibraryCode.Comments;
using ReusableUIComponents;
using ReusableUIComponents.CommandExecution;
using ReusableUIComponents.Dialogs;
using ReusableUIComponents.Theme;
Expand Down Expand Up @@ -107,7 +104,7 @@ public ActivateItems(ITheme theme,RefreshBus refreshBus, DockPanel mainDockPanel
RefreshBus.BeforePublish += (s, e) => UpdateChildProviders();

//handle custom icons from plugin user interfaces in which
CoreIconProvider = new DataExportIconProvider(PluginUserInterfaces.ToArray());
CoreIconProvider = new DataExportIconProvider(repositoryLocator,PluginUserInterfaces.ToArray());

SelectIMapsDirectlyToDatabaseTableDialog.ImageGetter = (model)=> CoreIconProvider.GetImage(model);

Expand Down Expand Up @@ -165,16 +162,7 @@ private void UpdateChildProviders()
CoreChildProvider.GetPluginChildren();
RefreshBus.ChildProvider = CoreChildProvider;
}

public Form ShowRDMPSingleDatabaseObjectControl(IRDMPSingleDatabaseObjectControl control,DatabaseEntity objectOfTypeT)
{
var content = WindowFactory.Create(this,control,objectOfTypeT);
content.Show(_mainDockPanel, DockState.Document);
control.SetDatabaseObject(this,objectOfTypeT);

return content;
}



public Form ShowWindow(Control singleControlForm, bool asDocument = false)
{
Expand Down Expand Up @@ -308,6 +296,9 @@ public void RequestItemEmphasis(object sender, EmphasiseRequest request)
else
root = request.ObjectToEmphasise; //assume maybe o is a root object itself?

if (root is CohortIdentificationConfiguration cic)
Activate<CohortIdentificationConfigurationUI, CohortIdentificationConfiguration>(cic);
else
if (root != null)
_windowManager.ShowCollectionWhichSupportsRootObjectType(root);

Expand All @@ -318,52 +309,11 @@ public void RequestItemEmphasis(object sender, EmphasiseRequest request)
var args = new EmphasiseEventArgs(request);
h(this, args);

var content = args.FormRequestingActivation as DockContent;

if(content != null)
if(args.FormRequestingActivation is DockContent content)
content.Activate();
}
}

public void ActivateLookupConfiguration(object sender, Catalogue catalogue,TableInfo optionalLookupTableInfo=null)
{
var t = Activate<LookupConfigurationUI, Catalogue>(catalogue);

if(optionalLookupTableInfo != null)
t.SetLookupTableInfo(optionalLookupTableInfo);
}

public void ViewFilterGraph(object sender,FilterGraphObjectCollection collection)
{
var aggFilter = collection.GetFilter() as AggregateFilter;

//if it's a cohort set
if(aggFilter != null && aggFilter.GetAggregate().IsCohortIdentificationAggregate)
{
var cohortAggregate = aggFilter.GetAggregate();
//use this instead
new ExecuteCommandViewCohortAggregateGraph(this,
new CohortSummaryAggregateGraphObjectCollection(cohortAggregate,collection.GetGraph(),CohortSummaryAdjustment.WhereRecordsIn,aggFilter))
.Execute();

return;
}

Activate<FilterGraphUI>(collection);
}

public void ActivateViewLog(LoadMetadata loadMetadata)
{
new ExecuteCommandViewLoadMetadataLogs(this).SetTarget(loadMetadata).Execute();
}

public IRDMPSingleDatabaseObjectControl ActivateViewLoadMetadataDiagram(object sender, LoadMetadata loadMetadata)
{
return Activate<LoadDiagramUI, LoadMetadata>(loadMetadata);
}



public bool IsRootObjectOfCollection(RDMPCollection collection, object rootObject)
{
//if the collection an arbitrary one then it is definetly not the root collection for anyone
Expand Down Expand Up @@ -402,12 +352,7 @@ public string DescribeProblemIfAny(object model)
/// <returns></returns>
public object GetRootObjectOrSelf(IMapsDirectlyToDatabaseTable objectToEmphasise)
{
var descendancy = CoreChildProvider.GetDescendancyListIfAnyFor(objectToEmphasise);

if (descendancy != null && descendancy.Parents.Any())
return descendancy.Parents[0];

return objectToEmphasise;
return CoreChildProvider.GetRootObjectOrSelf(objectToEmphasise);
}

public string GetDocumentation(Type type)
Expand Down Expand Up @@ -591,5 +536,16 @@ public bool YesNo(string text,string caption)
{
return MessageBox.Show(text,caption,MessageBoxButtons.YesNo) == DialogResult.Yes;
}

public bool TypeText(string header, string prompt, int maxLength, string initialText, out string text, bool requireSaneHeaderText)
{
var textTyper = new TypeTextOrCancelDialog(header, prompt, maxLength, initialText)
{
RequireSaneHeaderText = requireSaneHeaderText
};

text = textTyper.ShowDialog() == DialogResult.OK ? textTyper.ResultText : null;
return !string.IsNullOrWhiteSpace(text);
}
}
}

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

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using Rdmp.Core;
using Rdmp.Core.CommandExecution.AtomicCommands;
using Rdmp.Core.Providers;
using Rdmp.UI.CommandExecution.AtomicCommands;
Expand Down Expand Up @@ -46,14 +47,13 @@ private void BuildCommandLists()
tlpCohortCreation.Controls.Clear();
tlpDataExport.Controls.Clear();
tlpDataLoad.Controls.Clear();
tlpAdvanced.Controls.Clear();

/////////////////////////////////////Data Management/////////////////////////////////
//AddLabel("New Catalogue", tlpDataManagement);

AddCommand(new ExecuteCommandCreateNewCatalogueByImportingFile(_activator) { OverrideCommandName = "New Catalogue From File" }, tlpDataManagement);
AddCommand(new ExecuteCommandCreateNewCatalogueByImportingFile(_activator), tlpDataManagement);

AddCommand(new ExecuteCommandCreateNewCatalogueByImportingExistingDataTable(_activator, true) { OverrideCommandName = "New Catalogue From Existing Database Table" }, tlpDataManagement);
AddCommand(new ExecuteCommandCreateNewCatalogueByImportingExistingDataTable(_activator), tlpDataManagement);

AddCommand(new ExecuteCommandEditExistingCatalogue(_activator),
_activator.CoreChildProvider.AllCatalogues,
Expand All @@ -71,7 +71,7 @@ private void BuildCommandLists()

AddCommand(new ExecuteCommandCreateNewCohortIdentificationConfiguration(_activator)
{
OverrideCommandName = "Create New Cohort Identification Query"
OverrideCommandName = GlobalStrings.CreateNewCohortIdentificationQuery
},tlpCohortCreation);

AddCommand(new ExecuteCommandCreateNewCohortByExecutingACohortIdentificationConfiguration(_activator)
Expand Down
Loading

0 comments on commit 13f76b7

Please sign in to comment.