黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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
    }
}