コード例 #1
0
ファイル: CustomValue.cs プロジェクト: stewmc/vixen
        protected override void _PreRender(CancellationTokenSource tokenSource = null)
        {
            _elementData = new EffectIntents();

            if (_data == null)
            {
                return;
            }

            ICommand command = null;

            switch (ValueType)
            {
            case CustomValueType._8Bit:
                command = new _8BitCommand(Value8Bit);
                break;

            case CustomValueType._16Bit:
                command = new _16BitCommand(Value16Bit);
                break;

            case CustomValueType._32Bit:
                command = new _32BitCommand(Value32Bit);
                break;

            case CustomValueType._64Bit:
                command = new _64BitCommand(Value64Bit);
                break;

            case CustomValueType.Color:
                command = new ColorCommand(ColorValue);
                break;

            case CustomValueType.String:
                command = new StringCommand(StringValue);
                break;
            }

            CommandValue value = new CommandValue(command);

            foreach (ElementNode node in TargetNodes)
            {
                foreach (var leafNode in node.GetLeafEnumerator())
                {
                    if (tokenSource != null && tokenSource.IsCancellationRequested)
                    {
                        return;
                    }

                    IIntent intent = new CommandIntent(value, TimeSpan);
                    _elementData.AddIntentForElement(leafNode.Element.Id, intent, TimeSpan.Zero);
                }
            }
        }
コード例 #2
0
ファイル: Module.cs プロジェクト: robness/Vixen
        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)));

            foreach (var node in TargetNodes)
            {
                foreach (var elementNode in node.GetLeafEnumerator())
                {
                    IIntent i = new CommandIntent(value, TimeSpan);
                    _elementData.AddIntentForElement(elementNode.Element.Id, i, TimeSpan.Zero);
                }
            }
        }
コード例 #3
0
ファイル: RDSModule.cs プロジェクト: stewmc/vixen
		protected override void _PreRender(CancellationTokenSource tokenSource = null)
		{
			_elementData = new EffectIntents();

			CommandValue value = new CommandValue(new StringCommand(string.Format("{0}|{1}", "RDS", _data.Title)));

			foreach (ElementNode node in TargetNodes) {
				if (tokenSource != null && tokenSource.IsCancellationRequested)
					return;
				 

				IIntent i = new CommandIntent(value, TimeSpan);
				_elementData.AddIntentForElement(node.Element.Id, i, TimeSpan.Zero);
			}
		}
コード例 #4
0
ファイル: Module.cs プロジェクト: stewmc/vixen
		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)));

			foreach (var node in TargetNodes)
			{
				foreach (var elementNode in node.GetLeafEnumerator())
				{
					IIntent i = new CommandIntent(value, TimeSpan);
					_elementData.AddIntentForElement(elementNode.Element.Id, i, TimeSpan.Zero);	
				}
			}
				
		}
コード例 #5
0
        protected override void _PreRender(CancellationTokenSource tokenSource = null)
        {
            _elementData = new EffectIntents();

            CommandValue value = new CommandValue(new StringCommand(string.Format("{0}|{1}", "RDS", _data.Title)));

            foreach (ElementNode node in TargetNodes)
            {
                if (tokenSource != null && tokenSource.IsCancellationRequested)
                {
                    return;
                }


                IIntent i = new CommandIntent(value, TimeSpan);
                _elementData.AddIntentForElement(node.Element.Id, i, TimeSpan.Zero);
            }
        }
コード例 #6
0
ファイル: Module.cs プロジェクト: Jchuchla/vixen-sall-vixen
        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);
            });
        }
コード例 #7
0
ファイル: Module.cs プロジェクト: Jchuchla/vixen
        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);
            });
        }
コード例 #8
0
ファイル: CustomValue.cs プロジェクト: jeffu231/vixen
        protected override void _PreRender(CancellationTokenSource tokenSource = null)
        {
            _elementData = new EffectIntents();

            if (_data == null)
                return;

            ICommand command = null;

            switch (ValueType) {
                case CustomValueType._8Bit:
                    command = new _8BitCommand(Value8Bit);
                    break;
                case CustomValueType._16Bit:
                    command = new _16BitCommand(Value16Bit);
                    break;
                case CustomValueType._32Bit:
                    command = new _32BitCommand(Value32Bit);
                    break;
                case CustomValueType._64Bit:
                    command = new _64BitCommand(Value64Bit);
                    break;
                case CustomValueType.Color:
                    command = new ColorCommand(ColorValue);
                    break;
                case CustomValueType.String:
                    command = new StringCommand(StringValue);
                    break;
            }

            CommandValue value = new CommandValue(command);

            foreach (ElementNode node in TargetNodes)
            {
                foreach (var leafNode in node.GetLeafEnumerator())
                {
                    if (tokenSource != null && tokenSource.IsCancellationRequested)
                        return;

                    IIntent intent = new CommandIntent(value, TimeSpan);
                    _elementData.AddIntentForElement(leafNode.Element.Id, intent, TimeSpan.Zero);
                }

            }
        }