static void OnAcknowledgeClicked(WindowControl * Sender){ (void)Sender; TCHAR *Name = NULL; if (index_circle>=0) { Name = airspace_database.AirspaceCircle[index_circle].Name; } else if (index_area>=0) { Name = airspace_database.AirspaceArea[index_area].Name; } if (Name) { UINT answer; answer = MessageBoxX(Name, gettext(_T("Acknowledge for day?")), MB_YESNOCANCEL|MB_ICONQUESTION); if (answer == IDYES) { if (index_circle>=0) { AirspaceWarnListAdd(airspace_database, XCSoarInterface::Basic(), XCSoarInterface::Calculated(), XCSoarInterface::SettingsComputer(), XCSoarInterface::MapProjection(), false, true, index_circle, true); } else if (index_area>=0) { AirspaceWarnListAdd(airspace_database, XCSoarInterface::Basic(), XCSoarInterface::Calculated(), XCSoarInterface::SettingsComputer(), XCSoarInterface::MapProjection(), false, false, index_area, true); } wf->SetModalResult(mrOK); } else if (answer == IDNO) { // this will cancel a daily ack if (index_circle>=0) { AirspaceWarnListAdd(airspace_database, XCSoarInterface::Basic(), XCSoarInterface::Calculated(), XCSoarInterface::SettingsComputer(), XCSoarInterface::MapProjection(), true, true, index_circle, true); } else if (index_area>=0) { AirspaceWarnListAdd(airspace_database, XCSoarInterface::Basic(), XCSoarInterface::Calculated(), XCSoarInterface::SettingsComputer(), XCSoarInterface::MapProjection(), true, false, index_area, true); } wf->SetModalResult(mrOK); } } }
static void OnAcknowledgeClicked(WindowControl * Sender){ (void)Sender; TCHAR *Name = NULL; if (index_circle>=0) { Name = AirspaceCircle[index_circle].Name; } else if (index_area>=0) { Name = AirspaceArea[index_area].Name; } if (Name) { UINT answer; answer = MessageBoxX(hWndMapWindow, Name, // LKTOKEN _@M51_ = "Acknowledge for day?" gettext(TEXT("_@M51_")), MB_YESNOCANCEL|MB_ICONQUESTION); if (answer == IDYES) { if (index_circle>=0) { AirspaceWarnListAdd(&GPS_INFO, &CALCULATED_INFO, false, true, index_circle, true); } else if (index_area>=0) { AirspaceWarnListAdd(&GPS_INFO, &CALCULATED_INFO, false, false, index_area, true); } wf->SetModalResult(mrOK); } else if (answer == IDNO) { // this will cancel a daily ack if (index_circle>=0) { AirspaceWarnListAdd(&GPS_INFO, &CALCULATED_INFO, true, true, index_circle, true); } else if (index_area>=0) { AirspaceWarnListAdd(&GPS_INFO, &CALCULATED_INFO, true, false, index_area, true); } wf->SetModalResult(mrOK); } } }