Ejemplo n.º 1
0
        /// <summary>
        /// Prevents a default instance of the GTSettings class from being created.
        /// </summary>
        private Settings()
        {
            fileSettings          = new FileSettings();
            processingSettings    = new Processing();
            eyestrackerSettings   = new Eyestracker();
            eyetrackerSettings    = new Eyetracker();
            cameraSettings        = new Camera();
            calibrationSettings   = new Calibration();
            networkSettings       = new Network();
            visualizationSettings = new Visualization();
            autotuneSettings      = new Autotune();
            eyeMovementSettings   = new EyeMovement();
            cloudSettings         = new Cloud();

            // Observe Config directory and update combobox when new files are written/changed/deleted..
            myWatcher = new FileSystemWatcher(GTPath.GetLocalApplicationDataPath() +
                                              Path.DirectorySeparatorChar + "Settings",
                                              "*.xml");
            myWatcher.Path = fileSettings.SettingsDirectory;
            myWatcher.EnableRaisingEvents   = true;
            myWatcher.IncludeSubdirectories = false;
            myWatcher.Created += WatcherSettingsDirUpdated;
            myWatcher.Changed += WatcherSettingsDirUpdated;
            myWatcher.Deleted += WatcherSettingsDirUpdated;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Prevents a default instance of the GTSettings class from being created.
        /// </summary>
        private Settings()
        {
            fileSettings = new FileSettings();
            processingSettings = new Processing();
            eyestrackerSettings = new Eyestracker();
            eyetrackerSettings = new Eyetracker();
            cameraSettings = new Camera();
            calibrationSettings = new Calibration();
            networkSettings = new Network();
            visualizationSettings = new Visualization();
            autotuneSettings = new Autotune();
            eyeMovementSettings = new EyeMovement();
            cloudSettings = new Cloud();

            #region EyeSpark specific code
            headMovementSettings = new HeadMovement();
            #endregion

            // Observe Config directory and update combobox when new files are written/changed/deleted..
            myWatcher = new FileSystemWatcher(GTPath.GetLocalApplicationDataPath() +
                           Path.DirectorySeparatorChar + "Settings",
                                              "*.xml");
            myWatcher.Path = fileSettings.SettingsDirectory;
            myWatcher.EnableRaisingEvents = true;
            myWatcher.IncludeSubdirectories = false;
            myWatcher.Created += WatcherSettingsDirUpdated;
            myWatcher.Changed += WatcherSettingsDirUpdated;
            myWatcher.Deleted += WatcherSettingsDirUpdated;
        }