static void Update(void) { TCHAR sTmp[1000]; assert(wf != NULL); assert(wInfo != NULL); assert(wGrid != NULL); assert(csw != NULL); assert(glide_computer != NULL); const ComputerSettings &settings_computer = blackboard->GetComputerSettings(); const DerivedInfo &calculated = blackboard->Calculated(); FlightStatisticsRenderer fs(glide_computer->GetFlightStats(), look->chart, look->map); switch (page) { case ANALYSIS_PAGE_BAROGRAPH: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Barograph")); wf->SetCaption(sTmp); fs.CaptionBarograph(sTmp); wInfo->SetCaption(sTmp); SetCalcCaption(_("Settings")); break; case ANALYSIS_PAGE_CLIMB: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Climb")); wf->SetCaption(sTmp); fs.CaptionClimb(sTmp); wInfo->SetCaption(sTmp); SetCalcCaption(_("Task Calc")); break; case ANALYSIS_PAGE_THERMAL_BAND: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Thermal Band")); wf->SetCaption(sTmp); fs.CaptionClimb(sTmp); wInfo->SetCaption(sTmp); SetCalcCaption(_T("")); break; case ANALYSIS_PAGE_WIND: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Wind At Altitude")); wf->SetCaption(sTmp); wInfo->SetCaption(_T("")); SetCalcCaption(_("Set Wind")); break; case ANALYSIS_PAGE_POLAR: _stprintf(sTmp, _T("%s: %s (%s %d kg)"), _("Analysis"), _("Glide Polar"), _("Mass"), (int)settings_computer.glide_polar_task.GetTotalMass()); wf->SetCaption(sTmp); fs.CaptionPolar(sTmp, settings_computer.glide_polar_task); wInfo->SetCaption(sTmp); SetCalcCaption(_("Settings")); break; case ANALYSIS_PAGE_TEMPTRACE: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Temp Trace")); wf->SetCaption(sTmp); fs.CaptionTempTrace(sTmp, glide_computer->GetCuSonde()); wInfo->SetCaption(sTmp); SetCalcCaption(_("Settings")); break; case ANALYSIS_PAGE_TASK_SPEED: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Task Speed")); wf->SetCaption(sTmp); wInfo->SetCaption(_T("")); SetCalcCaption(_("Task Calc")); break; case ANALYSIS_PAGE_TASK: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Task")); wf->SetCaption(sTmp); fs.CaptionTask(sTmp, calculated); wInfo->SetCaption(sTmp); SetCalcCaption(_("Task calc")); break; case ANALYSIS_PAGE_OLC: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), ContestToString(settings_computer.task.contest)); wf->SetCaption(sTmp); SetCalcCaption(_T("")); fs.CaptionOLC(sTmp, settings_computer.task, calculated); wInfo->SetCaption(sTmp); break; case ANALYSIS_PAGE_AIRSPACE: _stprintf(sTmp, _T("%s: %s"), _("Analysis"), _("Airspace")); wf->SetCaption(sTmp); wInfo->SetCaption(_T("")); SetCalcCaption(_("Warnings")); break; case ANALYSIS_PAGE_COUNT: assert(false); break; } switch (page) { case ANALYSIS_PAGE_AIRSPACE: UpdateCrossSection(); csw->invalidate(); csw->show(); wGrid->hide(); break; default: csw->hide(); wGrid->show(); wGrid->invalidate(); break; } }