/**
* 响应上工具条按钮;选择测试类型
* @param void
* @return void
*/
void CSensorGraphChildFrame::OnSelectTestType() 
{
	CSensorGraphView* pView = (CSensorGraphView*)GetActiveView();

	CBCGPToolbarComboBoxButton* pComboButton = NULL;
	pComboButton = (CBCGPToolbarComboBoxButton*)m_oGraphViewTopToolBar.GetButton(9 + m_uiSensorNbCount);
	m_strTestType = pComboButton->GetText();
	m_uiTestType = m_pSiteData->GetTestTypeIDByString(m_strTestType);
	if(40 != m_uiTestType)
	{
		// 得到检波器TestType判据字符串
		m_strTestType = m_pSiteData->GetSensorTestTypeLimitStringByID(m_uiTestType);
	}
	CToolbarGraph* pBNGraph = NULL;
	pBNGraph = (CToolbarGraph*)m_oGraphViewTopToolBar.GetButton(2 + m_uiSensorNbCount);
	pBNGraph->m_iMode = 1;
	if(15 == m_uiTestType)	// 检波器电阻
	{
		pBNGraph->m_iMode = 2;
	}
	pBNGraph->m_strLabel = m_strTestType;
	m_oGraphViewTopToolBar.InvalidateButton(2 + m_uiSensorNbCount);

	pView->RedrawWindow();
}
Ejemplo n.º 2
0
void CMainFrame::OnAddress()
{
    CBCGPToolbarComboBoxButton* pAdress = DYNAMIC_DOWNCAST (CBCGPToolbarComboBoxButton,
                                          m_wndAddressBar.GetButton (m_wndAddressBar.CommandToIndex (IDC_ADDRESS)));

    if (pAdress == NULL)
    {
        return;
    }

    ASSERT_VALID (pAdress);

    CString strAddress = pAdress->GetText ();

    Navigate (strAddress);

    if (pAdress->FindItem (strAddress) < 0)
    {
        pAdress->AddItem (strAddress);
    }
}
/**
* 响应上工具条按钮;选择测试类型
* @param void
* @return void
*/
void CInstrumentGraphChildFrame::OnSelectTestType() 
{
	CInstrumentGraphView* pView = (CInstrumentGraphView*)GetActiveView();

	CBCGPToolbarComboBoxButton* pComboButton = NULL;
	pComboButton = (CBCGPToolbarComboBoxButton*)m_oGraphViewTopToolBar.GetButton(12);
	m_strTestType = pComboButton->GetText();
	m_uiTestType = m_pSiteData->GetTestTypeIDByString(m_strTestType);
	if(30 != m_uiTestType)
	{
		// 得到仪器TestType判据字符串
		m_strTestType = m_pSiteData->GetInsarumentTestTypeLimitStringByID(m_uiTestType);
	}
	CToolbarGraph* pBNGraph = NULL;
	pBNGraph = (CToolbarGraph*)m_oGraphViewTopToolBar.GetButton(7);
	pBNGraph->m_iMode = 1;
	pBNGraph->m_strLabel = m_strTestType;
	m_oGraphViewTopToolBar.InvalidateButton(7);

	pView->RedrawWindow();
}