public void RegisterSelectionsTab(List <String> selectedObjects, GridTabBase tab) { if (selectedObjects.Count < 3) { return; } selectedObjects.Sort(); var selectionList = new SelectionList(selectedObjects[0], selectedObjects[1], selectedObjects[2]); Console.WriteLine(selectedObjects[0] + " " + selectedObjects[1] + " " + selectedObjects[2]); if (!_selectionTabs.ContainsKey(selectionList)) { _selectionTabs[selectionList] = tab; } }
public GridTabBase GetSelectionsTab(Node node1, Node node2, Node node3) { if (node1.Get <FunctionInterpreter>() == null || node2.Get <FunctionInterpreter>() == null || node3.Get <FunctionInterpreter>() == null) { return(null); } var list = new List <string> { node1.Get <FunctionInterpreter>().Name, node2.Get <FunctionInterpreter>().Name, node3.Get <FunctionInterpreter>().Name }; list.Sort(); var SelectionList = new SelectionList(list[0], list[1], list[2]); GridTabBase tab = null; _selectionTabs.TryGetValue(SelectionList, out tab); return(tab); }
public void RegisterConstraintsTab(string functionNameNode1, string functionNameNode2, GridTabBase tab) { var constraintPair = new ConstraintPair(functionNameNode1, functionNameNode2); _constraintsTab[constraintPair] = tab; }
public void RegisterFunctionTab(string functionName, GridTabBase tab) { _shapeTabs[functionName] = tab; }
public void RegisterInterpreterTab <T>(GridTabBase tab) where T : AttributeInterpreterBase { _registeredTabs[typeof(T).GetHashCode()] = tab; }