Beispiel #1
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            ListView.SelectedIndexCollection indexes = mpListView1.SelectedIndices;
            if (indexes == null || indexes.Count == 0)
            {
                return;
            }
            ListViewItem item = mpListView1.Items[indexes[0]];

            ReOrder();
            UpdateList();
            FormEditCard dlg = new FormEditCard();

            dlg.Card     = (Card)item.Tag;
            dlg.CardType = cardTypes[((Card)item.Tag).DevicePath].ToString();
            dlg.ShowDialog();
            dlg.Card.Persist();
            _needRestart = true;
            UpdateList();
        }
Beispiel #2
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
   ListView.SelectedIndexCollection indexes = mpListView1.SelectedIndices;
   if (indexes == null || indexes.Count == 0)
     return;
   ListViewItem item = mpListView1.Items[indexes[0]];
   ReOrder();
   UpdateList();
   FormEditCard dlg = new FormEditCard();
   dlg.Card = (Card)item.Tag;
   dlg.CardType = cardTypes[((Card)item.Tag).DevicePath].ToString();
   dlg.ShowDialog();
   dlg.Card.Persist();
   _needRestart = true;
   UpdateList();
 }