ZigbeeApp/Home.Ios/Home.IOS.csproj
@@ -1015,6 +1015,8 @@ <BundleResource Include="Resources\Phone\Gateway\WiredGateway.png" /> <BundleResource Include="Resources\Phone\Gateway\WirelessGateway.png" /> <BundleResource Include="Resources\Phone\Gateway\AddGatewaySuccess.png" /> <BundleResource Include="Resources\Phone\Device\SensorPMTwoPointFive.png" /> <BundleResource Include="Resources\Phone\Instruct\SensorPMTwoPointFive.png" /> </ItemGroup> <Import Project="..\Shared\Shared.projitems" Label="Shared" Condition="Exists('..\Shared\Shared.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -313,6 +313,7 @@ 310=请输入合法的数字 311=手动 312= 背光灯颜色 313=长按图示按键5秒以上,信号图标{0}快闪, 进入配网状态。信号图标常亮则配网成功 5097=取消 5098=确定 @@ -2054,4 +2055,5 @@ 70021=门窗传感器 70022=温湿度传感器 70023=中继器 70024=智能空开 70024=智能空开 70025=PM2.5空气质量传感器 ZigbeeApp/Home.Ios/Resources/Phone/Device/SensorPMTwoPointFive.png
ZigbeeApp/Home.Ios/Resources/Phone/Instruct/SensorPMTwoPointFive.png
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
@@ -82,6 +82,34 @@ } /// <summary> /// 获取面板颜色的信息(出错会返回null) /// </summary> /// <param name="panel">按键面板的某一个回路</param> /// <returns></returns> public async Task<Panel.KeyColorData> GetPanelColorInfo(Panel panel) { panel.DeviceEpoint = 1; Panel.KeyNum keyNum = (Panel.KeyNum)panel.DeviceEpoint; var result = await panel.GetPanelColorInfoAsync(keyNum); //共通错误检测 string error = HdlCheckLogic.Current.CheckCommonErrorCode(result); if (error != null) { this.ShowErrorMsg(error); return null; } if (result == null || result.keyColorData == null) { //获取按键面板颜色调节信息失败 string msg = Language.StringByID(R.MyInternationalizationString.uGetPanelColorRegulationInfoFail); this.ShowErrorMsg(msg); return null; } return result.keyColorData; } /// <summary> /// 设置按键面板指定端点的【指示灯开关颜色】的信息 /// </summary> /// <param name="panel">按键面板的某一个回路</param> ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.csold mode 100755 new mode 100644
@@ -172,6 +172,11 @@ unSelectPic = "Device/SensorTemperatureHumidity.png"; this.AddMenuRow(objectText, unSelectPic, "SensorTemperatureHumidityForm"); //PM2.5空气质量传感器 objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName26); unSelectPic = "Device/SensorPMTwoPointFive.png"; this.AddMenuRow(objectText, unSelectPic, "SensorPMTwoPointFiveForm"); //中继器 objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName24); unSelectPic = "Device/RepeaterZigbee.png"; ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorPMTwoPointFiveForm.cs
New file @@ -0,0 +1,95 @@ using System; namespace Shared.Phone.UserCenter.DeviceDirection { /// <summary> /// PM2.5传感器的添加步骤界面 /// </summary> public class SensorPMTwoPointFiveForm : DirectionCommonForm { #region ■ 初始化_____________________________ /// <summary> /// 画面显示(底层会固定调用此方法,借以完成画面创建) /// </summary> public void ShowForm() { //设置头部信息 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice)); //初始化中部信息 this.InitMiddleFrame(); } /// <summary> /// 初始化中部信息 /// </summary> private void InitMiddleFrame() { //图片 var framePic = new FrameLayout(); framePic.Width = this.GetPictrueRealSize(897); framePic.Height = this.GetPictrueRealSize(705); framePic.Gravity = Gravity.CenterHorizontal; framePic.Y = Application.GetRealHeight(130); bodyFrameLayout.AddChidren(framePic); var btnPic = new PicViewControl(framePic.Width, framePic.Height, false); btnPic.UnSelectedImagePath = "Instruct/SensorPMTwoPointFive.png"; framePic.AddChidren(btnPic); //信号图标快闪 var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(455), this.GetPictrueRealSize(45), false); btnGreanLinght.X = this.GetPictrueRealSize(420); btnGreanLinght.Y = this.GetPictrueRealSize(295); btnGreanLinght.TextAlignment = TextAlignment.Center; btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3; btnGreanLinght.TextSize = 10; btnGreanLinght.TextID = R.MyInternationalizationString.uSignalIconFlash; framePic.AddChidren(btnGreanLinght); //信号图标 var btnLinght = new NormalViewControl(this.GetPictrueRealSize(250), this.GetPictrueRealSize(45), false); btnLinght.X = this.GetPictrueRealSize(550); btnLinght.Y = this.GetPictrueRealSize(588); btnLinght.TextColor = UserCenterColor.Current.TextGrayColor3; btnLinght.TextSize = 10; btnLinght.TextID = R.MyInternationalizationString.uSignalIcon; framePic.AddChidren(btnLinght); //长按5秒(按键) string textMsg = Language.StringByID(R.MyInternationalizationString.uLongClickPanelSomeSecond); if (textMsg.Contains("{0}") == true) { textMsg = string.Format(textMsg, "5"); } var btnSecond = new NormalViewControl(this.GetPictrueRealSize(360), this.GetPictrueRealSize(45), false); btnSecond.X = this.GetPictrueRealSize(48); btnSecond.Y = this.GetPictrueRealSize(107); btnSecond.TextColor = UserCenterColor.Current.TextGrayColor3; btnSecond.TextSize = 10; btnSecond.Text = textMsg; framePic.AddChidren(btnSecond); //长按图示按键5秒以上,信号图标 //快闪, 进入配网状态。信号图标常亮则配网成功 string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddSensorPMMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); msg1.Y = Application.GetRealHeight(1037); msg1.Text = msgArry[0]; msg1.TextColor = UserCenterColor.Current.TextGrayColor3; msg1.TextAlignment = TextAlignment.Center; bodyFrameLayout.AddChidren(msg1); var msg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); msg2.Y = msg1.Bottom; if (msgArry.Length > 1) { msg2.Text = msgArry[1]; } msg2.TextColor = UserCenterColor.Current.TextGrayColor3; msg2.TextAlignment = TextAlignment.Center; bodyFrameLayout.AddChidren(msg2); } #endregion } } ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -514,7 +514,7 @@ this.CloseProgressBar(ShowReLoadMode.YES); return false; } keyColorData = await HdlDevicePanelLogic.Current.GetPanelEpointColorInfo(panelDevice); keyColorData = await HdlDevicePanelLogic.Current.GetPanelColorInfo(panelDevice); if (this.keyColorData == null) { //关闭进度条 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
@@ -274,9 +274,17 @@ FrameLayout curentOldRoomFrameLayout = null; int index = 0; var roomTempList = GetSupportRoomList(); Room slectedRoom = null; for (int i = 0; i < roomTempList.Count; i++) { var room = roomTempList[i]; bool canSelect = false; if (curControlDev.currentSelectRoomId == room.Id) { slectedRoom = room; canSelect = true; } //房间 var btnRoomFrameLayout = new FrameLayout { @@ -303,7 +311,7 @@ btnRoomFrameLayout.AddChidren(btnRoom); btnRoom.IsSelected = false; if (index == 0) if (canSelect) { btnRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; btnRoom.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite; @@ -349,13 +357,20 @@ } BindInfo.FinishDisplay(roomTempList, btnFinifh); if (roomTempList.Count != 0) if (roomTempList.Count == 0) { curRoom = roomTempList[0]; curRoom = new Shared.Common.Room(); } else { curRoom = new Shared.Common.Room(); if (slectedRoom == null) { curRoom = roomTempList[0]; } else { curRoom = slectedRoom; } } RefreshDeviceList(curRoom); @@ -452,38 +467,38 @@ } EventHandler<MouseEventArgs> hander = (sender, e) => { btnChoose.IsSelected = !btnChoose.IsSelected; if (!btnChoose.IsSelected) { if (oldDevice != null) { oldDevice.IsSelected = false; oldDevice.Visible = false; } oldDevice = btnChoose; oldDevice.IsSelected = false; oldDevice.Visible = false; targetList.Clear(); } else { if (oldDevice != null) { oldDevice.IsSelected = false; oldDevice.Visible = false; } oldDevice = btnChoose; oldDevice.IsSelected = true; oldDevice.Visible = true; targetList.Clear(); targetList.Add(device); } { btnChoose.IsSelected = !btnChoose.IsSelected; if (!btnChoose.IsSelected) { if (oldDevice != null) { oldDevice.IsSelected = false; oldDevice.Visible = false; } oldDevice = btnChoose; oldDevice.IsSelected = false; oldDevice.Visible = false; targetList.Clear(); } else { if (oldDevice != null) { oldDevice.IsSelected = false; oldDevice.Visible = false; } oldDevice = btnChoose; oldDevice.IsSelected = true; oldDevice.Visible = true; targetList.Clear(); targetList.Add(device); } //新风面板:由于目标没有提供删除接口,所以可以取消选中能保存 btnFinifh.Enable = true; btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; }; //新风面板:由于目标没有提供删除接口,所以可以取消选中能保存 btnFinifh.Enable = true; btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; }; rowLayout.MouseUpEventHandler += hander; devicePic.MouseUpEventHandler += hander; btnBindName.MouseUpEventHandler += hander; @@ -593,7 +608,7 @@ btnFloorText.Text = dicFloorList[floorId]; //获取楼层中房间列表 supportRoomList = GetFloorRoomList(); supportRoomList = GetFloorRoomList(curFloorId); if (!btnMethodText.IsSelected) { if (oldbutton != null) @@ -653,21 +668,8 @@ //获取楼层 dicFloorList = HdlRoomLogic.Current.GetFloorSortList(); curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId(); if (BindInfo.GetCurrentSelectFloorIdName() != null) { Application.RunOnMainThread(() => { btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName(); }); } //获取楼层中房间列表 supportRoomList = GetFloorRoomList(); if (supportRoomList.Count == 0) { return; } supportRoomList = GetFloorRoomList(curControlDev.currentSelectFloorId); //获取所有房间中匹配的能绑的目标 currentPanelSupportBindDeviceList = GetAllRoomSupportDeviceList(); @@ -752,21 +754,56 @@ { Application.RunOnMainThread(() => { if (supportRoomList.Count != 0) { RefreshRoomList(); } //首次是否能点击保存 if (targetList.Count == 0) { curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId(); if (BindInfo.GetCurrentSelectFloorIdName() != null) { Application.RunOnMainThread(() => { btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName(); }); } btnFinifh.Enable = false; btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { foreach (var dev in targetList) { //获取本地设备列表 var localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice; var tempDev = localDeviceList.Find(obj => obj.DeviceAddr == dev.DeviceAddr && obj.DeviceEpoint == dev.DeviceEpoint); if (tempDev != null) { //获取设备所属房间 var tempDevRoom = HdlRoomLogic.Current.GetRoomByDevice(tempDev); if (tempDevRoom != null) { curControlDev.currentSelectRoomId = tempDevRoom.Id; curControlDev.currentSelectFloorId = tempDevRoom.FloorId; } } } if (!string.IsNullOrEmpty(curControlDev.currentSelectFloorId)) { if (BindInfo.GetBindTargetsFloorIdName(curControlDev.currentSelectFloorId) != null) { btnFloorText.Text = BindInfo.GetBindTargetsFloorIdName(curControlDev.currentSelectFloorId); } } btnFinifh.Enable = true; btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } //获取楼层中房间列表 if (supportRoomList.Count != 0) { RefreshRoomList(); } CommonPage.Loading.Hide(); @@ -1230,7 +1267,7 @@ /// 获取楼层对应的房间列表 /// </summary> /// <returns></returns> private List<Room> GetFloorRoomList() private List<Room> GetFloorRoomList(string floorId) { supportRoomList.Clear(); var supportRoomListTemp = new List<Room>(); @@ -1242,6 +1279,10 @@ { if (string.IsNullOrEmpty(room.FloorId)) { if (room.FloorId != floorId) { continue; } if (room.IsLove) { continue; ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
@@ -132,7 +132,7 @@ /// 门锁是否支持常开[这里暂时只有S-One门锁支持,H06C不支持, 后期通过能力值支持] /// </summary> /// <param name="doorLock:当前门锁"></param> /// <returns></returns> /// <returns>true:支持常开;false: 不支持常开</returns> public static bool CanNormallyOpen(ZigBee.Device.DoorLock doorLock) { var listDevice = new List<CommonDevice> { }; @@ -351,6 +351,30 @@ } /// <summary> /// 设置常开模式 /// </summary> /// <param name="doorLock">当前门锁</param> /// <param name="action">回调处理更新内容</param> /// <returns></returns> public static async System.Threading.Tasks.Task<bool> SetNormallyOpenModeFuncAsync(ZigBee.Device.DoorLock doorLock) { //app设置“常开模式”失败 var result = await doorLock.SetNormallyOpenModeFuncAsync(false); if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0) { return false; } if (result.defaultControlResponseData.status == 0) { //app设置“常开模式”成功 NormallyOpenModeValue(doorLock, false); return true; } return false; } /// <summary> /// 启动常开模式【弹窗】 /// </summary> /// <param name="doorLock">当前门锁</param> ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -1025,31 +1025,31 @@ private async void NomallyOpenDialog() { #region 后续版本 //if (UserCenterResourse.UserInfo.AuthorityNo != 1) //{ // this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate)); // return; //} if (UserCenterResourse.UserInfo.AuthorityNo != 1) { this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate)); return; } //if (!UserCenterResourse.AccountOption.DoorUnLockByRemote) //{ // SystemSecondAuthentication(); // return; //} if (!UserCenterResourse.AccountOption.DoorUnLockByRemote) { SystemSecondAuthentication(); return; } //action = () => //{ // //系统密码支持操作门锁后,调用温居城的界面【常开自动化】 // var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock); // Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); // Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; // functionSetting.Show(); // functionSetting.aaaAction = () => // { // UpdateNomallyOpenStatus(); // }; //}; //HdlCheckLogic.Current.CheckSecondarySecurity(action); action = () => { //系统密码支持操作门锁后,调用温居城的界面【常开自动化】 var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock); Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; functionSetting.Show(); // functionSetting.aaaAction = () => //{ // UpdateNomallyOpenStatus(); //}; }; HdlCheckLogic.Current.CheckSecondarySecurity(action); #endregion #region 暂时版本 (最终去掉) ZigbeeApp/Shared/R.cs
@@ -562,6 +562,10 @@ /// 背光灯颜色 /// </summary> public const int BackgroundLightColor = 312; /// <summary> /// PM2.5感器 -> 长按图示按键5秒以上,信号图标{0}快闪, 进入配网状态。信号图标常亮则配网成功 /// </summary> public const int AddSensorPMMsg = 313; public readonly static int cancel = 5097; public readonly static int confrim = 5098; @@ -6307,5 +6311,9 @@ /// 智能空开 /// </summary> public const int uDeviceDirectionName25 = 70024; /// <summary> /// PM2.5空气质量传感器 /// </summary> public const int uDeviceDirectionName26 = 70025; } } ZigbeeApp/Shared/Shared.projitems
@@ -474,6 +474,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\ShowDoorLockMsgControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\DoorLock.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceFreshAirCardControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorPMTwoPointFiveForm.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Phone\CommonForm\" />