xm
2019-07-16 b910cb79c9b5bcc204022a3cf9e6950f0a64dfbd
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
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Shared.Phone.UserCenter.User
{
    /// <summary>
    /// 网络切换时的显示界面
    /// </summary>
    public class NetSwitchAlertForm : FrameLayout
    {
        /// <summary>
        /// 文本信息控件
        /// </summary>
        private ViewNormalControl btnText = null;
 
        /// <summary>
        /// 显示到界面上
        /// </summary>
        public void Show()
        {
            this.Height = ControlCommonResourse.TopMenuFrameHeight;
            if (UserView.HomePage.Instance.ChildrenCount == 0)
            {
                return;
            }
            Application.MainPage.AddChidren(this);
        }
 
        /// <summary>
        /// 初始化信息控件
        /// </summary>
        /// <param name="text"></param>
        public void InitTextControl(string text)
        {
            this.btnText = new ViewNormalControl(this.Width, this.Height, false);
            btnText.TextAlignment = TextAlignment.Center;
            btnText.BackgroundColor = UserCenterColor.Current.RemoteLinkPink;
            btnText.Text = text;
            this.AddChidren(btnText);
 
            btnText.BringToFront();
            btnText.Animate = Animate.UpToDown;
        }
 
        /// <summary>
        /// 设置文本信息
        /// </summary>
        /// <param name="text"></param>
        public void SetText(string text)
        {
            this.btnText.Text = text;
        }
 
        /// <summary>
        /// 关闭画面
        /// </summary>
        public void CloseForm()
        {
            this.RemoveFromParent();
        }
    }
}