本文整理汇总了C++中Worker::SetConnectionRate方法的典型用法代码示例。如果您正苦于以下问题:C++ Worker::SetConnectionRate方法的具体用法?C++ Worker::SetConnectionRate怎么用?C++ Worker::SetConnectionRate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Worker
的用法示例。
在下文中一共展示了Worker::SetConnectionRate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCConnectionRate
//
// Enables and disables the connection rate edit box depending on the check box state.
void CPageDisk::OnCConnectionRate()
{
Manager *manager;
Worker *worker;
// change the check box to true/false only (having clicked, cannot
// return to intermediate state)
m_CConnectionRate.SetButtonStyle( BS_AUTOCHECKBOX );
if ( IsDlgButtonChecked( CConnectionRate ) == 1 &&
GetDlgItemInt( EConnectionRate ) != AMBIGUOUS_VALUE )
{
// Connection rate testing is enabled. Update the edit box.
m_EConnectionRate.SetPasswordChar( 0 );
}
else
{
m_EConnectionRate.SetPasswordChar( 32 );
}
// Seeing what kind of item is selected.
switch ( theApp.pView->m_pWorkerView->GetSelectedType() )
{
case WORKER:
worker = theApp.pView->m_pWorkerView->GetSelectedWorker();
worker->SetConnectionRate( m_CConnectionRate.GetCheck() );
break;
case MANAGER:
manager = theApp.pView->m_pWorkerView->GetSelectedManager();
manager->SetConnectionRate( m_CConnectionRate.GetCheck(), GenericDiskType );
break;
case ALL_MANAGERS:
theApp.manager_list.SetConnectionRate( m_CConnectionRate.GetCheck(),
GenericDiskType );
break;
}
EnableWindow();
}
示例2: OnCConnectionRate
void CPageNetwork::OnCConnectionRate()
{
Manager *manager;
Worker *worker;
// change the check box to true/false only (having clicked, cannot
// return to intermediate state)
m_CConnectionRate.SetButtonStyle(BS_AUTOCHECKBOX);
if (IsDlgButtonChecked(CConnectionRate) == 1) {
m_EConnectionRate.SetPasswordChar(0);
if (GetDlgItemInt(EConnectionRate) == AMBIGUOUS_VALUE)
SetDlgItemInt(EConnectionRate, 0);
} else {
m_EConnectionRate.SetPasswordChar(32);
}
switch (theApp.pView->m_pWorkerView->GetSelectedType()) {
case WORKER:
worker = theApp.pView->m_pWorkerView->GetSelectedWorker();
worker->SetConnectionRate(m_CConnectionRate.GetCheck());
break;
case MANAGER:
manager = theApp.pView->m_pWorkerView->GetSelectedManager();
manager->SetConnectionRate(m_CConnectionRate.GetCheck(), GenericServerType);
break;
case ALL_MANAGERS:
theApp.manager_list.SetConnectionRate(m_CConnectionRate.GetCheck(), GenericServerType);
break;
}
EnableWindow();
}