コード例 #1
0
        private void frmPrincipal_Load(object sender, EventArgs e)
        {
            frmSkins.EnviarTema += new frmSkins.CambiarSkin(frmSkins_EnviarTema);           
            frmSkins_EnviarTema(Properties.Settings.Default.LookandFeel);            
          
            barBtnHide.SuperTip = new DevExpress.Utils.SuperToolTip();            
            barBtnSalir.SuperTip = new DevExpress.Utils.SuperToolTip();
            barBtnHide.SuperTip.Items.Add("Esconder Menu");            
            barBtnSalir.SuperTip.Items.Add("Salir del Programa");

            frmPortada Portada = new frmPortada();
            Portada.TopLevel = false;
            Portada.Parent = this.splitContainerControl1.Panel2;
            Portada.Dock = DockStyle.Top;
            Portada.Enabled = false;
            Portada.ControlBox = false;
            Portada.Show();
        }
コード例 #2
0
        void navBarControl1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {        
            switch(e.Link.Group.Name)
            {
                case "navBarInicio":
                    CloseForms();
                    frmPortada Portada = new frmPortada();
                    Portada.TopLevel = false;
                    Portada.Parent = this.splitContainerControl1.Panel2;
                    Portada.Dock = DockStyle.Fill;
                    //Portada.Enabled = false;
                    Portada.ControlBox = false;
                    Portada.Show();
                    break;
                case "navBarReportes":
                    switch (e.Link.Caption)
                    {
                        case "Grupos":                            
                            frmParametersGroups Parameters = new frmParametersGroups();
                            Parameters.ShowDialog();
                            break;
                        case "Maestros":
                            //frmReportGeneral ReportGeneral = new frmReportGeneral();
                            //ReportGeneral.ShowDialog();
                            break;
                        case "General":
                            frmReportGeneral ReportGeneral = new frmReportGeneral();
                            ReportGeneral.ShowDialog();
                            break;
                    }
                    break;

                case "navBarHorarios":
                    frmHorario Horario = new frmHorario();
                    switch (e.Link.Caption)
                    {
                        case "Grupos":
                            CloseForms();
                            Horario.TopLevel = false;
                            Horario.Parent = this.splitContainerControl1.Panel2;
                            Horario.Dock = DockStyle.Fill;
                            Horario.ControlBox = false;
                            if (Horario.InicializeSchedule("Grupo"))
                            { Horario.Show(); }
                            else
                            {
                                frmPortada Portada1 = new frmPortada();
                                Portada1.TopLevel = false;
                                Portada1.Parent = this.splitContainerControl1.Panel2;
                                Portada1.Dock = DockStyle.Fill;
                                Portada1.Enabled = false;
                                Portada1.ControlBox = false;
                                Portada1.Show();
                            }                
                            break;
                        case "Maestros":
                            CloseForms();
                            Horario.TopLevel = false;
                            Horario.Parent = this.splitContainerControl1.Panel2;
                            Horario.Dock = DockStyle.Fill;
                            Horario.ControlBox = false;
                            if (Horario.InicializeSchedule("Maestro"))
                            { Horario.Show(); }
                            else
                            {
                                frmPortada Portada2 = new frmPortada();
                                Portada2.TopLevel = false;
                                Portada2.Parent = this.splitContainerControl1.Panel2;
                                Portada2.Dock = DockStyle.Fill;
                                Portada2.Enabled = false;
                                Portada2.ControlBox = false;
                                Portada2.Show();
                            }    
                            break;                    
                    }
                    break;
                
                case "navBarAltas":
                    CloseForms();
                    frmCaptura Captura = new frmCaptura();
                    switch (e.Link.Caption)
                    {
                            
                        case "Especialidad":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.Show();
                            break;
                        case "Grupos":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.Show();
                            break;
                        case "Materias":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.Show();
                            break;
                        case "Personal":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.TabPageToFront();
                            Captura.Show();
                            break;
                        case "Asignar Materias":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.TabPageToFront();
                            Captura.Show();
                            break;
                    }
                    break;         
            }
        }
コード例 #3
0
 private void bBtnALogotipo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     OpenFileDialog openFileDialog1 = new OpenFileDialog();
     openFileDialog1.InitialDirectory = Environment.SpecialFolder.MyDocuments.ToString();
     openFileDialog1.Filter = "Mapas de bits (*.jpg)|*.jpg";
     openFileDialog1.FilterIndex = 2;
     openFileDialog1.RestoreDirectory = true;
     openFileDialog1.Title = "Seleccionar Logotipo de Plantel";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         DataBaseUtilities.OpenConnection(PathDataBase);
         DataBaseUtilities.ExecuteNonSql("Update Plantel Set Imagen = '" + openFileDialog1.FileName + "'");
         DataBaseUtilities.CloseConnection();
         CloseForms();
         frmPortada Portada = new frmPortada();
         Portada.TopLevel = false;
         Portada.Parent = this.splitContainerControl1.Panel2;
         Portada.Enabled = false;
         Portada.ControlBox = false;
         Portada.Show();
     }
 }
コード例 #4
0
 private void bBtnHMaestros_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     frmHorario Horario = new frmHorario();
     CloseForms();
     Horario.TopLevel = false;
     Horario.Parent = this.splitContainerControl1.Panel2;
     Horario.Dock = DockStyle.Fill;
     Horario.ControlBox = false;
     if (Horario.InicializeSchedule("Maestro"))
     { Horario.Show(); }
     else
     {
         frmPortada Portada = new frmPortada();
         Portada.TopLevel = false;
         Portada.Parent = this.splitContainerControl1.Panel2;
         Portada.Dock = DockStyle.Fill;
         Portada.Enabled = false;
         Portada.ControlBox = false;
         Portada.Show();
     }    
 }