ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -309,10 +309,9 @@ 303=温度来源 304=湿度来源 305=PM2.5来源 307=不能创建自动化常开模式 308=不能取消自动化常开模式 307=警告!时效性常开关闭门锁功能失败,请手动取消常开模式。 308=警告!时效性常开删除失败。 309=时效性常开删除失败,继续“常开模式”请前往门锁用户界面设置; 5097=取消 @@ -1744,7 +1743,7 @@ 16034=闪光灯 16035=房间的内容在此处显示 16036=我知道了 16037=分享数据已经变更,请重新登陆 16037=分享数据已经变更,请重新登录 16038=工作模式 16039=控制模式 16040=触发模式 @@ -1801,7 +1800,7 @@ 16091=常开模式手动开启 16092=常开模式手动取消 16093=常开模式启用{0}小时 16094=您的权限已经变更,请重新登陆 16094=您的权限已经变更,请重新登录 16095=我已阅读并同意 16096=隐私权政策 16097=和 ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
Diff too large ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -309,10 +309,9 @@ 303=温度来源 304=湿度来源 305=PM2.5来源 307=不能创建自动化常开模式 308=不能取消自动化常开模式 307=警告!时效性常开关闭门锁功能失败,请手动取消常开模式。 308=警告!时效性常开删除失败。 309=时效性常开删除失败,继续“常开模式”请前往门锁用户界面设置; 5097=取消 @@ -1744,7 +1743,7 @@ 16034=闪光灯 16035=房间的内容在此处显示 16036=我知道了 16037=分享数据已经变更,请重新登陆 16037=分享数据已经变更,请重新登录 16038=工作模式 16039=控制模式 16040=触发模式 @@ -1801,7 +1800,7 @@ 16091=常开模式手动开启 16092=常开模式手动取消 16093=常开模式启用{0}小时 16094=您的权限已经变更,请重新登陆 16094=您的权限已经变更,请重新登录 16095=我已阅读并同意 16096=隐私权政策 16097=和 ZigbeeApp/Shared/Common/CommonPage.cs
@@ -57,7 +57,7 @@ /// <summary> /// 版本号 /// </summary> public static string CodeIDString = "1.0.20041501"; public static string CodeIDString = "1.0.20041601"; /// <summary> /// 注册来源(0:HDL On 1:Zigbee) /// </summary> ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dllBinary files differ
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dllBinary files differ
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -611,21 +611,43 @@ } var dicSceneContr = new Dictionary<int, SceneCategoryView>(); var listview = new VerticalListControl(); functionSceneBodyView.AddChidren(listview); //主人,管理员专用刷新控件 VerticalListRefreshControl listview1 = null; //成员专用不能刷新的控件 VerticalListControl listview2 = null; //if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2) //{ // listview1 = new VerticalListRefreshControl(); // functionSceneBodyView.AddChidren(listview1); //} //else { listview2 = new VerticalListControl(); functionSceneBodyView.AddChidren(listview2); } foreach (var scene in listScene) { //场景卡片控件 var sceneView = new SceneCategoryView(); listview.AddChidren(sceneView); listview1?.AddChidren(sceneView); listview2?.AddChidren(sceneView); sceneView.InitControl(scene, room); dicSceneContr[scene.Id] = sceneView; } HdlThreadLogic.Current.RunThread(() => { if (listview1 != null) { //获取全部场景的延时时间 this.GetAllDelayScene(dicSceneContr, listview); this.GetAllDelayScene(dicSceneContr, listview1); } else { //获取全部场景的延时时间 this.GetAllDelayScene(dicSceneContr, listview2); } }, ShowErrorMode.NO); } @@ -633,7 +655,7 @@ /// 获取全部场景的延时时间 /// </summary> /// <param name="dicSceneContr"></param> private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, VerticalListControl listview) private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview) { //读取全部的延时时间 var result = await Scene.CatDelaySceneAsync(); ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs
@@ -263,6 +263,9 @@ accounts.Add("Type", "1"); accounts.Add("Account", Config.Instance.Guid); accounts.Add("AccountName",accountName); ///mac+端口是为识别是那个门锁; accounts.Add("MacAddr", Send.CurrentDoorLock.DeviceAddr); accounts.Add("Epoint", Send.CurrentDoorLock.DeviceEpoint.ToString()); accounts.Add("UserId", userId); if (SelectedDeviceStatuscondition != "") { ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -86,6 +86,13 @@ bool yes = false; for (int a = 0; a < logic.Accounts.Count; a++) { if (logic.Accounts[a]["MacAddr"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Epoint"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) { //查找是否是那个门锁; //如果不是该门锁联动事件不显示出来; yes = false; break; } if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid) { //查找自己账号下的创建联动事件; ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -782,7 +782,7 @@ { //valueInt=3一条特殊的自动化(用来设置失效时间) var d=await Send.DelLogic(Idlist[i]); if (d != 0) if (d == 0) { //删除成功 exist = 2; ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
@@ -319,6 +319,7 @@ var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); var form = new BottomItemSelectForm(); form.SelectRowCanCancel = false;//选择的不能取消 form.AddForm(title, listText, nowSelectNo); form.FinishSelectEvent += (selectNo) => { ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/BottomItemSelectForm.cs
@@ -19,6 +19,14 @@ /// 前回选择的控件 /// </summary> private NormalSelectControl oldSelectContr = null; /// <summary> /// 选择取消(不是左上角),并且按下确定键时,是否调用回调函数(调用时传递的参数是 -1,默认不回调) /// </summary> public bool CancelCallEvent = false; /// <summary> /// 选择的行能否取消 /// </summary> public bool SelectRowCanCancel = true; #endregion @@ -111,6 +119,11 @@ //回调函数 FinishSelectEvent.Invoke(Convert.ToInt32(oldSelectContr.MainKeys)); } else if (FinishSelectEvent != null && this.CancelCallEvent == true) { //回调函数 FinishSelectEvent.Invoke(-1); } this.CloseForm(); }; @@ -138,8 +151,12 @@ //取消选择 if (btnRow.IsSelected == true) { //允许取消的时候,才能取消 if (this.SelectRowCanCancel == true) { btnRow.IsSelected = false; oldSelectContr = null; } return; } if (oldSelectContr != null) ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs
@@ -88,7 +88,7 @@ var pra2 = new AddDoorPra(); pra2.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); pra2.DoorLockId = i_doorLock.DeviceAddr + "_" + i_doorLock.DeviceEpoint; var result2 = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra, listCheck); var result2 = await UserCenterLogic.GetResponseDataByRequestHttps("DoorLock/AddDoorLock", true, pra2, listCheck); //云端是直接返回创建的主键字符串 return result2; } @@ -122,6 +122,10 @@ /// 常开持续时间(1~72小时 OtherOpenLockMode=9003的时候有效) /// </summary> public string NormallyOpenContinuedTime = string.Empty; /// <summary> /// 开锁时间(历史记录的时间From-To检索的对象) /// </summary> public string UnlockTime = DateTime.UtcNow.ToString(); } /// <summary> @@ -184,6 +188,10 @@ /// 其他开锁方式 固定9000 /// </summary> public int OpenLockMode = 9000; /// <summary> /// 录入时间 /// </summary> public string EntryTime = DateTime.Now.ToString(); } /// <summary> ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
@@ -244,7 +244,7 @@ var dev = new AddedDeviceBindResponseAllData(); dev = await currentKey.AddDeviceBindAsync(addBindeDev); if (dev.addedDeviceBindResponseData == null) if (dev != null || dev.addedDeviceBindResponseData == null) { Application.RunOnMainThread(() => { ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -150,6 +150,10 @@ { device.IconPath = "Device/Light.png"; } else { device.IconPath = "Device/RelayEpoint.png"; } device.ReSave(); } this.CloseProgressBar(); @@ -338,10 +342,19 @@ var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); var form = new BottomItemSelectForm(); form.CancelCallEvent = true;//允许取消 form.AddForm(title, listText, nowSelectNo); form.FinishSelectEvent += (selectNo) => { if (selectNo == -1) { //取消选择 btnFunction.Text = string.Empty; } else { btnFunction.Text = listText[selectNo]; } nowSelectNo = selectNo; //记录起当前选择的功能类型 if (selectNo == 0) @@ -352,10 +365,14 @@ { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光; } else else if (selectNo == 2) { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座; } else { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义; } }; }; } ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -932,10 +932,19 @@ var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); var form = new BottomItemSelectForm(); form.CancelCallEvent = true;//允许取消 form.AddForm(title, listText, nowSelectNo); form.FinishSelectEvent += (selectNo) => { if (selectNo == -1) { //选择取消 btnFunction.Text = string.Empty; } else { btnFunction.Text = listText[selectNo]; } nowSelectNo = selectNo; //记录起当前选择的功能类型 if (selectNo == 0) @@ -956,7 +965,7 @@ this.listNewDevice[0].IconPath = "Device/Light.png"; } } else else if (selectNo == 2) { this.listNewDevice[0].DfunctionType = DeviceFunctionType.A插座; if (this.listNewDevice[0].IsCustomizeImage == false) @@ -965,6 +974,15 @@ 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(); }; }; ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs
@@ -963,7 +963,7 @@ /// <summary> /// 其他开锁方式(OpenLockMode=9000时有效) 9001:常开打开 9002:常开取消 9003:常开持续 /// </summary> public int OtherOpenLockMode = -1; public int? OtherOpenLockMode = -1; /// <summary> /// 常开持续时间(1~72小时 OtherOpenLockMode=9003的时候有效) /// </summary> ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
@@ -89,6 +89,22 @@ /// 面板中存在的键值 /// </summary> List<String> panelBindListKey = null; /// <summary> /// 新风绑定目标回调 /// </summary> Action actionFreshAirTarget = null; /// <summary> /// 温度绑定目标回调 /// </summary> Action actionTemperatureTarget = null; /// <summary> /// 湿度绑定目标回调 /// </summary> Action actionHumidityTarget = null; /// <summary> /// PM绑定目标回调 /// </summary> Action actionPMTarget = null; #endregion #region UI设计 @@ -986,7 +1002,19 @@ { foreach (var bd in oldTargetList) { await RemoveTargets(bd); var res = await RemoveTargets(bd); if (res != 0) { Application.RunOnMainThread(() => { new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); btnFinifh.Enable = true; btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); return; }); } } } @@ -1017,7 +1045,7 @@ var dev = new AddedDeviceBindResponseAllData(); dev = await curControlDev.AddDeviceBindAsync(addBindeDev); if (dev.addedDeviceBindResponseData == null) if (dev != null || dev.addedDeviceBindResponseData == null) { Application.RunOnMainThread(() => { @@ -1138,17 +1166,12 @@ { foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList) { switch (re.Result) if (re.Result == 0) { case 0: return 0; break; case 1: return 1; break; case 2: return 2; break; } { return -1; } } } ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs
@@ -144,6 +144,10 @@ { device.IconPath = "Device/Light.png"; } else { device.IconPath = "Device/RelayEpoint.png"; } device.ReSave(); } this.CloseProgressBar(); @@ -332,10 +336,19 @@ var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); var form = new BottomItemSelectForm(); form.CancelCallEvent = true;//允许取消 form.AddForm(title, listText, nowSelectNo); form.FinishSelectEvent += (selectNo) => { if (selectNo == -1) { //选择取消 btnFunction.Text = string.Empty; } else { btnFunction.Text = listText[selectNo]; } nowSelectNo = selectNo; //记录起当前选择的功能类型 if (selectNo == 0) @@ -346,10 +359,14 @@ { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光; } else else if (selectNo == 2) { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座; } else { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义; } }; }; } ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs
@@ -144,6 +144,10 @@ { device.IconPath = "Device/Light.png"; } else { device.IconPath = "Device/RelayEpoint.png"; } device.ReSave(); } this.CloseProgressBar(); @@ -332,10 +336,19 @@ var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); var form = new BottomItemSelectForm(); form.CancelCallEvent = true;//允许取消 form.AddForm(title, listText, nowSelectNo); form.FinishSelectEvent += (selectNo) => { if (selectNo == -1) { //选择取消 btnFunction.Text = string.Empty; } else { btnFunction.Text = listText[selectNo]; } nowSelectNo = selectNo; //记录起当前选择的功能类型 if (selectNo == 0) @@ -346,10 +359,14 @@ { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A灯光; } else else if (selectNo == 2) { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A插座; } else { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A未定义; } }; }; } ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs
@@ -288,6 +288,7 @@ Width = Application.GetRealHeight(757), Visible = false, UnSelectedImagePath = "DoorLock/UnLockBlankPic.png", Gravity = Gravity.CenterHorizontal, }; blankFrameLayout.AddChidren(entryStatusPic); ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -90,6 +90,7 @@ /// 设置FrameLayout /// </summary> FrameLayout btnFuncSetFrameLayout; FrameLayout progressFrameLayoutMatch; /// <summary> /// 点击开布局 /// </summary> @@ -366,25 +367,32 @@ }; btnFrameLayout.AddChidren(closeFrameLayout); progressFrameLayoutMatch = new FrameLayout() { Width = Application.GetRealHeight(84),//639-35 Height = Application.GetRealHeight(446), X = Application.GetMinReal(51), BackgroundColor = ZigbeeColor.Current.XMWhite, }; btnFrameLayout.AddChidren(progressFrameLayoutMatch); var progressFrameLayout = new FrameLayout() { Width = Application.GetRealWidth(9),//639-35 Height = Application.GetRealHeight(446), X = Application.GetRealWidth(95), Y = Application.GetRealHeight(0), Width = Application.GetRealHeight(17),//639-35 Gravity = Gravity.CenterHorizontal, BackgroundColor = ZigbeeColor.Current.XMVerticalSeekBar, }; btnFrameLayout.AddChidren(progressFrameLayout); progressFrameLayoutMatch.AddChidren(progressFrameLayout); progressButton = new Button() { Width = Application.GetMinReal(84),//639-35 Height = Application.GetMinReal(93), X = Application.GetRealWidth(58), Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(347), UnSelectedImagePath = "DoorLock/UnLockButton.png", }; btnFrameLayout.AddChidren(progressButton); progressFrameLayoutMatch.AddChidren(progressButton); btnDoorOpenPic = new Button() { @@ -679,6 +687,9 @@ } NormallyOpenModeValue(tempRes); Application.RunOnMainThread(async () => { var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(); if (resTemp == 1) { @@ -688,9 +699,6 @@ { HaveLogicNormallyOpenMode = false; } Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); } } @@ -753,6 +761,7 @@ { Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); CommonPage.Loading.Hide(); }); } @@ -868,6 +877,10 @@ }; openFrameLayout.MouseUpEventHandler += hander1; btnDoorOpenPic.MouseUpEventHandler += hander1; if (progressButton.Y == Application.GetRealHeight(10)) { progressFrameLayoutMatch.MouseUpEventHandler += hander1; } //关锁事件 EventHandler<MouseEventArgs> hander2 = (sender, e) => @@ -1090,38 +1103,14 @@ //每次重新设置常开,默认时间都是12小时 DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12; NormallyOpenModeValue(true); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); CommonPage.Loading.Hide(); }); //常开模式开启提示 string msgNomallyModeIsTurnOn = Language.StringByID(R.MyInternationalizationString.NomallyModeIsTurnOn); var doorLockInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockInValidSetting); var alertNomallyModeIsTurnOn = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.DoorLockLogic, msgNomallyModeIsTurnOn, doorLockInValidSetting); alertNomallyModeIsTurnOn.Show(); alertNomallyModeIsTurnOn.MsgControlClickEvent += async () => { //默认创建常开模式的特殊逻辑 var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock); if (!res) { string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed); this.ShowTipMsg(msg0); return; } }; //点击自动化 alertNomallyModeIsTurnOn.LogicClickEvent += () => { //逻辑调用前记得移除 ZbGateway.StatusList.Remove(this); //调用逻辑界面 Shared.Phone.Device.Logic.SkipView.SkipAddLogic(2, doorLock); }; alertNomallyModeIsTurnOn.InvalidClickEvent += async () => { NomallyOpenModeInvalidTimeDialog(); }; AlreadyOpenNormallyMode(); } }; }; @@ -1159,22 +1148,32 @@ { //上报“常开模式”已被取消,app默认了“常开模式”被取消 NormallyOpenModeValue(false); UpdateNomallyOpenStatus(); //删除已经失效的“常开模式”的逻辑 var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); if (resTemp == 3) Application.RunOnMainThread(() => { string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); this.ShowTipMsg(msg0); UpdateNomallyOpenStatus(); }); //删除已经失效的“常开模式”的逻辑 if (HaveLogicNormallyOpenMode) { var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); //if (resTemp == 3) //{ // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); // this.ShowTipMsg(msg0); //} } } else { //app默认“常开模式”还是开启 NormallyOpenModeValue(true); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); } }; alert.CancelClickEvent += async () => { if (IsFromReport) @@ -1182,12 +1181,15 @@ //上报“常开模式”已被取消 Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); }); //先删除已失效的“常开模式”的逻辑 var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); if (resTemp == 3) if (HaveLogicNormallyOpenMode) { string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); this.ShowTipMsg(msg0); return; var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); //if (resTemp == 3) //{ // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed2); // this.ShowTipMsg(msg0); // return; //} } //app重新开启“常开模式” var result = await doorLock.SetNormallyOpenModeFuncAsync(true); @@ -1196,7 +1198,10 @@ string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime); this.ShowTipMsg(msg0); NormallyOpenModeValue(false); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); return; } if (result.defaultControlResponseData.status != 0) @@ -1204,22 +1209,28 @@ string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed); this.ShowTipMsg(msg1); NormallyOpenModeValue(false); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); return; } else { //保持“常开成功” NormallyOpenModeValue(true); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); //创建常开模式的特殊逻辑 var resu = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock); if (!resu) { string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed); this.ShowTipMsg(msg0); return; } //if (!resu) //{ // string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed); // this.ShowTipMsg(msg0); //} CommonPage.Loading.Hide(); } @@ -1228,23 +1239,33 @@ { //app操作不取消“常开模式” NormallyOpenModeValue(true); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); } }; alert.ConfirmClickEvent += async () => { if (IsFromReport) { //上报门锁“常开模式”已经取消,现在app确认“常开模式”取消 NormallyOpenModeValue(false); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); //删除已经失效的“常开模式”的逻辑 var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); if (resTemp == 3) if (HaveLogicNormallyOpenMode) { string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); this.ShowTipMsg(msg0); var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); //if (resTemp == 3) //{ // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); // this.ShowTipMsg(msg0); //} } } else @@ -1271,22 +1292,65 @@ //app确认取消“常开模式”成功 NormallyOpenModeValue(false); Application.RunOnMainThread(() => { UpdateNomallyOpenStatus(); }); //删除设置常开模式创建的逻辑 if (HaveLogicNormallyOpenMode) { var resTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); if (resTemp == 3) { string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); this.ShowTipMsg(msg0); //因为目前机制问题,逻辑经常失败,所以不提示,后期机制要改,重新做一个这个界面 //if (resTemp == 3) //{ // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); // this.ShowTipMsg(msg0); //} //else if (resTemp == 2) //{ // string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess); // this.ShowTipMsg(msg2); //} } else if (resTemp == 2) { string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess); this.ShowTipMsg(msg2); } } }; } /// <summary> /// 已经开启常开模式提示 /// </summary> public void AlreadyOpenNormallyMode() { //常开模式开启提示 string msgNomallyModeIsTurnOn = Language.StringByID(R.MyInternationalizationString.NomallyModeIsTurnOn); var doorLockInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockInValidSetting); var alertNomallyModeIsTurnOn = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.DoorLockLogic, msgNomallyModeIsTurnOn, doorLockInValidSetting); alertNomallyModeIsTurnOn.Show(); alertNomallyModeIsTurnOn.MsgControlClickEvent += async () => { //默认创建常开模式的特殊逻辑 var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock); //if (!res) //{ //string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed); // this.ShowTipMsg(msg0); //return; //} }; //点击自动化 alertNomallyModeIsTurnOn.LogicClickEvent += () => { //逻辑调用前记得移除 ZbGateway.StatusList.Remove(this); //调用逻辑界面 Shared.Phone.Device.Logic.SkipView.SkipAddLogic(2, doorLock); }; alertNomallyModeIsTurnOn.InvalidClickEvent += async () => { NomallyOpenModeInvalidTimeDialog(); }; } @@ -1323,12 +1387,16 @@ var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock); if (!res) { //默认创建常开模式失败 string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed); this.ShowTipMsg(msg0); return; //二次加载弹窗 常开模式开启提示 NomallyOpenModeInvalidTimeDialog(); } }; } /// <summary> /// 常开模式状态更新 /// </summary> ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -109,6 +109,15 @@ HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys); }; //所属住宅 caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence); var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2); btnBeloneArea.UseClickStatu = false; listview.AddChidren(btnBeloneArea); btnBeloneArea.InitControl(); //划线 btnBeloneArea.AddBottomLine(); //数据上传与下载 var rowData = new RowLayoutControl(listview.rowSpace / 2); listview.AddChidren(rowData); ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayProductInfoForm.cs
@@ -111,14 +111,17 @@ btnType.AddBottomLine(); HdlGatewayLogic.Current.SetGatewayImageText(btnType.txtView, zbGateway); //所属住宅 caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence); var btnBeloneArea = new FrameCaptionViewControl(caption, Common.Config.Instance.Home.Name, listview.rowSpace / 2); btnBeloneArea.UseClickStatu = false; listview.AddChidren(btnBeloneArea); btnBeloneArea.InitControl(); //划线 btnBeloneArea.AddBottomLine(); //安装位置 var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2); listview.AddChidren(rowBeloneArea); rowBeloneArea.InitControl(Language.StringByID(R.MyInternationalizationString.uInstallationLocation), this.zbGateway); //底线 rowBeloneArea.AddBottomLine(); rowBeloneArea.SelectRoomEvent += (roomKeys) => { //变更网关房间 HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway, roomKeys); }; //完成初始化桌布 tableContr.FinishInitControl(); ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -16,9 +16,13 @@ /// </summary> private FrameLayout frameTable = null; /// <summary> /// 列表控件 /// 列表控件(白色背景) /// </summary> private VerticalListControl listView = null; private FrameListControl listView = null; /// <summary> /// 整个界面的上下滑动控件 /// </summary> private VerticalFrameControl listBackContr = null; /// <summary> /// 楼层顺序 /// </summary> @@ -64,10 +68,16 @@ //清空bodyFrame this.ClearBodyFrame(); //整个界面的上下滑动控件 this.listBackContr = new VerticalFrameControl(); listBackContr.Height = bodyFrameLayout.Height; bodyFrameLayout.AddChidren(listBackContr); //住宅行 var rowHome = new RowLayoutControl(); rowHome.Height = Application.GetRealHeight(173); rowHome.BackgroundColor = UserCenterColor.Current.White; bodyFrameLayout.AddChidren(rowHome); listBackContr.frameTable.AddChidren(rowHome); rowHome.frameTable.UseClickStatu = false; var btnAdreeIcon = rowHome.frameTable.AddLeftIcon(81); @@ -144,8 +154,8 @@ //初始化桌布 this.frameTable = new FrameLayout(); frameTable.Y = rowHome.Bottom + Application.GetRealHeight(23); frameTable.Height = bodyFrameLayout.Height - rowHome.Bottom - Application.GetRealHeight(23); bodyFrameLayout.AddChidren(frameTable); frameTable.Height = listBackContr.frameTable.Height - rowHome.Bottom - Application.GetRealHeight(23); listBackContr.frameTable.AddChidren(frameTable); //根据指定模式,初始化桌布控件 this.InitFrameTableByMode(); @@ -244,7 +254,7 @@ frameFloor.UseClickStatu = false; frameFloor.Height = Application.GetRealHeight(115); frameFloor.BackgroundColor = UserCenterColor.Current.White; frameTable.AddChidren(frameFloor); this.frameTable.AddChidren(frameFloor); //楼层 var btnFloor = frameFloor.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFloor), 200, 60); @@ -253,11 +263,11 @@ btnFloor.TextSize = 15; frameFloor.AddChidren(btnFloor, ChidrenBindMode.NotBind); listView = new VerticalListControl(29); listView = new FrameListControl(29); listView.BackgroundColor = UserCenterColor.Current.White; listView.Y = frameFloor.Bottom; listView.Height = frameTable.Height - frameFloor.Bottom; frameTable.AddChidren(listView); this.frameTable.AddChidren(listView); //初始化楼层行 this.InitFloorRow(); @@ -289,7 +299,7 @@ this.AddFloorRow(keys, dicFloor[keys], i != count); } //调整控件高度 listView.AdjustRealHeight(Application.GetRealHeight(23)); this.AdjustContrlTableHeight(); }); } @@ -306,6 +316,7 @@ private void AddFloorRow(string keys, string floorName, bool addLine) { var frameRow = new RowLayoutControl(listView.rowSpace / 2); frameRow.MainKeys = keys; this.listView.AddChidren(frameRow); //图标 var btnIcon = frameRow.frameTable.AddLeftIcon(81); @@ -395,8 +406,24 @@ } else { bool canMove = false; for (int i = 0; i < listView.ChildrenCount; i++) { var myRow = listView.GetChildren(i) as RowLayoutControl; if (myRow != null && myRow.MainKeys == keys) { canMove = true; continue; } if (canMove == true) { //它之后的行,全部往上移 myRow.Y -= frameRow.Height; } } frameRow.RemoveFromParent(); listView.AdjustRealHeight(Application.GetRealHeight(23)); //调整桌布高度 this.AdjustContrlTableHeight(); } }); }; @@ -495,7 +522,7 @@ btnRoomList.TextSize = 15; frameRoom.AddChidren(btnRoomList, ChidrenBindMode.NotBind); listView = new VerticalListControl(29); listView = new FrameListControl(29); listView.BackgroundColor = UserCenterColor.Current.White; listView.Y = frameRoom.Bottom; listView.Height = frameTable.Height - frameRoom.Bottom; @@ -523,8 +550,8 @@ //添加房间行 this.AddRoomRow(listRoom[i], i != listRoom.Count - 1); } //调整控件真实高度 listView.AdjustRealHeight(Application.GetRealHeight(23)); //调整桌布高度 this.AdjustContrlTableHeight(); } #endregion @@ -539,6 +566,7 @@ private void AddRoomRow(Common.Room room, bool addLine) { var frameRow = new RowLayoutControl(listView.rowSpace / 2); frameRow.MainKeys = room.Id; listView.AddChidren(frameRow); //图标 var btnIcon = frameRow.frameTable.AddLeftIcon(81); @@ -602,8 +630,24 @@ } else { bool canMove = false; for (int i = 0; i < listView.ChildrenCount; i++) { var myRow = listView.GetChildren(i) as RowLayoutControl; if (myRow != null && myRow.MainKeys == room.Id) { canMove = true; continue; } if (canMove == true) { //它之后的行,全部往上移 myRow.Y -= frameRow.Height; } } frameRow.RemoveFromParent(); listView.AdjustRealHeight(Application.GetRealHeight(23)); //调整桌布高度 this.AdjustContrlTableHeight(); } }); }; @@ -812,6 +856,17 @@ return true; } /// <summary> /// 调整控件桌布高度 /// </summary> private void AdjustContrlTableHeight() { //调整桌布高度 listView.AdjustRealHeight(Application.GetRealHeight(23)); this.frameTable.Height = listView.Bottom; this.listBackContr.AdjustTableHeight(); } #endregion #region ■ 结构体_____________________________ ZigbeeApp/Shared/R.cs
@@ -539,13 +539,17 @@ /// </summary> public const int PM25Source = 305; /// <summary> /// 不能创建自动化常开模式 /// 警告!此次常开模式默认门锁一直开着,没有实现自动关闭功能 /// </summary> public const int AddLogicNormallyModeFailed = 307; /// <summary> /// 不能取消自动化常开模式 /// 警告!时效性常开删除失败。 /// </summary> public const int CancelLogicNormallyModeFailed = 308; /// <summary> /// 时效性常开删除失败,继续“常开模式”请前往门锁用户界面设置 /// </summary> public const int CancelLogicNormallyModeFailed2 = 309; public readonly static int cancel = 5097; public readonly static int confrim = 5098;