//
// Fills in the list of interfaces and displays a selection
// if all children workers have the same interface.
//
void CPageNetwork::ShowInterface()
{
	Manager *manager;
	Worker *worker;

	m_DInterface.ResetContent();

	// Check that either a manager or a worker is selected.
	if (!(manager = theApp.pView->m_pWorkerView->GetSelectedManager())) {
		return;
	}
	// Put the manager's network interfaces into the DInterface combo box
	for (int i = 0; i < manager->InterfaceCount(GenericNetType); i++) {
		if (m_DInterface.AddString(manager->GetInterface(i, GenericNetType)->name) != i) {
			ErrorMessage("AddString() for interface failed in CPageNetwork::SetTargetSelection()");
			return;
		}
	}

	// Select (in the combo box) the worker's or manager's selected interface.
	if (worker = theApp.pView->m_pWorkerView->GetSelectedWorker()) {
		// select the current interface (if any) in the combo box
		m_DInterface.SelectString(-1, worker->GetLocalNetworkInterface());
	} else {
		// select the current interface (if any) in the combo box
		m_DInterface.SelectString(-1, manager->GetLocalNetworkInterface());
	}
}