public SjedistaViewModel(Sjedista model) { SalaID = model.SalaID; OznakaReda = model.OznakaReda; OznakaKolone = model.OznakaKolone; Sala = model.Sala; SjedisteID = model.SjedisteID; }
private void btn_Clicked(object sender, EventArgs e) { var btn = sender as Button; for (int i = 0; i < this.Sjedista.ColumnDefinitions.Count; i++) { var btn2 = this.Sjedista.Children[i] as Button; if (btn2.Text != btn.Text && btn2.IsEnabled == false) { btn2.IsEnabled = true; btn2.BackgroundColor = Color.FromHex("#27d956"); } } btn.BackgroundColor = Color.Gray; btn.IsEnabled = false; this.Dalje.IsVisible = true; this.Odabrano.Text = btn.Text; this.odabranoSjedaloObj = btn.BindingContext as Sjedista; this.Poruka.Text = "Odabrali ste sjedište " + btn.Text; }