public ActionResult DrawPresenceStatus(PresenceStatusEnum presenceStatusEnum) { var imageBytes = MicrosoftTeamsStatusImages.StatusImageFromEnum(presenceStatusEnum); DisplayService.DrawBytes(imageBytes); return(new NoContentResult()); }
public static byte[] StatusImageFromEnum(PresenceStatusEnum statusEnum) { return(statusEnum switch { PresenceStatusEnum.Avaliable => ConvertBytesToBitmapImageRPi(new byte[] { 0x3c, 0x7e, 0xfb, 0xf7, 0xaf, 0xdf, 0x7e, 0x3c }, AVALIABLE_COLOR), PresenceStatusEnum.Away => ConvertBytesToBitmapImageRPi(new byte[] { 0x3c, 0x6e, 0xef, 0xef, 0xef, 0xf7, 0x7e, 0x3c }, AWAY_COLOR), PresenceStatusEnum.Busy => ConvertBytesToBitmapImageRPi(new byte[] { 0x3c, 0x7e, 0xff, 0xff, 0xff, 0xff, 0x7e, 0x3c }, BUSY_COLOR), PresenceStatusEnum.DoNotDisturb => ConvertBytesToBitmapImageRPi(new byte[] { 0x3c, 0x7e, 0xff, 0x81, 0x81, 0xff, 0x7e, 0x3c }, BUSY_COLOR), _ => ConvertBytesToBitmapImageRPi(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, Color.Black), });