Beispiel #1
0
        /// <summary>
        /// Allcoate resources, parse the config file which contains all the
        /// animations and create a list of animation objects. Subscribe to
        /// events
        /// </summary>
        /// <param name="configPath">Name of the config file for the panel</param>
        /// <returns>true on success</returns>
        public bool Init(String configPath)
        {
            bool retVal = _animationsCollection.Load(configPath);

            if (retVal)
            {
                retVal = _interpreter.LoadScripts(configPath);
            }

            if (retVal)
            {
                _switchConfig = new SwitchConfig();
                _switchConfig.Load(configPath);
            }

            if (retVal)
            {
                subscribeToInterpreterEvents();

                subscribeToActuatorEvents();
            }

            Log.Debug("returning from Anim manager init()");

            return(retVal);
        }
Beispiel #2
0
        /// <summary>
        /// Allcoate resources, parse the config file which contains all the
        /// animations and create a list of animation objects. Subscribe to
        /// events. The parameter panelConfigMapEntry contains all the info about
        /// the current scanner
        /// </summary>
        /// <param name="panelConfigMapEntry">Config object for the panel</param>
        /// <returns>true on success</returns>
        public bool Init(PanelConfigMapEntry panelConfigMapEntry)
        {
            _panelConfigMapEntry = panelConfigMapEntry;

            _panelClass = (panelConfigMapEntry != null) ? panelConfigMapEntry.PanelClass : String.Empty;

            bool retVal = _animationsCollection.Load(panelConfigMapEntry.ConfigFileName);

            if (retVal)
            {
                retVal = _interpreter.LoadScripts(panelConfigMapEntry.ConfigFileName);
            }

            if (retVal)
            {
                subscribeToInterpreterEvents();

                subscribeToActuatorEvents();
            }

            Log.Debug("returning from Anim manager init()");

            return(retVal);
        }