void AddGestureRecognizerToDoneLabel() { DoneLabel.UserInteractionEnabled = true; DoneLabel.AddGestureRecognizer(new UITapGestureRecognizer(() => { DismissViewController(GlobalVars.CanAnimate, () => { }); })); }
protected void OnDoneButtonClicked(object sender, EventArgs e) { string ty = Typebox.ActiveText; int id = Locals.Count + 1; if (ty == "Cine") { Cine cine = new Cine(NameBox.Text, id, HoursBox.Text, OwnerBox.Text, ScreenSpin.ValueAsInt); LocalController.Locals.Add(cine); } else if (ty == "Hobbie") { Hobbie hobbie = new Hobbie(NameBox.Text, id, HoursBox.Text, OwnerBox.Text); LocalController.Locals.Add(hobbie); } else if (ty == "Restaurant") { Restaurant restaurant = new Restaurant(NameBox.Text, id, HoursBox.Text, OwnerBox.Text, ExTablesButton.Active); LocalController.Locals.Add(restaurant); } else if (ty == "Store") { string cats = CatBox.Text; List <string> x = new List <string>(); foreach (string cat in cats.Split(',')) { x.Add(cat); } Store store = new Store(NameBox.Text, id, HoursBox.Text, OwnerBox.Text, x); LocalController.Locals.Add(store); } int id2 = LocalController.Locals.Count; DoneLabel.Text = $"Local N˚ {id2} created!\n"; Dictionary <int, Dictionary <string, string> > dict = LocalController.FillDict(); string name = $"Name: {dict[id2]["Name"]}\n"; string owner = $"Owner: {dict[id2]["Owner"]}\n"; string bh = $"Business Hours: {dict[id2]["Business Hours"]}\n"; DoneLabel.Text += name; DoneLabel.Text += owner; DoneLabel.Text += bh; DoneLabel.Show(); Back(); }
protected void OnAddButtonClicked(object sender, EventArgs e) { DoneLabel.Hide(); NameLabel.Show(); NameBox.Show(); TypeLabeld.Show(); Typebox.Show(); OwnerLabel.Show(); OwnerBox.Show(); AddButton.Hide(); ViewButton.Hide(); BackButton.Show(); DoneButton.Show(); HoursBox.Show(); HoursLabel.Show(); }
void ReleaseDesignerOutlets() { if (CopyButton != null) { CopyButton.Dispose(); CopyButton = null; } if (DoneLabel != null) { DoneLabel.Dispose(); DoneLabel = null; } if (ShareButton != null) { ShareButton.Dispose(); ShareButton = null; } }
protected void OnBackButtonClicked(object sender, EventArgs e) { Back(); DoneLabel.Hide(); }
protected void OnViewButtonClicked(object sender, EventArgs e) { DoneLabel.Hide(); w2.Show(); }