private void InitFeaturePrefs() { ckShowTimes.Checked = m_pf.DisplayTimesByDefault; ckSIC.Checked = m_pf.TracksSecondInCommandTime; ckTrackCFITime.Checked = m_pf.IsInstructor; ckUseArmyCurrency.Checked = m_pf.UsesArmyCurrency; ckUse117DutyTime.Checked = m_pf.UsesFAR117DutyTime; rbl117Rules.SelectedIndex = m_pf.UsesFAR117DutyTimeAllFlights ? 1 : 0; ckUse135DutyTime.Checked = m_pf.UsesFAR135DutyTime; ckUse13529xCurrency.Checked = m_pf.UsesFAR13529xCurrency; ckUse13526xCurrency.Checked = m_pf.UsesFAR13526xCurrency; ckUse61217Currency.Checked = m_pf.UsesFAR61217Currency; ckLAPLCurrency.Checked = m_pf.UsesLAPLCurrency; ck6157c4Pref.Checked = m_pf.UsesLooseIFRCurrency; pnlLoose6157.Visible = DateTime.Now.CompareTo(ExaminerFlightRow.Nov2018Cutover) < 0; ckCanadianCurrency.Checked = m_pf.UseCanadianCurrencyRules; rblTotalsOptions.SelectedValue = m_pf.TotalsGroupingMode.ToString(); ckIncludeModelFeatureTotals.Checked = !m_pf.SuppressModelFeatureTotals; rblCurrencyPref.SelectedIndex = (m_pf.UsesPerModelCurrency ? 1 : 0); rblTimeEntryPreference.SelectedIndex = (m_pf.UsesHHMM ? 1 : 0); rblDateEntryPreferences.SelectedIndex = (m_pf.UsesUTCDateOfFlight ? 1 : 0); prefTimeZone.SelectedTimeZone = m_pf.PreferredTimeZone; foreach (CurrencyExpiration.Expiration exp in Enum.GetValues(typeof(CurrencyExpiration.Expiration))) { ListItem li = new ListItem(CurrencyExpiration.ExpirationLabel(exp), exp.ToString()) { Selected = m_pf.CurrencyExpiration == exp }; cmbExpiredCurrency.Items.Add(li); } }
private void InitFeaturePrefs() { ckShowTimes.Checked = m_pf.DisplayTimesByDefault; ckSIC.Checked = m_pf.TracksSecondInCommandTime; ckTrackCFITime.Checked = m_pf.IsInstructor; ckUseArmyCurrency.Checked = m_pf.UsesArmyCurrency; ckUse117DutyTime.Checked = m_pf.UsesFAR117DutyTime; rbl117Rules.SelectedIndex = m_pf.UsesFAR117DutyTimeAllFlights ? 1 : 0; ckUse135DutyTime.Checked = m_pf.UsesFAR135DutyTime; ckUse1252xxCurrency.Checked = m_pf.UsesFAR1252xxCurrency; ckUse13529xCurrency.Checked = m_pf.UsesFAR13529xCurrency; ckUse13526xCurrency.Checked = m_pf.UsesFAR13526xCurrency; ckUse61217Currency.Checked = m_pf.UsesFAR61217Currency; ckLAPLCurrency.Checked = m_pf.UsesLAPLCurrency; ckAllowNightTouchAndGo.Checked = m_pf.AllowNightTouchAndGoes; ckDayLandingsForDayCurrency.Checked = m_pf.OnlyDayLandingsForDayCurrency; ckCanadianCurrency.Checked = m_pf.UseCanadianCurrencyRules; rblTotalsOptions.SelectedValue = m_pf.TotalsGroupingMode.ToString(); ckIncludeModelFeatureTotals.Checked = !m_pf.SuppressModelFeatureTotals; ck2Decimal.Checked = m_pf.Use2DigitTotals; rblCurrencyPref.SelectedIndex = (m_pf.UsesPerModelCurrency ? 1 : 0); rblTimeEntryPreference.SelectedIndex = (m_pf.UsesHHMM ? 1 : 0); rblDateEntryPreferences.SelectedIndex = (m_pf.UsesUTCDateOfFlight ? 1 : 0); prefTimeZone.SelectedTimeZone = m_pf.PreferredTimeZone; foreach (CurrencyExpiration.Expiration exp in Enum.GetValues(typeof(CurrencyExpiration.Expiration))) { ListItem li = new ListItem(CurrencyExpiration.ExpirationLabel(exp), exp.ToString()) { Selected = m_pf.CurrencyExpiration == exp }; cmbExpiredCurrency.Items.Add(li); } }
protected void AddCurrencyExpirations(DropDownList cmb) { if (cmb == null) { throw new ArgumentNullException(nameof(cmb)); } foreach (CurrencyExpiration.Expiration exp in Enum.GetValues(typeof(CurrencyExpiration.Expiration))) { ListItem li = new ListItem(CurrencyExpiration.ExpirationLabel(exp), exp.ToString()) { Selected = m_pf.CurrencyExpiration == exp }; cmb.Items.Add(li); } }