Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Refactoring #243

Merged
merged 44 commits into from
Sep 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
dcafd6b
Align with DataAccessor now an interface
adecler Jul 29, 2020
d6468e5
Aligning with removal of MethodCaller
adecler Jul 30, 2020
e91778f
Align with changes on Menu and DataAccessor
adecler Aug 1, 2020
efd1ab3
Aligning with namespace renaming in HoM_UI
adecler Aug 5, 2020
4c029ab
Making Excel compile after changes on BHoM_UI
adecler Aug 8, 2020
b4fdcdc
Fixing BHoM Excel crashing at start
adecler Aug 11, 2020
511ecd4
Fixes #242 incorrect list of options in cell dropdown
adecler Aug 11, 2020
393fcab
Adding try-catch on closing
adecler Aug 12, 2020
26f2f91
First wave of refactoring (mainly interaction between Formula and Dat…
adecler Aug 14, 2020
a38d79c
BHoM addin now initialised when Excel opens
adecler Aug 15, 2020
dcd61a5
refactoring Addin and Ribbon code
adecler Aug 15, 2020
575421c
Minor refactoring
adecler Aug 15, 2020
217a74c
project save
adecler Aug 15, 2020
e52376b
Reorganisation of the code
adecler Aug 15, 2020
b0a5961
simplifying code structure around itemSelector menu
adecler Aug 18, 2020
ab0c65c
Tydying up the Addin code
adecler Aug 18, 2020
6a0891d
Getting rid of legacy FormulaSearchMenu
adecler Aug 18, 2020
2b424b8
restoring internalise code that was removed
adecler Aug 19, 2020
6e69026
new saving system for callers and internalisation
adecler Aug 22, 2020
30ced11
restoring backward compatibility + additional cleaning
adecler Aug 22, 2020
0ce2146
getting rid of the BHoM_ValidationHidden sheet used in CallerValueLis…
adecler Aug 25, 2020
36250dd
Getting rid of ArrayResizer
adecler Aug 25, 2020
7051ba7
First pass of cleaning Excel_Engine
adecler Aug 25, 2020
d9d4ff4
First pass at cleaning the oM
adecler Aug 25, 2020
838c19b
emptying oM and Engine
adecler Aug 25, 2020
13eb1e8
generalising ribbon xml for components
adecler Aug 25, 2020
cfa3ac9
generalising teh choice collection for dropdown components
adecler Aug 25, 2020
1b4d2d6
More refactoring and new UI buttons/formulas for expand and condense
adecler Aug 26, 2020
fe30e06
fixing open of files
adecler Aug 26, 2020
f4d3638
Fixing the restoration of caller when reopening a file
adecler Aug 27, 2020
f0a8706
Fixing the Explode
adecler Aug 27, 2020
482bae2
removing reference to Excel DNA in engine
adecler Sep 1, 2020
8d0e54e
Removing unecessary references to NetOffice
adecler Sep 1, 2020
05df3ab
Adding null check
adecler Sep 1, 2020
fe66fcf
Potential fix for Excel restarting after closing
adecler Sep 4, 2020
134b607
Add support for saving data as custom XML part
adecler Sep 4, 2020
e8c9c33
removing restoring internalised data until I figure out why it also c…
adecler Sep 4, 2020
d70b508
fixing closing bug caused by NetOffice
adecler Sep 4, 2020
8072fb8
Getting rid of NetOffice package
adecler Sep 4, 2020
a99e8f9
Log usage of teh BHoM at each run
adecler Sep 5, 2020
8071495
refactoring workbook functionality in AddIn
adecler Sep 8, 2020
89d6d54
Supporting multiple workbooks opened at the same time
adecler Sep 8, 2020
3502f05
Fix bug when using the same ribbon component multiple times
adecler Sep 8, 2020
dfa2013
Fixes #240
adecler Sep 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Aligning with removal of MethodCaller
adecler committed Jul 30, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d6468e565caede5719cddb8fc774fae312d75d06
1 change: 0 additions & 1 deletion Excel_UI/Addin/AddIn.cs
Original file line number Diff line number Diff line change
@@ -434,7 +434,6 @@ private Dictionary<string, CallerFormula> Formulea
private Application m_Application;
private static SearchMenu m_GlobalSearch = null;
private bool m_Initialised = false;
private IEnumerable<CommandBarButton> m_Btns;
private oM.Excel.Reference m_CurrentSelection;

/*******************************************/
3 changes: 1 addition & 2 deletions Excel_UI/UI/Callers/CreateCustom.cs
Original file line number Diff line number Diff line change
@@ -64,10 +64,9 @@ public override object Run(object[] inputs)

/*******************************************/

public override bool SetItem(object item)
public override void SetItem(object item)
{
SelectedItem = item;
return true;
}

/*******************************************/
2 changes: 1 addition & 1 deletion Excel_UI/UI/Callers/Explode.cs
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@

namespace BH.UI.Excel.Callers
{
class ExplodeCaller : BH.UI.Templates.MethodCaller
class ExplodeCaller : BH.UI.Templates.Caller
{
/*******************************************/
/**** Properties ****/
5 changes: 3 additions & 2 deletions Excel_UI/UI/Components/oM/CreateObject.cs
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

@@ -65,9 +66,9 @@ public CreateObjectFormula() : base() { }

public override string GetName()
{
if (Caller is MethodCaller && Caller.SelectedItem != null)
if (Caller.SelectedItem != null && Caller.SelectedItem is MethodBase)
{
Type decltype = (Caller as MethodCaller).OutputParams.First().DataType;
Type decltype = Caller.OutputParams.First().DataType;
if (typeof(IObject).IsAssignableFrom(decltype))
{
string ns = decltype.Namespace;
5 changes: 3 additions & 2 deletions Excel_UI/UI/Templates/CallerFormula.cs
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
using NetOffice.ExcelApi;
using System.Xml;
using BH.Engine.Serialiser;
using System.Reflection;

namespace BH.UI.Excel.Templates
{
@@ -88,9 +89,9 @@ public CallerFormula()

public virtual string GetName()
{
if (Caller is MethodCaller && Caller.SelectedItem != null)
if (Caller.SelectedItem != null && Caller.SelectedItem is MethodBase)
{
Type decltype = (Caller as MethodCaller).Method.DeclaringType;
Type decltype = ((MethodBase)Caller.SelectedItem).DeclaringType;
string ns = decltype.Namespace;
if (ns.StartsWith("BH"))
ns = ns.Split('.').Skip(2).Aggregate((a, b) => $"{a}.{b}");