private void DisplayCurrentCategory()
        {
            categoryCollectionList.Clear();

            if (_currentCategory.ParentCategory == null)
            {
                CurrentCategoryLabel.Text = "Available categories:";
            }
            else
            {
                CurrentCategoryLabel.Text = _currentCategory.Name + ":";
            }

            foreach (BaseElement element in _currentCategory)
            {
                /*Label nameLabel = new Label();
                 * nameLabel.Text = element.Name;
                 * Label descriptionLabel = new Label();
                 * descriptionLabel.Text = element.Description;
                 * PictureBox pictureBox = new PictureBox();
                 * pictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
                 * pictureBox.Image = element.Thumbnail;*/

                ElementListItem item = new ElementListItem(element);
                item.Text        = element.Name;
                item.ToolTipText = element.Description;

                categoryCollectionList.Items.Add(item);
            }
        }
Esempio n. 2
0
        private void categoryCollectionList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (categoryCollectionList.SelectedItems.Count == 0)
            {
                return;
            }
            ElementListItem item = (ElementListItem)categoryCollectionList.SelectedItems[0];

            descriptionBox.Text = item.Element.Description;
        }
Esempio n. 3
0
        private void DisplayCurrentCategory()
        {
            categoryCollectionList.Clear();

            if (_currentCategory.ParentCategory == null)
            {
                CurrentCategoryLabel.Text = "Available categories:";
            }
            else
            {
                CurrentCategoryLabel.Text = _currentCategory.Name + ":";
            }

            foreach (BaseElement element in _currentCategory)
            {
                ElementListItem item = new ElementListItem(element);
                item.Text        = element.Name;
                item.ToolTipText = element.Description;

                categoryCollectionList.Items.Add(item);
            }
        }