Exemple #1
0
        public void UnloadContext(BA_InputGroup g, string t)
        {
            BA_InputContext context = Contexts.Where((c) => c.Group == g && c.ContextType == t).FirstOrDefault();

            if (context == null)
            {
                return;
            }
            if (!_activeContexts.Contains(context))
            {
                return;
            }

            _activeContexts.Remove(context);
        }
Exemple #2
0
        public void LoadContext(BA_InputGroup g, string t)
        {
            BA_InputContext context = Contexts.Where((c) => c.Group == g && c.ContextType == t).FirstOrDefault();

            if (context == null)
            {
                return;
            }
            if (_activeContexts.Contains(context))
            {
                return;
            }
            if (!ValidInputGroups.Contains(g))
            {
                return;
            }

            _activeContexts.Add(context);
        }