Example #1
0
        public void SetDatasets([NotNull] IEnumerable <Dataset> datasets)
        {
            Assert.ArgumentNotNull(datasets, "datasets");

            _groupedListView.BeginUpdate();

            try
            {
                _groupedListView.ClearItems();

                foreach (Dataset dataset in datasets)
                {
                    string categoryName = (dataset.DatasetCategory != null)
                                                                      ? dataset.DatasetCategory.Name
                                                                      : null;
                    string imageKey = DatasetTypeImageLookup.GetImageKey(dataset);

                    _groupedListView.AddItem(dataset.DisplayName, categoryName, imageKey);
                }
            }
            finally
            {
                _groupedListView.EndUpdate();
            }
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DatasetCatalogControl"/> class.
        /// </summary>
        public DatasetCatalogControl()
        {
            InitializeComponent();

            _groupedListView.ShowCheckBoxes = false;
            _groupedListView.SmallImageList = DatasetTypeImageLookup.CreateImageList();
        }