/// <inheritdoc />
        public void LightUpSideWhite(WidgetPositionEnum side, uint fadeInDuration, uint diplayDuration, uint fadeOutDuration)
        {
            byte sideId = 0;
            bool found  = true;

            switch (side)
            {
            case (WidgetPositionEnum.Center):
            {
                sideId = (byte)COMFrameIdsEnum.Initialization;
                break;
            }

            case (WidgetPositionEnum.Top):
            {
                sideId = (byte)COMFrameIdsEnum.ShowTop;
                break;
            }

            case (WidgetPositionEnum.Right):
            {
                sideId = (byte)COMFrameIdsEnum.ShowRight;
                break;
            }

            case (WidgetPositionEnum.Bot):
            {
                sideId = (byte)COMFrameIdsEnum.ShowBot;
                break;
            }

            case (WidgetPositionEnum.Left):
            {
                sideId = (byte)COMFrameIdsEnum.ShowLeft;
                break;
            }

            default:
            {
                found = false;
                break;
            }
            }
            if (found)
            {
                byte[] frame = { (byte)sideId,                  0,
                                 (byte)(fadeInDuration / 256),
                                 (byte)(fadeInDuration % 256),
                                 (byte)(diplayDuration / 256),
                                 (byte)(diplayDuration % 256),
                                 (byte)(fadeOutDuration / 256),
                                 (byte)(fadeOutDuration % 256) };
                SendFrame(frame);
            }
        }
        /// <inheritdoc />
        public void LightUpSideWhite(WidgetPositionEnum side, uint fadeInDuration, uint diplayDuration, uint fadeOutDuration)
        {
            string parameters = WifiRequestNameEnum.Request.ToString() + "=";
            bool   found      = true;

            switch (side)
            {
            case (WidgetPositionEnum.Center):
            {
                parameters += WifiRequestNameEnum.ShowAll.ToString();
                break;
            }

            case (WidgetPositionEnum.Top):
            {
                parameters += WifiRequestNameEnum.ShowTop.ToString();
                break;
            }

            case (WidgetPositionEnum.Right):
            {
                parameters += WifiRequestNameEnum.ShowRight.ToString();
                break;
            }

            case (WidgetPositionEnum.Bot):
            {
                parameters += WifiRequestNameEnum.ShowBot.ToString();
                break;
            }

            case (WidgetPositionEnum.Left):
            {
                parameters += WifiRequestNameEnum.ShowLeft.ToString();
                break;
            }

            default:
            {
                found = false;
                break;
            }
            }
            if (found)
            {
                parameters += "&" + WifiRequestNameEnum.FadeInDuration.ToString() + "=" + fadeInDuration;
                parameters += "&" + WifiRequestNameEnum.DiplayDuration.ToString() + "=" + diplayDuration;
                parameters += "&" + WifiRequestNameEnum.FadeOutDuration.ToString() + "=" + fadeOutDuration;

                SendRequest(parameters);
            }
        }
Exemple #3
0
 /// <summary>
 /// Contructor
 /// </summary>
 /// <param name="pos">Position</param>
 /// <param name="show">Whether or not show element</param>
 public ShowElementEventArgs(WidgetPositionEnum pos, bool show)
 {
     Position = pos;
     Show     = show;
 }