Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void RegisterConstraintsTab(string functionNameNode1, string functionNameNode2, GridTabBase tab)
        {
            var constraintPair = new ConstraintPair(functionNameNode1, functionNameNode2);

            _constraintsTab[constraintPair] = tab;
        }
Exemplo n.º 4
0
 public void RegisterFunctionTab(string functionName, GridTabBase tab)
 {
     _shapeTabs[functionName] = tab;
 }
Exemplo n.º 5
0
 public void RegisterInterpreterTab <T>(GridTabBase tab) where T : AttributeInterpreterBase
 {
     _registeredTabs[typeof(T).GetHashCode()] = tab;
 }