private void PlayTour(object sender, EventArgs e) { tourAsociado.viewFlag = false; MenuForm2 parent = this.Parent as MenuForm2; parent.PlayTour(this.tourAsociado); }
public override void ShowMenu() { //MenuAdult menu = new MenuAdult(Constants.tours, this); MenuForm2 menu = new MenuForm2(Constants.tours, this); this.Hide(); menu.Show(); }
private void PlayTour(object sender, EventArgs e) { DialogResult result1 = MessageBox.Show(Constants.InitiateTourConfirmation1 + tourAsociado.name + Constants.InitiateTourConfirmation2, Constants.InitiateTourTitle, MessageBoxButtons.YesNo); if (result1 == DialogResult.Yes) { MenuForm2 parent = this.Parent as MenuForm2; parent.PlayTour(this.tourAsociado); } }
async private void DeleteTour(object sender, EventArgs e) { DialogResult result1 = MessageBox.Show(Constants.DeleteTourConfirmation1 + tourAsociado.name + Constants.DeleteTourConfirmation2, Constants.DeleteTourTitle, MessageBoxButtons.YesNo); if (result1 == DialogResult.Yes) { var tourController = new TourController(); var result = await tourController.DeleteTourAsync(this.tourAsociado._id); Constants.tours = tourController.GetAllToursAsync().Result; this.Hide(); MenuForm2 parent = this.Parent as MenuForm2; parent.ArrangeCardGrid(); } }