// Function to read the checkpoint intervals from the previous invocation of the // splashscreen from the registry. private void ReadIncrements() { var sPBIncrementPerTimerInterval = RegistryAccess.GetStringRegistryValue(REGVALUE_PB_MILLISECOND_INCREMENT, "0.0015"); double dblResult; if (double.TryParse(sPBIncrementPerTimerInterval, System.Globalization.NumberStyles.Float, System.Globalization.NumberFormatInfo.InvariantInfo, out dblResult)) { m_dblPBIncrementPerTimerInterval = dblResult; } else { m_dblPBIncrementPerTimerInterval = .0015; } var sPBPreviousPctComplete = RegistryAccess.GetStringRegistryValue(REGVALUE_PB_PERCENTS, ""); if (sPBPreviousPctComplete != "") { var aTimes = sPBPreviousPctComplete.Split(null); m_alPreviousCompletionFraction = new List <double>(); foreach (var timeVal in aTimes) { double dblVal; if (double.TryParse(timeVal, System.Globalization.NumberStyles.Float, System.Globalization.NumberFormatInfo.InvariantInfo, out dblVal)) { m_alPreviousCompletionFraction.Add(dblVal); } else { m_alPreviousCompletionFraction.Add(1.0); } } } else { m_bFirstLaunch = true; lblTimeRemaining.Text = ""; } }
// Function to read the checkpoint intervals from the previous invocation of the // splash screen from the registry. private void ReadIncrements() { var sPBIncrementPerTimerInterval = RegistryAccess.GetStringRegistryValue(REG_VALUE_PB_MILLISECOND_INCREMENT, "0.0015"); if (clsUtilities.ParseDouble(sPBIncrementPerTimerInterval, out var dblResult)) { m_dblPBIncrementPerTimerInterval = dblResult; } else { m_dblPBIncrementPerTimerInterval = .0015; } var sPBPreviousPctComplete = RegistryAccess.GetStringRegistryValue(REG_VALUE_PB_PERCENTS, ""); if (sPBPreviousPctComplete != "") { var aTimes = sPBPreviousPctComplete.Split(null); m_alPreviousCompletionFraction = new List <double>(); foreach (var timeVal in aTimes) { if (clsUtilities.ParseDouble(timeVal, out var dblVal)) { m_alPreviousCompletionFraction.Add(dblVal); } else { m_alPreviousCompletionFraction.Add(1.0); } } } else { m_bFirstLaunch = true; lblTimeRemaining.Text = ""; } }