Пример #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;
            }
        }
Пример #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);
        }
Пример #3
0
        public void RegisterConstraintsTab(string functionNameNode1, string functionNameNode2, GridTabBase tab)
        {
            var constraintPair = new ConstraintPair(functionNameNode1, functionNameNode2);

            _constraintsTab[constraintPair] = tab;
        }
Пример #4
0
 public void RegisterFunctionTab(string functionName, GridTabBase tab)
 {
     _shapeTabs[functionName] = tab;
 }
Пример #5
0
 public void RegisterInterpreterTab <T>(GridTabBase tab) where T : AttributeInterpreterBase
 {
     _registeredTabs[typeof(T).GetHashCode()] = tab;
 }