コード例 #1
0
        private void BtnComenzarExamen_Click(object sender, EventArgs e)
        {
            irAPregunta = Convert.ToInt32(LblNumeroPregunta.Text);

            Screen screen = Screen.PrimaryScreen;

            //BR: el monitor actual es de 1080 X 1920
            int WidthScreen  = screen.Bounds.Width;
            int HeightScreen = screen.Bounds.Height;

            FormQuestionsPanel formQuestionsPanel = new FormQuestionsPanel
            {
                StartPosition = FormStartPosition.Manual,
                Left          = 0,
                //formQuestionsPanel.Top = Height - 180; //BR: No tomaremos una medida fija, sino que será proporcional a la resolución de ptantalla
                Top    = HeightScreen - HeightScreen * 200 / 1080,
                Width  = WidthScreen,
                Height = HeightScreen * 200 / 1080
            };

            //Llenamos los respectivos campos de la base de datos antes de abrir la siguiente ventana
            if (CrearNuevoAlumno())
            {
                CargarParametros();
                formQuestionsPanel.Show();
                this.Hide();
            }
        }
コード例 #2
0
        private void BtnGoToExam_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in DgvExams.SelectedRows)
            {
                FormMain.idExamenActual      = Convert.ToInt32(row.Cells[2].Value);
                FormMain.ExamenSeleccionado  = row.Cells[0].Value.ToString();
                FormMain.NUMERO_DE_PREGUNTAS = Convert.ToInt32(row.Cells[3].Value);
            }

            Screen screen = Screen.PrimaryScreen;

            //BR: el monitor actual es de 1080 X 1920
            int WidthScreen  = screen.Bounds.Width;
            int HeightScreen = screen.Bounds.Height;

            FormQuestionsPanel formQuestionsPanel = new FormQuestionsPanel
            {
                StartPosition = FormStartPosition.Manual,
                Left          = 0,
                //formQuestionsPanel.Top = Height - 180; //BR: No tomaremos una medida fija, sino que será proporcional a la resolución de ptantalla
                Top    = HeightScreen - HeightScreen * 200 / 1080,
                Width  = WidthScreen,
                Height = HeightScreen * 200 / 1080
            };

            formQuestionsPanel.Show();
            this.Hide();
        }
コード例 #3
0
        private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            Screen screen = Screen.PrimaryScreen;

            //BR: el monitor actual es de 1080 X 1920
            int WidthScreen  = screen.Bounds.Width;
            int HeightScreen = screen.Bounds.Height;

            FormQuestionsPanel formQuestionsPanel = new FormQuestionsPanel();

            formQuestionsPanel.StartPosition = FormStartPosition.Manual;
            formQuestionsPanel.Left          = 0;
            //formQuestionsPanel.Top = Height - 180; //BR: No tomaremos una medida fija, sino que será proporcional a la resolución de ptantalla
            formQuestionsPanel.Top    = HeightScreen - HeightScreen * 200 / 1080;
            formQuestionsPanel.Width  = WidthScreen;
            formQuestionsPanel.Height = HeightScreen * 200 / 1080;

            formQuestionsPanel.ShowDialog();
        }