黄学彪
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Shared.Phone.UserCenter.Guide
{
    /// <summary>
    /// 住宅的引导界面
    /// </summary>
    public class GuideHouseForm : GuideCommonForm
    {
        #region ■ 变量声明___________________________
 
        #endregion
 
        #region ■ 初始化_____________________________
 
        /// <summary>
        /// 显示界面
        /// </summary>
        public override void ShowFrom()
        {
            base.ShowFrom();
            base.btnHouse.Text = string.Empty;
 
            //蒙上阴影
            var frameback = new FrameLayout();
            frameback.BackgroundColor = 0xad000000;
            this.AddChidren(frameback);
 
            //我的家
            var btnHome = new NormalViewControl(100, 100, true);
            btnHome.TextSize = 24;
            btnHome.TextID = R.MyInternationalizationString.uMyHome;
            btnHome.IsBold = true;
            btnHome.Width = btnHome.GetRealWidthByText() + Application.GetRealWidth(20);
            btnHome.BackgroundColor = UserCenterColor.Current.White;
            btnHome.Radius = (uint)Application.GetRealHeight(100) / 2;
            btnHome.TextAlignment = TextAlignment.Center;
            btnHome.Y = Application.GetRealHeight(155);
            btnHome.X = Application.GetRealWidth(35);
            frameback.AddChidren(btnHome);
 
            //箭头
            var btnArrows = new PicViewControl(153, 102);
            btnArrows.UnSelectedImagePath = "Guide/Arrows2.png";
            btnArrows.X = Application.GetRealWidth(500);
            btnArrows.Y = Application.GetRealHeight(155);
            frameback.AddChidren(btnArrows);
 
            //长按“我的家”{0}可切换我的住宅
            var btnMsg = new NormalViewControl(387, 150, true);
            btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uLongClickMyHomeCanChangedHome).Replace("{0}", "\r\n");
            btnMsg.TextAlignment = TextAlignment.Center;
            btnMsg.TextColor = UserCenterColor.Current.White;
            btnMsg.TextSize = 18;
            btnMsg.IsBold = true;
            btnMsg.IsMoreLines = true;
            btnMsg.X = Application.GetRealWidth(576);
            btnMsg.Y = Application.GetRealHeight(317);
            frameback.AddChidren(btnMsg);
 
            var frameHomeBack = new FrameLayout();
            frameHomeBack.Width = Application.GetRealWidth(449);
            frameHomeBack.Height = Application.GetRealHeight(475);
            frameHomeBack.X = Application.GetRealWidth(35);
            frameHomeBack.Y = Application.GetRealHeight(255);
            frameHomeBack.BackgroundImagePath = "Item/SelectHouse.png";
            frameback.AddChidren(frameHomeBack);
 
            //选择住宅
            var rowSelect = new FrameRowControl();
            rowSelect.Y = Application.GetRealHeight(23);
            rowSelect.Height = Application.GetRealHeight(150);
            rowSelect.UseClickStatu = false;
            frameHomeBack.AddChidren(rowSelect);
            var btnSelect = rowSelect.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.ChangeHome), 350);
            btnSelect.IsBold = true;
            btnSelect.X = Application.GetRealWidth(81);
            btnSelect.Y = Application.GetRealHeight(12);
 
            //我的家
            var rowFrame1 = new FrameRowControl();
            rowFrame1.UseClickStatu = false;
            rowFrame1.Y = rowSelect.Bottom;
            rowFrame1.Height = Application.GetRealHeight(150);
            frameHomeBack.AddChidren(rowFrame1);
            //图标
            var btnIcon1 = rowFrame1.AddLeftIcon(81);
            btnIcon1.UnSelectedImagePath = "Item/HouseSelected.png";
            //显示文字
            var btnText1 = rowFrame1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uMyHome), 300);
            btnText1.IsBold = true;
            btnText1.X = Application.GetRealWidth(173);
            //底线
            var btnLine1 = rowFrame1.AddBottomLine();
            btnLine1.X = Application.GetRealWidth(81);
 
            //办公室
            var rowFrame2 = new FrameRowControl();
            rowFrame2.UseClickStatu = false;
            rowFrame2.Y = rowFrame1.Bottom;
            rowFrame2.Height = Application.GetRealHeight(150);
            frameHomeBack.AddChidren(rowFrame2);
            //图标
            var btnIcon2 = rowFrame2.AddLeftIcon(81);
            btnIcon2.UnSelectedImagePath = "Guide/WorkRoomIcon.png";
            //显示文字
            var btnText2 = rowFrame2.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWorkRoom), 300);
            btnText2.X = Application.GetRealWidth(173);
            btnText2.TextColor = UserCenterColor.Current.TextGrayColor1;
 
            //我知道了
            var btnKnwon = this.AddIKnwonButton();
            btnKnwon.ButtonClickEvent += (sender, e) =>
            {
                this.RemoveFromParent();
                var form = new GuideRoomForm();
                form.ShowFrom();
            };
        }
 
        #endregion
    }
}