public Control CreateService(object item) { TourServiceItem client = new TourServiceItem(); client.Tour = this.tour; client.Group = this.group; client.Service = (ITourService)item; return(client); }
private TourServiceItem FindInClients(ITourService service) { foreach (UserControl ctrl in this.flpMain.Controls) { TourServiceItem srvCtrl = ctrl as TourServiceItem; if (srvCtrl != null) { if (srvCtrl.Service == service) { return(srvCtrl); } } } return(null); }
public bool ListContainsService(UserControl ctrl) { TourServiceItem srvCtrl = (TourServiceItem)ctrl; return(this.Services.Contains(srvCtrl.Service)); }