CodeTV.WizardForm.PopulateChannelsFolderInDropDownMenu C# (CSharp) Method

PopulateChannelsFolderInDropDownMenu() private method

private PopulateChannelsFolderInDropDownMenu ( ToolStripItemCollection toolStripItemCollection, ChannelFolder channelFolder ) : void
toolStripItemCollection System.Windows.Forms.ToolStripItemCollection
channelFolder ChannelFolder
return void
        private void PopulateChannelsFolderInDropDownMenu(ToolStripItemCollection toolStripItemCollection, ChannelFolder channelFolder)
        {
            toolStripItemCollection.Clear();
            ToolStripMenuItem channelToolStripMenuItem0 = new ToolStripMenuItem(Properties.Resources.ChooseFolder);
            channelToolStripMenuItem0.Tag = channelFolder;
            channelToolStripMenuItem0.Click += new EventHandler(channelFolderToolStripMenuItem_Click);
            toolStripItemCollection.Add(channelToolStripMenuItem0);

            foreach (Channel channel in channelFolder.ChannelList)
            {
                if (channel is ChannelFolder)
                {
                    ToolStripMenuItem channelToolStripMenuItem = new ToolStripMenuItem(channel.Name);
                    channelToolStripMenuItem.Tag = channel;
                    channelToolStripMenuItem.DropDownItems.Clear();
                    channelToolStripMenuItem.DropDownOpening += new EventHandler(channelFolderToolStripMenuItem_DropDownOpening);

                    ToolStripMenuItem channelToolStripMenuItem1 = new ToolStripMenuItem("Dummy");
                    channelToolStripMenuItem.DropDownItems.Add(channelToolStripMenuItem1);

                    toolStripItemCollection.Add(channelToolStripMenuItem);
                }
            }
        }