public MeasurementData(MeasurementData measurement) : base(measurement) { this.NumOfMeasures = measurement.NumOfMeasures; this.DifferenceBetweenMeasures = measurement.DifferenceBetweenMeasures; this.NumOfParametersToMeasure = measurement.NumOfParametersToMeasure; this.WindowOpenTimeSeconds = measurement.WindowOpenTimeSeconds; this.measurementInstructions = new List <MeasureInstructionData>(); foreach (MeasureInstructionData instruction in measurement.measurementInstructions) { this.measurementInstructions.Add(new MeasureInstructionData(instruction)); } this.Type = "Measurement"; }
public MeasurementData(MeasurementData measurement) : base(measurement) { this.NumOfMeasures = measurement.NumOfMeasures; this.DifferenceBetweenMeasures = measurement.DifferenceBetweenMeasures; this.NumOfParametersToMeasure = measurement.NumOfParametersToMeasure; this.WindowOpenTimeSeconds = measurement.WindowOpenTimeSeconds; this.measurementInstructions = new List<MeasureInstructionData>(); foreach(MeasureInstructionData instruction in measurement.measurementInstructions) { this.measurementInstructions.Add(new MeasureInstructionData(instruction)); } this.Type = "Measurement"; }
public ExperimentData(ExperimentData exp) : base(exp) { this.expID = -1; this.ExperimentQuestion = exp.ExperimentQuestion; this.Type = "Experiment"; RoadScholarContext rsContext = new RoadScholarContext(); this.activities = new List <ActivityData>(); foreach (ActivityData act in exp.activities) { ActivityData copiedActivity = null; if (act is TrueFalseQuestionData) { copiedActivity = new TrueFalseQuestionData((TrueFalseQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is AmericanQuestionData) { copiedActivity = new AmericanQuestionData((AmericanQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is ShortAnswerQuestionData) { copiedActivity = new ShortAnswerQuestionData((ShortAnswerQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is InstructionData) { copiedActivity = new InstructionData((InstructionData)act); rsContext.addActivity(copiedActivity); } else if (act is ImageData) { copiedActivity = new ImageData((ImageData)act); rsContext.addActivity(copiedActivity); } else if (act is VideoData) { copiedActivity = new VideoData((VideoData)act); rsContext.addActivity(copiedActivity); } else if (act is MeasurementData) { copiedActivity = new MeasurementData((MeasurementData)act); rsContext.addActivity(copiedActivity); } this.activities.Add(copiedActivity); } }
public ExperimentData(ExperimentData exp) : base(exp) { this.expID = -1; this.ExperimentQuestion = exp.ExperimentQuestion; this.Type = "Experiment"; RoadScholarContext rsContext = new RoadScholarContext(); this.activities = new List<ActivityData>(); foreach (ActivityData act in exp.activities) { ActivityData copiedActivity = null; if (act is TrueFalseQuestionData) { copiedActivity = new TrueFalseQuestionData((TrueFalseQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is AmericanQuestionData) { copiedActivity = new AmericanQuestionData((AmericanQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is ShortAnswerQuestionData) { copiedActivity = new ShortAnswerQuestionData((ShortAnswerQuestionData)act); rsContext.addActivity(copiedActivity); } else if (act is InstructionData) { copiedActivity = new InstructionData((InstructionData)act); rsContext.addActivity(copiedActivity); } else if (act is ImageData) { copiedActivity = new ImageData((ImageData)act); rsContext.addActivity(copiedActivity); } else if (act is VideoData) { copiedActivity = new VideoData((VideoData)act); rsContext.addActivity(copiedActivity); } else if (act is MeasurementData) { copiedActivity = new MeasurementData((MeasurementData)act); rsContext.addActivity(copiedActivity); } this.activities.Add(copiedActivity); } }
public static MeasurementData getMeasurementAsData(Measurement measurement) { MeasurementData mData = new MeasurementData(); mData.ActivityName = measurement.ActivityName; mData.expID = measurement.expID; mData.id = measurement.id; mData.isMainActivity = measurement.isMainActivity; mData.RoomId = measurement.RoomId; mData.NumOfMeasures = measurement.NumOfMeasures; mData.DifferenceBetweenMeasures = measurement.DifferenceBetweenMeasures; mData.NumOfParametersToMeasure = measurement.NumOfParametersToMeasure; mData.WindowOpenTimeSeconds = measurement.WindowOpenTimeSeconds; if (measurement.measurementInstructions != null) { foreach (MeasureInstruction mi in measurement.measurementInstructions) { mData.measurementInstructions.Add(getMeasureInstructionAsData(mi)); } } return mData; }