public void setSettings(BagoliniSettings mySettings)
 {
     distanceSlider.setSliderValue(mySettings.setting0);
     rotationSlider.setSliderValue(mySettings.setting1);
     AttachToHead.isOn = mySettings.setting2;
     GradsToggle.isOn  = mySettings.setting3;
     ShowRedSide.isOn  = mySettings.setting4;
     setUpProps();
 }
Beispiel #2
0
 public void initSettings()
 {
     testSettings0 = new BagoliniSettings();
     testSettings1 = new BoxStringSettings();
     testSettings2 = new DepthTestSettings();
     testSettings3 = new VernierSettings();
     testSettings4 = new DoubleMaddoxSettings();
     testSettings5 = new DepthPracticeSettings();
     testSettings6 = new VisualField1Settings();
     testSettings7 = new Worth4DotSettings();
     testSettings8 = new StandardEyeChartSettings();
 }
        public BagoliniSettings createSettingsObject(string[] settingsString)
        {
            //this converts a string to a much faster to access object.
            BagoliniSettings mySettings = new BagoliniSettings();

            if (settingsString.Length > 0)
            {
                mySettings.setting0 = float.Parse(settingsString[0]);
                mySettings.setting1 = float.Parse(settingsString[1]);
                mySettings.setting2 = bool.Parse(settingsString[2]);
                mySettings.setting3 = bool.Parse(settingsString[3]);
                mySettings.setting4 = bool.Parse(settingsString[4]);
            }
            else
            {
                mySettings.setting0 = 0;
                mySettings.setting1 = 0;
                mySettings.setting2 = false;
                mySettings.setting3 = false;
                mySettings.setting4 = false;
            }
            return(mySettings);
        }