/// <summary> /// Stops the task. /// This method should ONLY contain a call to Hulk.StopTask(). /// Any other post-task cleanup should be handled in DelayMeasurementTask.StopTask() or DelayMeasurementPanel.CleanUp(). /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void stopButton_Click(object sender, EventArgs e) { logger.Debug("Enter: stopButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { Hulk.StopTask(); } }
/// <summary> /// Starts the next trial. /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void goButton_Click(object sender, EventArgs e) { logger.Debug("Enter: goButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { stopButton.Enabled = true; goButton.Enabled = false; ((PositionTask)task).Go(); } }
/// <summary> /// Starts the next trial. /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void goButton_Click(object sender, EventArgs e) { logger.Debug("Enter: goButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { protocolStopwatch.Start(); fileLoadButton.Enabled = false; goButton.Enabled = false; stopButton.Enabled = true; ThreadPool.QueueUserWorkItem(new WaitCallback(((ModeledControllerWithHmdTask)task).Go)); } }
/// <summary> /// Stops the task. /// This method should ONLY contain a call to Hulk.StopTask(). /// Any other post-task cleanup should be handled in BalanceTask.StopTask() or ModeledControllerWithHmdPanel.CleanUp(). /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void stopButton_Click(object sender, EventArgs e) { logger.Debug("Enter: stopButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { protocolStopwatch.Stop(); protocolStopwatch.Reset(); Hulk.StopTask(); ICommand c = new ICommand(); c.CommandType = (int)eCommands.FadeOut; AppMain.ServerHandler.sendCommandToRegisteredClients(c, null); } }
/// <summary> /// Starts the next trial. /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void goButton_Click(object sender, EventArgs e) { logger.Debug("Enter: goButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { recordingFilenamesListBox.ClearSelected(); recordingFilenamesListBox.SetSelected(0, true); fileLoadButton.Enabled = false; goButton.Enabled = false; stopButton.Enabled = true; ((PassiveMovementTask)task).Go(); } }
/// <summary> /// Starts the next trial. /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void goButton_Click(object sender, EventArgs e) { logger.Debug("Enter: goButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { loadButton.Enabled = false; goButton.Enabled = false; stopButton.Enabled = true; amplitudeTextBox.Enabled = false; amplitudeTextBox.BackColor = ColorScheme.Instance.TextBoxDisabledBackground; offsetTextBox.Enabled = false; offsetTextBox.BackColor = ColorScheme.Instance.TextBoxDisabledBackground; ((DelayMeasurementTask)task).Go(forcingFunctionsFilename, Double.Parse(amplitudeTextBox.Text), Double.Parse(offsetTextBox.Text)); } }
/// <summary> /// Starts the movement. /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void goButton_Click(object sender, EventArgs e) { MotionCommand newMotionCommand; double duration; logger.Debug("Enter: goButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { MessageBox.Show("NOT IMPLEMENTED YET!"); //newMotionCommand = new MotionCommand(); //newMotionCommand.innerAcceleration = Double.Parse(accelerationCommandInnerTextBox.Text); //newMotionCommand.outerAcceleration = Double.Parse(accelerationCommandOuterTextBox.Text); //newMotionCommand.innerVelocity = Double.Parse(velocityCommandInnerTextBox.Text); //newMotionCommand.outerVelocity = Double.Parse(velocityCommandOuterTextBox.Text); //softStopButton.Enabled = true; //hardStopButton.Enabled = true; //((UnrealLandscapesDemoTask)task).Go(newMotionCommand, 0); } }
/// <summary> /// Starts the movement. /// </summary> /// <param name="sender">Not used</param> /// <param name="e">Not used</param> private void goButton_Click(object sender, EventArgs e) { MotionCommand newMotionCommand; double duration; logger.Debug("Enter: goButton_Click(object, EventArgs)"); if (Hulk.CheckCommandAllowed()) { newMotionCommand = new MotionCommand(); newMotionCommand.innerAcceleration = Double.Parse(accelerationCommandInnerTextBox.Text); newMotionCommand.outerAcceleration = Double.Parse(accelerationCommandOuterTextBox.Text); newMotionCommand.innerVelocity = Double.Parse(velocityCommandInnerTextBox.Text); newMotionCommand.outerVelocity = Double.Parse(velocityCommandOuterTextBox.Text); if (positionCheckBox.Checked) { newMotionCommand.innerPosition = Double.Parse(positionCommandInnerTextBox.Text); newMotionCommand.outerPosition = Double.Parse(positionCommandOuterTextBox.Text); softStopButton.Enabled = false; hardStopButton.Enabled = false; } else { softStopButton.Enabled = true; hardStopButton.Enabled = true; } duration = -1.0; if (durationCheckBox.Checked) { duration = Double.Parse(durationCommandTextBox.Text); } ((RotationTask)task).Go(newMotionCommand, duration); } }