public void RemoveItem(PrintItemWrapper printItemWrapper) { int index = PrintItems.IndexOf(printItemWrapper); if (index < 0) { // It may be possible to have the same item in the remove list twice. // so if it is not in the PrintItems then ignore it. return; } PrintItems.RemoveAt(index); // and remove it from the data base printItemWrapper.Delete(); }
public override void RemoveItem(PrintItemWrapper printItemWrapper) { int index = printItems.IndexOf(printItemWrapper); if (index < 0) { // It may be possible to have the same item in the remove list twice. // so if it is not in the PrintItems then ignore it. return; } printItems.RemoveAt(index); // and remove it from the data base printItemWrapper.Delete(); LoadLibraryItems(); LibraryProvider.OnDataReloaded(null); }