/// <summary> /// Initializes a new instance of the Slide class. /// </summary> public Slide() { this.stimuli = new VGElementCollection(); this.activeXElements = new VGElementCollection(); this.targets = new VGElementCollection(); this.correctResponses = new StopConditionCollection(); this.links = new StopConditionCollection(); this.stopConditions = new StopConditionCollection(); this.category = string.Empty; this.TriggerSignal = new Trigger(TriggerSignaling.None, TriggerOutputDevices.LPT, 40, 255, 0x0378); this.IdOfPreSlideFixationTrial = -1; }
/// <summary> /// Initializes a new instance of the Slide class. /// </summary> /// <param name="newName">A <see cref="string"/> with the unique name of this Slide</param> /// <param name="newBackgroundColor">A <see cref="Color"/> with the background color for this slide</param> /// <param name="newBackgroundImage">A <see cref="Image"/> with the background image for this slide</param> /// <param name="newStopConditions">A <see cref="StopConditionCollection"/> list /// of responses for which the slide presentation should stop.</param> /// <param name="newResponses">An optional <see cref="StopConditionCollection"/> with responses /// that indicate correct answers.</param> /// <param name="newCategory">A <see cref="string"/> with an optional category /// that gives an additional slide distinction.</param> /// <param name="newPresentationSize">A <see cref="Size"/> with the original /// presentation size of this slide.</param> public Slide( string newName, Color newBackgroundColor, Image newBackgroundImage, StopConditionCollection newStopConditions, StopConditionCollection newResponses, string newCategory, Size newPresentationSize) { this.stimuli = new VGElementCollection(); this.activeXElements = new VGElementCollection(); this.targets = new VGElementCollection(); this.links = new StopConditionCollection(); this.stopConditions = newStopConditions; this.BackgroundColor = newBackgroundColor; this.BackgroundImage = newBackgroundImage; this.name = newName; this.correctResponses = newResponses; this.category = newCategory; this.PresentationSize = newPresentationSize; this.IdOfPreSlideFixationTrial = -1; }
/// <summary> /// Initializes a new instance of the Slide class as a clone of /// the given slide. /// </summary> /// <param name="slide">The <see cref="Slide"/> to clone.</param> public Slide(Slide slide) { // Clone stimuli this.stimuli = new VGElementCollection(); foreach (VGElement element in slide.VGStimuli) { this.stimuli.Add((VGElement)element.Clone()); } // Clone activeXElements this.activeXElements = new VGElementCollection(); foreach (VGElement element in slide.ActiveXStimuli) { this.activeXElements.Add((VGElement)element.Clone()); } // Clone stop conditions this.stopConditions = new StopConditionCollection(); foreach (StopCondition condition in slide.StopConditions) { this.stopConditions.Add((StopCondition)condition.Clone()); } // Clone background properties this.BackgroundColor = slide.BackgroundColor; if (slide.BackgroundImage != null) { this.BackgroundImage = (Image)slide.BackgroundImage.Clone(); } if (slide.BackgroundSound != null) { this.BackgroundSound = (AudioFile)slide.BackgroundSound.Clone(); } // Clone trigger this.TriggerSignal = slide.TriggerSignal; this.IsDesktopSlide = slide.IsDesktopSlide; this.IdOfPreSlideFixationTrial = slide.IdOfPreSlideFixationTrial; this.IsDisabled = slide.IsDisabled; // Clone correct responses this.correctResponses = new StopConditionCollection(); foreach (StopCondition condition in slide.CorrectResponses) { this.correctResponses.Add((StopCondition)condition.Clone()); } // Clone links this.links = new StopConditionCollection(); foreach (StopCondition condition in slide.Links) { this.links.Add((StopCondition)condition.Clone()); } // Clone description this.name = slide.Name; this.category = slide.Category; // Clone target areas this.targets = new VGElementCollection(); foreach (VGElement target in slide.TargetShapes) { this.targets.Add((VGElement)target.Clone()); } // Clone mouse properties this.MouseInitialPosition = slide.MouseInitialPosition; this.MouseCursorVisible = slide.MouseCursorVisible; this.ForceMousePositionChange = slide.ForceMousePositionChange; this.PresentationSize = slide.PresentationSize; this.Modified = slide.Modified; }