Пример #1
0
 private void PhotoList_SelectedIndexChanged(object sender, EventArgs e)
 {
     foreach (ListViewItem item in PhotoList.SelectedItems)
     {
         element = search.FindByID(item.ImageKey);//znalezienie zaznaczonego elementu
     }
     if (element != null)
     {
         SelectElement(element);//aktualizacja listview z atrybutami
     }
 }
Пример #2
0
        private void DeleteElement_ComboBox_SelectionChangeCommitted(object sender, EventArgs e)
        {
            DeleteElement_ListView.Items.Clear();                                               //usuniecie elementow z listview
            Element element = search.FindByID(DeleteElement_ComboBox.SelectedValue.ToString()); //znalezienie elementu

            foreach (KeyValuePair <string, string> pair in element.ExtraAttributes)
            {
                DeleteElement_ListView.Items.Add(new ListViewItem(new string[] { pair.Key, pair.Value })); //dodanie elementow do slownika
            }
            DeleteElement_ImageBox.Image = element.Image;                                                  //ustawnienie kontrolki z obrazkiem
        }
Пример #3
0
        private void EditElement_ComboBox_SelectionChangeCommitted(object sender, EventArgs e)
        {
            EditElement_ListView.Items.Clear();                                       //usuniecie elementow z listview

            element = search.FindByID(EditElement_ComboBox.SelectedValue.ToString()); //wyszukanie wybranego elementu

            foreach (KeyValuePair <string, string> pair in element.ExtraAttributes)
            {
                EditElement_ListView.Items.Add(new ListViewItem(new string[] { pair.Key, pair.Value })); //dodanie elementow do listview
            }
            EditElement_ImageBox.Image = element.Image;                                                  //ustawienie obrazka
        }