static void OnCloseClicked(WndButton* pWnd){ if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); bool bIdenti = false; getVariables(); for (unsigned int i=0 ; i < NO_WP_FILES-1; i++) { if((szWaypointFile[i] != NULL) && (_tcslen (szWaypointFile[i])> 0)) for (unsigned int j=(i+1) ; j < NO_WP_FILES; j++) { TCHAR tmp[MAX_PATH]; if((szWaypointFile[j] != NULL) && (_tcslen (szWaypointFile[j])> 0)) { if(_tcscmp(szWaypointFile[i],szWaypointFile[j])==0) { _sntprintf(tmp, MAX_PATH, _T("%s %u %s %u %s!"), MsgToken(2340), // _@M2340_ "Waypoint Files" i+1, MsgToken(2345) , //_@M2345_ "and" j+1, MsgToken(2346) //_@M2346_ "are identical" ); MessageBoxX( tmp, MsgToken(356), mbOk) ; // _@M356_ "Information" bIdenti = true; } } } } if( bIdenti) return ; if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnEnableClicked(WndButton* pWnd) { if (ItemIndex != -1) { const size_t i = (FullFlag) ? StrIndex[LowLimit + ItemIndex] : (LowLimit + ItemIndex); if ((UpLimit-LowLimit>0) && (ItemIndex >= 0) // JMW fixed bug, was >0 && (ItemIndex < (UpLimit - LowLimit))) { CAirspace *airspace = AirspaceSelectInfo[i].airspace; if (airspace) { wf->SetTimerNotify(0,NULL); LKSound(TEXT("LK_TICK.WAV")); CAirspaceManager::Instance().PopupAirspaceDetail(airspace); } } } else { if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrCancel); } } } }
bool dlgAirspaceShowModal(bool coloredit){ colormode = coloredit; WndForm *wf = dlgLoadFromXML(CallBackTable, ScreenLandscape ? IDR_XML_AIRSPACE_L : IDR_XML_AIRSPACE_P); if (!wf) return false; WndListFrame* wAirspaceList = (WndListFrame*)wf->FindByName(TEXT("frmAirspaceList")); LKASSERT(wAirspaceList!=NULL); wAirspaceList->SetBorderKind(BORDERLEFT); wAirspaceList->SetEnterCallback(OnAirspaceListEnter); WndOwnerDrawFrame* wAirspaceListEntry = (WndOwnerDrawFrame*)wf->FindByName(TEXT("frmAirspaceListEntry")); if(wAirspaceListEntry) { wAirspaceListEntry->SetCanFocus(true); } UpdateList(wAirspaceList); changed = false; wf->ShowModal(); delete wf; return changed; }
static void OnSetFrequency(WndButton* pWnd){ (void)pWnd; #ifdef RADIO_ACTIVE TCHAR Tmp[255]; if(RadioPara.Enabled) { double ASFrequency = ExtractFrequency((TCHAR*)airspace_copy.Name()); if(!ValidFrequency(ASFrequency)) { ASFrequency = ExtractFrequency((TCHAR*)airspace_copy.Comment()); } if(ValidFrequency(ASFrequency)) { _stprintf(Tmp,_T("%7.3fMHz"),ASFrequency); devPutFreqActive(ASFrequency, (TCHAR*)airspace_copy.Name()); DoStatusMessage(_T(""), Tmp ); } } #endif // RADIO_ACTIVE if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnCloseClicked(WndButton* pWnd) { if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnBallastDump(WndButton* pWnd) { BallastTimerActive = !BallastTimerActive; if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnCloseClicked(WndButton* pWnd) { TaskIndex = -1; if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrCancel); } } }
static void OnSIMClicked(WndButton* pWnd) { RUN_MODE = RUN_SIM; if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnMoveClicked(WndButton* pWnd){ if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } MapWindow::SetPanTaskEdit(twItemIndex); }
static void OnCloseClicked(WndButton* pWnd) { ItemIndex = -1; // to stop FormDown bringing up task details if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnOk(WndButton* pWnd) { PlayResource(TEXT("IDR_WAV_CLICK")); if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnPILOTClicked(WndButton* pWnd) { RUN_MODE = RUN_PILOT; LKSound(_T("LK_SLIDE.WAV")); if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnWPSCloseClicked(WndButton* pWnd){ ItemIndex = -1; if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrCancel); } } wf->SetTimerNotify(0,NULL); }
static void OnNickelClick(WndButton* pWnd) { RUN_MODE = RUN_EXIT; RestartToNickel = true; LKSound(_T("LK_SLIDE.WAV")); if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnEXITClicked(WndButton* pWnd) { RUN_MODE = RUN_EXIT; #ifdef KOBO RestartToNickel = false; #endif if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnFLYClicked(WndButton* pWnd) { RUN_MODE = RUN_FLY; // Removed 110605: we now run devInit on startup for all devices, and we dont want an immediate and useless reset. // LKForceComPortReset=true; PortMonitorMessages = 0; if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void OnMoveBeforeClicked(WndButton* pWnd){ LockTaskData(); SwapWaypoint(twItemIndex-1); SetWaypointValues(); UnlockTaskData(); if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
static void Main() { WndForm *form = LoadDialog(NULL, main_window, xmlfile.c_str()); if (form == NULL) { _ftprintf(stderr, _T("Failed to load resource '%s'\n"), xmlfile.c_str()); return; } form->ShowModal(); delete form; }
static void OnEnterClicked(WndButton* pWnd) { (void)pWnd; if (TaskIndex >= iNO_Tasks) { TaskIndex = iNO_Tasks - 1; } if (TaskIndex >= 0) { if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } } }
void SetFormControlEnabled(WndForm &form, const TCHAR *control_name, bool enabled) { Window *window = form.FindByName(control_name); assert(window != NULL); window->set_enabled(enabled); }
static void OnCloseClicked(WndButton* pWnd) { LKSound(_T("LK_SLIDE.WAV")); switch (RUN_MODE) { case RUN_DUALPROF: RUN_MODE = RUN_WELCOME; break; } if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
/* * only called by #CAirspaceManager::ProcessAirspaceDetailQueue() * for display AirspaceDetails, use #PopupAirspaceDetail */ void dlgAirspaceDetails() { WndForm* wf = dlgLoadFromXML(CallBackTable, IDR_XML_AIRSPACEDETAILS); if (!wf) return; wf->SetTimerNotify(1000, OnTimer); SetValues(wf); wf->ShowModal(); delete wf; wf = NULL; return; }
bool ConfigPanel::FinishFileField(WndForm &wf, const TCHAR *control_name, const TCHAR *profile_key) { const WndProperty *wp = (const WndProperty *)wf.FindByName(control_name); return wp != NULL && FinishFileField(*wp, profile_key); }
void ShowFormControl(WndForm &form, const TCHAR *control_name, bool visible) { Window *window = form.FindByName(control_name); assert(window != NULL); window->set_visible(visible); }
void ShowOptionalFormControl(WndForm &form, const TCHAR *control_name, bool visible) { Window *window = form.FindByName(control_name); if (window != NULL) window->set_visible(visible); }
void ConfigPanel::InitFileField(WndForm &wf, const TCHAR *control_name, const TCHAR *profile_key, const TCHAR *filters) { WndProperty *wp = (WndProperty *)wf.FindByName(control_name); assert(wp != NULL); InitFileField(*wp, profile_key, filters); }
static void OnTaskSelectListListEnter(WindowControl * Sender, WndListFrame::ListInfo_t *ListInfo) { (void) Sender; TaskIndex = ListInfo->ItemIndex + ListInfo->ScrollIndex; if (TaskIndex >= iNO_Tasks) { TaskIndex = iNO_Tasks - 1; } if (TaskIndex >= 0) { if(Sender) { WndForm * pForm = Sender->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } } }
static void OnRemoveClicked(WndButton* pWnd) { LockTaskData(); RemoveTaskPoint(twItemIndex); SetWaypointValues(); if (ActiveTaskPoint>=twItemIndex) { ActiveTaskPoint--; } if (ActiveTaskPoint<0) { ActiveTaskPoint= -1; } UnlockTaskData(); if(pWnd) { WndForm * pForm = pWnd->GetParentWndForm(); if(pForm) { pForm->SetModalResult(mrOK); } } }
void dlgProgress::SetProgressText(const TCHAR* szText) { WindowControl* wText = _WndForm->FindByName(TEXT("frmText")); if(wText) { wText->SetCaption(szText); wText->Redraw(); #ifndef USE_GDI MainWindow.Refresh(); #endif } }
void PlaneEditWidget::UpdateCaption() { if (dialog == nullptr) return; StaticString<128> tmp; tmp.Format(_T("%s: %s"), _("Plane Details"), GetValueString(REGISTRATION)); dialog->SetCaption(tmp); }