| | |
| | | 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]);
|
| | |
| | | /// 设备重命名
|
| | | /// </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;
|