Ejemplo n.º 1
0
    /// <summary>
    /// This method initializes the default mouse variables for use in this interface.
    /// </summary>
    private void CreateMouseVariables()
    {
      var varMouseFixations = new MouseVariable(
        MouseParams.Fixations,
        "MFIXCOUN",
        "Mouse: Fixations (count)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSEFixations,
        this.toolTipStatistic.GetToolTip(this.chbMSEFixations));
      this.defaultVariables.Add("chbMSEFixations", varMouseFixations);

      var varMouseFixationsPS = new MouseVariable(
        MouseParams.FixationsPS,
        "MFIXCOpS",
        "Mouse: Fixations (count/s)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSEFixationsPS,
        this.toolTipStatistic.GetToolTip(this.chbMSEFixationsPS));
      this.defaultVariables.Add("chbMSEFixationsPS", varMouseFixationsPS);

      var varMouseFixationsUntilFirstMouseClick = new MouseVariable(
        MouseParams.FixationsUntilFirstMouseClick,
        "MFIXCO1C",
        "Mouse: Fixations Until First Click (count)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSECountFix2FirstClick,
        this.toolTipStatistic.GetToolTip(this.chbMSECountFix2FirstClick));
      this.defaultVariables.Add("chbMSECountFix2FirstClick", varMouseFixationsUntilFirstMouseClick);

      var varMouseFixationDurationMean = new MouseVariable(
        MouseParams.FixationDurationMean,
        "MFIXDURA",
        "Mouse: Fixation Duration Mean (ms)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSEFixDurationMean,
        this.toolTipStatistic.GetToolTip(this.chbMSEFixDurationMean));
      this.defaultVariables.Add("chbMSEFixDurationMean", varMouseFixationDurationMean);

      var varMouseFixationDurationMedian = new MouseVariable(
        MouseParams.FixationDurationMedian,
        "MFIXDUME",
        "Mouse: Fixation Duration Median (ms)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSEFixDurationMedian,
        this.toolTipStatistic.GetToolTip(this.chbMSEFixDurationMedian));
      this.defaultVariables.Add("chbMSEFixDurationMedian", varMouseFixationDurationMedian);

      var varMouseFixationSaccadeRatio = new MouseVariable(
        MouseParams.FixationSaccadeRatio,
        "MFIXDUpS",
        "Mouse: Fixation/Saccade ratio",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSEFixationSaccadesRatio,
        this.toolTipStatistic.GetToolTip(this.chbMSEFixationSaccadesRatio));
      this.defaultVariables.Add("chbMSEFixationSaccadesRatio", varMouseFixationSaccadeRatio);

      var varMouseAverageSaccadeLength = new MouseVariable(
        MouseParams.AverageSaccadeLength,
        "MFIXSALE",
        "Mouse: Average Saccade Length (px)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSESaccadeLength,
        this.toolTipStatistic.GetToolTip(this.chbMSESaccadeLength));
      this.defaultVariables.Add("chbMSESaccadeLength", varMouseAverageSaccadeLength);

      var varMouseAverageSaccadeVelocity = new MouseVariable(
        MouseParams.AverageSaccadeVelocity,
        "MFIXSAVE",
        "Mouse: Average Saccade Velocity (px/s)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSESaccadeVelocity,
        this.toolTipStatistic.GetToolTip(this.chbMSESaccadeVelocity));
      this.defaultVariables.Add("chbMSESaccadeVelocity", varMouseAverageSaccadeVelocity);

      var varMouseTimeToFirstFixInSearchRect = new MouseVariable(
        MouseParams.TimeToFirstFixInSearchRect,
        "MFIXRECT",
        "Mouse: Time To First Fixation in AOI 'SearchRect' (ms)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSETime2FirstFixInSearchRect,
        this.toolTipStatistic.GetToolTip(this.chbMSETime2FirstFixInSearchRect));
      this.defaultVariables.Add("chbMSETime2FirstFixInSearchRect", varMouseTimeToFirstFixInSearchRect);

      var varMouseTimeToFirstFixAtTarget = new MouseVariable(
        MouseParams.TimeToFirstFixAtTarget,
        "MFIXTARG",
        "Mouse: Time To First Fixation in AOI 'Target' (ms)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSETime2FirstFixAtTarget,
        this.toolTipStatistic.GetToolTip(this.chbMSETime2FirstFixAtTarget));
      this.defaultVariables.Add("chbMSETime2FirstFixAtTarget", varMouseTimeToFirstFixAtTarget);

      var varMouseTimeToSecondFixAtTarget = new MouseVariable(
        MouseParams.TimeToSecondFixAtTarget,
        "MFIX2TAR",
        "Mouse: Time To Second Fixation in AOI 'Target' (ms)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSETime2SecondFixAtTarget,
        this.toolTipStatistic.GetToolTip(this.chbMSETime2SecondFixAtTarget));
      this.defaultVariables.Add("chbMSETime2SecondFixAtTarget", varMouseTimeToSecondFixAtTarget);

      var varMouseTimeAtTarget = new MouseVariable(
        MouseParams.TimeAtTarget,
        "MFIXTAFT",
        "Mouse: AOI 'Target' Fixation Time (ms)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSEFixTimeAtTarget,
        this.toolTipStatistic.GetToolTip(this.chbMSEFixTimeAtTarget));
      this.defaultVariables.Add("chbMSEFixTimeAtTarget", varMouseTimeAtTarget);

      var varMousePathlength = new MouseVariable(
        MouseParams.Pathlength,
        "MSE_PATH",
        "Mouse: Pathlength (px)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSEPathlength,
        this.toolTipStatistic.GetToolTip(this.chbMSEPathlength));
      this.defaultVariables.Add("chbMSEPathlength", varMousePathlength);

      var varMousePathlengthPS = new MouseVariable(
        MouseParams.PathlengthPS,
        "MSE_PApS",
        "Mouse: Path velocity (px/s)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSEPathlengthPS,
        this.toolTipStatistic.GetToolTip(this.chbMSEPathlengthPS));
      this.defaultVariables.Add("chbMSEPathlengthPS", varMousePathlengthPS);

      var varMouseLeftClicksPS = new MouseVariable(
        MouseParams.LeftClicksPS,
        "MCLILCpS",
        "Mouse: Left Clicks (count/s)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSELeftClicksPS,
        this.toolTipStatistic.GetToolTip(this.chbMSELeftClicksPS));
      this.defaultVariables.Add("chbMSELeftClicksPS", varMouseLeftClicksPS);

      var varMouseRightClicksPS = new MouseVariable(
        MouseParams.RightClicksPS,
        "MCLIRCpS",
        "Mouse: Right Clicks (count/s)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSERightClicksPS,
        this.toolTipStatistic.GetToolTip(this.chbMSERightClicksPS));
      this.defaultVariables.Add("chbMSERightClicksPS", varMouseRightClicksPS);

      var varMouseLeftClicks = new MouseVariable(
        MouseParams.LeftClicks,
        "MCLILCOU",
        "Mouse: Left Clicks (count)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSELeftClicks,
        this.toolTipStatistic.GetToolTip(this.chbMSELeftClicks));
      this.defaultVariables.Add("chbMSELeftClicks", varMouseLeftClicks);

      var varMouseRightClicks = new MouseVariable(
        MouseParams.RightClicks,
        "MCLIRCOU",
        "Mouse: Right Clicks (count)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSERightClicks,
        this.toolTipStatistic.GetToolTip(this.chbMSERightClicks));
      this.defaultVariables.Add("chbMSERightClicks", varMouseRightClicks);

      var varMouseTimeToFirstClick = new MouseVariable(
        MouseParams.TimeToFirstClick,
        "MTIM1CLI",
        "Mouse: Time Until First Click (ms)",
        Type.GetType("System.Int32"),
        "N0",
        this.chbMSETime2FirstClick,
        this.toolTipStatistic.GetToolTip(this.chbMSETime2FirstClick));
      this.defaultVariables.Add("chbMSETime2FirstClick", varMouseTimeToFirstClick);

      var varMouseAverageDistanceToGaze = new MouseVariable(
        MouseParams.AverageDistanceToGaze,
        "GMF_AVDI",
        "Gaze: Average Gaze Mouse Path Distance (px)",
        Type.GetType("System.Single"),
        "N2",
        this.chbMSEAverageDistance,
        this.toolTipStatistic.GetToolTip(this.chbMSEAverageDistance));
      this.defaultVariables.Add("chbMSEAverageDistance", varMouseAverageDistanceToGaze);
    }
Ejemplo n.º 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);
    }