wxr
2019-11-27 590a012a34db27cd1630eb70406e05d5af55e4ca
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
using System;
using Shared;
 
namespace HDL_ON.UI
{
    public class UserPage : FrameLayout
    {
 
        #region 控件列表
        /// <summary>
        /// 当前区域
        /// </summary>
        FrameLayout bodyView;
        /// <summary>
        /// 内容区域
        /// </summary>
        FrameLayout ContextView;
        /// <summary>
        /// 导航栏区域
        /// </summary>
        FrameLayout NavigationView;
        /// <summary>
        /// 导航栏点击区域
        /// </summary>
        FrameLayout NavigationSubView;
        #region 底部区域控件
        /// <summary>
        /// 收藏子区域
        /// </summary>
        FrameLayout collectionView;
        /// <summary>
        /// 收藏图标
        /// </summary>
        Button btnCollectionIcon;
        /// <summary>
        /// 收藏文本
        /// </summary>
        Button btnCollectionText;
        /// <summary>
        /// 分类子区域
        /// </summary>
        FrameLayout classificationView;
        /// <summary>
        /// 分类图标
        /// </summary>
        Button btnClassificationIcon;
        /// <summary>
        /// 分类文本
        /// </summary>
        Button btnClassificationText;
        /// <summary>
        /// 智能子区域
        /// </summary>
        FrameLayout intellectualizationView;
        /// <summary>
        /// 智能图标
        /// </summary>
        Button btnIntellectualizationIcon;
        /// <summary>
        /// 智能文本
        /// </summary>
        Button btnIntellectualizationText;
        /// <summary>
        /// 个人中心子区域
        /// </summary>
        FrameLayout personalCenterView;
        /// <summary>
        /// 个人中心图标
        /// </summary>
        Button btnPersonalCenterIcon;
        /// <summary>
        /// 个人中心文本
        /// </summary>
        Button btnPersonalCenterText;
        /// <summary>
        /// 选中区域
        /// </summary>
        FrameLayout NavigationSelectionView;
        #endregion
        #endregion
 
        public UserPage()
        {
            bodyView = this;
            ContextView = new FrameLayout()
            {
                Height = Application.GetRealHeight(618),
            };
            bodyView.AddChidren(ContextView);
 
            NavigationView = new FrameLayout()
            {
                Y = Application.GetRealHeight(607),
                Height = Application.GetRealHeight(60),
            };
            bodyView.AddChidren(NavigationView);
 
        }
 
        /// <summary>
        /// 选中个人中心
        /// </summary>
        public void ChoosePersonalCenter()
        {
            NavigationSubView = new FrameLayout()
            {
                Y = Application.GetRealHeight(11),
                Height = Application.GetRealHeight(49),
                BackgroundColor = CSS.CSS_Color.MainBackgroundColor,
            };
            NavigationView.AddChidren(NavigationSubView);
 
            #region 收藏区域
            collectionView = new FrameLayout() {
                Width  = Application.GetRealWidth(94),
            };
            NavigationSubView.AddChidren(collectionView);
            btnCollectionIcon = new Button() {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(5),
                Width = Application.GetMinRealAverage(22),
                Height = Application.GetMinRealAverage(22),
                UnSelectedImagePath = "Navigation/CollectionIcon.png",
            };
            collectionView.AddChidren(btnCollectionIcon);
            btnCollectionText = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = btnCollectionIcon.Bottom,
                Height = Application.GetRealHeight(16),
                SelectedTextColor = CSS.CSS_Color.MainColor,
                TextColor =CSS.CSS_Color.FirstLevelTitleColor,
                TextSize = CSS.CSS_FontSize.PromptFontSize_SecondaryLevel,
                TextID = InternationalizationString.Collection,
                TextAlignment = TextAlignment.Center,
            };
            collectionView.AddChidren(btnCollectionText);
            #endregion
 
            #region 分类区域
            classificationView = new FrameLayout()
            {
                Width = Application.GetRealWidth(94),
                X = collectionView.Right,
            };
            NavigationSubView.AddChidren(classificationView);
            btnClassificationIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(5),
                Width = Application.GetMinRealAverage(22),
                Height = Application.GetMinRealAverage(22),
                UnSelectedImagePath = "Navigation/ClassificationIcon.png",
            };
            classificationView.AddChidren(btnClassificationIcon);
            btnClassificationText = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = btnCollectionIcon.Bottom,
                Height = Application.GetRealHeight(16),
                SelectedTextColor = CSS.CSS_Color.MainColor,
                TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                TextSize = CSS.CSS_FontSize.PromptFontSize_SecondaryLevel,
                TextID = InternationalizationString.Classification,
                TextAlignment = TextAlignment.Center,
            };
            classificationView.AddChidren(btnClassificationText);
            #endregion
 
            #region 分类区域
            intellectualizationView = new FrameLayout()
            {
                Width = Application.GetRealWidth(94),
                X = classificationView.Right,
            };
            NavigationSubView.AddChidren(intellectualizationView);
            btnIntellectualizationIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(5),
                Width = Application.GetMinRealAverage(22),
                Height = Application.GetMinRealAverage(22),
                UnSelectedImagePath = "Navigation/IntellectualizationIcon.png",
            };
            intellectualizationView.AddChidren(btnIntellectualizationIcon);
            btnIntellectualizationText = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = btnCollectionIcon.Bottom,
                Height = Application.GetRealHeight(16),
                TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                SelectedTextColor = CSS.CSS_Color.MainColor,
                TextSize = CSS.CSS_FontSize.PromptFontSize_SecondaryLevel,
                TextID = InternationalizationString.Classification,
                TextAlignment = TextAlignment.Center,
            };
            intellectualizationView.AddChidren(btnIntellectualizationText);
            #endregion
            
            #region 个人中心
            personalCenterView = new FrameLayout()
            {
                Width = Application.GetRealWidth(94),
                X = intellectualizationView.Right,
            };
            NavigationSubView.AddChidren(personalCenterView);
 
            btnPersonalCenterIcon = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = Application.GetRealHeight(5),
                Width = Application.GetMinRealAverage(22),
                Height = Application.GetMinRealAverage(22),
                UnSelectedImagePath = "Navigation/PersonalCenterIcon.png",
                SelectedImagePath = "Navigation/PersonalCenterIconOn.png",
            };
            personalCenterView.AddChidren(btnPersonalCenterIcon);
 
            btnPersonalCenterText = new Button()
            {
                Gravity = Gravity.CenterHorizontal,
                Y = btnCollectionIcon.Bottom,
                Height = Application.GetRealHeight(16),
                TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                SelectedTextColor = CSS.CSS_Color.MainColor,
                TextSize = CSS.CSS_FontSize.PromptFontSize_SecondaryLevel,
                TextID = InternationalizationString.Classification,
                TextAlignment = TextAlignment.Center,
            };
            personalCenterView.AddChidren(btnPersonalCenterText);
            #endregion
 
 
            btnPersonalCenterIcon.RemoveFromParent();
            btnPersonalCenterText.IsSelected = true;
 
 
            NavigationSelectionView = new FrameLayout()
            {
                X = personalCenterView.X,
                Width = Application.GetRealWidth(94),
                Height = Application.GetRealHeight(40),
                BackgroundImagePath = "Navigation/UserPageNavbg.png",
            };
            NavigationView.AddChidren(NavigationSelectionView);
            btnPersonalCenterIcon.IsSelected = true;
            btnPersonalCenterIcon.Y = Application.GetRealHeight(6);
 
            NavigationSelectionView.AddChidren(btnPersonalCenterIcon);
 
 
 
            var personalCenterPage = new UI2.PersonalCenterPage();
            ContextView.AddChidren(personalCenterPage);
            personalCenterPage.LoadView();
        }
 
 
    }
}