Пример #1
0
        private void _setsTabControl_SelectedIndexChanged(object sender, EventArgs e)
        {
            _nodesTreeView.Nodes.Clear();
            if (_previousBrowser != null)
            {
                _previousBrowser.UpdateAssemblies -= Browser_UpdateAssemblies;
                _previousBrowser = null;
            }

            var selectedItem = _setsTabControl.SelectedTab;
            if (selectedItem != null)
            {
                var ctrl = (AssemblySetBrowser)selectedItem.Controls[0];
                ctrl.UpdateAssemblies += Browser_UpdateAssemblies;
                Browser_UpdateAssemblies(ctrl, EventArgs.Empty);
                _previousBrowser = ctrl;
            }
        }
Пример #2
0
        private void RefreshSets()
        {
            _setsTabControl.TabPages.Clear();
            foreach (var set in _assemblySets)
            {
                var page = new TabPage(set.Name);
                page.Tag = set;

                var ctrl = new AssemblySetBrowser(set);
                ctrl.Dock = DockStyle.Fill;
                page.Controls.Add(ctrl);
                _setsTabControl.TabPages.Add(page);
            }

            if (_setsTabControl.TabCount != 0)
            {
                _setsTabControl_SelectedIndexChanged(this, EventArgs.Empty);
            }
        }