public static async Task<bool> Action(string actionName)
{
try
{
await Task.Delay(1000);
switch ((actionName + "").ToLower())
{
case "buildit_pause":
Pause?.Invoke(null, EventArgs.Empty);
break;
case "buildit_play":
Play?.Invoke(null, EventArgs.Empty);
break;
case "buildit_forward":
Forward?.Invoke(null, EventArgs.Empty);
break;
case "buildit_back":
Backward?.Invoke(null, EventArgs.Empty);
break;
case "buildit_volumeup":
VolumeUp?.Invoke(null,EventArgs.Empty);
break;
case "buildit_volumedown":
VolumeDown?.Invoke(null, EventArgs.Empty);
break;
case "buildit_mute":
Mute?.Invoke(null, EventArgs.Empty);
break;
case "buildit_unmute":
Unmute?.Invoke(null, EventArgs.Empty);
break;
default:
return false;
}
return true;
}
catch (Exception ex)
{
ex.LogException();
return false;
}
}
}