public IEnumerable <IUsable> SelectedServices() { List <IUsable> selectedServices = new List <IUsable>(); foreach (ListViewItem item in servizi) { String nome = item.SubItems[0].Text; selectedServices.Add(coordinator.FilterServiceName(nome).ElementAt(0)); } return(selectedServices.ToArray()); }
private void DeleteHandeler(Object sendere, EventArgs eventArgs) { if (_serviceList.SelectedItems.Count > 0) { foreach (ListViewItem item in _serviceList.SelectedItems) { IEnumerable <IUsable> service = coordinator.FilterServiceName(item.SubItems[0].Text); coordinator.RemoveService(service.ElementAt(0)); } } _services = coordinator.Services; ServiceChangedHandler(this, EventArgs.Empty); }