Beispiel #1
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem lvi in listView.SelectedItems)
     {
         NamedColor nc = lvi.Tag as NamedColor;
         colors.Remove(nc);
         listView.Items.Remove(lvi);
         if (app.GetControlsAttr(ControlsAttr.AutoSave))
         {
             using (Context context = lib.GetContext()) nc.Remove(context);
         }
         if (OnNamedColorRemoved != null)
         {
             OnNamedColorRemoved(this, new NamedColorEventArgs(nc));
         }
     }
     UpdateControls();
 }