Пример #1
0
BOOL CSigGrphConfigDlg::OnInitDialog()
{
    CDialog::OnInitDialog();
    // Create List Control
    m_omSignalList.DeleteAllItems();
    // Enable grid lines and full row selection
    m_omSignalList.SetExtendedStyle( LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT );
    m_omSignalList.InsertColumn( defCOL_CATOGORY_INDEX,
                                 defSTR_LIST_HEADING_CATOGORY );
    m_omSignalList.SetColumnWidth( defCOL_CATOGORY_INDEX,
                                   defCOL_CATOGORY_WIDTH );
    m_omSignalList.InsertColumn(  defCOL_ELEMENT_INDEX,
                                  defSTR_LIST_HEADING_ELEMENT );
    m_omSignalList.SetColumnWidth( defCOL_ELEMENT_INDEX,
                                   defCOL_ELEMENT_WIDTH);
    m_omSignalList.InsertColumn( defCOL_TYPE_INDEX,
                                 defSTR_LIST_HEADING_TYPE );
    m_omSignalList.SetColumnWidth( defCOL_TYPE_INDEX,
                                   defCOL_TYPE_WIDTH );
    // Remove Automatic Text from the color popup
    m_omLineColor.SetDefaultText( STR_EMPTY );
    m_omPointColor.SetDefaultText( STR_EMPTY );
    //Add the list of available buses.
    m_omCmbBusType.AddString(_T("CAN"));
    //m_omCmbBusType.AddString(_T("MCNET"));
    //m_omCmbBusType.AddString(_T("J1939"));
    //m_omCmbBusType.AddString(_T("FLEXRAY"));
    m_omCmbBusType.SetCurSel(0);
    vEnableControls(FALSE);
    vPopulateElementList();
    return TRUE;  // return TRUE unless you set the focus to a control
    // EXCEPTION: OCX Property Pages should return FALSE
}
Пример #2
0
/*******************************************************************************
  Function Name  : OnCbnSelchangeComboBusType
  Input(s)       : -
  Output         : -
  Functionality  : This function handles the selection change event for
                   Combobox IDC_COMBO_BUS_TYPE.
  Member of      : CSigGrphConfigDlg
  Author(s)      : ArunKumar K
  Date Created   : 27-10-2010
  Modifications  :
*******************************************************************************/
void CSigGrphConfigDlg::OnCbnSelchangeComboBusType()
{
    // Update UI with changes
    vPopulateElementList();
    // Update UI Controls
    vEnableDisableControls();
}
Пример #3
0
/*******************************************************************************
  Function Name  : OnBnClickedBtnConfigure
  Input(s)       : -
  Output         : -
  Functionality  : This function handles the button click event for Configure
                   button IDC_BTN_CONFIGURE.
  Member of      : CSigGrphConfigDlg
  Author(s)      : ArunKumar K
  Date Created   : 27-10-2010
  Modifications  :
*******************************************************************************/
void CSigGrphConfigDlg::OnBnClickedBtnConfigure()
{
    CElementSelection omConfig(m_nHardware);
    omConfig.m_pMainFrame = m_pMainFrame;
    omConfig.m_eBusType = (eTYPE_BUS)m_omCmbBusType.GetCurSel();
    //int nElemCount =
    m_pMainFrame->m_odGraphList[omConfig.m_eBusType].m_omElementList.GetSize();

    if( omConfig.DoModal() == IDOK )
    {
        // Update UI with changes
        vPopulateElementList();
        // Update Controls
        vEnableDisableControls();
    }
}
Пример #4
0
/*******************************************************************************
  Function Name  : vHandleConfigFileChange
  Input(s)       : lParam, wParam - Not Used
  Output         : -
  Functionality  : Handles connection change event. Initialised graph and list
                   control members
  Member of      : CGraphLeftView
  Author(s)      : Raja N
  Date Created   : 09/12/2004
  Modifications  :
*******************************************************************************/
LRESULT CGraphLeftView::vHandleConfigFileChange( WPARAM /*wParam*/, LPARAM /*lParam*/)
{
    // Update List Control
    vPopulateElementList();
    // Update UI Controls
    vEnableDisableControls();

    if ( m_pDMGraphCtrl )
    {
        // Remove All items in the control
        m_pDMGraphCtrl->ClearGraph();
    }
    // Add Elements in to the graph control
    vPopulateGraphControl();
    return 0;
}