protected virtual void OnMenuSelected(MenuSelectedEventArgs e) { if (MenuSelected != null) { MenuSelected(this, e); } }
private async void MenuButton_MenuSelected(object sender, MenuSelectedEventArgs e) { try { if (e.Result.Index == -1) { return; } if (e.Result.Index == 0) { using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Loading...")) { var result = await APIContext.Assemblies.Get(Assembly.Id); if (result.Success) { var componentsView = new AssemblyComponentsPage(result.Data.Assembly, (int)result.Data.Total); await Navigation.PushModalAsync(componentsView); } } } } catch (Exception ex) { await MaterialDialog.Instance.SnackbarAsync(message : "An error occured!", msDuration : MaterialSnackbar.DurationLong); } }
private void Menu_Selected(object sender, MenuSelectedEventArgs e) { Console.WriteLine($"******** Selected: {e.Command}"); DisableMenu(); var t = StartGame(e.Command); }
private MenuSelectedEventArgs OnMenuSelectedForOut() { MenuSelectedEventArgs args = new MenuSelectedEventArgs(); OnMenuSelected(args); return(args); }
private MenuSelectedEventArgs OnMenuSelected(string label) { MenuSelectedEventArgs args = new MenuSelectedEventArgs(label); OnMenuSelected(args); return(args); }
private void HandleMenuSelected(object sender, MenuSelectedEventArgs e) { Debug.Print("menu selected: " + e.Command); if (e.Command == "Exit") { Debug.Print("Exit menu"); } }
/// <summary> /// Called when an item in the menu is selected. /// </summary> protected void HandleMenuSelected(object sender, MenuSelectedEventArgs e) { switch (e.Command) { case "power": Debug.Print("menu power"); TogglePower(); break; case "Exit": this.DisplayInfoScreen(); break; } }
private void HandleMenuSelected(object sender, MenuSelectedEventArgs e) { Debug.Print("menu selected: " + e.Command); }