Example #1
0
 private void PromptAndDelete(BindingSource itemSource)
 {
     HogKeysIO selectedItem = (HogKeysIO)itemSource.Current;
     DialogResult result = MessageBox.Show("Are you sure you want to delete: " +
         selectedItem.Name + " ?", "Confirm Switch Delete", MessageBoxButtons.OKCancel);
     if (result == System.Windows.Forms.DialogResult.OK)
     {
         itemSource.Remove(selectedItem);
     }
 }