コード例 #1
0
        public void Load(FileStream stream)
        {
            // Clear all of the current content in the UI
            treeView.Items.Clear();
            articleList.Items.Clear();
            FlowDocument clear = new FlowDocument();

            summaryBox.Document = clear;

            compView.Load_Components(stream);
            List <String> newTree = compView.Get_Children_Of("/");   // Returns name of Channels or Feeds below the root

            PopulateOnLoad(newTree);
        }
コード例 #2
0
        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
        }
コード例 #3
0
        static void Print_Tree_Recursive(string path, int depth)
        {
            List <string> children = cv.Get_Children_Of(path);

            foreach (string child in children)
            {
                for (int i = 0; i < depth; i++)
                {
                    Console.Write("\t");
                }
                Console.WriteLine(child);
                Print_Tree_Recursive(path + child + "/", depth + 1);
            }
        }