コード例 #1
0
void ConfigSettingsWidget::SetId(int id)
{
    this->id = id;

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

    ui.txtName->setText(pConnection->GetName());

    ui.cbAutoStart->setChecked(pConnection->IsAutoStart());
}
コード例 #2
0
void CPropTask::FillDialog()
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

    SetFileName();
    string buf;
    ReadFileContent(CString(m_ProjectPath) + _T("\\") + m_sFileName, buf);
    m_ResourceText = buf.c_str();
    m_sName = GetNameFromId();
    ASSERT(!m_ResourceText.IsEmpty());
    m_Resource = (Resource *)ParsePou(m_ResourceText, m_Resource);
    InitFromFile(m_Resource);
    if(!m_bAutomationMode)
    {
        COperation::FillDialog();
        GetDialog()->SetCreateUser(m_sCreateUser);
        GetDialog()->SetCreateDate(m_sCreateDate);
        GetDialog()->SetLastModUser(m_sLastModUser);
        GetDialog()->SetLastModDate(m_sLastModDate);
        GetDialog()->SetAlias(m_sAlias);
        GetDialog()->SetName(m_sName);
        GetDialog()->SetText1(m_sUsrText[0]);
	    GetDialog()->SetText2(m_sUsrText[1]);
	    GetDialog()->SetText3(m_sUsrText[2]);
	    GetDialog()->SetHelpUrl(m_sHelpUrl);
	    GetDialog()->SetUrl(m_sUrl);
        BOOL bAutoStart = IsAutoStart();
        GetDialog()->SetAutoStart(bAutoStart);
		GetDialog()->SetLoaded(IsLoaded());		// NFTASKHANDLING 19.05.05 SIS
        GetDialog()->SetInterval(m_sInterval);
        GetDialog()->SetIoSync(m_sIOSync);
        GetDialog()->SetPriority(m_sPriority);
        GetDialog()->SetEventString(m_sEvent);
        GetDialog()->SetWatchdog(m_sWatchdog);
    }
}