Пример #1
0
        public ItemSelector(IEnumerable <EnvDTE.ProjectItem> items)
        {
            InitializeComponent();

            ddlFiles.Focus();

            var siblings = ItemSelector.GetSiblings(items.ElementAt(0));

            _files = this.GetSource(siblings, items, new Dictionary <string, string>(), string.Empty);
            ddlFiles.ItemsSource   = _files.Keys;
            ddlFiles.SelectedIndex = 0;
        }
Пример #2
0
        public ItemSelector(IEnumerable <EnvDTE.ProjectItem> items)
        {
            InitializeComponent();

            ddlFiles.Focus();

            EnvDTE.ProjectItem currentItem = items.ElementAt(0);

            var siblings = ItemSelector.GetSiblings(currentItem);

            _files = this.GetSelectedItmes(siblings, items, new Dictionary <string, string>(), string.Empty);
            ddlFiles.ItemsSource = _files.Keys;
            var index = GetMatchParentIndex(currentItem.Name, _files.Keys.ToArray());

            ddlFiles.SelectedIndex = index;
        }