void MinecraftVersionDialog::LoadList() { MCVersionList & verList = MCVersionList::Instance(); bool success = false; if(verList.NeedsLoad()) { LambdaTask::TaskFunc func = [&] (LambdaTask *task) -> wxThread::ExitCode { task->DoSetStatus(_("Loading Minecraft version list...")); return (wxThread::ExitCode)DoLoadList(); }; LambdaTask *lTask = new LambdaTask(func); TaskProgressDialog taskDlg(this); success = taskDlg.ShowModal(lTask) > 0; delete lTask; } else { success = true; } Refilter(); }
void ListSelectDialog::LoadList() { wxArrayString sList; LambdaTask::TaskFunc func = [&] (LambdaTask *task) -> wxThread::ExitCode { task->DoSetStatus("Loading list..."); DoLoadList(sList); return (wxThread::ExitCode) 0; }; LambdaTask *lTask = new LambdaTask(func); TaskProgressDialog taskDlg(this); taskDlg.ShowModal(lTask); delete lTask; list->Set(sList); UpdateOKBtn(); }
void ListSelectDialog::LoadList() { sList.Clear(); LambdaTask::TaskFunc func = [&] (LambdaTask *task) -> wxThread::ExitCode { task->DoSetStatus("Loading list..."); return (wxThread::ExitCode)DoLoadList(); }; LambdaTask *lTask = new LambdaTask(func); TaskProgressDialog taskDlg(this); taskDlg.ShowModal(lTask); delete lTask; UpdateListCount(); listCtrl->Refresh(); listCtrl->Update(); UpdateOKBtn(); }