HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-05-19 e747e6d8524e3146bb48dc304a713f309966b1c6
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -845,23 +845,24 @@
            btnFunction.AddLeftCaption(caption, 600);
            //开关图标
            var btnSwitch = btnFunction.AddMostRightSwitchIcon();
            //如果当前住宅是虚拟住宅的话,让所有菜单都不能点击
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                btnSwitch.CanClick = false;
            }
            //底线
            btnFunction.AddBottomLine();
            btnSwitch.ButtonClickEvent += async (sender, e) =>
            btnSwitch.ButtonClickEvent += (sender, e) =>
            {
                //切换模式
                bool statu = !btnSwitch.IsSelected;
                var result = await HdlDeviceCurtainLogic.Current.SetHandPullControl(deviceCurtain, statu);
                var result = HdlDeviceCurtainLogic.Current.SetHandPullControl(deviceCurtain, statu);
                if (result == true)
                {
                    btnSwitch.IsSelected = statu;
                }
            };
            //如果是虚拟住宅
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                btnSwitch.IsSelected = ModelData.DeviceModelDataLogic.Current.GetCurtainHandPullControl(deviceCurtain);
                return;
            }
            //添加属性上报监听
            string mainkeys = LocalDevice.Current.GetDeviceMainKeys(this.listNewDevice[0]);
@@ -1117,11 +1118,11 @@
        /// 设备重命名
        /// </summary>
        /// <param name="i_deviceName">deviceName.</param>
        private async void DeviceReName(string i_deviceName, bool closeForm)
        private void DeviceReName(string i_deviceName, bool closeForm)
        {
            //修改MAC名
            string deviceName = i_deviceName.Trim();
            var result = await Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName);
            var result = Common.LocalDevice.Current.ReMacName(this.listNewDevice, deviceName);
            if (result == false)
            {
                return;