private async Task startTesting() { if (executingTest.ProgramInUse.IsOrderRandom && !executingTest.ProgramInUse.TrainingProgram) { executingTest.ProgramInUse.Shuffle(); } else if (executingTest.ProgramInUse.IsOrderRandom && executingTest.ProgramInUse.TrainingProgram) { executingTest.ProgramInUse.ShuffleWithTrainingProgram(); } int index = 0; foreach (Program program in executingTest.ProgramInUse.ProgramList) { index++; await Task.Delay(executingTest.ProgramInUse.IntervalTime); executingTest.ExpositionTime = DateTime.Now; if (program.GetType() == typeof(StroopProgram)) { ExpositionController.BeginStroopTest(program.ProgramName, executingTest.ParticipantName, executingTest.Mark, this); } else if (program.GetType() == typeof(ReactionProgram)) { ExpositionController.BeginReactionTest(program.ProgramName, executingTest.ParticipantName, executingTest.Mark, this); } executingTest.writeLineOutput(index, program); } Program.writeOutputFile(outputFile, string.Join("\n", executingTest.Output.ToArray())); Close(); }
private void executeButton_Click(object sender, EventArgs e) { if (Global.GlobalFormMain.contentPanel.Controls.Count > 0) { checkSave(); } if (this.ValidateChildren(ValidationConstraints.Enabled)) { if (executingTypeLabel.Text.Equals(LocRM.GetString("stroopTest", currentCulture))) { ExpositionController.BeginStroopTest(executingNameLabel.Text, participantComboBox.Text, markTextBox.Text[0], this); } else if (executingTypeLabel.Text.Equals(LocRM.GetString("reactionTest", currentCulture))) { ExpositionController.BeginReactionTest(executingNameLabel.Text, participantComboBox.Text, markTextBox.Text[0], this); } else if (executingTypeLabel.Text.Equals(LocRM.GetString("experiment", currentCulture))) { ExpositionController.BeginExperimentTest(executingNameLabel.Text, participantComboBox.Text, markTextBox.Text[0], this); } else if (executingTypeLabel.Text.Equals(LocRM.GetString("matchingTest", currentCulture))) { ExpositionController.BeginMatchingTest(executingNameLabel.Text, participantComboBox.Text, markTextBox.Text[0], this); } else { /* do nothing*/ } } }
private void executeButton_Click(object sender, EventArgs e) { if (this.ValidateChildren(ValidationConstraints.Enabled)) { if (executingTypeLabel.Text.Equals("StroopTest")) { ExpositionController.BeginStroopTest(executingNameLabel.Text, participantTextBox.Text, markTextBox.Text[0], this); } else if (executingTypeLabel.Text.Equals("ReactionTest")) { ExpositionController.BeginReactionTest(executingNameLabel.Text, participantTextBox.Text, markTextBox.Text[0], this); } else if (executingTypeLabel.Text.Equals("Experimento")) { ExpositionController.BeginExperimentTest(executingNameLabel.Text, participantTextBox.Text, markTextBox.Text[0], this); } else { /* do nothing*/ } } else { MessageBox.Show("Algum campo não foi preenchido de forma correta."); } }
private void FormMain_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.R) // Ctrl+R - roda teste { ExpositionController.BeginStroopTest(executingNameLabel.Text, participantComboBox.Text, markTextBox.Text[0], this); } if (e.Control && e.KeyCode == Keys.D) // Ctrl+D - define programa { defineTest(); } if (e.Control && e.KeyCode == Keys.N) // Ctrl+N - novo programa { newProgram(); } if (e.Control && e.KeyCode == Keys.H) // Ctrl+H - intruções / ajuda { HelpPagesController.showInstructions(); } }
private void startTestToolStripMenuItem_Click(object sender, EventArgs e) { ExpositionController.BeginStroopTest(executingNameLabel.Text, participantComboBox.Text, markTextBox.Text[0], this); }