public ActionResult GetMenu() { List <MenuVM> lst = new List <MenuVM>(); lst = MenuMethods.GetMenuItems(); return(View(lst)); }
static void Main(string[] args) { // Initialize Menu Commands and Options to the Console bool endMenu = false; while (endMenu == false) { Console.WriteLine("Please select a command"); Console.WriteLine("\t1. Create Record\n\t2. Read Record\n\t3. Exit"); Console.Write("COMMAND: "); int command = Convert.ToInt32(Console.ReadLine()); switch (command) { case 1: // Create a record MenuMethods.CreateNewRecord(); break; case 2: // Read a record MenuMethods.ReadARecord(); break; case 3: // Exit the program endMenu = true; break; default: // Default statement / Exception handling Console.WriteLine("Please enter a valid command."); break; } } }
protected void Page_Load(object sender, EventArgs e) { this.DoBeforePageLoad(); if (this.ThisPageName == null) { this.ThisPageName = "Default.aspx"; } LiteralControl userLinks = MenuMethods.MakeUserLinks(SessionMethodes.RoleId(Session["idRole"])); this.Master.FindControl("cphUserForm").Controls.Add(userLinks); OperacijaRezultat rezult = OpMenuSelect.SelectMenuByRole(SessionMethodes.RoleId(Session["idRole"])); LiteralControl menuLinks = MenuMethods.MakeMenuLinks(rezult.DbItems.Cast <MenuDb>().ToArray(), this.ThisPageName); this.Master.FindControl("cphMenu").Controls.Add(menuLinks); if (!Page.IsPostBack) { this.DoWithoutPostBack(); } this.DoAfterPageLoad(); }
void Start() { _instance = this; source = GetComponent <AudioSource>(); Adressingvalue(); Master.StartGame(); // DEBUG, YOU CAN CHANGE IT TO START UPON ANOTHER TRIGGER }
public void ShowMenu(MenuMethods _menu) { if (activeMenu != null) { activeMenu.isOpen = false; } activeMenu = _menu; activeMenu.isOpen = true; }
//makes _activeMenu (passed from CanvasManager) non-interactable, makes this popup menu visible and interactable public void OpenPopup(MenuMethods _activeMenu) { _activeMenu.canvasGroup.interactable = false; //saves _activeMenu to temp variable so ClosePopup can access it tempActiveMenu = _activeMenu; isOpen = true; canvasGroup.blocksRaycasts = canvasGroup.interactable = true; canvasGroup.alpha = 1; }
public void ShowMenu(MenuMethods _menu) { if (_menu.isPopup) { _menu.OpenPopup(activeMenu); } else { //sets current activeMenu invisible if (activeMenu != null) { activeMenu.Display(false); } //sets new activeMenu activeMenu = _menu; //sets new activeMenu visible activeMenu.Display(true); } }
public void ActivateItem() { MenuMethods menuMethods = new MenuMethods(); menuMethods.ShowVersion(); }
public IViewComponentResult Invoke(int?ParentId) { _MenuItems = MenuMethods.GetMenuItems(1, ParentId); return(View("~/Views/Menu/MenuItems.cshtml", _MenuItems)); }
public cMenu() { _Menu = MenuMethods.GetMenuItems(1, 0); }