예제 #1
0
        private void buttonSelectDestinationOutputs_Click(object sender, EventArgs e)
        {
            ControllersAndOutputsSet controllersAndOutputs = new ControllersAndOutputsSet();

            foreach (ElementNode selectedElement in SelectedElements)
            {
                foreach (ElementNode leafElementNode in selectedElement.GetLeafEnumerator())
                {
                    if (leafElementNode == null || leafElementNode.Element == null)
                    {
                        continue;
                    }

                    IDataFlowComponent component = VixenSystem.DataFlow.GetComponent(leafElementNode.Element.Id);
                    if (component == null)
                    {
                        continue;
                    }

                    IEnumerable <IDataFlowComponent> outputComponents = _findComponentsOfTypeInTreeFromComponent(component, typeof(CommandOutputDataFlowAdapter));

                    foreach (IDataFlowComponent outputComponent in outputComponents)
                    {
                        IControllerDevice controller;
                        int outputIndex;
                        VixenSystem.OutputControllers.getOutputDetailsForDataFlowComponent(outputComponent, out controller, out outputIndex);

                        if (controller == null)
                        {
                            continue;
                        }

                        if (!controllersAndOutputs.ContainsKey(controller))
                        {
                            controllersAndOutputs[controller] = new HashSet <int>();
                        }

                        controllersAndOutputs[controller].Add(outputIndex);
                    }
                }
            }

            if (controllersAndOutputs.Count == 0)
            {
                var msg = new MessageBoxForm("No controller patch points found.", "Not Found", MessageBoxButtons.OK,
                                             SystemIcons.Information);
                msg.ShowDialog(this);
            }
            else
            {
                MasterForm.SelectControllersAndOutputs(controllersAndOutputs, true);
            }
        }
예제 #2
0
        private void buttonSelectDestinationOutputs_Click(object sender, EventArgs e)
        {
            ControllersAndOutputsSet controllersAndOutputs = new ControllersAndOutputsSet();

            foreach (ElementNode selectedElement in SelectedElements)
            {
                foreach (ElementNode leafElementNode in selectedElement.GetLeafEnumerator())
                {
                    if (leafElementNode == null || leafElementNode.Element == null)
                    {
                        continue;
                    }

                    IDataFlowComponent component = VixenSystem.DataFlow.GetComponent(leafElementNode.Element.Id);
                    if (component == null)
                    {
                        continue;
                    }

                    IEnumerable <IDataFlowComponent> outputComponents = _findComponentsOfTypeInTreeFromComponent(component, typeof(CommandOutputDataFlowAdapter));

                    foreach (IDataFlowComponent outputComponent in outputComponents)
                    {
                        IControllerDevice controller;
                        int outputIndex;
                        VixenSystem.OutputControllers.getOutputDetailsForDataFlowComponent(outputComponent, out controller, out outputIndex);

                        if (controller == null)
                        {
                            continue;
                        }

                        if (!controllersAndOutputs.ContainsKey(controller))
                        {
                            controllersAndOutputs[controller] = new HashSet <int>();
                        }

                        controllersAndOutputs[controller].Add(outputIndex);
                    }
                }
            }

            MasterForm.SelectControllersAndOutputs(controllersAndOutputs);
        }
예제 #3
0
        private void buttonSelectDestinationOutputs_Click(object sender, EventArgs e)
        {
            ControllersAndOutputsSet controllersAndOutputs = new ControllersAndOutputsSet();

            foreach (ElementNode selectedElement in SelectedElements) {
                foreach (ElementNode leafElementNode in selectedElement.GetLeafEnumerator()) {
                    if (leafElementNode == null || leafElementNode.Element == null)
                        continue;

                    IDataFlowComponent component = VixenSystem.DataFlow.GetComponent(leafElementNode.Element.Id);
                    if (component == null)
                        continue;

                    IEnumerable<IDataFlowComponent> outputComponents = _findComponentsOfTypeInTreeFromComponent(component, typeof (CommandOutputDataFlowAdapter));

                    foreach (IDataFlowComponent outputComponent in outputComponents) {
                        IControllerDevice controller;
                        int outputIndex;
                        VixenSystem.OutputControllers.getOutputDetailsForDataFlowComponent(outputComponent, out controller, out outputIndex);

                        if (controller == null)
                            continue;

                        if (!controllersAndOutputs.ContainsKey(controller))
                            controllersAndOutputs[controller] = new HashSet<int>();

                        controllersAndOutputs[controller].Add(outputIndex);
                    }
                }
            }

            MasterForm.SelectControllersAndOutputs(controllersAndOutputs, true);
        }