public Control CreateTour(object item) { TourControl client = new TourControl((Entities.Tour)item); client.Dock = DockStyle.Top; return(client); }
private TourControl FindInClients(Entities.Tour tour) { foreach (UserControl ctrl in this.flpTours.Controls) { TourControl grpCtrl = ctrl as TourControl; if (grpCtrl != null) { if (grpCtrl.Tour == tour) { return(grpCtrl); } } } return(null); }
public bool ListContainsTour(UserControl ctrl) { TourControl tourCtrl = (TourControl)ctrl; return(this.Tours.Contains(tourCtrl.Tour)); }