| | |
| | | /// <param name="device">Device.</param> |
| | | public static void RoomNmae(Button button, CommonDevice device) |
| | | { |
| | | button.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameByDevice(device); |
| | | button.Text = HdlRoomLogic.Current.GetRoomNameByDevice(device); |
| | | } |
| | | /// <summary> |
| | | /// 返回楼层所有的房间的列表 |
| | |
| | | public static List<Common.Room> GetRoomList(string type, string floorId = null) |
| | | { |
| | | var list = new List<Common.Room>(); |
| | | var listAllRoom = UserCenter.HdlRoomLogic.Current.GetAllListRooms(); |
| | | var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); |
| | | for (int i = 0; i < listAllRoom.Count; i++) |
| | | { |
| | | if (type == "action_logicscene" || type == "action_lockscene") |
| | |
| | | var deviceUIlist = new List<CommonDevice>(); |
| | | foreach (var deviceKey in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKey); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKey); |
| | | if (device == null) |
| | | { |
| | | continue; |
| | |
| | | } |
| | | if (device.Type == DeviceType.DoorLock) |
| | | { |
| | | var myInfo = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | var myInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device }); |
| | | if (myInfo.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone) |
| | | { |
| | | //暂时不支持S-one门锁; |
| | |
| | | |
| | | if (CurrentLogic.Conditions.Count == 0 || CurrentLogic.Actions.Count == 0) |
| | | { |
| | | var alert = new UserCenter.ShowMsgControl(ShowMsgType.Normal, |
| | | var alert = new ShowMsgControl(ShowMsgType.Normal, |
| | | Language.StringByID(MyInternationalizationString.addnull), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |
| | |
| | | |
| | | if (string.IsNullOrEmpty(name)) |
| | | { |
| | | var alert = new UserCenter.ShowMsgControl(ShowMsgType.Normal, |
| | | var alert = new ShowMsgControl(ShowMsgType.Normal, |
| | | Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), |
| | | Language.StringByID(MyInternationalizationString.confrim)); |
| | | alert.Show(); |