Пример #1
0
        /// <summary>
        /// A 'run' command was interpreted by the interpreter.  Perform
        /// the necessary action.
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void Interpreter_EvtRun(object sender, InterpreterRunEventArgs e)
        {
            if (PreviewMode)
            {
                return;
            }

            Log.Debug(e.Script);

            runCommand(e.Script);
        }
Пример #2
0
        /// <summary>
        /// Run a script referred to by scriptRef (e.g., onBack, onSelect etc)
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event arg</param>
        private void AppInterpreter_EvtRun(object sender, InterpreterRunEventArgs e)
        {
            switch (e.Script)
            {
            case "@onBack":
                if (_player.CurrentAnimation != null && _player.CurrentAnimation.OnBack.HasCode())
                {
                    _interpreter.Execute(_player.CurrentAnimation.OnBack);
                }

                break;
            }
        }
Пример #3
0
        /// <summary>
        /// Event handler to run a command. The interpreter raises the event when
        /// it encounters a command in the animation config file
        ///  command
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Interpreter_EvtRun(object sender, InterpreterRunEventArgs e)
        {
            bool handled = false;

            _dialogPanel.OnRunCommand(e.Script, ref handled);
        }