Exemplo n.º 1
0
        private void ControlHoras_Load(object sender, EventArgs e)
        {
            if (Opciones.DarkTheme)
            {
                msManager.Theme = MetroFramework.MetroThemeStyle.Dark;
            }
            else
            {
                msManager.Theme = MetroFramework.MetroThemeStyle.Light;
            }

            string[] s;
            s = Opciones.Estilo.Split('-');
            msManager.Style = (MetroColorStyle)Convert.ToInt32(s[1]);

            mgAlumnosList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;

            if (FromContext)
            {
                _EditData = new pnlDataEdition(this, Opciones, Alumno_Matricula);
                _EditData.swipe(true);

                SetSingleStudent(int.Parse(Alumno_Matricula));
            }
            else
            {
                mgAlumnosList.Enabled = true;
                SetStudents();
            }
        }
Exemplo n.º 2
0
        private void mgAlumnosList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right || e.Button == MouseButtons.Left)
            {
                int currentMouseOverRow = mgAlumnosList.HitTest(e.X, e.Y).RowIndex;

                if (currentMouseOverRow >= 0)
                {
                    mgAlumnosList.ClearSelection();
                    mgAlumnosList.Rows[currentMouseOverRow].Selected = true;

                    _EditData = new pnlDataEdition(this, Opciones, mgAlumnosList.Rows[mgAlumnosList.SelectedRows[0].Index].Cells[0].Value.ToString());
                    _EditData.swipe(true);
                    //mbEliminaHorario.Enabled = true;
                    //mcMenu.Show(mgHorarios, new Point(e.X, e.Y));
                }
            }
        }