private void loadSamples()
        {
            if (_control == null)
            {
                return;
            }
            SampleInfo firstItem = null;

            if (!string.IsNullOrEmpty(_control.NewFeatureName))
            {
                // if there is new feature specified in xml, open it instead of first node
                firstItem = _control.Find(_control.NewFeatureName) as SampleInfo;
            }

            if (_control.Features.Count > 0)
            {
                foreach (FeatureInfo sample in _control.Features)
                {
                    if (sample is SampleInfo)
                    {
                        AddItem(sample, treeFeatures.Nodes);
                    }

                    else if (sample is CategoryInfo)
                    {
                        CategoryInfo category = sample as CategoryInfo;
                        var          node     = AddItem(category, treeFeatures.Nodes);
                        foreach (SampleInfo s in category.Samples)
                        {
                            AddItem(s, node.Nodes);
                        }
                    }
                }
                if (firstItem != null)
                {
                    _selectedItem = firstItem;
                    treeFeatures.Search(firstItem.Name);
                }
                else
                {
                    // select first node
                    var first = treeFeatures.Nodes[0];
                    if (first.Nodes.Count > 0)
                    {
                        first.Expand();
                        _selectedItem           = first.Nodes[0].GetValue() as SampleInfo;
                        first.Nodes[0].Selected = true;
                    }
                    else
                    {
                        _selectedItem  = first.GetValue() as SampleInfo;
                        first.Selected = true;
                    }
                }
            }
        }