Exemple #1
0
bool
OrderedTaskSave(OrderedTask &task)
{
  TCHAR fname[69] = _T("");
  if (!TextEntryDialog(fname, 64, _("Enter a task name")))
    return false;

  const auto tasks_path = MakeLocalPath(_T("tasks"));

  _tcscat(fname, _T(".tsk"));
  task.SetName(StaticString<64>(fname));
  SaveTask(AllocatedPath::Build(tasks_path, fname), task);
  return true;
}
Exemple #2
0
bool
OrderedTaskSave(OrderedTask &task)
{
  assert(protected_task_manager != nullptr);

  TCHAR fname[69] = _T("");
  if (!TextEntryDialog(fname, 64, _("Enter a task name")))
    return false;

  TCHAR path[MAX_PATH];
  LocalPath(path, _T("tasks"));
  Directory::Create(path);

  _tcscat(fname, _T(".tsk"));
  task.SetName(StaticString<64>(fname));
  LocalPath(path, _T("tasks"), fname);
  protected_task_manager->TaskSave(path, task);
  return true;
}