void ConfigSettingsWidget::on_cmdBack_clicked()
{
    auto pConnection = ((MainListView*)FrmMain::instance()->mainWidget()->widget(MainView))->model.GetConnection(id);

    pConnection->SetAutoStart(this->ui.cbAutoStart->isChecked());

    Configs::instance()->refreshConfigs();

    ((MainListView*)FrmMain::instance()->mainWidget()->widget(MainView))->model.LoadConnections();

    FrmMain::instance()->mainWidget()->showWidget(MainView);
}
Пример #2
0
Файл: config.c Проект: VCCE/VCC
void UpdateConfig (void)
{
	SetResize(CurrentConfig.Resize);
	SetAspect(CurrentConfig.Aspect);
	SetScanLines(CurrentConfig.ScanLines);
	SetFrameSkip(CurrentConfig.FrameSkip);
	SetAutoStart(CurrentConfig.AutoStart);
	SetSpeedThrottle(CurrentConfig.SpeedThrottle);
	SetCPUMultiplyer(CurrentConfig.CPUMultiplyer);
	SetRamSize(CurrentConfig.RamSize);
	SetCpuType(CurrentConfig.CpuType);
	SetMonitorType(CurrentConfig.MonitorType);
	SetCartAutoStart(CurrentConfig.CartAutoStart);
	if (CurrentConfig.RebootNow)
	{
		DoReboot();
	}
	CurrentConfig.RebootNow = 0;
}
Пример #3
0
void CPropTask::Init()
{
    if(!m_bAutomationMode)
    {
        m_sAlias          = GetDialog()->GetAlias();
        m_sUsrText[0]     = GetDialog()->GetText1();
	    m_sUsrText[1]     = GetDialog()->GetText2();
	    m_sUsrText[2]     = GetDialog()->GetText3();
	    m_sHelpUrl        = GetDialog()->GetHelpUrl();
	    m_sUrl            = GetDialog()->GetUrl();
        m_sInterval       = GetDialog()->GetInterval();
        m_sPriority       = GetDialog()->GetPriority();
        m_sIOSync         = GetDialog()->GetIoSync();
        m_sEvent          = GetDialog()->GetEventString();
        m_sWatchdog       = GetDialog()->GetWatchdog();
        SetAutoStart(GetDialog()->GetAutoStart());
		SetLoaded(GetDialog()->GetLoaded());	// NFTASKHANDLING 19.05.05 SIS
    }

}
Пример #4
0
BOOL NetmonProfile::Load(const TCHAR *szDefaultAdapter)
{
    TCHAR szCurrentExe[MAX_PATH]={ 0 };
    TCHAR szCurrentDir[MAX_PATH]={ 0 };
    TCHAR szProfile[MAX_PATH]={ 0 };
    TCHAR *pFilePart;
    TCHAR szHiddenProcesses[1000];

    // Get full path name of Netmon.exe
    GetModuleFileName(0, szCurrentExe, MAX_PATH);

    // Get base directory
    GetFullPathName(szCurrentExe, MAX_PATH, szCurrentDir, &pFilePart);
    *pFilePart = TEXT('\0');

    // Get full path name of Netmon.ini
    _tcscpy_s(szProfile, MAX_PATH, szCurrentDir);
    _tcscat_s(szProfile, MAX_PATH, _T("Netmon.ini"));

    // Init
    _pf.Init(szProfile, _T("Netmon Profile v1"));

    // Load preferences
    // If the key doesn't exist, a default value is written to the ini file
    if( _pf.GetString(_T("Adapter"), _szAdapter, 256) == FALSE )
    {
        SetAdapter(szDefaultAdapter);
    }

    if( _pf.GetString(_T("AutoStart"), _szAutoStart, MAX_PATH) == FALSE )
    {
        SetAutoStart(_T(""));
    }

    if( _pf.GetInt(_T("AutoCapture"), &_bAutoCapture) == FALSE )
    {
        SetAutoCapture(FALSE);
    }

    if( _pf.GetInt(_T("DtViewEnable"), &_bDtViewEnable) == FALSE )
    {
        SetDtViewEnable(FALSE);
    }

    if( _pf.GetInt(_T("DtViewMaxSpace"), &_iDtViewMaxSpace) == FALSE )
    {
        SetDtViewMaxSpace(0); // No limit
    }

    if( _pf.GetString(_T("HiddenProcess"), szHiddenProcesses, 1000) == FALSE)
    {
        SetHiddenProcesses(std::vector<int>());
    }
    else
    {
        int puid;
        int offset = 0;
        while (_stscanf_s(szHiddenProcesses + offset, _T("%d"), &puid) == 1)
        {
            _hiddenProcesses.push_back(puid);

            // Offset
            TCHAR buf[16];
            _stprintf_s(buf, 16, _T("%d"), puid);
            offset += _tcslen(buf) + 1;
        }
    }

    if( _pf.GetString(_T("Language"), _szLanguage, 64) == FALSE )
    {
        SetLanguage(_T("English"));
    }

    if( _pf.GetInt(_T("ShowHidden"), &_bShowHidden) == FALSE )
    {
        SetShowHidden(TRUE);
    }

    return TRUE;
}