static void RefreshView() { WndFrame* wSummary = (WndFrame *)wf->FindByName(_T("frmSummary")); if (wSummary) { const TCHAR* text = OrderedTaskFactoryDescription(get_cursor_type()); wSummary->SetCaption(text); } }
static void OnSelect() { if (wPointTypes->GetCursorIndex() >= point_types.size()) return; if (SetPointType(get_cursor_type())) wf->SetModalResult(mrOK); else wf->SetModalResult(mrCancel); }
static void OnSelect() { if (ordered_task->get_factory_type() == get_cursor_type()) { // no change wf->SetModalResult(mrOK); return; } bool apply = false; if (!ordered_task->task_size()) { apply = true; // empty task, don't ask confirmation } else if (MessageBoxX(_("Change task type?"), _("Task Type"), MB_YESNO|MB_ICONQUESTION) == IDYES) { apply = true; } if (apply) { task_modified |= true; ordered_task->set_factory(get_cursor_type()); wf->SetModalResult(mrOK); } }