private string FindChannelPath(string currentPath, string channelName)
        {
            string channelPath = currentPath;    // Temp
            string retVal;

            List <string> children = compView.Get_Children_Of(currentPath);

            foreach (string s in children)
            {
                if (compView.Is_Channel(channelPath + s))
                {
                    if (s == channelName) // We found the matching channel
                    {
                        return(channelPath + s);
                    }
                    else
                    {
                        retVal = this.FindChannelPath(channelPath + s + "/", channelName);
                        if (retVal != "")
                        {
                            return(retVal);
                        }
                    }
                }
            }

            return(""); // We have gone through and not found the desired channel
        }
Пример #2
0
        private void PopulateOnLoad(List <String> newTree)
        {
            foreach (String i in newTree)
            {
                if (compView.Is_Channel(i)) // We know there are either more channels or feeds internal, need to recursively call
                {
                    List <String> components = compView.Get_Children_Of(i);
                    PopulateOnLoad(components);
                }

                else
                {
                    ComponentTreeViewItem newFeed = new ComponentTreeViewItem(i);    // Create item to be displayed in left hand menu
                    treeView.Items.Add(newFeed);
                }
            }
        }