static void OnAcknowledgeClicked(WndButton* pWnd){
  (void)pWnd;

  if (wf == NULL) return;

  {
    CCriticalSection::CGuard guard(CAirspaceManager::Instance().MutexRef());
    CAirspace* airspace = CAirspaceManager::Instance().GetAirspacesForDetails();
    if(airspace) {
      if (airspace_copy.Enabled()) {
        CAirspaceManager::Instance().AirspaceDisable(*airspace);
      } else {
        CAirspaceManager::Instance().AirspaceEnable(*airspace);
      }
    }
  }


  WndFrame  *wPicto = ((WndFrame *)wf->FindByName(TEXT("frmAirspacePicto")));
  if(wPicto) {
    wPicto->Redraw();
  }
  SetValues();
  PlayResource(TEXT("IDR_WAV_CLICK"));
}
示例#2
0
static void OnAcknowledgeClicked(WndButton* pWnd){
  (void)pWnd;
  {
    ScopeLock guard(CAirspaceManager::Instance().MutexRef());
    CAirspace* airspace = CAirspaceManager::Instance().GetAirspacesForDetails();
    if(airspace) {
      if (airspace_copy.Enabled()) {
        CAirspaceManager::Instance().AirspaceDisable(*airspace);
      } else {
        CAirspaceManager::Instance().AirspaceEnable(*airspace);
      }
    }
  }

  WndForm* wf = pWnd->GetParentWndForm();
  if(wf) {
    WndFrame  *wPicto = ((WndFrame *)wf->FindByName(TEXT("frmAirspacePicto")));
    if(wPicto) {
      wPicto->Redraw();
    }
    SetValues(wf);
  }
  PlayResource(TEXT("IDR_WAV_CLICK"));
}