Beispiel #1
0
    /// <summary>
    /// This method creates a custom gaze variable 
    ///   for regressions from the current user interface settings.
    /// </summary>
    /// <param name="isUsingAOI">
    /// True, if regressions should only be detected in an AOI
    ///   otherwise (for using all fixation data) false.
    /// </param>
    /// <param name="isAOIGroup">
    /// True, if it is a AOI Group that the parameter belongs to,
    ///   otherwise (for a single AOI) false.
    /// </param>
    private void CreateCustomGazeRegressionParam(bool isUsingAOI, bool isAOIGroup)
    {
      this.gazeParams |= GazeParams.Custom;
      var newGazeVariable = new CustomVariable();
      if (isUsingAOI)
      {
        newGazeVariable.AOIName = isAOIGroup
                                    ? this.cbbGazeRegressionAOIGroups.Text
                                    : this.cbbGazeRegressionAOISingle.Text;
      }
      else
      {
        newGazeVariable.AOIName = string.Empty;
      }

      newGazeVariable.Number = (int)this.nudGazeRegressionLineHeight.Value;
      newGazeVariable.ColumnName = "GFIX_C" + this.gazeCustomParams.Count.ToString();
      newGazeVariable.IsAOIGroup = isAOIGroup;
      newGazeVariable.ParamType = ParamTypes.Regressions;

      var var = new GazeVariable(
        GazeParams.Custom,
        newGazeVariable.ColumnName,
        "Gaze: " + newGazeVariable.ToString(),
        Type.GetType("System.Int32"),
        "N0",
        null,
        newGazeVariable.ReturnValues());

      this.InsertOrRemoveColumn(true, var);
      this.gazeCustomParams.Add(newGazeVariable);
    }
Beispiel #2
0
    /// <summary>
    /// This method creates a custom mouse variable from the current user interface settings.
    /// </summary>
    /// <param name="isAOIGroup">
    /// True, if it is a AOI Group that the parameter belongs to,
    ///   otherwise (for a single AOI) false.
    /// </param>
    private void CreateCustomMouseParam(bool isAOIGroup)
    {
      this.mouseParams |= MouseParams.Custom;
      var newMouseVariable = new CustomVariable();
      newMouseVariable.AOIName = isAOIGroup ? this.cbbMouseAOIGroup.Text : this.cbbMouseAOISingle.Text;
      newMouseVariable.ColumnName = "MFIX_C" + this.mouseCustomParams.Count.ToString();
      newMouseVariable.Number = (int)this.nudMouseNumberOf.Value;
      newMouseVariable.IsAOIGroup = isAOIGroup;
      newMouseVariable.MouseButton = this.cbbMouseClickButton.Text == string.Empty
                                       ? MouseButtons.None
                                       : (MouseButtons)Enum.Parse(typeof(MouseButtons), this.cbbMouseClickButton.Text);
      if (this.rdbMouseCompleteFixationTime.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.CompleteTime;
      }
      else if (this.rdbMouseTimeUntil.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.TimeUntil;
      }
      else if (this.rdbMouseNumberOfFixations.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.NumberOf;
      }
      else if (this.rdbMouseFixationDurationMean.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.FixationDurationMean;
      }
      else if (this.rdbMouseFixationDurationMedian.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.FixationDurationMedian;
      }
      else if (this.rdbMouseClickAOI.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.Clicks;
      }
      else if (this.rdbMouseSaccadeDuration.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.SaccadeDuration;
      }
      else if (this.rdbMouseSaccadeLength.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.SaccadeLength;
      }
      else if (this.rdbMouseSaccadeVelocity.Checked)
      {
        newMouseVariable.ParamType = ParamTypes.SaccadeVelocity;
      }

      var var = new MouseVariable(
        MouseParams.Custom,
        newMouseVariable.ColumnName,
        "Mouse: " + newMouseVariable.ToString(),
        Type.GetType("System.Int32"),
        "N0",
        null,
        newMouseVariable.ReturnValues());

      this.InsertOrRemoveColumn(true, var);
      this.mouseCustomParams.Add(newMouseVariable);
    }
Beispiel #3
0
    /// <summary>
    /// This method creates a custom gaze variable from the current user interface settings.
    /// </summary>
    /// <param name="isAOIGroup">
    /// True, if it is a AOI Group that the parameter belongs to,
    ///   otherwise (for a single AOI) false.
    /// </param>
    private void CreateCustomGazeParam(bool isAOIGroup)
    {
      this.gazeParams |= GazeParams.Custom;
      var newGazeVariable = new CustomVariable();
      newGazeVariable.AOIName = isAOIGroup ? this.cbbGazeAOIGroups.Text : this.cbbGazeAOISingle.Text;
      newGazeVariable.ColumnName = "GFIX_C" + this.gazeCustomParams.Count.ToString();
      newGazeVariable.Number = (int)this.nudGazeTimeUntilNumberOf.Value;
      newGazeVariable.IsAOIGroup = isAOIGroup;
      if (this.rdbGazeCompleteFixationTime.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.CompleteTime;
      }
      else if (this.rdbGazeTimeUntil.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.TimeUntil;
      }
      else if (this.rdbGazeNumberOfFixations.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.NumberOf;
      }
      else if (this.rdbGazeFixationDurationMean.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.FixationDurationMean;
      }
      else if (this.rdbGazeFixationDurationMedian.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.FixationDurationMedian;
      }
      else if (this.rdbGazeSaccadeDuration.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.SaccadeDuration;
      }
      else if (this.rdbGazeSaccadeLength.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.SaccadeLength;
      }
      else if (this.rdbGazeSaccadeVelocity.Checked)
      {
        newGazeVariable.ParamType = ParamTypes.SaccadeVelocity;
      }

      var var = new GazeVariable(
        GazeParams.Custom,
        newGazeVariable.ColumnName,
        "Gaze: " + newGazeVariable.ToString(),
        Type.GetType("System.Int32"),
        "N0",
        null,
        newGazeVariable.ReturnValues());

      this.InsertOrRemoveColumn(true, var);
      this.gazeCustomParams.Add(newGazeVariable);
    }