예제 #1
0
        public static IVLConfig getInstance()
        {
            if (_ivlConfig == null)
            {
                try
                {
                    Type t = typeof(IVLConfig);

                    FileInfo filePath = new FileInfo(fileName);
                    {
                        if (filePath.IsReadOnly)
                        {
                            filePath.IsReadOnly = false;
                        }
                    }

                    _ivlConfig = (IVLConfig)XmlConfigUtility.Deserialize(t, fileName);
                }
                catch (Exception)
                {
                    Type t = typeof(IVLConfig);
                    _ivlConfig = new IVLConfig();

                    {
                        XmlConfigUtility.Serialize(_ivlConfig, fileName);
                    }
                }
            }
            return(_ivlConfig);
        }
예제 #2
0
        public static void SetCurrentSettings()
        {
            if (_ivlConfig == null)
            {
                _ivlConfig = IVLConfig.getInstance();
            }
            switch (_ivlConfig.Mode)
            {
            case ImagingMode.Posterior_Prime:
            {
                _ivlConfig.PrimePosteriorSettings.Settings = CurrentSettings;
                break;
            }

            case ImagingMode.Anterior_Prime:
            {
                _ivlConfig.AnteriorSettings.Settings = CurrentSettings;
                break;
            }

            case ImagingMode.Anterior_45:
            {
                _ivlConfig.AnteriorSettings.Settings = CurrentSettings;
                break;
            }

            case ImagingMode.Anterior_FFA:
            {
                _ivlConfig.AnteriorSettings.Settings = CurrentSettings;
                break;
            }

            case ImagingMode.Posterior_45:
            {
                _ivlConfig.FortyFiveSettings.Settings = CurrentSettings;
                break;
            }

            case ImagingMode.FFAColor:
            {
                _ivlConfig.FfaColorSettings.Settings = CurrentSettings;
                break;
            }

            case ImagingMode.FFA_Plus:
            {
                _ivlConfig.FfaSettings.Settings = CurrentSettings;
                break;
            }
            }
        }
예제 #3
0
 public static void ResetIVLConfig()
 {
     _ivlConfig = null;
 }
예제 #4
0
        public static void GetCurrentSettings()
        {
            if (_ivlConfig == null)
            {
                _ivlConfig = IVLConfig.getInstance();
            }
            switch (_ivlConfig.Mode)
            {
            case ImagingMode.Posterior_Prime:
            {
                CurrentSettings = _ivlConfig.PrimePosteriorSettings.Settings;
                if (CurrentSettings.CameraSettings._SaveFramesCount.val == "8")
                {
                    CurrentSettings.CameraSettings._SaveFramesCount.val = "10";
                }

                break;
            }

            case ImagingMode.Anterior_Prime:
            {
                CurrentSettings = _ivlConfig.AnteriorSettings.Settings;
                if (CurrentSettings.CameraSettings._SaveFramesCount.val == "8")
                {
                    CurrentSettings.CameraSettings._SaveFramesCount.val = "10";
                }
                break;
            }

            case ImagingMode.Anterior_45:
            {
                CurrentSettings = _ivlConfig.AnteriorSettings.Settings;
                break;
            }

            case ImagingMode.Anterior_FFA:
            {
                CurrentSettings = _ivlConfig.AnteriorSettings.Settings;
                break;
            }

            case ImagingMode.Posterior_45:
            {
                CurrentSettings = _ivlConfig.FortyFiveSettings.Settings;

                break;
            }

            case ImagingMode.FFAColor:
            {
                CurrentSettings = _ivlConfig.FfaColorSettings.Settings;
                break;
            }

            case ImagingMode.FFA_Plus:
            {
                CurrentSettings = _ivlConfig.FfaSettings.Settings;
                break;
            }
            }
            if (CurrentSettings.CameraSettings.DeviceID.length != 16)
            {
                CurrentSettings.CameraSettings.DeviceID.length = 16;
            }
            SetNegativeRangeForHSSettings();
            if (CurrentSettings.CameraSettings.IRCheckValue.max != 255)
            {
                CurrentSettings.CameraSettings.IRCheckValue.max = 255;
            }
        }