JLChen
2020-05-28 04bd96cbf5d12a4e4b116d2b05fd0d05ea81ee23
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
using System;
using System.Collections.Generic;
using System.Text;
using Shared;
using Shared.SimpleControl;
using Shared.SimpleControl.Phone;
using Shared.SimpleControl.R;
 
namespace SmartHome.UI.SimpleControl.Phone.Music
{
    class A31SetInformation : FrameLayout
    {
        public void show(A31MusicModel a31)
        {
            AddChidren(new Button
            {
                Height = Application.GetRealHeight(30),
                BackgroundColor = SkinStyle.Current.MainColor,
            });
 
            var topFrameLayout = new FrameLayout
            {
                Height = Application.GetRealHeight (Application.DesignHeight - 30),
                Y = Application.GetRealHeight(30),
                BackgroundColor = 0xff181818,
            };
            AddChidren(topFrameLayout);
 
            //重命名
            var renamelayout = new FrameLayout
            {
                Height = Application.GetRealHeight(100),
                Y = Application.GetRealHeight(500),
            };
            topFrameLayout.AddChidren(renamelayout);
 
            var renamehoto = new Button
            {
                Width = Application.GetRealWidth(61),
                Height = Application.GetRealHeight(81),
                UnSelectedImagePath = "MusicIcon/rename.png",
                SelectedImagePath = "MusicIcon/renameselected.png",
                TextAlignment = TextAlignment.CenterLeft,               
                X = Application.GetRealWidth(30),               
            };
            renamelayout.AddChidren(renamehoto);
 
            var rename = new Button
            {
                Height = Application.GetRealHeight(100),
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(130),
                //Text = "重命名",
                TextID=MyInternationalizationString.rename,
                TextSize = 18,
                
            };
            renamelayout.AddChidren(rename);
             EventHandler<MouseEventArgs> renamesource = (sender, e) =>
             {                 
                 A31Rename Rename = new A31Rename();
                 MainPage.MainFrameLayout.AddChidren(Rename);
                 Rename.show(a31);
             };
            rename.MouseUpEventHandler += renamesource;
            renamehoto.MouseUpEventHandler += renamesource;
 
            #region 设备信息  设备内容  闹钟设置  定时关闭
            /*
            //设备信息
            var equipmenlayout = new FrameLayout
            {
                Height = Application.GetRealHeight(100),
                Y = renamelayout.Bottom,
            };
            topFrameLayout.AddChidren(equipmenlayout);
 
 
            
                        var equipmenthoto = new Button
                        {
                            Width = Application.GetRealWidth(61),
                            Height = Application.GetRealHeight(81),
                            UnSelectedImagePath = "MusicIcon/content.png",
                            SelectedImagePath = "MusicIcon/contentselected.png",
                            TextAlignment = TextAlignment.CenterLeft,
                            Gravity = Gravity.CenterVertical,
                            X = Application.GetRealWidth(30),
                        };
                        equipmenlayout.AddChidren(equipmenthoto);
 
                        var equipmen = new Button
                        {
                            Height = Application.GetRealHeight(100),
                            TextAlignment = TextAlignment.CenterLeft,
                            X = Application.GetRealWidth(130),
                            Text = "设备信息",
                            TextSize = 18,
 
                        };
                        equipmenlayout.AddChidren(equipmen);
 
                        //设备内容
                        var contenlayout = new FrameLayout
                        {
                            Height = Application.GetRealHeight(100),
                            Y = equipmenlayout.Bottom,
                        };
                        topFrameLayout.AddChidren(contenlayout);
 
                        var contenthoto = new Button
                        {
                            Width = Application.GetRealWidth(61),
                            Height = Application.GetRealHeight(81),
                            UnSelectedImagePath = "MusicIcon/information.png",
                            SelectedImagePath = "MusicIcon/informationselected.png",
                            TextAlignment = TextAlignment.CenterLeft,
                            Gravity = Gravity.CenterVertical,
                            X = Application.GetRealWidth(30),
                        };
                        contenlayout.AddChidren(contenthoto);
 
                        var content = new Button
                        {
                            Height = Application.GetRealHeight(100),
                            TextAlignment = TextAlignment.CenterLeft,
                            X = Application.GetRealWidth(130),
                            Text = "设备内容",
                            TextSize = 18,
 
                        };
                        contenlayout.AddChidren(content);
 
                        //闹钟设置
                        var clocklayout = new FrameLayout
                        {
                            Height = Application.GetRealHeight(100),
                            Y = contenlayout.Bottom,
                        };
                        topFrameLayout.AddChidren(clocklayout);
 
                        var clockhoto = new Button
                        {
                            Width = Application.GetRealWidth(61),
                            Height = Application.GetRealHeight(81),
                            UnSelectedImagePath = "MusicIcon/clock.png",
                            SelectedImagePath = "MusicIcon/clockselected.png",
                            TextAlignment = TextAlignment.CenterLeft,
                            Gravity = Gravity.CenterVertical,
                            X = Application.GetRealWidth(30),
                        };
                        clocklayout.AddChidren(clockhoto);
 
                        var clock = new Button
                        {
                            Height = Application.GetRealHeight(100),
                            TextAlignment = TextAlignment.CenterLeft,               
                            X = Application.GetRealWidth(130),
                            Text = "闹钟设置",
                            TextSize = 18,
                        };
                        clocklayout.AddChidren(clock);
 
                        //定时关闭
                        var timinglayout = new FrameLayout
                        {
                            Height = Application.GetRealHeight(100),
                            Y = clocklayout.Bottom,
                        };
                        topFrameLayout.AddChidren(timinglayout);
 
                        var timingclosurehoto = new Button
                        {
                            Width = Application.GetRealWidth(61),
                            Height = Application.GetRealHeight(81),
                            UnSelectedImagePath = "MusicIcon/timing.png",
                            SelectedImagePath = "MusicIcon/timingselected.png",
                            TextAlignment = TextAlignment.CenterLeft,
                            Gravity = Gravity.CenterVertical,
                            X = Application.GetRealWidth(30),
                        };
                        timinglayout.AddChidren(timingclosurehoto);
 
                        var timingclosure = new Button
                        {
                            Height = Application.GetRealHeight(100),
                            TextAlignment = TextAlignment.CenterLeft,
                            X = Application.GetRealWidth(130),
                            Text = "定时关闭",
                            TextSize = 18,              
                        };
                        timinglayout.AddChidren(timingclosure);
                */
            #endregion
 
            FrameLayout backframeLayout = new FrameLayout
            {
                Height = Application.GetRealHeight(100),
                Y = Application.GetRealWidth(1000),
            };
            topFrameLayout.AddChidren(backframeLayout);
            var back = new Button
            {
                Height = Application.GetRealHeight(100),
                //Text = "返回",
                TextID=MyInternationalizationString.back,
                Gravity = Gravity.Center,
                TextSize = 18,
            };
            backframeLayout.AddChidren(back);
            back.MouseUpEventHandler += (sender, e) =>
            {
                RemoveFromParent();
            };
 
        }
 
    }
}