Exemple #1
0
bool
LoggerConfigPanel::Save(bool &_changed, bool &_require_restart)
{
  bool changed = false, require_restart = false;

  ComputerSettings &settings_computer =
    XCSoarInterface::SetComputerSettings();
  Plane &plane = settings_computer.plane;

  changed |= SaveFormProperty(form, _T("prpLoggerTimeStepCruise"),
                              szProfileLoggerTimeStepCruise,
                              settings_computer.logger_time_step_cruise);

  changed |= SaveFormProperty(form, _T("prpLoggerTimeStepCircling"),
                              szProfileLoggerTimeStepCircling,
                              settings_computer.logger_time_step_circling);

  changed |= SaveFormPropertyToProfile(form, _T("PilotName"),
                                       szProfilePilotName);
  changed |= SaveFormProperty(form, _T("AircraftType"), plane.type);
  changed |= SaveFormProperty(form, _T("AircraftReg"), plane.registration);
  changed |= SaveFormProperty(form, _T("CompetitionID"), plane.competition_id);
  changed |= SaveFormPropertyToProfile(form, _T("LoggerID"), szProfileLoggerID);

  changed |= SaveFormProperty(form, _T("prpLoggerShortName"),
                              szProfileLoggerShort,
                              settings_computer.logger_short_name);

  /* GUI label is "Enable Auto Logger" */
  changed |= SaveFormPropertyNegated(form, _T("prpDisableAutoLogger"),
                                     szProfileDisableAutoLogger,
                                     settings_computer.auto_logger_disabled);

  if (changed)
    PlaneGlue::ToProfile(settings_computer.plane);

  _changed |= changed;
  _require_restart |= require_restart;

  return true;
}
Exemple #2
0
bool
LoggerConfigPanel::Save()
{
  SETTINGS_COMPUTER &settings_computer =
    XCSoarInterface::SetSettingsComputer();
  Plane &plane = settings_computer.plane;

  bool changed = false;

  changed |= SaveFormProperty(*wf, _T("prpLoggerTimeStepCruise"),
                              szProfileLoggerTimeStepCruise,
                              settings_computer.LoggerTimeStepCruise);

  changed |= SaveFormProperty(*wf, _T("prpLoggerTimeStepCircling"),
                              szProfileLoggerTimeStepCircling,
                              settings_computer.LoggerTimeStepCircling);

  changed |= SaveFormPropertyToProfile(*wf, _T("PilotName"),
                                       szProfilePilotName);
  changed |= SaveFormProperty(*wf, _T("AircraftType"), plane.type);
  changed |= SaveFormProperty(*wf, _T("AircraftReg"), plane.registration);
  changed |= SaveFormProperty(*wf, _T("CompetitionID"), plane.competition_id);
  changed |= SaveFormPropertyToProfile(*wf, _T("LoggerID"), szProfileLoggerID);

  changed |= SaveFormProperty(*wf, _T("prpLoggerShortName"),
                              szProfileLoggerShort,
                              settings_computer.LoggerShortName);

  /* GUI label is "Enable Auto Logger" */
  changed |= SaveFormPropertyNegated(*wf, _T("prpDisableAutoLogger"),
                                     szProfileDisableAutoLogger,
                                     settings_computer.DisableAutoLogger);

  if (changed)
    PlaneGlue::ToProfile(settings_computer.plane);

  return changed;
}