コード例 #1
0
        private void togglePanels(string userControlPanel)
        {
            colorBtn();
            this.formHome.panelMain.Controls.Clear();
            switch (userControlPanel)
            {
            case "general":
                this.uCGeneral = new Vista.Configuracion.UCGeneral();
                this.formHome.panelMain.Controls.Add(this.uCGeneral);
                this.uCGeneral.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCGeneral.Location = new System.Drawing.Point(0, 0);
                this.uCGeneral.Name     = "uCGeneral";
                this.uCGeneral.Size     = new System.Drawing.Size(724, 485);
                this.uCGeneral.TabIndex = 1;
                break;

            case "perfil":
                this.uCPerfil = new Vista.Configuracion.UCPerfil();
                this.formHome.panelMain.Controls.Add(this.uCPerfil);
                this.uCPerfil.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCPerfil.Location = new System.Drawing.Point(0, 0);
                this.uCPerfil.Name     = "uCEmpresas";
                this.uCPerfil.Size     = new System.Drawing.Size(724, 485);
                this.uCPerfil.TabIndex = 1;
                break;

            case "roles":
                this.uCRoles = new Vista.Configuracion.UCRoles();
                this.formHome.panelMain.Controls.Add(this.uCRoles);
                this.uCRoles.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCRoles.Location = new System.Drawing.Point(0, 0);
                this.uCRoles.Name     = "uCRoles";
                this.uCRoles.Size     = new System.Drawing.Size(724, 485);
                this.uCRoles.TabIndex = 1;
                break;

            case "usuarios":
                this.uCUsuarios = new Vista.Configuracion.UCUsuarios();
                this.formHome.panelMain.Controls.Add(this.uCUsuarios);
                this.uCUsuarios.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCUsuarios.Location = new System.Drawing.Point(0, 0);
                this.uCUsuarios.Name     = "uCUsuarios";
                this.uCUsuarios.Size     = new System.Drawing.Size(724, 485);
                this.uCUsuarios.TabIndex = 1;
                break;

            default:
                break;
            }
        }
コード例 #2
0
        private void togglePanels(string userControlPanel)
        {
            colorBtn();
            this.formHome.panelMain.Controls.Clear();
            switch (userControlPanel)
            {
            case "choferes":
                this.uCChoferes = new Vista.Crud.UCChoferes();
                this.formHome.panelMain.Controls.Add(this.uCChoferes);
                this.uCChoferes.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCChoferes.Location = new System.Drawing.Point(0, 0);
                this.uCChoferes.Name     = "uCChoferes";
                this.uCChoferes.Size     = new System.Drawing.Size(724, 485);
                this.uCChoferes.TabIndex = 1;
                break;

            case "empresas":
                this.uCEmpresas = new Vista.Crud.UCEmpresas();
                this.formHome.panelMain.Controls.Add(this.uCEmpresas);
                this.uCEmpresas.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCEmpresas.Location = new System.Drawing.Point(0, 0);
                this.uCEmpresas.Name     = "uCEmpresas";
                this.uCEmpresas.Size     = new System.Drawing.Size(724, 485);
                this.uCEmpresas.TabIndex = 1;
                break;

            case "licencias":
                this.uCLicencias = new Vista.Crud.UCLicencias();
                this.formHome.panelMain.Controls.Add(this.uCLicencias);
                this.uCLicencias.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCLicencias.Location = new System.Drawing.Point(0, 0);
                this.uCLicencias.Name     = "uCLicencias";
                this.uCLicencias.Size     = new System.Drawing.Size(724, 485);
                this.uCLicencias.TabIndex = 1;
                break;

            case "papeletas":
                this.uCPapeletas = new Vista.Crud.UCPapeletas();
                this.formHome.panelMain.Controls.Add(this.uCPapeletas);
                this.uCPapeletas.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCPapeletas.Location = new System.Drawing.Point(0, 0);
                this.uCPapeletas.Name     = "uCPapeletas";
                this.uCPapeletas.Size     = new System.Drawing.Size(724, 485);
                this.uCPapeletas.TabIndex = 1;
                break;

            case "rutas":
                this.uCRutas = new Vista.Crud.UCRutas();
                this.formHome.panelMain.Controls.Add(this.uCRutas);
                this.uCRutas.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCRutas.Location = new System.Drawing.Point(0, 0);
                this.uCRutas.Name     = "uCRutas";
                this.uCRutas.Size     = new System.Drawing.Size(724, 485);
                this.uCRutas.TabIndex = 1;
                break;

            case "tipoempresa":
                this.uCTipoEmpresa = new Vista.Crud.UCTipoEmpresa();
                this.formHome.panelMain.Controls.Add(this.uCTipoEmpresa);
                this.uCTipoEmpresa.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCTipoEmpresa.Location = new System.Drawing.Point(0, 0);
                this.uCTipoEmpresa.Name     = "uCTipoEmpresa";
                this.uCTipoEmpresa.Size     = new System.Drawing.Size(724, 485);
                this.uCTipoEmpresa.TabIndex = 1;
                break;

            case "tipovehiculo":
                this.uCTipoVehiculo = new Vista.Crud.UCTipoVehiculo();
                this.formHome.panelMain.Controls.Add(this.uCTipoVehiculo);
                this.uCTipoVehiculo.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCTipoVehiculo.Location = new System.Drawing.Point(0, 0);
                this.uCTipoVehiculo.Name     = "uCTipoVehiculo";
                this.uCTipoVehiculo.Size     = new System.Drawing.Size(724, 485);
                this.uCTipoVehiculo.TabIndex = 1;
                break;

            case "usuarios":
                this.uCUsuarios = new Vista.Crud.UCUsuarios();
                this.formHome.panelMain.Controls.Add(this.uCUsuarios);
                this.uCUsuarios.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCUsuarios.Location = new System.Drawing.Point(0, 0);
                this.uCUsuarios.Name     = "uCUsuarios";
                this.uCUsuarios.Size     = new System.Drawing.Size(724, 485);
                this.uCUsuarios.TabIndex = 1;
                break;

            case "vehiculos":
                this.uCVehiculos = new Vista.Crud.UCVehiculos();
                this.formHome.panelMain.Controls.Add(this.uCVehiculos);
                this.uCVehiculos.Dock     = System.Windows.Forms.DockStyle.Fill;
                this.uCVehiculos.Location = new System.Drawing.Point(0, 0);
                this.uCVehiculos.Name     = "uCVehiculos";
                this.uCVehiculos.Size     = new System.Drawing.Size(724, 485);
                this.uCVehiculos.TabIndex = 1;
                break;

            default:
                break;
            }
        }