Exemplo n.º 1
0
        //public static void servicos()
        //{
        //    navbar.BackColor = Color.Blue;
        //}

        public static void Mudar(String x = "")
        {
            painel.Controls.Clear();
            switch (x)
            {
            case "Alimentos":
                navbar.BackColor = Color.Red;
                break;

            case "Serviços":
                formservicos form = new formservicos
                {
                    TopLevel = false
                };
                painel.Controls.Add(form);
                form.Show();
                navbar.BackColor = Color.Blue;

                break;

            case "Hospedagem":
                navbar.BackColor = Color.LimeGreen;
                break;

            case "Eventos":
                navbar.BackColor = Color.Blue;
                break;

            case "Avalie":
                navbar.BackColor = Color.Blue;
                break;

            default:
                formHome fh = new formHome
                {
                    TopLevel = false
                };
                painel.Controls.Add(fh);
                fh.Show();
                navbar.BackColor = barra;
                break;
            }
        }
Exemplo n.º 2
0
        public static void Mudar(String x = "")
        {
            painel.Controls.Clear();
            switch (x)
            {
            case "Alimentos":
                formAlimentos formA = new formAlimentos
                {
                    TopLevel = false
                };
                painel.Controls.Add(formA);
                formA.Show();
                navbar.BackColor = Color.Red;
                break;

            case "Serviços":
                formservicos form = new formservicos
                {
                    TopLevel = false
                };
                painel.Controls.Add(form);
                form.Show();
                navbar.BackColor = Color.FromArgb(0, 120, 215);
                break;

            case "Hospedagem":
                hospedagem.Hosp_Home Hosp = new Hosp_Home();
                {
                    Hosp.TopLevel = false;
                }
                painel.Controls.Add(Hosp);
                Hosp.Show();
                navbar.BackColor = Color.FromArgb(69, 172, 20);
                break;

            case "Eventos":
                FormEventos fEvent = new FormEventos();
                {
                    fEvent.TopLevel = false;
                }
                painel.Controls.Add(fEvent);
                fEvent.Show();
                navbar.BackColor = Color.FromArgb(120, 88, 210);
                break;

            case "Reclame":
                FormAvalie formAvalie = new FormAvalie();
                {
                    formAvalie.TopLevel = false;
                }
                painel.Controls.Add(formAvalie);
                formAvalie.Show();
                navbar.BackColor = Color.DeepSkyBlue;
                break;

            default:
                formHome fh = new formHome
                {
                    TopLevel = false
                };
                painel.Controls.Add(fh);
                fh.Show();
                navbar.BackColor = barra;
                break;
            }
        }