gxc
2019-12-25 944b87b6bcccb095cd73f13f4410fb20faf48f74
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedListRoomForm.cs
@@ -77,8 +77,6 @@
                    this.ShowReLoadView();
                    return;
                }
                //从本地获取成员的分享列表
                HdlShardLogic.Current.GetMemberShardContentListFromLocal(memberShardInfo);
                //初始化区域列表
                this.InitAreaListRow();
@@ -98,8 +96,11 @@
            {
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //显示没有分享数据模式
                    this.ShowNotShardMode();
                    bodyFrameLayout.RemoveAll();
                    //还没有共享区域给成员{0}可点击右上角“+”添加
                    string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg);
                    string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
                    this.ShowNotDataImage(bodyFrameLayout, Arry, "Item/NotShardPic.png", 383, 279);
                });
            }
            else
@@ -139,6 +140,8 @@
                    {
                        this.AddRoomListRow(floorId, dicGroup[floorId]);
                    }
                    //调整桌布高度
                    listView.AdjustTableHeight();
                });
            }
        }
@@ -223,6 +226,8 @@
                }
                frameRow.frameTable.ButtonClickEvent += (sender, e) =>
                {
                    var form = new LookSharedContentForm();
                    form.AddForm(room, memberShardInfo);
                };
                //删除
@@ -259,19 +264,14 @@
        {
            //获取全部设备
            var listDevice = new List<CommonDevice>();
            foreach (var deviceUi in room.DeviceUIList)
            foreach (var deviceFile in room.DeviceUIFilePathList)
            {
                var device = deviceUi.CommonDevice;
                if (device == null)
                var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
                if (byteData == null)
                {
                    string deviceFile = deviceUi.FileName.Replace("DeviceUI_", string.Empty);
                    var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
                    if (byteData == null)
                    {
                        continue;
                    }
                    device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
                    continue;
                }
                var device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
                listDevice.Add(device);
            }
            //获取全部场景
@@ -308,45 +308,6 @@
            //重新刷新界面
            this.InitMiddleFrame();
            return 1;
        }
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 显示没有分享数据模式
        /// </summary>
        private void ShowNotShardMode()
        {
            bodyFrameLayout.RemoveAll();
            //图片
            var btnPic = new PicViewControl(383, 279);
            btnPic.Gravity = Gravity.CenterHorizontal;
            btnPic.Y = Application.GetRealHeight(498);
            btnPic.UnSelectedImagePath = "Item/NotShardPic.png";
            bodyFrameLayout.AddChidren(btnPic);
            //还没有共享区域给成员{0}可点击右上角“+”添加
            string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg);
            string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
            var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
            btnMsg1.Y = Application.GetRealHeight(962);
            btnMsg1.TextAlignment = TextAlignment.Center;
            btnMsg1.TextSize = 12;
            btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnMsg1.Text = Arry[0];
            bodyFrameLayout.AddChidren(btnMsg1);
            if (Arry.Length > 1)
            {
                var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
                btnMsg2.Y = btnMsg1.Bottom;
                btnMsg2.TextAlignment = TextAlignment.Center;
                btnMsg2.TextSize = 12;
                btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
                btnMsg2.Text = Arry[1];
                bodyFrameLayout.AddChidren(btnMsg2);
            }
        }
        #endregion