void ProcessModel::HideProcess(int puid)
{
    // Modify the Model
    int index = GetProcessIndex(puid);
    Lock();
    if (index != -1)
    {
        _processes[index].hidden = true;
    }
    Unlock();

    if (index != -1)
    {
        // Update View
        if (!ProcessView::IsHidden())
        {
            ProcessView::Update(false, true);
        }
        else
        {
            ProcessView::Update(true);
        }

        // Update Profile
        std::vector<int> hiddenProcesses;
        ExportHiddenProcesses(hiddenProcesses);
        g_profile.SetHiddenProcesses(hiddenProcesses);
    }
}
Beispiel #2
0
void ProcessModel::ShowProcess(int puid)
{
    // Modify the Model
    int index = GetProcessIndex(puid);
    Lock();
    if (index != -1)
    {
        _processes[index].hidden = false;
    }
    Unlock();

    if (index != -1)
    {
        // Update View
        ProcessView::Update(false, true);

        // Update Profile
        std::vector<int> hiddenProcesses;
        ExportHiddenProcesses(hiddenProcesses);
        g_profile.SetValue(TEXT("HiddenProcess"), new ProfileIntListItem(hiddenProcesses));
    }
}