コード例 #1
0
ファイル: MainMenuController.cs プロジェクト: Irfan2k19/CIS
        public ActionResult GetMenu()
        {
            List <MenuVM> lst = new List <MenuVM>();

            lst = MenuMethods.GetMenuItems();
            return(View(lst));
        }
コード例 #2
0
        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;
                }
            }
        }
コード例 #3
0
        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();
        }
コード例 #4
0
    void Start()
    {
        _instance = this;
        source    = GetComponent <AudioSource>();
        Adressingvalue();

        Master.StartGame(); // DEBUG, YOU CAN CHANGE IT TO START UPON ANOTHER TRIGGER
    }
コード例 #5
0
    public void ShowMenu(MenuMethods _menu)
    {
        if (activeMenu != null)
        {
            activeMenu.isOpen = false;
        }

        activeMenu        = _menu;
        activeMenu.isOpen = true;
    }
コード例 #6
0
    //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;
    }
コード例 #7
0
ファイル: CanvasManager.cs プロジェクト: shroommu/AmazonSim
    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);
        }
    }
コード例 #8
0
        public void ActivateItem()
        {
            MenuMethods menuMethods = new MenuMethods();

            menuMethods.ShowVersion();
        }
コード例 #9
0
 public IViewComponentResult Invoke(int?ParentId)
 {
     _MenuItems = MenuMethods.GetMenuItems(1, ParentId);
     return(View("~/Views/Menu/MenuItems.cshtml", _MenuItems));
 }
コード例 #10
0
 public cMenu()
 {
     _Menu = MenuMethods.GetMenuItems(1, 0);
 }