private static void ReadCfg() { Logger.LogTrivial("Reading settings from config file..."); ToggleKey = mCfgFile.ReadEnum <Keys>(ECfgSections.SETTINGS.ToString(), ESettings.ToggleKey.ToString(), Keys.F8); ToggleKeyModifier = mCfgFile.ReadEnum <Keys>(ECfgSections.SETTINGS.ToString(), ESettings.ToggleKeyModifier.ToString(), Keys.None); PlayAlertSound = mCfgFile.ReadBoolean(ECfgSections.SETTINGS.ToString(), ESettings.PlayAlertSound.ToString(), true); PlayScanSound = mCfgFile.ReadBoolean(ECfgSections.SETTINGS.ToString(), ESettings.PlayScanSound.ToString(), true); AutoDisableOnTrafficStops = mCfgFile.ReadBoolean(ECfgSections.SETTINGS.ToString(), ESettings.AutoDisableOnTrafficStops.ToString(), true); AutoDisableOnPursuits = mCfgFile.ReadBoolean(ECfgSections.SETTINGS.ToString(), ESettings.AutoDisableOnPursuits.ToString(), true); //BetaKey = mCfgFile.ReadString(ECfgSections.SETTINGS.ToString(), ESettings.BetaKey.ToString(), "YourBetaKeyHere"); Logger.LogTrivial("ToggleKey = " + ToggleKey.ToString()); CameraDegreesFOV = mCfgFile.ReadInt32(ECfgSections.CAMERAS.ToString(), ECameras.CameraDegreesFOV.ToString(), cCameraDegreesFOV); CameraRange = (float)mCfgFile.ReadDouble(ECfgSections.CAMERAS.ToString(), ECameras.CameraRange.ToString(), cCameraRange); CameraMinimum = (float)mCfgFile.ReadDouble(ECfgSections.CAMERAS.ToString(), ECameras.CameraMinimum.ToString(), (float)cCameraMinRange); DriverFrontAngle = mCfgFile.ReadInt32(ECfgSections.CAMERAS.ToString(), ECameras.DriverFrontAngle.ToString(), cDriverFrontAngle); DriverRearAngle = mCfgFile.ReadInt32(ECfgSections.CAMERAS.ToString(), ECameras.DriverRearAngle.ToString(), cDriverRearAngle); PassengerRearAngle = mCfgFile.ReadInt32(ECfgSections.CAMERAS.ToString(), ECameras.PassengerRearAngle.ToString(), cPassengerRearAngle); PassengerFrontAngle = mCfgFile.ReadInt32(ECfgSections.CAMERAS.ToString(), ECameras.PassengerFrontAngle.ToString(), cPassengerFrontAngle); VehicleRescanBuffer = mCfgFile.ReadInt32(ECfgSections.CAMERAS.ToString(), ECameras.VehicleRescanBuffer.ToString(), cVehicleRescanBuffer); SecondsBetweenAlerts = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.SecondsBetweenAlerts.ToString(), cSecondsBetweenAlerts); ProbabilityOfAlerts = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.ProbabilityOfAlerts.ToString(), cProbabilityOfAlerts); StolenVehicleWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.StolenVehicleWeight.ToString(), cDefaultStolenVehicleWeight); OwnerWantedWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.OwnerWantedWeight.ToString(), cDefaultOwnerWantedWeight); OwnerLicenseSuspendedWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.OwnerLicenseSuspendedWeight.ToString(), cDefaultOwnerLicenseSuspendedWeight); OwnerLicenseExpiredWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.OwnerLicenseExpiredWeight.ToString(), cDefaultOwnerLicenseExpiredWeight); UnregisteredVehicleWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.UnregisteredVehicleWeight.ToString(), cDefaultUnregisteredVehicleWeight); RegisrationExpiredWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.RegisrationExpiredWeight.ToString(), cDefaultRegisrationExpiredWeight); NoInsuranceWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.NoInsuranceWeight.ToString(), cDefaultNoInsuranceWeight); InsuranceExpiredWeight = mCfgFile.ReadInt32(ECfgSections.ALERTS.ToString(), EAlerts.InsuranceExpiredWeight.ToString(), cDefaultInsuranceExpiredWeight); AdjustAlertWeights(); }