//--------------------------------------------------------------------------------FUNCIONES AUXILIARES--------------------------------------------------------------------------- private void gestionarBarra(Brush color, string error) { switch (panelActual.VentanaActiva) { case "TicketTecnicoControl": TicketTecnicoControl control25 = (TicketTecnicoControl)principal.Children[0]; control25.statusBar.Background = color; control25.tbStatusInformation.Text = error; break; case "GestionarTecnicoTicketcontrol": GestionarTecnicoTicketControl control24 = (GestionarTecnicoTicketControl)principal.Children[0]; control24.statusBar.Background = color; control24.tbStatusInformation.Text = error; break; case "GestionarTicketsAdminControl": GestionarTicketsAdminControl control23 = (GestionarTicketsAdminControl)principal.Children[0]; control23.statusBar.Background = color; control23.tbStatusInformation.Text = error; break; case "HomeTicketControl": HomeTicketControl control22 = (HomeTicketControl)principal.Children[0]; control22.statusBar.Background = color; control22.tbStatusInformation.Text = error; break; case "CrearCodigoBarrasControl": CrearCodigoBarrasContorl control20 = (CrearCodigoBarrasContorl)principal.Children[0]; control20.statusBar.Background = color; control20.tbStatusInformation.Text = error; break; case "CrearTicketControl": CrearTicketControl control21 = (CrearTicketControl)principal.Children[0]; control21.statusBar.Background = color; control21.tbStatusInformation.Text = error; break; case "ticketsPendientescontrol": ticketsPendientescontrol control1 = (ticketsPendientescontrol)principal.Children[0]; control1.statusBar.Background = color; control1.tbStatusInformation.Text = error; break; case "CrearTicketsAdminControl": CrearTicketsAdminControl control = (CrearTicketsAdminControl)principal.Children[0]; control.statusBar.Background = color; control.tbStatusInformation.Text = error; break; case "VerHistoricoTicketsControl": VerHistoricoTicketsControl control2 = (VerHistoricoTicketsControl)principal.Children[0]; control2.statusBar.Background = color; control2.tbStatusInformation.Text = error; break; case "EditarTicketsAdminControl": EditarTicketsAdminControl control3 = (EditarTicketsAdminControl)principal.Children[0]; control3.statusBar.Background = color; control3.tbStatusInformation.Text = error; break; case "UsuariosControl": UsuariosControl control4 = (UsuariosControl)principal.Children[0]; control4.statusBar.Background = color; control4.tbStatusInformation.Text = error; break; case "SedesControl": SedesControl control5 = (SedesControl)principal.Children[0]; control5.statusBar.Background = color; control5.tbStatusInformation.Text = error; break; case "LocalidadesControl": LocalidadesControl control6 = (LocalidadesControl)principal.Children[0]; control6.statusBar.Background = color; control6.tbStatusInformation.Text = error; break; case "CategoriasControl": CategoriasControl control7 = (CategoriasControl)principal.Children[0]; control7.statusBar.Background = color; control7.tbStatusInformation.Text = error; break; case "EquiposControl": EquiposControl control8 = (EquiposControl)principal.Children[0]; control8.statusBar.Background = color; control8.tbStatusInformation.Text = error; break; } }
private void LvMenu_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { switch (((ListViewItem)((ListView)sender).SelectedItem).Name) { case "lvTickets": ticketsPendientescontrol contenido = new ticketsPendientescontrol(); principal.Children.Clear(); principal.Children.Insert(0, contenido); panelActual.VentanaActiva = "ticketsPendientescontrol"; break; case "lvCrear": CrearTicketsAdminControl contenido2 = new CrearTicketsAdminControl(usuarioVentana.UsuarioId); principal.Children.Clear(); principal.Children.Insert(0, contenido2); panelActual.VentanaActiva = "CrearTicketsAdminControl"; break; case "lvEditar": EditarTicketsAdminControl contenido9 = new EditarTicketsAdminControl(usuarioVentana); principal.Children.Clear(); principal.Children.Insert(0, contenido9); panelActual.VentanaActiva = "EditarTicketsAdminControl"; break; case "lvUsuarios": UsuariosControl controlUsuario = new UsuariosControl(); panelPrincipal.Children.Clear(); panelPrincipal.Children.Insert(0, controlUsuario); panelActual.VentanaActiva = "UsuariosControl"; break; case "lvSedes": SedesControl controlUsuario1 = new SedesControl(); panelPrincipal.Children.Clear(); panelPrincipal.Children.Insert(0, controlUsuario1); panelActual.VentanaActiva = "SedesControl"; break; case "lvCategorias": CategoriasControl contenido5 = new CategoriasControl(); principal.Children.Clear(); principal.Children.Insert(0, contenido5); panelActual.VentanaActiva = "CategoriasControl"; break; case "lvCiudades": LocalidadesControl contenido6 = new LocalidadesControl(); principal.Children.Clear(); principal.Children.Insert(0, contenido6); panelActual.VentanaActiva = "LocalidadesControl"; break; case "lvEquipos": EquiposControl contenido7 = new EquiposControl(); principal.Children.Clear(); principal.Children.Insert(0, contenido7); panelActual.VentanaActiva = "EquiposControl"; break; } } catch (IOException error) { gestionarBarra(Brushes.IndianRed, error.Message); } }