xm
2020-12-14 d6fb0646531172f23648441c224cdcccd721b894
ZigbeeApp/Shared/Phone/UserCenter/Guide/GuideForm1.cs
New file
@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter.Guide
{
    /// <summary>
    /// 引导界面1
    /// </summary>
    public class GuideForm1 : GuideCommonForm
    {
        #region ■ 初始化_____________________________
        /// <summary>
        /// 显示界面
        /// </summary>
        public override void ShowFrom()
        {
            base.ShowFrom();
            //蒙上阴影
            var frameBack = new FrameLayout();
            frameBack.BackgroundColor = 0xad000000;
            this.AddChidren(frameBack);
            var frameleft = new FrameLayout();
            frameleft.Width = Application.GetRealWidth(115);
            frameleft.BackgroundColor = 0xff252525;
            frameBack.AddChidren(frameleft);
            //右滑进入房间列表
            var btnMsg = new NormalViewControl(300, 75, true);
            btnMsg.TextID = R.MyInternationalizationString.uSlideRightToRoomList;
            btnMsg.TextSize = 18;
            btnMsg.IsBold = true;
            btnMsg.TextColor = UserCenterColor.Current.White;
            btnMsg.X = Application.GetRealWidth(132);
            btnMsg.Y = Application.GetRealHeight(961);
            btnMsg.Width = btnMsg.GetRealWidthByText();
            frameBack.AddChidren(btnMsg);
            //图标
            var btnIcon = new IconViewControl(69);
            btnIcon.X = btnMsg.Right + Application.GetRealWidth(52);
            btnIcon.Y = btnMsg.Y + Application.GetRealHeight(3);
            btnIcon.UnSelectedImagePath = "Guide/RightIcon.png";
            frameBack.AddChidren(btnIcon);
            //手指图标
            var btnFinger = new PicViewControl(102, 93);
            btnFinger.UnSelectedImagePath = "Guide/Finger.png";
            btnFinger.X = Application.GetRealWidth(130);
            btnFinger.Y = btnMsg.Bottom + Application.GetRealWidth(32);
            frameBack.AddChidren(btnFinger);
            //我知道了
            var btnKnwon = this.AddIKnwonButton();
            btnKnwon.ButtonClickEvent += (sender, e) =>
            {
                this.RemoveFromParent();
                var form = new GuideForm2();
                form.ShowFrom();
            };
            HdlThreadLogic.Current.RunThread(() =>
            {
                int index = 0;
                int oldValue = Application.GetRealWidth(130);
                int moveValue = Application.GetRealWidth(50);
                while (this.Parent != null)
                {
                    index++;
                    HdlThreadLogic.Current.RunMain(() =>
                    {
                        if (index >= 10)
                        {
                            btnFinger.X = oldValue;
                            index = 0;
                        }
                        else
                        {
                            btnFinger.X += moveValue;
                        }
                    }, ShowErrorMode.NO);
                    System.Threading.Thread.Sleep(300);
                }
            });
        }
        #endregion
    }
}