Exemplo n.º 1
0
        private Stimulus GetRightStimulus()
        {
            Stimulus stim = new Stimulus();

            stim.SetImage(right_stimulus.ImageLocation);
            stim.SetWidth(Convert.ToInt32(right_stimulus_width.Text));
            stim.SetHeight(Convert.ToInt32(right_stimulus_height.Text));
            stim.SetTop(Convert.ToInt32(right_stimulus_top.Text));
            stim.SetLeft(Convert.ToInt32(right_stimulus_left.Text));
            stim.SetStimulusName(right_stimulus_name.Text);
            return(stim);
        }
Exemplo n.º 2
0
        // Helper functions for reading from xml files
        private Stimulus XMLReadStimulusParameters(XmlElement xmlStimulus)
        {
            Stimulus stim = new Stimulus();

            int    top      = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("top")[0]).InnerText);
            int    left     = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("left")[0]).InnerText);
            int    height   = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("height")[0]).InnerText);
            int    width    = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("width")[0]).InnerText);
            string filename = ((XmlElement)xmlStimulus.GetElementsByTagName("location")[0]).InnerText;
            string name     = ((XmlElement)xmlStimulus.GetElementsByTagName("name")[0]).InnerText;

            stim.SetStimulusName(name);
            stim.SetFilename(filename);
            stim.SetTop(top);
            stim.SetLeft(left);
            stim.SetHeight(height);
            stim.SetWidth(width);

            return(stim);
        }
Exemplo n.º 3
0
 private Stimulus GetRightStimulus()
 {
     Stimulus stim = new Stimulus();
     stim.SetImage(right_stimulus.ImageLocation);
     stim.SetWidth(Convert.ToInt32(right_stimulus_width.Text));
     stim.SetHeight(Convert.ToInt32(right_stimulus_height.Text));
     stim.SetTop(Convert.ToInt32(right_stimulus_top.Text));
     stim.SetLeft(Convert.ToInt32(right_stimulus_left.Text));
     stim.SetStimulusName(right_stimulus_name.Text);
     return stim;
 }
        // Helper functions for reading from xml files
        private Stimulus XMLReadStimulusParameters(XmlElement xmlStimulus)
        {
            Stimulus stim = new Stimulus();

            int top = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("top")[0]).InnerText);
            int left = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("left")[0]).InnerText);
            int height = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("height")[0]).InnerText);
            int width = Convert.ToInt32(((XmlElement)xmlStimulus.GetElementsByTagName("width")[0]).InnerText);
            string filename = ((XmlElement)xmlStimulus.GetElementsByTagName("location")[0]).InnerText;
            string name = ((XmlElement)xmlStimulus.GetElementsByTagName("name")[0]).InnerText;

            stim.SetStimulusName(name);
            stim.SetFilename(filename);
            stim.SetTop(top);
            stim.SetLeft(left);
            stim.SetHeight(height);
            stim.SetWidth(width);

            return stim;
        }