Beispiel #1
0
std::wstring Settings::DoReadConfigValue(const char *name)
{
    CriticalSectionLocker lock(g_csConfigValues);

    wchar_t buf[512];
    if ( RegistryRead(name, buf, sizeof(buf)) )
        return buf;
    else
        return std::wstring();
}
Beispiel #2
0
// Reset the program to let the user prepare the job
void JobReset() {
    sectionitem section;

    // Change the stage
    if (Job.stage == JobStageRunning) return; // Can only reset when before or done

    // Initialize job information
    Job.stage = JobStageBefore;
    Job.stop = false;
    Job.time = 0;
    Job.tasks = L"";
    Job.task = Job.errors = L"";
    Job.error = 0;
    Job.folder = Job.file = Job.compare = 0;
    Job.foldererror = Job.fileerror = Job.compareerror = 0;
    Job.log = Job.hash = NULL;

    // Load tasks text from the registry to the tasks box
    string s = RegistryRead(REGISTRYKEY, REGISTRYPATH, REGISTRYNAME);
    WindowTextSet(Handle.tasks, s);
}