public CdsBrowserForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            m_Roots = ContainerDiscovery.GetInstance();
            this.m_Browser = new MediaBrowser();

            this.m_Roots.AllRoots.OnContainerChanged += new CpRootContainer.Delegate_OnContainerChanged(OnAllRootsContainerChanged);
            this.m_Browser.OnRefreshComplete += new MediaBrowser.Delegate_ContentFound(this.Sink_RefreshComplete);

            this.PopulateContextDropDown();
            this.comboBoxContext.SelectedIndex = 0;
        }
        public MainForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            dockedRendererControl = new RendererControl();
            dockedRendererControl.Visible = false;
            dockedRendererControl.Dock = DockStyle.Top;

            mediaPropertyControl = new MediaPropertyControl();
            mediaPropertyControl.Visible = false;
            mediaPropertyControl.Dock = DockStyle.Bottom;
            mediaPropertyControlSplitter = new System.Windows.Forms.Splitter();
            mediaPropertyControlSplitter.Visible = false;
            mediaPropertyControlSplitter.Dock = DockStyle.Bottom;

            this.Controls.Add(dockedRendererControl);
            this.Controls.Add(mediaPropertyControl);
            this.Controls.Add(mediaPropertyControlSplitter);
            this.Controls.SetChildIndex(dockedRendererControl,0);
            this.Controls.SetChildIndex(mediaPropertyControl,0);
            this.Controls.SetChildIndex(mediaPropertyControlSplitter,0);
            this.Controls.SetChildIndex(listInfo,0);
            this.Controls.SetChildIndex(mediaListView,0);

            deviceTree.Nodes.Add(rendererRootNode);
            containerDiscovery = ContainerDiscovery.GetInstance();
            cdsRootNode.Tag = containerDiscovery.AllRoots;
            deviceTree.Nodes.Add(cdsRootNode);
            containerDiscovery.AllRoots.OnContainerChanged += new CpRootContainer.Delegate_OnContainerChanged(ContainerChangedSink);

            eventPanel.Visible = false;
            splitter2.Visible = false;

            rendererDiscovery = new AVRendererDiscovery((new AVRendererDiscovery.DiscoveryHandler(RendererAddedSink)));
            rendererDiscovery.OnRendererRemoved += new AVRendererDiscovery.DiscoveryHandler(new AVRendererDiscovery.DiscoveryHandler(RendererRemovedSink));

            this.m_SpiderTimer = new System.Timers.Timer();
            this.m_SpiderTimer.Interval = 10000;
            this.m_SpiderTimer.Elapsed += new System.Timers.ElapsedEventHandler(this.OnTimeToClearSpiderCache);
            this.m_SpiderTimer.Enabled = true;
        }
 private void Init(int capacity)
 {
     this.m_Children = new ArrayList();
     this.m_Roots = ContainerDiscovery.GetInstance();
     this.m_Context = new ContextInfo();
     this.m_Context.m_Context.Push(this.m_Roots.AllRoots);
     this.m_HistorySize = capacity;
     if (this.m_HistorySize > 0)
     {
         this.m_History = new ArrayList(capacity);
     }
     else
     {
         this.m_History = new ArrayList();
     }
 }
 /// <summary>
 /// Returns a static instance of the ContainerDiscovery object.
 /// </summary>
 /// <returns></returns>
 public static ContainerDiscovery GetInstance()
 {
     lock (LockInit)
     {
         if (TheContainerFinder == null)
         {
             TheContainerFinder = new ContainerDiscovery();
         }
     }
     return TheContainerFinder;
 }