gxc
2019-10-28 1c4904d77f484c075080942d87785481b52b6fb2
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
using System;
using Shared;
using Shared.Common;
using Shared.R;
 
namespace Shared.Phone.Device.Logic
{
    public class CustomText:FrameLayout
    {
 
        public void Show()
        {
            this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
 
            var topFrameLayout = new FrameLayout
            {
                Height = Application.GetRealHeight(140),
                Y = Application.GetRealHeight(80),
            };
            AddChidren(topFrameLayout);
 
            var titleName = new Button
            {
                //TextID = MyInternationalizationString.selection,
                Text = "自定义推送",
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
            };
            topFrameLayout.AddChidren(titleName);
 
            var back = new Button
            {
                Width = Application.GetRealWidth(110),
                Height = Application.GetRealHeight(110),
                X = Application.GetRealWidth(20),
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = "ZigeeLogic/Back.png",
            };
            topFrameLayout.AddChidren(back);
            back.MouseDownEventHandler += (sender, e) => {
                RemoveFromParent();
            };
 
 
            var middle = new FrameLayout();
            middle.Y = topFrameLayout.Bottom;
            middle.Height = Application.GetRealHeight(1920 - 220);
            middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
            this.AddChidren(middle);
 
            var textBox = new EditText
            {
                Width = Application.GetRealWidth(900),
                Height = Application.GetRealHeight(600),
                X = Application.GetRealWidth(90),
                Y = Application.GetRealHeight(90),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                Radius = (uint)Application.GetRealHeight(40),
                BorderColor = ZigbeeColor.Current.LogicLineColor,
                BorderWidth = 2,
                //Text = Common.Logic.CurrentLogic.LogicName,
                //TextID=MyInternationalizationString.automation1,
            };
            middle.AddChidren(textBox);
 
            var btnsave = new Button
            {
                Height = Application.GetRealHeight(150),
                Y = textBox.Bottom + Application.GetRealHeight(300),
                //Text = "保存",
                Width = Application.GetRealWidth(500),
                Radius = (uint)Application.GetRealHeight(50),
                BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
                X = Application.GetRealWidth(290),
                TextID = MyInternationalizationString.Save,
            };
            middle.AddChidren(btnsave);
            btnsave.MouseUpEventHandler += (sender, e) =>
             {
                 RemoveFromParent();
             };
        }
    }
}