Exemplo n.º 1
0
BOOL CNBUnitDevice::GetCommandAbility(int nID)
{
	switch(nID)
	{
	case IDM_TOOL_BIND:
		return TRUE;
	case IDM_TOOL_UNBIND:
		return FALSE;
	case IDM_TOOL_ADDMIRROR: // Should be single logical device
		return FALSE;
	case IDM_TOOL_MIGRATE: // Should be single logical device
		return FALSE;
	case IDM_TOOL_REPLACE_DEVICE:
		return FALSE;
	case IDM_TOOL_REPLACE_UNIT_DEVICE:
		return FALSE;
	case IDM_TOOL_SINGLE:
		return (IsHDD() && IsOperatable());
	case IDM_TOOL_SPAREADD:
		return FALSE;
	case IDM_TOOL_SPAREREMOVE:
		return (IsFaultTolerant() && IsSpare() && m_pLogicalDevice->IsOperatableAll());
	default:
		return TRUE;
	}
}
Exemplo n.º 2
0
int Game::SpareBonus(int frameIndex) {
	if (IsSpare(frameIndex))
		return _frames[frameIndex + 2];

	return 0;
}