diff --git a/.ci/code/UI_Test/Helpers/InstantiateCaller.cs b/.ci/code/UI_Test/Helpers/InstantiateCaller.cs index a08507e..b316450 100644 --- a/.ci/code/UI_Test/Helpers/InstantiateCaller.cs +++ b/.ci/code/UI_Test/Helpers/InstantiateCaller.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -92,3 +92,4 @@ public static Caller InstantiateCaller(Type type) } + diff --git a/.ci/code/UI_Test/Helpers/PossibleComponentItems.cs b/.ci/code/UI_Test/Helpers/PossibleComponentItems.cs index a038920..73c7d4f 100644 --- a/.ci/code/UI_Test/Helpers/PossibleComponentItems.cs +++ b/.ci/code/UI_Test/Helpers/PossibleComponentItems.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -47,3 +47,4 @@ public static List PossibleComponentItems() } + diff --git a/.ci/code/UI_Test/Objects/DummyAccessor.cs b/.ci/code/UI_Test/Objects/DummyAccessor.cs index 52c5293..0d26041 100644 --- a/.ci/code/UI_Test/Objects/DummyAccessor.cs +++ b/.ci/code/UI_Test/Objects/DummyAccessor.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -130,3 +130,4 @@ private T GetDummyObject() + diff --git a/.ci/code/UI_Test/Objects/DummyCaller.cs b/.ci/code/UI_Test/Objects/DummyCaller.cs index ee757c7..4ff5a1a 100644 --- a/.ci/code/UI_Test/Objects/DummyCaller.cs +++ b/.ci/code/UI_Test/Objects/DummyCaller.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -76,3 +76,4 @@ public override object Run(List inputs) + diff --git a/.ci/code/UI_Test/Properties/AssemblyInfo.cs b/.ci/code/UI_Test/Properties/AssemblyInfo.cs index 9350912..d9d5e28 100644 --- a/.ci/code/UI_Test/Properties/AssemblyInfo.cs +++ b/.ci/code/UI_Test/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -55,5 +55,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.0.0.0")] +[assembly: AssemblyFileVersion("7.1.0.0")] + diff --git a/.ci/code/UI_Test/Verify/ComponentInstantiation.cs b/.ci/code/UI_Test/Verify/ComponentInstantiation.cs index 3070f56..1375818 100644 --- a/.ci/code/UI_Test/Verify/ComponentInstantiation.cs +++ b/.ci/code/UI_Test/Verify/ComponentInstantiation.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -87,3 +87,4 @@ public static TestResult ComponentInstantiation(SearchItem item) } + diff --git a/.ci/code/UI_Test/Verify/ComponentReadWriteCycle.cs b/.ci/code/UI_Test/Verify/ComponentReadWriteCycle.cs index f281f26..8352960 100644 --- a/.ci/code/UI_Test/Verify/ComponentReadWriteCycle.cs +++ b/.ci/code/UI_Test/Verify/ComponentReadWriteCycle.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -133,3 +133,4 @@ public static TestResult ComponentReadWriteCycle(SearchItem item) } + diff --git a/.ci/code/UI_Test/Verify/ComponentRunCycle.cs b/.ci/code/UI_Test/Verify/ComponentRunCycle.cs index d6dd75f..e55c708 100644 --- a/.ci/code/UI_Test/Verify/ComponentRunCycle.cs +++ b/.ci/code/UI_Test/Verify/ComponentRunCycle.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -145,3 +145,4 @@ public static TestResult ComponentRunCycle(SearchItem item) } + diff --git a/BHoM_UI.sln b/BHoM_UI.sln index 26a9ac5..373ae8f 100644 --- a/BHoM_UI.sln +++ b/BHoM_UI.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.1169 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34616.47 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BHoM_UI", "BHoM_UI\BHoM_UI.csproj", "{69F4F042-E23A-4673-AB32-3D787CFA976C}" EndProject @@ -12,6 +12,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI_Engine", "UI_Engine\UI_E {50D4C1ED-C16C-4365-A742-938BF49EC4B0} = {50D4C1ED-C16C-4365-A742-938BF49EC4B0} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BHoM_Windows_UI", "BHoM_Windows_UI\BHoM_Windows_UI.csproj", "{9BA156D1-851D-4267-A94F-6F238D17B634}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,6 +32,10 @@ Global {565DDBD0-5C04-4BE9-B57D-CE54C2124ABB}.Debug|Any CPU.Build.0 = Debug|Any CPU {565DDBD0-5C04-4BE9-B57D-CE54C2124ABB}.Release|Any CPU.ActiveCfg = Release|Any CPU {565DDBD0-5C04-4BE9-B57D-CE54C2124ABB}.Release|Any CPU.Build.0 = Release|Any CPU + {9BA156D1-851D-4267-A94F-6F238D17B634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BA156D1-851D-4267-A94F-6F238D17B634}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BA156D1-851D-4267-A94F-6F238D17B634}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BA156D1-851D-4267-A94F-6F238D17B634}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/BHoM_UI/Caller/AddToMenu.cs b/BHoM_UI/Caller/AddToMenu.cs index 6458edb..df71abb 100644 --- a/BHoM_UI/Caller/AddToMenu.cs +++ b/BHoM_UI/Caller/AddToMenu.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -82,3 +82,4 @@ public void SetSelectorMenu(ItemSelectorMenu selectorMenu) + diff --git a/BHoM_UI/Caller/Compile.cs b/BHoM_UI/Caller/Compile.cs index 54c3229..54fda34 100644 --- a/BHoM_UI/Caller/Compile.cs +++ b/BHoM_UI/Caller/Compile.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -93,3 +93,4 @@ protected virtual void CompileMethod() + diff --git a/BHoM_UI/Caller/Core.cs b/BHoM_UI/Caller/Core.cs index 0fd95ef..adaf128 100644 --- a/BHoM_UI/Caller/Core.cs +++ b/BHoM_UI/Caller/Core.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -189,3 +189,4 @@ protected void MarkAsModified(CallerUpdate update) + diff --git a/BHoM_UI/Caller/IO_CRUD.cs b/BHoM_UI/Caller/IO_CRUD.cs index 0c0b2d4..bf33a84 100644 --- a/BHoM_UI/Caller/IO_CRUD.cs +++ b/BHoM_UI/Caller/IO_CRUD.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -197,3 +197,4 @@ public virtual bool CanUpdateInput(int index, string name) + diff --git a/BHoM_UI/Caller/Read.cs b/BHoM_UI/Caller/Read.cs index 162820b..39916e8 100644 --- a/BHoM_UI/Caller/Read.cs +++ b/BHoM_UI/Caller/Read.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -222,3 +222,4 @@ protected object OldCreateMethodToType(string json, List inputParams, + diff --git a/BHoM_UI/Caller/Run.cs b/BHoM_UI/Caller/Run.cs index 384151e..ea35c6e 100644 --- a/BHoM_UI/Caller/Run.cs +++ b/BHoM_UI/Caller/Run.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -78,7 +78,9 @@ public virtual object Run(List inputs) { try { - return m_CompiledFunc(inputs.ToArray()); + var result = m_CompiledFunc(inputs.ToArray()); + ResetLogSuppression(); + return result; } catch (InvalidCastException e) { @@ -88,10 +90,15 @@ public virtual object Run(List inputs) // Try to update the generic method to fit the input types MethodInfo method = Engine.Base.Compute.MakeGenericFromInputs(originalMethod, inputs.Select(x => x?.GetType()).ToList()); m_CompiledFunc = method.ToFunc(); - return m_CompiledFunc(inputs.ToArray()); + var result = m_CompiledFunc(inputs.ToArray()); + ResetLogSuppression(); + return result; } else + { + ResetLogSuppression(); throw e; + } } } else if (InputParams.Count <= 0) @@ -306,6 +313,14 @@ protected virtual bool ShouldCalculateNewResult(List inputs, ref object return true; } + /*************************************/ + + protected void ResetLogSuppression() + { + BH.Engine.Base.Compute.StopSuppressRecordingEvents(); //Ensure suppression is reset in case the calling method forgot to do it + BH.Engine.Base.Compute.ThrowErrorsAsExceptions(false); //Reset throwing errors to whatever the user may have set it to prior to running this method + } + /*************************************/ /**** Private Fields ****/ @@ -320,3 +335,4 @@ protected virtual bool ShouldCalculateNewResult(List inputs, ref object + diff --git a/BHoM_UI/Caller/SetComponentDetails.cs b/BHoM_UI/Caller/SetComponentDetails.cs index 6df059c..e9bdd45 100644 --- a/BHoM_UI/Caller/SetComponentDetails.cs +++ b/BHoM_UI/Caller/SetComponentDetails.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -88,3 +88,4 @@ protected virtual void SetComponentDetails(object item) + diff --git a/BHoM_UI/Caller/SetInputs.cs b/BHoM_UI/Caller/SetInputs.cs index c15d1ce..a67037f 100644 --- a/BHoM_UI/Caller/SetInputs.cs +++ b/BHoM_UI/Caller/SetInputs.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -116,3 +116,4 @@ protected virtual void SetInputs(object item) + diff --git a/BHoM_UI/Caller/SetItem.cs b/BHoM_UI/Caller/SetItem.cs index 52cf944..d5c7430 100644 --- a/BHoM_UI/Caller/SetItem.cs +++ b/BHoM_UI/Caller/SetItem.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -120,3 +120,4 @@ protected virtual object FromGeneric(object item) + diff --git a/BHoM_UI/Caller/SetOutputs.cs b/BHoM_UI/Caller/SetOutputs.cs index 3861363..d3c5fe7 100644 --- a/BHoM_UI/Caller/SetOutputs.cs +++ b/BHoM_UI/Caller/SetOutputs.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -124,3 +124,4 @@ protected virtual void SetOutputs(object item) + diff --git a/BHoM_UI/Caller/SetParamSelectionMenu.cs b/BHoM_UI/Caller/SetParamSelectionMenu.cs index d069bac..9f06a56 100644 --- a/BHoM_UI/Caller/SetParamSelectionMenu.cs +++ b/BHoM_UI/Caller/SetParamSelectionMenu.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -89,3 +89,4 @@ protected virtual void SetOutputSelectionMenu() + diff --git a/BHoM_UI/Caller/Write.cs b/BHoM_UI/Caller/Write.cs index 9aada9d..66a256f 100644 --- a/BHoM_UI/Caller/Write.cs +++ b/BHoM_UI/Caller/Write.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -64,3 +64,4 @@ public virtual string Write() + diff --git a/BHoM_UI/CallerTemplates/MultiChoiceCaller.cs b/BHoM_UI/CallerTemplates/MultiChoiceCaller.cs index afa8d7b..35f8417 100644 --- a/BHoM_UI/CallerTemplates/MultiChoiceCaller.cs +++ b/BHoM_UI/CallerTemplates/MultiChoiceCaller.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -141,3 +141,4 @@ private void EnumValueSelected(object sender, object e) + diff --git a/BHoM_UI/Components/Adapter/CreateAdapter.cs b/BHoM_UI/Components/Adapter/CreateAdapter.cs index 7619ea9..7a1d493 100644 --- a/BHoM_UI/Components/Adapter/CreateAdapter.cs +++ b/BHoM_UI/Components/Adapter/CreateAdapter.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -65,3 +65,4 @@ public CreateAdapterCaller() : base() + diff --git a/BHoM_UI/Components/Adapter/CreateRequest.cs b/BHoM_UI/Components/Adapter/CreateRequest.cs index fbce313..c9d09f3 100644 --- a/BHoM_UI/Components/Adapter/CreateRequest.cs +++ b/BHoM_UI/Components/Adapter/CreateRequest.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -69,3 +69,4 @@ public CreateRequestCaller() : base() + diff --git a/BHoM_UI/Components/Adapter/Execute.cs b/BHoM_UI/Components/Adapter/Execute.cs index 233cc9a..7d9fe80 100644 --- a/BHoM_UI/Components/Adapter/Execute.cs +++ b/BHoM_UI/Components/Adapter/Execute.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -100,8 +100,17 @@ public static Output, bool> Execute(BHoMAdapter adapter, IExecuteCo return result; } + if(!adapter.BeforeExecute(command, executeConfig)) + { + BH.Engine.Base.Compute.RecordError($"An error occurred within the setup actions for the Execute. Please rectify those issues to use the Execute component."); + return result; + } + result = adapter.Execute(command, executeConfig); // Item1 is the result of the Execute; Item2 the `success` bool. + if (!adapter.AfterExecute(command, executeConfig)) + BH.Engine.Base.Compute.RecordWarning($"An error occurred during the tear down operation for the Execute. Please take note of any additional warnings/errors received from the Execute component."); + return result != null ? result : new Output, bool>() { Item1 = null, Item2 = false }; } @@ -112,3 +121,4 @@ public static Output, bool> Execute(BHoMAdapter adapter, IExecuteCo + diff --git a/BHoM_UI/Components/Adapter/Move.cs b/BHoM_UI/Components/Adapter/Move.cs index 724c844..b2561d9 100644 --- a/BHoM_UI/Components/Adapter/Move.cs +++ b/BHoM_UI/Components/Adapter/Move.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -111,8 +111,19 @@ public static bool Move(BHoMAdapter source, BHoMAdapter target, object request = return false; } + if(!source.BeforeMove(target, actualRequest, pullType, pullCfg, pushType, pushCfg)) + { + BH.Engine.Base.Compute.RecordError($"An error occurred within the setup actions for the Move. Please rectify those issues to use the Move component."); + return false; + } + - return source.Move(target, actualRequest, pullType, pullCfg, pushType, pushCfg); + bool result = source.Move(target, actualRequest, pullType, pullCfg, pushType, pushCfg); + + if(!source.AfterMove(target, actualRequest, pullType, pullCfg, pushType, pushCfg)) + BH.Engine.Base.Compute.RecordWarning($"An error occurred during the tear down operation for the Move. Please take note of any additional warnings/errors received from the Move component."); + + return result; } /*************************************/ @@ -122,3 +133,4 @@ public static bool Move(BHoMAdapter source, BHoMAdapter target, object request = + diff --git a/BHoM_UI/Components/Adapter/Pull.cs b/BHoM_UI/Components/Adapter/Pull.cs index ea49f56..d45f0f8 100644 --- a/BHoM_UI/Components/Adapter/Pull.cs +++ b/BHoM_UI/Components/Adapter/Pull.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -117,7 +117,18 @@ public static IEnumerable Pull(BHoMAdapter adapter, object request = nul return null; } - return adapter.Pull(actualRequest, pullType, pullConfig); + if(!adapter.BeforePull(actualRequest, pullType, pullConfig)) + { + BH.Engine.Base.Compute.RecordError($"An error occurred within the setup actions for the Pull. Please rectify those issues to use the Pull component."); + return null; + } + + IEnumerable result = adapter.Pull(actualRequest, pullType, pullConfig); + + if(!adapter.AfterPull(actualRequest, pullType, pullConfig)) + BH.Engine.Base.Compute.RecordWarning($"An error occurred during the tear down operation for the Pull. Please take note of any additional warnings/errors received from the Pull component."); + + return result; } /*************************************/ @@ -133,3 +144,4 @@ public static IEnumerable Pull(BHoMAdapter adapter, object request = nul + diff --git a/BHoM_UI/Components/Adapter/Push.cs b/BHoM_UI/Components/Adapter/Push.cs index ee4e6b7..2921164 100644 --- a/BHoM_UI/Components/Adapter/Push.cs +++ b/BHoM_UI/Components/Adapter/Push.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -109,8 +109,17 @@ public static Output, bool> Push(BHoMAdapter adapter, IEnumerable result = adapter.Push(objects, tag, pt, pushConfig); + if(!adapter.AfterPush(objects, tag, pt, pushConfig)) + BH.Engine.Base.Compute.RecordWarning($"An error occurred during the tear down operation for the Push. Please take note of any additional warnings/errors received from the Push component."); + return BH.Engine.Base.Create.Output(result, objects?.Count() == result?.Count()); } @@ -121,3 +130,4 @@ public static Output, bool> Push(BHoMAdapter adapter, IEnumerable objects = null) + diff --git a/BHoM_UI/Components/Engine/External.cs b/BHoM_UI/Components/Engine/External.cs index cd04729..d799d5e 100644 --- a/BHoM_UI/Components/Engine/External.cs +++ b/BHoM_UI/Components/Engine/External.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -63,3 +63,4 @@ public ExternalCaller() : base() + diff --git a/BHoM_UI/Components/Engine/FromJson.cs b/BHoM_UI/Components/Engine/FromJson.cs index 444e475..445ac9b 100644 --- a/BHoM_UI/Components/Engine/FromJson.cs +++ b/BHoM_UI/Components/Engine/FromJson.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -57,3 +57,4 @@ public FromJsonCaller() : base(typeof(BH.Engine.Serialiser.Convert).GetMethod("F + diff --git a/BHoM_UI/Components/Engine/GetEvents.cs b/BHoM_UI/Components/Engine/GetEvents.cs index 5008d5b..6d99687 100644 --- a/BHoM_UI/Components/Engine/GetEvents.cs +++ b/BHoM_UI/Components/Engine/GetEvents.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -99,3 +99,4 @@ public static Output, List, List, List> GetEven + diff --git a/BHoM_UI/Components/Engine/GetInfo.cs b/BHoM_UI/Components/Engine/GetInfo.cs index 3d8f756..62434ff 100644 --- a/BHoM_UI/Components/Engine/GetInfo.cs +++ b/BHoM_UI/Components/Engine/GetInfo.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -104,3 +104,4 @@ public static Output, List, List(IEnumerable list) + diff --git a/BHoM_UI/Components/Engine/ToJson.cs b/BHoM_UI/Components/Engine/ToJson.cs index e14a1cc..0d656c7 100644 --- a/BHoM_UI/Components/Engine/ToJson.cs +++ b/BHoM_UI/Components/Engine/ToJson.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -58,3 +58,4 @@ public ToJsonCaller() : base(typeof(BH.Engine.Serialiser.Convert).GetMethod("ToJ + diff --git a/BHoM_UI/Components/UI/FalseStartToggle.cs b/BHoM_UI/Components/UI/FalseStartToggle.cs index 27de83c..8cd3f38 100644 --- a/BHoM_UI/Components/UI/FalseStartToggle.cs +++ b/BHoM_UI/Components/UI/FalseStartToggle.cs @@ -1,6 +1,6 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -111,3 +111,4 @@ public override object Run(List inputs) } } + diff --git a/BHoM_UI/Components/UI/UnitTest.cs b/BHoM_UI/Components/UI/UnitTest.cs index 1719d8a..8bf54ca 100644 --- a/BHoM_UI/Components/UI/UnitTest.cs +++ b/BHoM_UI/Components/UI/UnitTest.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -146,3 +146,4 @@ private List SeparateOutputs(object returnObject) + diff --git a/BHoM_UI/Components/oM/CreateCustom.cs b/BHoM_UI/Components/oM/CreateCustom.cs index 0981506..2dd7142 100644 --- a/BHoM_UI/Components/oM/CreateCustom.cs +++ b/BHoM_UI/Components/oM/CreateCustom.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -142,3 +142,4 @@ public override bool RemoveInput(string name) + diff --git a/BHoM_UI/Components/oM/CreateData.cs b/BHoM_UI/Components/oM/CreateData.cs index feb4ad7..bf60a31 100644 --- a/BHoM_UI/Components/oM/CreateData.cs +++ b/BHoM_UI/Components/oM/CreateData.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -181,3 +181,4 @@ private void AddSourceLinkToMenu(object menu) + diff --git a/BHoM_UI/Components/oM/CreateDictionary.cs b/BHoM_UI/Components/oM/CreateDictionary.cs index 68acdae..4fb167c 100644 --- a/BHoM_UI/Components/oM/CreateDictionary.cs +++ b/BHoM_UI/Components/oM/CreateDictionary.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -91,3 +91,4 @@ public static IDictionary CreateDictionary(List keys, List value + diff --git a/BHoM_UI/Components/oM/CreateEnum.cs b/BHoM_UI/Components/oM/CreateEnum.cs index 79a03f4..0e68726 100644 --- a/BHoM_UI/Components/oM/CreateEnum.cs +++ b/BHoM_UI/Components/oM/CreateEnum.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -110,3 +110,4 @@ public override List GetChoiceNames() + diff --git a/BHoM_UI/Components/oM/CreateObject.cs b/BHoM_UI/Components/oM/CreateObject.cs index 07c903c..1d0a592 100644 --- a/BHoM_UI/Components/oM/CreateObject.cs +++ b/BHoM_UI/Components/oM/CreateObject.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -74,3 +74,4 @@ public CreateObjectCaller() : base() + diff --git a/BHoM_UI/Components/oM/CreateType.cs b/BHoM_UI/Components/oM/CreateType.cs index cc7605d..453afe6 100644 --- a/BHoM_UI/Components/oM/CreateType.cs +++ b/BHoM_UI/Components/oM/CreateType.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -121,3 +121,4 @@ public override void AddToMenu(object menu) + diff --git a/BHoM_UI/Global/DocumentListener.cs b/BHoM_UI/Global/DocumentListener.cs index 4224b6a..153b269 100644 --- a/BHoM_UI/Global/DocumentListener.cs +++ b/BHoM_UI/Global/DocumentListener.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -226,3 +226,4 @@ private static Label GetCell(string text) + diff --git a/BHoM_UI/Global/GlobalSearch.cs b/BHoM_UI/Global/GlobalSearch.cs index 6401b6c..581dc67 100644 --- a/BHoM_UI/Global/GlobalSearch.cs +++ b/BHoM_UI/Global/GlobalSearch.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -155,9 +155,20 @@ private static void M_SearchMenu_Disposed(object sender, EventArgs e) private static void ShowWithConstraint(SearchConfig config) { + var settings = BH.Engine.Settings.Query.GetSettings(typeof(BH.oM.UI.SearchSettings)) as SearchSettings; + List excludedToolkits = new List(); + if (settings != null) + excludedToolkits = settings.Toolkits.Where(x => !x.Include).Select(x => x.Toolkit).ToList(); + if (config != null) { - m_SearchMenu.PossibleItems = m_PossibleItems.Select(x => + m_SearchMenu.PossibleItems = m_PossibleItems.Where(x => + { + if (excludedToolkits.Any(y => x.Text.Contains(y))) + return false; + + return true; //If the text does not contain any of the excluded toolkits then include it in this display + }).Select(x => { SearchItem withWeight = x.ShallowClone() as SearchItem; withWeight.Weight = withWeight.Weight(config); @@ -166,7 +177,13 @@ private static void ShowWithConstraint(SearchConfig config) } else { - m_SearchMenu.PossibleItems = m_PossibleItems; + m_SearchMenu.PossibleItems = m_PossibleItems.Where(x => + { + if (excludedToolkits.Any(y => x.Text.Contains(y))) + return false; + + return true; //If the text does not contain any of the excluded toolkits then include it in this display + }).ToList(); } m_SearchMenu.HitsOnEmptySearch = config != null; @@ -189,3 +206,4 @@ private static void ShowWithConstraint(SearchConfig config) + diff --git a/BHoM_UI/Global/Initialisation.cs b/BHoM_UI/Global/Initialisation.cs index 0d8b5c7..bbc4034 100644 --- a/BHoM_UI/Global/Initialisation.cs +++ b/BHoM_UI/Global/Initialisation.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -145,3 +145,4 @@ private static bool InitialiseToolkit(IInitialisationSettings settings) + diff --git a/BHoM_UI/Global/SearchMenu.cs b/BHoM_UI/Global/SearchMenu.cs index 59399f7..5fe12b8 100644 --- a/BHoM_UI/Global/SearchMenu.cs +++ b/BHoM_UI/Global/SearchMenu.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -333,3 +333,4 @@ protected List GetComponentItems() + diff --git a/BHoM_UI/Global/SearchMenu_WinForm.cs b/BHoM_UI/Global/SearchMenu_WinForm.cs index 1c163a2..543437a 100644 --- a/BHoM_UI/Global/SearchMenu_WinForm.cs +++ b/BHoM_UI/Global/SearchMenu_WinForm.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -254,3 +254,4 @@ protected override void RefreshSearchResults(List hits) + diff --git a/BHoM_UI/Global/SearchMenu_Wpf.cs b/BHoM_UI/Global/SearchMenu_Wpf.cs index bed9bd0..dcf88bf 100644 --- a/BHoM_UI/Global/SearchMenu_Wpf.cs +++ b/BHoM_UI/Global/SearchMenu_Wpf.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -260,3 +260,4 @@ public static ImageSource GetImage(Bitmap bmp) + diff --git a/BHoM_UI/Menus/IItemSelectorMenu.cs b/BHoM_UI/Menus/IItemSelectorMenu.cs index 89493ca..167ac71 100644 --- a/BHoM_UI/Menus/IItemSelectorMenu.cs +++ b/BHoM_UI/Menus/IItemSelectorMenu.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -40,3 +40,4 @@ public interface IItemSelectorMenu + diff --git a/BHoM_UI/Menus/ItemSelector.cs b/BHoM_UI/Menus/ItemSelector.cs index 8eea69e..742ecdd 100644 --- a/BHoM_UI/Menus/ItemSelector.cs +++ b/BHoM_UI/Menus/ItemSelector.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -127,3 +127,4 @@ private void M_Menu_ItemSelected(object sender, object e) + diff --git a/BHoM_UI/Menus/ItemSelectorMenu.cs b/BHoM_UI/Menus/ItemSelectorMenu.cs index 2176610..0153945 100644 --- a/BHoM_UI/Menus/ItemSelectorMenu.cs +++ b/BHoM_UI/Menus/ItemSelectorMenu.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -112,3 +112,4 @@ protected void ReturnSelectedItem(object item) + diff --git a/BHoM_UI/Menus/ItemSelectorMenu_WinForm.cs b/BHoM_UI/Menus/ItemSelectorMenu_WinForm.cs index 0b4bad2..f4ed17b 100644 --- a/BHoM_UI/Menus/ItemSelectorMenu_WinForm.cs +++ b/BHoM_UI/Menus/ItemSelectorMenu_WinForm.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -176,3 +176,4 @@ protected void Search_TextChanged(object sender, EventArgs e) + diff --git a/BHoM_UI/Menus/ItemSelectorMenu_Wpf.cs b/BHoM_UI/Menus/ItemSelectorMenu_Wpf.cs index 9e25cc5..e5cb618 100644 --- a/BHoM_UI/Menus/ItemSelectorMenu_Wpf.cs +++ b/BHoM_UI/Menus/ItemSelectorMenu_Wpf.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -186,3 +186,4 @@ private void Menu_SizeChanged(object sender, SizeChangedEventArgs e) + diff --git a/BHoM_UI/Menus/ParamSelectorMenu.cs b/BHoM_UI/Menus/ParamSelectorMenu.cs index 758b654..4444a25 100644 --- a/BHoM_UI/Menus/ParamSelectorMenu.cs +++ b/BHoM_UI/Menus/ParamSelectorMenu.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -232,3 +232,4 @@ protected string ParamLabel() + diff --git a/BHoM_UI/Properties/AssemblyInfo.cs b/BHoM_UI/Properties/AssemblyInfo.cs index 3af873c..0a2d1d6 100644 --- a/BHoM_UI/Properties/AssemblyInfo.cs +++ b/BHoM_UI/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -55,7 +55,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.0.0.0")] +[assembly: AssemblyFileVersion("7.1.0.0")] + diff --git a/BHoM_UI/Properties/Resources.Designer.cs b/BHoM_UI/Properties/Resources.Designer.cs index 6b688f1..b5f6719 100644 --- a/BHoM_UI/Properties/Resources.Designer.cs +++ b/BHoM_UI/Properties/Resources.Designer.cs @@ -1,6 +1,6 @@ /* * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2023, the respective contributors. All rights reserved. + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. * * Each contributor holds copyright over their respective contributions. * The project versioning (Git) records all such contribution source information. @@ -657,3 +657,4 @@ internal static System.Drawing.Icon BHoM_Icon + diff --git a/BHoM_Windows_UI/BHoM_Windows_UI.csproj b/BHoM_Windows_UI/BHoM_Windows_UI.csproj new file mode 100644 index 0000000..9b62b50 --- /dev/null +++ b/BHoM_Windows_UI/BHoM_Windows_UI.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {9BA156D1-851D-4267-A94F-6F238D17B634} + Library + Properties + BH.UI.Base.Windows + BHoM_Windows_UI + v4.7.2 + 512 + true + + + true + full + false + ..\Build\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Build\ + TRACE + prompt + 4 + + + + $(ProgramData)\BHoM\Assemblies\BHoM.dll + False + False + + + $(ProgramData)\BHoM\Assemblies\BHoM_Engine.dll + False + False + + + + + $(ProgramData)\BHoM\Assemblies\Settings_Engine.dll + False + False + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + SearchSettingsWindow.xaml + + + + + + Designer + MSBuild:Compile + + + + + {50d4c1ed-c16c-4365-a742-938bf49ec4b0} + UI_oM + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + xcopy "$(TargetDir)$(TargetFileName)" "$(ProgramData)\BHoM\Assemblies" /Y + + diff --git a/BHoM_Windows_UI/Interface/ISettingsWindow.cs b/BHoM_Windows_UI/Interface/ISettingsWindow.cs new file mode 100644 index 0000000..14483f3 --- /dev/null +++ b/BHoM_Windows_UI/Interface/ISettingsWindow.cs @@ -0,0 +1,35 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BH.UI.Base.Windows +{ + public interface ISettingsWindow + { + void OnPopUpClose(); + } +} diff --git a/BHoM_Windows_UI/Properties/AssemblyInfo.cs b/BHoM_Windows_UI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cce90ed --- /dev/null +++ b/BHoM_Windows_UI/Properties/AssemblyInfo.cs @@ -0,0 +1,58 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("BHoM_Windows_UI")] +[assembly: AssemblyDescription("https://github.com/BHoM/BHoM_UI")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("BuroHappold Engineering")] +[assembly: AssemblyProduct("BHoM_Windows_UI")] +[assembly: AssemblyCopyright("Copyright © BuroHappold Engineering 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9ba156d1-851d-4267-a94f-6f238d17b634")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("7.0.0.0")] +[assembly: AssemblyFileVersion("7.1.0.0")] diff --git a/BHoM_Windows_UI/Properties/Resources.Designer.cs b/BHoM_Windows_UI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..dbcebdd --- /dev/null +++ b/BHoM_Windows_UI/Properties/Resources.Designer.cs @@ -0,0 +1,95 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace BH.UI.Base.Windows.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BH.UI.Base.Windows.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap BHoM_Logo { + get { + object obj = ResourceManager.GetObject("BHoM_Logo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/BHoM_Windows_UI/Properties/Resources.resx b/BHoM_Windows_UI/Properties/Resources.resx new file mode 100644 index 0000000..cefdf13 --- /dev/null +++ b/BHoM_Windows_UI/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Resources\BHoM_Logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/BHoM_Windows_UI/Resources/BHoM_Logo.png b/BHoM_Windows_UI/Resources/BHoM_Logo.png new file mode 100644 index 0000000..e38b7cc Binary files /dev/null and b/BHoM_Windows_UI/Resources/BHoM_Logo.png differ diff --git a/BHoM_Windows_UI/Settings/SearchSettingsWindow.xaml b/BHoM_Windows_UI/Settings/SearchSettingsWindow.xaml new file mode 100644 index 0000000..ded9dde --- /dev/null +++ b/BHoM_Windows_UI/Settings/SearchSettingsWindow.xaml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + The Buildings and + + Habitats object Model + + + SUSTAINABLE CODE AT SCALE + + + + + + + + + + + +