old mode 100755
new mode 100644
| | |
| | | //选择未分配时,清空
|
| | | if (roomKeys == string.Empty) { listCheck = new List<string>(); }
|
| | | foreach (var device in this.listNewDevice)
|
| | | {
|
| | | { |
| | | if (device is OTADevice)
|
| | | {
|
| | | //针对单纯只有一个200端点的设备
|
| | |
| | | //这里有点特殊,如果回路没有设置有区域的时候,才设置
|
| | | listCheck.Add(mainKeys);
|
| | | HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
|
| | | } |
| | | else if (this.deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir |
| | | && device.Type == DeviceType.FreshAir) |
| | | { |
| | | //新风面板的新风设备,则区域跟着模块一起 |
| | | HdlRoomLogic.Current.ChangedRoom(device, roomKeys); |
| | | }
|
| | | else if (listCheck.Contains(mainKeys) == true)
|
| | | {
|
| | | //如果这个回路之前都还没有区域,在本界面还没有关闭之前,可以无条件随便变更
|
| | | { |
| | | //如果这个回路之前都还没有区域,在本界面还没有关闭之前,可以无条件随便变更 |
| | | HdlRoomLogic.Current.ChangedRoom(device, roomKeys);
|
| | | }
|
| | | }
|
| | |
| | | var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType);
|
| | |
|
| | | var form = new BottomItemSelectForm();
|
| | | form.CancelCallEvent = true;//允许取消
|
| | | form.AddForm(title, listText, nowSelectNo);
|
| | | form.FinishSelectEvent += (selectNo) =>
|
| | | {
|
| | | btnFunction.Text = listText[selectNo];
|
| | | if (selectNo == -1)
|
| | | {
|
| | | //选择取消
|
| | | btnFunction.Text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnFunction.Text = listText[selectNo];
|
| | | }
|
| | | nowSelectNo = selectNo;
|
| | | //记录起当前选择的功能类型
|
| | | if (selectNo == 0)
|
| | |
| | | this.listNewDevice[0].IconPath = "Device/Light.png";
|
| | | }
|
| | | }
|
| | | else
|
| | | else if (selectNo == 2)
|
| | | {
|
| | | this.listNewDevice[0].DfunctionType = DeviceFunctionType.A插座;
|
| | | if (this.listNewDevice[0].IsCustomizeImage == false)
|
| | | {
|
| | | //重新设置图片
|
| | | this.listNewDevice[0].IconPath = "Device/Socket1.png";
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | this.listNewDevice[0].DfunctionType = DeviceFunctionType.A未定义;
|
| | | if (this.listNewDevice[0].IsCustomizeImage == false)
|
| | | {
|
| | | //重新设置图片
|
| | | this.listNewDevice[0].IconPath = "Device/Switch.png";
|
| | | }
|
| | | }
|
| | | this.listNewDevice[0].ReSave();
|
| | |
| | | private void ShowTopRightMenu()
|
| | | {
|
| | | //检测此回路是否拥有定位功能(拿端点最小的那个回路去定位)
|
| | | bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
|
| | | |
| | | bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]); |
| | | |
| | | var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
|
| | | string deviceMenu = string.Empty;
|
| | | if (canTest == true)
|