Ejemplo n.º 1
0
        /// <summary>
        /// Заполняем значения элементов формы параметрами из сохраненных настроек
        /// </summary>
        private void FillFormValuesFromSettings()
        {
            nudHeartRate.Value = _settings.HeartRate;
            cbHeartRateMeasurementComplited.Checked = _settings.HeartRateMeasurementCompleted;
            tbLatitude.Text  = _settings.Latitude.ToString("F6");
            tbLongitude.Text = _settings.Longitude.ToString("F6");
            tbAltitude.Text  = _settings.Altitude.ToString("F2");
            cbGeoLocationMeasurementComplited.Checked = _settings.GeoLocationMeasurementCompleted;
            nudPressure.Value = _settings.Pressure;
            cbPressureMeasurementComplited.Checked = _settings.PressureMeasurementCompleted;
            cbLocale.SelectedItem = DisplayNameAttribute.GetName(_settings.Locale);
            tbFontFilename.Text   = _settings.FontFilename;
            tbSystemResFile.Text  = _settings.SystemResourceFilename;
            tbUserResFile.Text    = _settings.UserResourceFilename;
            ucScreen.Colors       = _settings.Colors;

            cbLocale.SelectedItem = DisplayNameAttribute.GetName(_settings.Locale);

            if (File.Exists(tbFontFilename.Text))
            {
                ucScreen.SetFontFile(tbFontFilename.Text);
            }
        }