예제 #1
0
파일: LipSync.cs 프로젝트: thorhs/vixen
        protected override void _PreRender(CancellationTokenSource cancellationToken = null)
        {
            _elementData = new EffectIntents();
            var targetNodes = TargetNodes.AsParallel();

            if (cancellationToken != null)
            {
                targetNodes = targetNodes.WithCancellation(cancellationToken.Token);
            }

            targetNodes.ForAll(node =>
            {
                if (node != null)
                {
                    RenderNode(node);
                }
            });
        }
예제 #2
0
        protected override void _PreRender(CancellationTokenSource cancellationToken = null)
        {
            _elementData = new EffectIntents();

            var value = new CommandValue(new StringCommand(string.Format("{0}|{1},{2}", "Launcher", _data.Executable, _data.Arguments)));

            var targetNodes = TargetNodes.AsParallel();

            if (cancellationToken != null)
            {
                targetNodes = targetNodes.WithCancellation(cancellationToken.Token);
            }

            targetNodes.ForAll(node => {
                IIntent i = new CommandIntent(value, TimeSpan);
                _elementData.AddIntentForElement(node.Element.Id, i, TimeSpan.Zero);
            });
        }