//
// Displays the values from memory in the GUI.
//
void CPageDisk::ShowData()
{
	Manager	*manager;
	Worker	*worker;

	// Only enable the display if a disk worker or a manager with disk 
	// interfaces is selected.
	manager = theApp.pView->m_pWorkerView->GetSelectedManager();
	worker = theApp.pView->m_pWorkerView->GetSelectedWorker();
	if (( theApp.pView->m_pWorkerView->GetSelectedType() == ALL_MANAGERS) ||
		( manager && !manager->InterfaceCount( GenericDiskType ) ) ||
		( worker && !IsType( worker->Type(), GenericDiskType ) ) )
	{
		Reset();
		return;
	}

	// This is a new view of the target assignment.  
	// It has not been modified.
	selected = NULL;
	highlighted = NULL;
	// Show the target list.
	ShowTargets();
	// Set the target selection check boxes.
	ShowTargetSelection();
	// Bold the last selected item.
	ShowFocus();
	// Show the connection rate settings.
	ShowConnectionRate();
	// Show the disk specific settings.
	ShowSettings();
	// Enable the apropriate windows and redraw the page.
	EnableWindow();
}
void CPageDisk::OnKillfocusEConnectionRate() 
{
	Manager *manager;
	Worker	*worker;
	// Restores the previous value if the edit box was left blank.
	if ( !m_EConnectionRate.LineLength() )
	{
		ShowConnectionRate();
		return;
	}

	// Seeing what kind of item is selected.
	switch ( theApp.pView->m_pWorkerView->GetSelectedType() )
	{
	case WORKER:
		worker = theApp.pView->m_pWorkerView->GetSelectedWorker();
		worker->SetTransPerConn( GetDlgItemInt( EConnectionRate ) );
		break;
	case MANAGER:
		manager = theApp.pView->m_pWorkerView->GetSelectedManager();
		manager->SetTransPerConn( GetDlgItemInt( EConnectionRate ), 
			GenericDiskType );
		break;
	case ALL_MANAGERS:
		theApp.manager_list.SetTransPerConn( GetDlgItemInt( EConnectionRate ),
			GenericDiskType );
		break;
	}

	EnableWindow();
}
//
// Resetting contents of display.
//
void CPageDisk::Reset()
{
	// Clear the target list.
	m_TTargets.DeleteAllItems();
	
	// Display the conneciton rate and disk settings.
	ShowConnectionRate();
	ShowSettings();

	selected = NULL;
	highlighted = NULL;

	EnableWindow();
}
Exemple #4
0
//
// Resetting contents of display.
//
void CPageDisk::Reset()
{
	// Clear the target list.
	m_TTargets.DeleteAllItems();

	// Display the conneciton rate, disk settings, and random data check.
	ShowConnectionRate();
	ShowSettings();
	ShowDataPattern();
	ShowFixedSeedValue();

	selected = NULL;
	highlighted = NULL;

	EnableWindow();
}
//
// Grays out the check boxes in the target list, clears the interface
// selection, sets the conneciton rate check box to it's 3rd state,
// and hides the content of the connection rate edit box.
//
void CPageNetwork::Reset()
{
	// Clear the target list.
	m_TTargets.DeleteAllItems();

	// Clear the interface selection.
	ShowInterface();

	// Set the connection rate check box to it's ambiguous state.
	ShowConnectionRate();
	ShowSettings();

	selected = NULL;
	highlighted = NULL;

	EnableWindow();
}