| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //房间图片
|
| | | var framePic = new FrameLayout();
|
| | | framePic.Y = Application.GetRealHeight(60);
|
| | | framePic.Width = Application.GetMinRealAverage(887);
|
| | | framePic.Height = Application.GetMinRealAverage(444);
|
| | | framePic.Gravity = Gravity.CenterHorizontal;
|
| | | framePic.Radius = 8;
|
| | | framePic.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
|
| | | bodyFrameLayout.AddChidren(framePic);
|
| | | var btnPic = new ImageView();
|
| | | btnPic.Y = Application.GetRealHeight(60);
|
| | | btnPic.Width = Application.GetMinRealAverage(887);
|
| | | btnPic.Height = Application.GetMinRealAverage(444);
|
| | | btnPic.Gravity = Gravity.CenterHorizontal;
|
| | | btnPic.Radius = 8;
|
| | | btnPic.ImagePath = "RoomIcon/0.JPG";
|
| | | bodyFrameLayout.AddChidren(btnPic);
|
| | | framePic.AddChidren(btnPic);
|
| | | btnPic.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | //房间图片选择
|
| | | this.RoomPictrueSelect(btnPic);
|
| | | };
|
| | | //添加阴影特效
|
| | | var btnTemp = new ButtonBase();
|
| | | btnTemp.AddBottomShadow(btnPic, true);
|
| | | btnTemp = null;
|
| | | framePic.SetViewShadow(true);
|
| | |
|
| | | this.newRoom = new Common.Room();
|
| | | newRoom.FloorId = this.floorKeys;
|
| | |
| | | string picName = $"RoomIcon_{DateTime.Now.ToString("yyyyMMddHHmmss")}.png";
|
| | | string picFullName = System.IO.Path.Combine(Common.Config.Instance.FullPath, picName);
|
| | | Shared.IO.FileUtils.WriteFileByBytes(picFullName, btnPic.ImageBytes);
|
| | | newRoom.BackgroundImage = picFullName;
|
| | | newRoom.BackgroundImage = picName;
|
| | | //备份
|
| | | Phone.UserCenter.HdlAutoBackupLogic.AddOrEditorFile(picName);
|
| | | }
|