コード例 #1
0
        /// <summary>
        /// Sterge tipul selectat
        /// </summary>
        private void StergeTip()
        {
            if (listView1.SelectedItems.Count != 1)
                return;
            listView1.Items.Remove(listView1.SelectedItems[0]);

            tempList.Add(new ContinutUpdate<Tip>(_selectedTip, ContinutUpdateType.DELETE));
            _selectedTip = null;
        }
コード例 #2
0
 /// <summary>
 /// Reseteaza campurile pentru a adauga un nou tip
 /// </summary>
 private void TipNou()
 {
     _selectedTip = null;
     txtNume.Text = "";
 }
コード例 #3
0
 private void listView1_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (listView1.SelectedItems.Count != 1)
         return;
     _selectedTip = ((CustomListViewItem<Tip>)listView1.SelectedItems[0]).CustomStruct;
     SetTipInformation();
 }