xm
2021-12-01 6d73bf6e816570291865674bef8bce8972e4de3f
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
//using System;
//using HDL_ON.UI.CSS;
//using Shared;
//namespace HDL_ON.UI
//{
//    public class FaceSettingPage : FrameLayout
//    {
//        FrameLayout bodyView;
 
//        #region 图标选择部分图标
//        /// <summary>
//        /// 背景图选项区域
//        /// </summary>
//        FrameLayout pictureOptionView;
//        /// <summary>
//        /// 背景图选项选择区域
//        /// </summary>
//        VerticalScrolViewLayout optionView;
//        /// <summary>
//        /// 拍照按钮
//        /// </summary>
//        Button btnTakePicture;
//        /// <summary>
//        /// 相册按钮
//        /// </summary>
//        Button btnAlbum;
//        /// <summary>
//        /// 取消按钮
//        /// </summary>
//        Button btnCancel;
//        #endregion
 
//        public FaceSettingPage()
//        {
//            bodyView = this;
//        }
 
//        public void LoadPage()
//        {
//            new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView();
//            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
 
//            var contentView = new FrameLayout()
//            {
//                Y = Application.GetRealHeight(64),
//                Height = Application.GetRealHeight(667 - 64),
//                BackgroundColor = 0xFFFFFFFF,
//            };
//            bodyView.AddChidren(contentView);
 
 
//            var imageName = Guid.NewGuid().ToString();
//            CropImage.TakePicture((imagePath) =>
//            {
 
//            }, imageName, 4, 3);
 
 
//        }
 
 
 
        
//        /// <summary>
//        /// 加载图标选择选项
//        /// </summary>
//        void LoadPictureOptionView()
//        {
//            var pView = new FrameLayout()
//            {
//                BackgroundColor = CSS_Color.DialogTransparentColor1,
//            };
//            bodyView.AddChidren(pView);
 
//            pictureOptionView = new FrameLayout()
//            {
//                Y = Application.GetRealHeight(445),
//                Height = Application.GetRealHeight(250),
//                AnimateSpeed = 0.3f,
//                Animate = Animate.DownToUp,
//            };
//            pView.AddChidren(pictureOptionView);
 
//            optionView = new VerticalScrolViewLayout()
//            {
//                Gravity = Gravity.CenterHorizontal,
//                Width = Application.GetRealWidth(343),
//                Height = Application.GetRealHeight(150),
//                BackgroundColor = CSS_Color.MainBackgroundColor,
//                Radius = (uint)Application.GetRealWidth(12),
//            };
//            pictureOptionView.AddChidren(optionView);
 
//            btnTakePicture = new Button()
//            {
//                Height = Application.GetRealHeight(50),
//                TextAlignment = TextAlignment.Center,
//                TextColor = CSS_Color.TextualColor,
//                SelectedTextColor = CSS_Color.MainColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//                TextID = StringId.TakePicture,
//            };
//            optionView.AddChidren(btnTakePicture);
 
//            optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
 
//            btnAlbum = new Button()
//            {
//                Height = Application.GetRealHeight(50),
//                TextAlignment = TextAlignment.Center,
//                TextColor = CSS_Color.TextualColor,
//                SelectedTextColor = CSS_Color.MainColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//                TextID = StringId.Album,
//            };
//            optionView.AddChidren(btnAlbum);
 
//            optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
 
//            btnCancel = new Button()
//            {
//                Gravity = Gravity.CenterHorizontal,
//                Y = Application.GetRealHeight(8) + optionView.Bottom,
//                Width = Application.GetRealWidth(343),
//                Height = Application.GetRealHeight(50),
//                BackgroundColor = CSS_Color.MainBackgroundColor,
//                Radius = (uint)Application.GetRealWidth(12),
//                TextID = StringId.Cancel,
//                TextColor = CSS_Color.WarningColor,
//                TextSize = CSS_FontSize.SubheadingFontSize,
//            };
//            pictureOptionView.AddChidren(btnCancel);
 
 
//            LoadEvent_PictureOptionViewEventList(pView);
//        }
 
//        /// <summary>
//        /// 加载背景图选择区域事件列表
//        /// </summary>
//        void LoadEvent_PictureOptionViewEventList(FrameLayout pView)
//        {
//            pictureOptionView.MouseUpEventHandler = (sender, e) =>
//            {
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            pView.MouseUpEventHandler = (sender, e) =>
//            {
//                pictureOptionView.Parent.RemoveFromParent();
//            };
 
//            btnCancel.MouseUpEventHandler = (sender, e) =>
//            {
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            btnTakePicture.MouseDownEventHandler = (sender, e) => {
//                btnTakePicture.IsSelected = true;
//            };
//            btnTakePicture.MouseUpEventHandler = (sender, e) =>
//            {
//                btnTakePicture.IsSelected = false;
//                var imageName = Guid.NewGuid().ToString();
//                //var imageName = scene.sid;
//                CropImage.TakePicture((imagePath) =>
//                {
//                    CropImageCallBack(imagePath);
 
//                }, imageName, 4, 3);
 
//                //if (pageTitleId == StringId.EditScene)
//                //{
//                //    scene.SaveFunctionData();
//                //}
//                pictureOptionView.Parent.RemoveFromParent();
//            };
//            btnAlbum.MouseDownEventHandler = (sender, e) => {
//                btnAlbum.IsSelected = true;
//            };
 
//            btnAlbum.MouseUpEventHandler = (sender, e) =>
//            {
//                btnAlbum.IsSelected = false;
//                //从相册选择图片裁剪
//                var imageName = Guid.NewGuid().ToString();
//                //var imageName = scene.sid;
//                CropImage.SelectPicture((imagePath) =>
//                {
//                    //CropImageCallBack(imagePath);
//                }, imageName, 4, 3);
 
//                pictureOptionView.Parent.RemoveFromParent();
//            };
 
//        }
 
//    }
//}