private void OnDisable()
    {
        currentState = OptionsState.DESPLEGANDO_AUDIO;
        goingTo      = OptionsState.NONE;
        transformSetaAudio.localPosition  = originalSetaAudioPos;
        transformSetaVideo.localPosition  = originalSetaVideoPos;
        transformSetaAudio.localPosition += new Vector3(0, setaOffset, 0);
        transformBG.localPosition        += new Vector3(0, bgOffset, 0);

        //se highlightea el shroom del audio
        currentItem = firstAudio;
        currentItem.highlight.SetActive(true);

        //resetear todos los cambios que se le hayan hecho al menu
        musica.value          = prevMusic;
        sfx.value             = prevSfx;
        mute.isOn             = prevMute;
        mostrarTiempo.isOn    = prevMostrarTiempo;
        pantallaCompleta.isOn = Screen.fullScreen;
        resolutionSel         = prevResolution;
        resolutionGroup.transform.localPosition = initialResolutionGroupPos - new Vector2(prevResolution * slideItemOffset, 0);
        fpsSel = prevFps;
        fpsGroup.transform.localPosition = initialFpsGroupPos - new Vector2(prevFps * slideItemOffset, 0);
        qualitySel = prevQuality;
        qualityGroup.transform.localPosition = initialQualityGroupPos - new Vector2(prevQuality * slideItemOffset, 0);

        StopAllCoroutines();
    }
Esempio n. 2
0
        public async Task NavigateToSelectedMenuItem(NavMenuItem navMenuItem)
        {
            if (navMenuItem == null)
            {
                return;
            }

            try
            {
                Page displayPage = (Page)Activator.CreateInstance(navMenuItem.TargetType);

                if (!string.IsNullOrEmpty(navMenuItem.Title))
                {
                    if (navMenuItem.Icon == "ic_sair")
                    {
                        App.AppCurrent.Logout();
                        return;
                    }

                    await NavigationService.NavigateSetRootAsync(displayPage, null, true);
                }
                else
                {
                    await NavigationService.ClearHistory();

                    await NavigationService.NavigateAsync(displayPage, null, true);
                }

                displayPage.Title = navMenuItem.Title;
            }
            catch (Exception ex)
            {
                await Application.Current.MainPage.DisplayAlert(AppResource.alertAlert, "Erro " + ex.Message, AppResource.textOk);
            }
        }
Esempio n. 3
0
        public async Task NavigateToSelectedMenuItem(NavMenuItem navMenuItem)
        {
            if (navMenuItem == null)
            {
                return;
            }

            try
            {
                Page displayPage = (Page)Activator.CreateInstance(navMenuItem.TargetType);

                if (navMenuItem == MenuListData.Dashboard)
                {
                    await NavigationService.NavigateSetRootAsync(displayPage, null, true);
                }
                else
                {
                    await NavigationService.ClearHistory();

                    await NavigationService.NavigateAsync(displayPage, null, true);
                }

                displayPage.Title = navMenuItem.Title;
            }
            catch (Exception ex)
            {
                await App.Current.MainPage.DisplayAlert("ERRO", "Erro " + ex.Message, "OK");
            }
            finally
            {
            }
        }
Esempio n. 4
0
        private void NavMenuListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            webview.Stop(); //停止当前的活动(优先级最高)

            // 遍历,将选中Rectangle隐藏
            foreach (var np in navMenuPrimaryItem)
            {
                np.Selected = Visibility.Collapsed;
            }

            NavMenuItem item = e.ClickedItem as NavMenuItem;

            // Rectangle显示并导航
            item.Selected = Visibility.Visible;
            if (item.DestUri != null)
            {
                webview.Navigate(new Uri(item.DestUri));    //转入新网页地址

                historyStack.Add(new Uri(item.DestUri));    //网址压栈

                ApplicationView appView = ApplicationView.GetForCurrentView();
                appView.Title = item.Label;
            }
            RootSplitView.IsPaneOpen = false;
        }
        private void OnClickItem(object sender, ItemClickEventArgs e)
        {
            // Find the item that is clicked
            NavMenuItem selectedItem = e.ClickedItem as NavMenuItem; // Capture the ClickedItem

            if (selectedItem.Label.Equals("Home"))                   // Find Item
            {
                // NOTE: we are not yet passing information between pages
                // Load the page in the child frame
                frmContent.Navigate(typeof(HomePage)); //TODO: rename to meaningful name (HomePage)
            }

            else if (selectedItem.Label.Equals("Add Player"))
            {
                // Load the page in the child frame
                frmContent.Navigate(typeof(AddPlayerPage)); // TODO: AddPage
            }

            else if (selectedItem.Label.Equals("Start Game"))
            {
                // Load the page in the child frame
                frmContent.Navigate(typeof(SelectPlayerPage)); // TODO: Start Game with SelectPlayerPage
            }
            else if (selectedItem.Label.Equals("Scoreboard"))
            {
                // Load the page in the child frame
                frmContent.Navigate(typeof(ScoreboardPage)); // TODO: ScoreboardPage
            }
        }
Esempio n. 6
0
    private bool IsActive(NavMenuItem item)
    {
        var currentUri = Nav.Uri;
        var itemUri    = Nav.ToAbsoluteUri(item.Href !).ToString();

        return(Util.UrlMatching.ShouldMatch(currentUri, itemUri, item.PrefixMatch));
    }
Esempio n. 7
0
    private async Task HandleClick(NavMenuItem item)
    {
        //if (item.CanExecute == null || await item.CanExecute(App))
        //{

        //}
    }
Esempio n. 8
0
        private void NavMenuListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            // 遍历,将选中Rectangle隐藏
            foreach (var np in navMenuPrimaryItem)
            {
                np.Selected = Visibility.Collapsed;
            }
            foreach (var ns in navMenuSecondaryItem)
            {
                ns.Selected = Visibility.Collapsed;
            }

            NavMenuItem item = e.ClickedItem as NavMenuItem;

            // Rectangle显示并导航
            item.Selected = Visibility.Visible;
            if (item.DestPage != null)
            {
                RootFrame.Navigate(item.DestPage);
            }

            RootSplitView.IsPaneOpen = false;
            myframe     = RootFrame;
            mysplitView = RootSplitView;
        }
 /// <summary>
 /// 生成导航菜单树状结构,转换菜单为导航菜单元素
 /// </summary>
 /// <param name="menuInfos"></param>
 /// <returns></returns>
 public NavMenuBar GenerateNavMenuTree(List <MenuInfo> menuInfos)
 {
     try
     {
         NavMenuBar navMenuBar = new NavMenuBar();
         // 抓取root 节点
         foreach (MenuInfo menuInfo in menuInfos.Where(menu => menu.MenuParentID.ToLower().Equals("root")).OrderBy(menu => menu.MenuWeight))
         {
             bool        parentMenuExpand = false;
             NavMenuItem navMenuItem      = new NavMenuItem
             {
                 Name     = menuInfo.MenuName,
                 Title    = menuInfo.MenuTitle,
                 IconType = menuInfo.MenuIcon,
                 Url      = menuInfo.MenuComponent,
                 Master   = menuInfo.EnableMasterTemplate,
                 Submenu  = GenerateSubNavMenus(menuInfo, menuInfos, out parentMenuExpand),
                 SubArrow = parentMenuExpand
             };
             navMenuBar.Menu.Add(navMenuItem);
         }
         return(navMenuBar);
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }
Esempio n. 10
0
        private void NavMenuListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            // 遍历,将选中Rectangle隐藏
            foreach (var np in navMenuPrimaryItem)
            {
                np.Color    = new SolidColorBrush(Colors.White);
                np.Selected = Visibility.Collapsed;
            }
            foreach (var ns in navMenuSecondaryItem)
            {
                ns.Color    = new SolidColorBrush(Colors.White);
                ns.Selected = Visibility.Collapsed;
            }

            NavMenuItem item = e.ClickedItem as NavMenuItem;

            // Rectangle显示并导航
            item.Selected = Visibility.Visible;
            item.Color    = new SolidColorBrush(brush);

            if (item.DestPage != null)
            {
                RootFrame.Navigate(item.DestPage);
            }

            if (Window.Current.Bounds.Width < 1008)
            {
                RootSplitView.IsPaneOpen = false;
            }
        }
Esempio n. 11
0
 public void SelectMainMenu(Frame target, NavMenuItem item)
 {
     SelectedNavMenuItem = item;
     if (NavLinks.Count > 0)
     {
         NavLinks.Clear();
     }
     NavLinks.Add(new NavLinkItem(item.Label, item.PageType));
     target.Navigate(item.PageType);
 }
        private async void UserList_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            NavMenuItem item = e.Item as NavMenuItem;

            vm.NavigateToUserDetailCommand.Execute((User)e.Item);
            ((ListView)sender).SelectedItem = null;
        }
 public void ClickVideo()
 {
     if (currentState == OptionsState.AUDIO_DESPLEGADO)
     {
         currentState = OptionsState.REPLEGANDO_AUDIO;
         goingTo      = OptionsState.VIDEO_DESPLEGADO;
         foreach (GameObject g in menuElements)
         {
             g.SetActive(false);
         }
         transformSetaAudio.localPosition  = originalSetaAudioPos;
         transformSetaVideo.localPosition += new Vector3(0, setaOffset, 0);
         currentItem.highlight.SetActive(false);
         currentItem = firstVideo;
         currentItem.highlight.SetActive(true);
     }
 }
    void Start()
    {
        currentState = OptionsState.DESPLEGANDO_AUDIO;
        goingTo      = OptionsState.VIDEO_DESPLEGADO;
        foreach (GameObject g in menuElements)
        {
            g.SetActive(false);
        }

        //se activa el highlight del primer elemento de navegacion con mando/teclado
        currentItem = firstAudio;
        currentItem.highlight.SetActive(true);

        SoundManager.Instance.ChangeMusicVolume(musica.value);

        musica.onValueChanged.AddListener(delegate {
            if (!mute.isOn)
            {
                SoundManager.Instance.ChangeMusicVolume(musica.value);
            }
        });
        sfx.onValueChanged.AddListener(delegate {
            if (!mute.isOn)
            {
                SoundManager.Instance.ChangeFXVolume(sfx.value);
            }
        });
        mute.onValueChanged.AddListener(delegate {
            if (mute.isOn)
            {
                SoundManager.Instance.ChangeMusicVolume(0);
                SoundManager.Instance.ChangeFXVolume(0);
            }
            else
            {
                SoundManager.Instance.ChangeMusicVolume(musica.value);
                SoundManager.Instance.ChangeFXVolume(sfx.value);
            }
        });

        //fix del bug por el que los sliders se movian sin tenerlos seleccionados.
        FindObjectOfType <EventSystem>().sendNavigationEvents = false;
    }
Esempio n. 15
0
        /// <summary>
        /// Event Handler that runs when a nav menu item is clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnNavigationItemClicked(object sender, ItemClickEventArgs e)
        {
            //sets variable equal to the clicked control
            NavMenuItem navMenuItem = e.ClickedItem as NavMenuItem;

            //if the control clicked is the instructions page button
            if (navMenuItem == _uiNavInstructions)
            {
                //navigate to the instructions page
                _frmContent.Navigate(typeof(InstructionsPage));
            }

            //if the control clicked is the blackjack page button
            else if (navMenuItem == _uiNavBlackJack)
            {
                //navigate to the blackjack page
                _frmContent.Navigate(typeof(BlackJack));
            }
        }
Esempio n. 16
0
 private void Aside_MenuItemClick(TreeNode node, NavMenuItem item, int pageIndex)
 {
     if (node != null && node.Tag != null && node.Tag.GetType() != item.GetType())
     {
         for (int i = 0; i < GasMonitorManager.Chanels.Count; i++)
         {
             GasMonitorManager.Chanels[i].ShowOrHide = false;
             if (GasMonitorManager.Chanels[i].Id == node.Tag.ToString())
             {
                 GasMonitorManager.Chanels[i].ShowOrHide = true;
             }
         }
     }
     else
     {
         for (int i = 0; i < GasMonitorManager.Chanels.Count; i++)
         {
             GasMonitorManager.Chanels[i].ShowOrHide = true;
         }
     }
 }
Esempio n. 17
0
        public static void NavMove(int i)
        {
            // 遍历,将选中Rectangle隐藏
            foreach (var np in navMenuPrimaryItem)
            {
                np.Selected = Visibility.Collapsed;
            }
            foreach (var ns in navMenuSecondaryItem)
            {
                ns.Selected = Visibility.Collapsed;
            }
            NavMenuItem item = navMenuPrimaryItem[i];

            // Rectangle显示并导航
            item.Selected = Visibility.Visible;
            if (item.DestPage != null)
            {
                myframe.Navigate(item.DestPage);
            }

            mysplitView.IsPaneOpen = false;
        }
Esempio n. 18
0
        private static List <NavMenuItem> GetNavMenuItems(HttpContextBase httpContext, bool isAdmin, bool rightAlign)
        {
            List <NavMenuItem> Result = DatabaseCache.GetNavMenuItems(httpContext, isAdmin, rightAlign);

            if (Result == null)
            {
                Result = new List <NavMenuItem>();
                string RequestDomain = Globals.GetRequestDomain(httpContext);

                using (XenonCMSContext DB = new XenonCMSContext())
                {
                    // Get nav menu
                    var NavMenuItems = DB.SitePages.Where(x => (x.Site.Domain == RequestDomain) && x.ShowInMenu && (x.ParentId == 0) && (isAdmin || !x.RequireAdmin) && (x.RightAlign == rightAlign)).OrderBy(x => x.DisplayOrder).ThenBy(x => x.Text).ToArray();
                    foreach (var NMI in NavMenuItems)
                    {
                        // Build the menu item
                        NavMenuItem NewMenuItem = new NavMenuItem(NMI.Text, NMI.Slug);

                        // Determine if we have children
                        var Children = DB.SitePages.Where(x => x.ShowInMenu && (x.ParentId == NMI.Id) && (isAdmin || !x.RequireAdmin) && (x.RightAlign == rightAlign)).OrderBy(x => x.DisplayOrder).ThenBy(x => x.Text);
                        if (Children.Count() > 0)
                        {
                            NewMenuItem.Children = new List <NavMenuItem>();
                            foreach (var C in Children)
                            {
                                NewMenuItem.Children.Add(new NavMenuItem(C.Text, C.Slug));
                            }
                        }

                        Result.Add(NewMenuItem);
                    }
                }

                DatabaseCache.AddNavMenuItems(httpContext, Result, isAdmin, rightAlign);
            }

            return(Result);
        }
Esempio n. 19
0
        private void Aside_MenuItemClick(TreeNode node, NavMenuItem item, int pageIndex)
        {
            if (!node.Text.IsNullOrEmpty())
            {
                switch (node.Text)
                {
                case "基础信息":
                    break;

                case "职位类型维护":
                    pnlForm.Controls.Clear();
                    FrmPosition frmPosition = new FrmPosition();
                    frmPosition.TopLevel = false;
                    pnlForm.Controls.Add(frmPosition);
                    frmPosition.Show();
                    break;

                case "民族类型维护":
                    pnlForm.Controls.Clear();
                    FrmNation frmNation = new FrmNation();
                    frmNation.TopLevel = false;
                    pnlForm.Controls.Add(frmNation);
                    frmNation.Show();
                    break;

                case "性别类型维护":
                    pnlForm.Controls.Clear();
                    FrmSexType frmSexType = new FrmSexType();
                    frmSexType.TopLevel = false;
                    pnlForm.Controls.Add(frmSexType);
                    frmSexType.Show();
                    break;

                case "学历类型维护":
                    pnlForm.Controls.Clear();
                    FrmEducation frmEducation = new FrmEducation();
                    frmEducation.TopLevel = false;
                    pnlForm.Controls.Add(frmEducation);
                    frmEducation.Show();
                    break;

                case "部门信息维护":
                    pnlForm.Controls.Clear();
                    FrmDepartment frmDepartment = new FrmDepartment();
                    frmDepartment.TopLevel = false;
                    pnlForm.Controls.Add(frmDepartment);
                    frmDepartment.Show();
                    break;

                case "员工工资账单":
                    break;

                case "内部财务账单":
                    pnlForm.Controls.Clear();
                    FrmCash frmCash = new FrmCash();
                    frmCash.TopLevel = false;
                    pnlForm.Controls.Add(frmCash);
                    frmCash.Show();
                    break;

                case "酒店盈利情况":
                    pnlForm.Controls.Clear();
                    FrmChart frmChart = new FrmChart();
                    frmChart.TopLevel = false;
                    pnlForm.Controls.Add(frmChart);
                    frmChart.Show();
                    break;

                case "水电管理":

                    break;

                case "水电信息":
                    pnlForm.Controls.Clear();
                    FrmWtiInfo frmWtiInfo = new FrmWtiInfo();
                    frmWtiInfo.TopLevel = false;
                    pnlForm.Controls.Add(frmWtiInfo);
                    frmWtiInfo.Show();
                    break;

                case "监管统计":
                    break;

                case "监管部门情况":
                    pnlForm.Controls.Clear();
                    FrmCheckList frmCheckList = new FrmCheckList();
                    frmCheckList.TopLevel = false;
                    pnlForm.Controls.Add(frmCheckList);
                    frmCheckList.Show();
                    break;

                case "客房管理":
                    break;

                case "房态图一览":
                    pnlForm.Controls.Clear();
                    FrmRoomMap frmRoomMap = new FrmRoomMap();
                    frmRoomMap.TopLevel = false;
                    pnlForm.Controls.Add(frmRoomMap);
                    frmRoomMap.Show();
                    break;

                case "新增客房":
                    pnlForm.Controls.Clear();
                    FrmAddRoom frmAddRoom = new FrmAddRoom();
                    frmAddRoom.TopLevel = false;
                    pnlForm.Controls.Add(frmAddRoom);
                    frmAddRoom.Show();
                    break;

                case "客户管理":
                    break;

                case "客户信息管理":
                    pnlForm.Controls.Clear();
                    FrmCustoManager frmCustoManager = new FrmCustoManager();
                    frmCustoManager.TopLevel = false;
                    pnlForm.Controls.Add(frmCustoManager);
                    frmCustoManager.Show();
                    break;

                case "顾客消费账单":
                    pnlForm.Controls.Clear();
                    FrmCustoSpend frmCustoSpend = new FrmCustoSpend();
                    frmCustoSpend.TopLevel = false;
                    pnlForm.Controls.Add(frmCustoSpend);
                    frmCustoSpend.Show();
                    break;

                case "人事管理":
                    break;

                case "员工管理":
                    pnlForm.Controls.Clear();
                    FrmWorkerManager frmWorkerManager = new FrmWorkerManager();
                    frmWorkerManager.TopLevel = false;
                    pnlForm.Controls.Add(frmWorkerManager);
                    frmWorkerManager.Show();
                    break;

                case "公告日志":
                    pnlForm.Controls.Clear();
                    FrmNotice frmNotice = new FrmNotice();
                    frmNotice.TopLevel = false;
                    pnlForm.Controls.Add(frmNotice);
                    frmNotice.Show();
                    break;

                case "上传公告日志":
                    pnlForm.Controls.Clear();
                    FrmUpLoadNotice frmUpLoadNotice = new FrmUpLoadNotice();
                    frmUpLoadNotice.TopLevel = false;
                    pnlForm.Controls.Add(frmUpLoadNotice);
                    frmUpLoadNotice.Show();
                    break;

                case "物资管理":
                    break;

                case "商品管理":
                    pnlForm.Controls.Clear();
                    FrmSellThingManager frmSellThingManager = new FrmSellThingManager();
                    frmSellThingManager.TopLevel = false;
                    pnlForm.Controls.Add(frmSellThingManager);
                    frmSellThingManager.Show();
                    break;

                case "仓库物资":
                    break;

                case "员工操作日志":
                    pnlForm.Controls.Clear();
                    FrmOperation frmOperation = new FrmOperation();
                    frmOperation.TopLevel = false;
                    pnlForm.Controls.Add(frmOperation);
                    frmOperation.Show();
                    break;
                }
            }
        }
Esempio n. 20
0
 public void SetNodeItem(TreeNode node, NavMenuItem item)
 {
     MenuHelper.Add(node, item);
 }
Esempio n. 21
0
        private static List<NavMenuItem> GetNavMenuItems(HttpContextBase httpContext, bool isAdmin, bool rightAlign)
        {
            List<NavMenuItem> Result = DatabaseCache.GetNavMenuItems(httpContext, isAdmin, rightAlign);
            if (Result == null)
            {
                Result = new List<NavMenuItem>();
                string RequestDomain = Globals.GetRequestDomain(httpContext);

                using (XenonCMSContext DB = new XenonCMSContext())
                {
                    // Get nav menu
                    var NavMenuItems = DB.SitePages.Where(x => (x.Site.Domain == RequestDomain) && x.ShowInMenu && (x.ParentId == 0) && (isAdmin || !x.RequireAdmin) && (x.RightAlign == rightAlign)).OrderBy(x => x.DisplayOrder).ThenBy(x => x.Text).ToArray();
                    foreach (var NMI in NavMenuItems)
                    {
                        // Build the menu item
                        NavMenuItem NewMenuItem = new NavMenuItem(NMI.Text, NMI.Slug);

                        // Determine if we have children
                        var Children = DB.SitePages.Where(x => x.ShowInMenu && (x.ParentId == NMI.Id) && (isAdmin || !x.RequireAdmin) && (x.RightAlign == rightAlign)).OrderBy(x => x.DisplayOrder).ThenBy(x => x.Text);
                        if (Children.Count() > 0)
                        {
                            NewMenuItem.Children = new List<NavMenuItem>();
                            foreach (var C in Children)
                            {
                                NewMenuItem.Children.Add(new NavMenuItem(C.Text, C.Slug));
                            }
                        }

                        Result.Add(NewMenuItem);
                    }
                }

                DatabaseCache.AddNavMenuItems(httpContext, Result, isAdmin, rightAlign);
            }

            return Result;
        }
    //METODO DE CONTROL DE LA NAVEGACION DE LAS OPCIONES
    private void MenuNav()
    {
        NavMenuItem.MENU_ITEM_TYPE type = currentItem.myType;

        //accionar una opcion
        if (InputManager.instance.selectButton && !InputManager.instance.prevSelectButton ||
            InputManager.instance.selectButton2 && !InputManager.instance.prevSelectButton2)
        {
            if (type == NavMenuItem.MENU_ITEM_TYPE.BUTTON || type == NavMenuItem.MENU_ITEM_TYPE.SHROOM_BUTTON || type == NavMenuItem.MENU_ITEM_TYPE.TOGGLE)
            {
                currentItem.InteractClick();
            }
        }
        if (type == NavMenuItem.MENU_ITEM_TYPE.SLIDER)
        {
            if (InputManager.instance.horizontalAxis > 0.1 || InputManager.instance.horizontalAxis2 > 0.1 || InputManager.instance.rightKey)  //derecha
            {
                currentItem.InteractRight();
            }
            else if (InputManager.instance.horizontalAxis < -0.1 || InputManager.instance.horizontalAxis2 < -0.1 || InputManager.instance.leftKey)  //izquierda
            {
                currentItem.InteractLeft();
            }
        }
        else if (type == NavMenuItem.MENU_ITEM_TYPE.MY_SLIDER)
        {
            //derecha
            if ((InputManager.instance.horizontalAxis > 0.1 && InputManager.instance.prevHorizontalAxis == 0) || (InputManager.instance.horizontalAxis2 > 0.1 && InputManager.instance.prevHorizontalAxis2 == 0) || (InputManager.instance.rightKey && !InputManager.instance.prevRightKey))
            {
                currentItem.InteractRight();
            }
            //izquierda
            else if ((InputManager.instance.horizontalAxis < -0.1 && InputManager.instance.prevHorizontalAxis == 0) || (InputManager.instance.horizontalAxis2 < -0.1 && InputManager.instance.prevHorizontalAxis2 == 0) || (InputManager.instance.leftKey && !InputManager.instance.prevLeftKey))
            {
                currentItem.InteractLeft();
            }
        }

        //MOVIMIENTO VERTICAL
        //abajo
        if ((InputManager.instance.verticalAxis < 0 && InputManager.instance.prevVerticalAxis == 0) || (InputManager.instance.verticalAxis2 < 0 && InputManager.instance.prevVerticalAxis2 == 0) || (InputManager.instance.downKey && !InputManager.instance.prevDownKey))  //abajo
        {
            if (type == NavMenuItem.MENU_ITEM_TYPE.SHROOM_BUTTON && currentState == OptionsState.AUDIO_DESPLEGADO)
            {
                currentItem = currentItem.DownElement(0);
            }
            else if (type == NavMenuItem.MENU_ITEM_TYPE.SHROOM_BUTTON && currentState == OptionsState.VIDEO_DESPLEGADO)
            {
                currentItem = currentItem.DownElement(1);
            }
            else
            {
                currentItem = currentItem.DownElement(0);
            }
        }
        //arriba
        else if ((InputManager.instance.verticalAxis > 0 && InputManager.instance.prevVerticalAxis == 0) || (InputManager.instance.verticalAxis2 > 0 && InputManager.instance.prevVerticalAxis2 == 0) || (InputManager.instance.upKey && !InputManager.instance.prevUpKey))  //arriba
        {
            if (type == NavMenuItem.MENU_ITEM_TYPE.BUTTON && currentState == OptionsState.AUDIO_DESPLEGADO)
            {
                currentItem = currentItem.UpElement(0);
            }
            else if (type == NavMenuItem.MENU_ITEM_TYPE.BUTTON && currentState == OptionsState.VIDEO_DESPLEGADO)
            {
                currentItem = currentItem.UpElement(1);
            }
            else
            {
                currentItem = currentItem.UpElement();
            }
        }

        //MOVIMIENTO HORIZONTAL
        //derecha
        if ((InputManager.instance.horizontalAxis > 0 && InputManager.instance.prevHorizontalAxis == 0) || (InputManager.instance.horizontalAxis2 > 0 && InputManager.instance.prevHorizontalAxis2 == 0) || (InputManager.instance.rightKey && !InputManager.instance.prevRightKey))
        {
            currentItem = currentItem.RightElement();
        }
        //izquierda
        else if ((InputManager.instance.horizontalAxis < 0 && InputManager.instance.prevHorizontalAxis == 0) || (InputManager.instance.horizontalAxis2 < 0 && InputManager.instance.prevHorizontalAxis2 == 0) || (InputManager.instance.leftKey && !InputManager.instance.prevLeftKey))
        {
            currentItem = currentItem.LeftElement();
        }
    }
Esempio n. 23
0
 private void uiNavMenu1_MenuItemClick(TreeNode node, NavMenuItem item, int pageIndex)
 {
 }
Esempio n. 24
0
 private void uiNavMenu1_MenuItemClick(System.Windows.Forms.TreeNode node, NavMenuItem item, int pageIndex)
 {
     UIMessageTip.ShowOk(node.Text + ", " + pageIndex);
 }
 private void Aside_MenuItemClick(System.Windows.Forms.TreeNode node, NavMenuItem item, int pageIndex)
 {
     Footer.Text = "PageIndex: " + pageIndex;
 }
Esempio n. 26
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddRazorPages();
            services.AddServerSideBlazor();
            services.AddSingleton <WeatherForecastService>();
            services.AddMudServices();

            services.AddDbContext <AdventureWorksLT2017Context>(options =>
            {
                //options.UseSqlServer();
            });
            services.AddTransient <DataWorkspace>();
            //services.AddTransient<DataWorkspaceBase, DataWorkspace>();

            services.AddBlazorKit(() => new()
            {
                AppTitle   = "Sample #1",
                AppVersion = typeof(Startup).Assembly.GetName().Version?.ToString() ?? "n/a",
                Menu       = new("")
                {
                    Children = new NavMenuItem[]
                    {
                        new NavMenuItem("Home")
                        {
                            Icon = Icons.Material.Outlined.Home,
                            Href = "/",
                        },

                        new NavMenuGroup("Classic")
                        {
                            Children = new NavMenuItem[]
                            {
                                new NavMenuItem("Counter")
                                {
                                    Icon = Icons.Material.Filled.Add,
                                    Href = "/counter",
                                },
                                new NavMenuItem("Fetch Data")
                                {
                                    Icon = Icons.Material.Filled.List,
                                    Href = "/fetchdata",
                                },
                            },
                        },

                        new NavMenuGroup("Test")
                        {
                            Icon     = Icons.Material.Filled.Science,
                            Children = new NavMenuItem[]
                            {
                                new ScreenMenuItem <Pages.Test1>
                                {
                                    Icon = Icons.Custom.Uncategorized.Radioactive,
                                },
                                new ScreenMenuItem <Pages.Test2Even>
                                {
                                    Icon = Icons.Material.Filled.AvTimer,
                                    ComputeCanExecute = app => Pages.Test2Even.ComputeCanExecute(),
                                },
                                new ScreenMenuItem <Pages.Test2Odd>
                                {
                                    Icon = Icons.Material.Filled.AvTimer,
                                    ComputeCanExecute = app => Pages.Test2Odd.ComputeCanExecute(),
                                },
                                new ScreenMenuItem <Pages.Test3>
                                {
                                    Icon = Icons.Custom.Uncategorized.Radioactive,
                                },
                                new ScreenMenuItem <Pages.Test4>
                                {
                                    Icon  = Icons.Custom.Uncategorized.Radioactive,
                                    Label = "Test4 - DataList w/ Local",
                                },
                                new ScreenMenuItem <Pages.Test5>
                                {
                                    Icon  = Icons.Custom.Uncategorized.Radioactive,
                                    Label = "Test5 - DataList w/ EFCore",
                                },
                                new ScreenMenuItem <Pages.Test6>
                                {
                                    Icon = Icons.Custom.Uncategorized.Radioactive,
                                },

                                new ScreenMenuItem <Pages.Test99>
                                {
                                    Icon = Icons.Custom.Uncategorized.Radioactive,
                                },
                            },
                        },
                    },
                }
            });
        }