private bool CheckSensorKeys(FormulaKey key)
{
if (key.Key.Equals(FormulaEditorKey.AccelerationX) ||
key.Key.Equals(FormulaEditorKey.AccelerationY) ||
key.Key.Equals(FormulaEditorKey.AccelerationZ))
{
if (!ServiceLocator.SensorService.IsAccelarationEnabled())
{
return false;
}
return true;
}
if (key.Key.Equals(FormulaEditorKey.Compass))
{
if (!ServiceLocator.SensorService.IsCompassEnabled())
{
return false;
}
return true;
}
if (key.Key.Equals(FormulaEditorKey.InclinationX) ||
key.Key.Equals(FormulaEditorKey.InclinationY))
{
if (!ServiceLocator.SensorService.IsInclinationEnabled())
{
return false;
}
return true;
}
return true;
}