xm
2020-07-21 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/LookSharedContentForm.cs
@@ -23,11 +23,11 @@
        /// <summary>
        /// 设备桌布控件
        /// </summary>
        private FrameLayout frameDeviceTable = null;
        private NormalFrameLayout frameDeviceTable = null;
        /// <summary>
        /// 设备桌布控件
        /// </summary>
        private FrameLayout frameSceneTable = null;
        private NormalFrameLayout frameSceneTable = null;
        /// <summary>
        /// 删除按钮
        /// </summary>
@@ -81,12 +81,12 @@
            this.dicSelectScene = new Dictionary<int, Common.SceneUI>();
            //初始化桌布控件
            this.frameSceneTable = new FrameLayout();
            this.frameSceneTable = new NormalFrameLayout();
            frameSceneTable.Y = Application.GetRealHeight(132);
            frameSceneTable.Height = bodyFrameLayout.Height - Application.GetRealHeight(132);
            bodyFrameLayout.AddChidren(frameSceneTable);
            this.frameDeviceTable = new FrameLayout();
            this.frameDeviceTable = new NormalFrameLayout();
            frameDeviceTable.Y = frameSceneTable.Y;
            frameDeviceTable.Height = frameSceneTable.Height;
            bodyFrameLayout.AddChidren(frameDeviceTable);
@@ -166,8 +166,12 @@
                {
                    continue;
                }
                var sceneUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(System.Text.Encoding.UTF8.GetString(byteData));
                listScene.Add(sceneUi);
                try
                {
                    var sceneUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(System.Text.Encoding.UTF8.GetString(byteData));
                    listScene.Add(sceneUi);
                }
                catch { }
            }
            if (listScene.Count == 0)
            {
@@ -409,10 +413,10 @@
            //确认删除选择的共享场景和功能?
            this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteShardContentMsg), () =>
            {
                HdlThreadLogic.Current.RunThread(async () =>
                HdlThreadLogic.Current.RunThread(() =>
                {
                    //上传文件
                    var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.lookRoom, listDevice, listScene);
                    var result = HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, this.lookRoom, listDevice, listScene);
                    if (result == true)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
@@ -449,11 +453,15 @@
                    }
                    //从分享文件中序列化回来
                    var deviceData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
                    var device = ZigBee.Device.CommonDevice.CommonDeviceByByteString(strArry[1], System.Text.Encoding.UTF8.GetString(deviceData));
                    if (device != null)
                    try
                    {
                        listDevice.Add(device);
                        var device = ZigBee.Device.CommonDevice.CommonDeviceByByteString(strArry[1], System.Text.Encoding.UTF8.GetString(deviceData));
                        if (device != null)
                        {
                            listDevice.Add(device);
                        }
                    }
                    catch { }
                }
            }
            return listDevice;