private async void MenuItem_Clicked_1(object sender, EventArgs e) { if ((sender as Xamarin.Forms.MenuItem).BindingContext is ChoiceOption obj) { await Navigation.PushAsync(InfoPage.Show(obj.Feature)); } }
private async void Info(object sender, EventArgs e) { if ((sender as Xamarin.Forms.MenuItem).BindingContext is IXML obj) { await Navigation.PushAsync(InfoPage.Show(obj)); } }
private async void InfoSelected(object sender, SelectedItemChangedEventArgs e) { if (e.SelectedItem is IXML obj) { await Navigation.PushAsync(InfoPage.Show(obj)); } ((ListView)sender).SelectedItem = null; }
public InfoSelectPage() { BindingContext = this; InitializeComponent(); ShowInfo = new Command(async(par) => { if (par is IXML o) { await Navigation.PushAsync(InfoPage.Show(o)); } }); }
private async void ResourceInfo(object sender, EventArgs e) { if ((sender as Xamarin.Forms.MenuItem).BindingContext is ResourceViewModel rs) { if (rs.Value is ModifiedSpell ms) { ms.Info = Model.Context.Player.GetAttack(ms, ms.differentAbility); ms.Modifikations.AddRange(from f in Model.Context.Player.GetFeatures() where f is SpellModifyFeature && Utils.Matches(Model.Context, ms, ((SpellModifyFeature)f).Spells, null) select f); ms.Modifikations = ms.Modifikations.Distinct().ToList(); await Navigation.PushAsync(InfoPage.Show(ms)); } if (rs.Value is ResourceInfo r) { await Navigation.PushAsync(InfoPage.Show(Model.Context.Player.GetResourceFeatures(r.ResourceID))); } } }
public static ContentPage Show(IEnumerable <IOGLElement> vals) { List <IOGLElement> values = (from v in vals where v != null select v).ToList(); if (values.Count == 0) { return(InfoPage.Show(null)); } else if (values.Count == 1) { return(InfoPage.Show(values[0])); } InfoSelectPage Instance = new InfoSelectPage(); Instance.Values.ReplaceRange(from s in values select new InfoObj(s, Instance.ShowInfo)); return(Instance); }
private void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) { Navigation.PushAsync(InfoPage.Show((IXML)e.SelectedItem, Model.Select, Model.CommandName)); }