예제 #1
0
        /**
         * Evento que se añadira a un menu cargado
         */
        public void onClickButtonMenuEspecial(object sender)
        {
            ComboBoxItem b  = (ComboBoxItem)sender;
            MenuClass    mc = Lista.getMenuFromText(b.Content.ToString());

            if (Lista.buttonInButtons(mc))
            {
                Lista.hideAll();
                GridSecundario.SetValue(Grid.RowProperty, 1);
                GridPrincipal.SetValue(Grid.RowProperty, 0);
                Lista.showWrapFromMenu(mc);
            }
            menu.SelectedItem = b;

            _activatedButton  = b;
            b.Background      = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF595959"));
            Return.Visibility = Visibility.Hidden;
        }
예제 #2
0
        /**
         * Evento que se lanza al pulsar alguno de los botones del menu
         * Oculta los paneles de cada menu y muestra el seleccionado
         */
        public void onClickButtonMenu(object sender, EventArgs e)
        {
            ComboBox           b        = (ComboBox)sender;
            ComboBoxItem       selected = (ComboBoxItem)b.SelectedItem;
            MenuClass          mc       = Lista.getMenuFromText(selected.Content.ToString());
            WrapPanelPrincipal wp       = Lista.getWrapVisible();

            clearTextBox();
            if (Lista.buttonInButtons(mc))
            {
                Lista.hideAll();
                menuCarpetas.Visibility = Visibility.Hidden;
                GridSecundario.SetValue(Grid.RowProperty, 1);
                GridPrincipal.SetValue(Grid.RowProperty, 0);
                Lista.showWrapFromMenu(mc);
            }

            _activatedButton       = selected;
            Return.Visibility      = Visibility.Hidden;
            borderEnter.Visibility = Visibility.Hidden;
        }