Esempio n. 1
0
void WatchdogDialog::UpdateStatus(int index)
{
    Alarm *alarm = Alarm::s_Alarms[index];
    m_lStatus->SetItemImage(index, alarm->m_bEnabled ? 1 : 0);

//    m_lAlarms->SetItem(index, ALARM_ENABLED, alarm->m_bEnabled ? _T("X") : _T(""));
    m_lStatus->SetItem(index, ALARM_TYPE, alarm->Type());
    m_lStatus->SetItem(index, ALARM_STATUS, alarm->GetStatus());
    m_lStatus->SetItemTextColour(index, alarm->m_bFired ? *wxRED: *wxBLACK);
    m_lStatus->SetColumnWidth(ALARM_STATUS, wxLIST_AUTOSIZE);
}
void ConfigurationDialog::UpdateItem(int index)
{
    Alarm *alarm = Alarm::s_Alarms[index];

    m_lAlarms->SetItem(index, ALARM_TYPE, alarm->Type());
    m_lAlarms->SetColumnWidth(ALARM_TYPE, wxLIST_AUTOSIZE);
    m_lAlarms->SetItem(index, ALARM_OPTIONS, alarm->Options());
    m_lAlarms->SetColumnWidth(ALARM_OPTIONS, wxLIST_AUTOSIZE);
    m_lAlarms->SetItem(index, ALARM_ACTION, alarm->Action());
    m_lAlarms->SetColumnWidth(ALARM_ACTION, wxLIST_AUTOSIZE);
}