.DS_Store | 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.DS_StoreBinary files differ
ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,29 +1,17 @@ <Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default"> <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.5c86e4357d63" /> <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" /> <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/SkipView.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs"> <Files> <File FileName="Shared/Phone/Category/SelectFloorForm.cs" Line="149" Column="1" IsPinned="True" /> <File FileName="Shared/Phone/Device/Logic/SkipView.cs" Line="24" Column="23" /> <File FileName="Shared/Phone/Device/Logic/LogicView/TipView.cs" Line="99" Column="61" /> <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="24" Column="21" /> <File FileName="Shared/Phone/Device/Logic/AddLogicPage.cs" /> <File FileName="Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs" Line="1066" Column="15" /> <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="1265" Column="28" /> <File FileName="Shared/Phone/Device/Logic/OneLogic.cs" Line="190" Column="43" /> <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="658" Column="10" /> <File FileName="Shared/Phone/Category/CategoryMainForm.cs" Line="58" Column="13" /> <File FileName="Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs" Line="1441" Column="43" /> <File FileName="Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs" Line="10" Column="36" /> <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="12" Column="40" /> <File FileName="Shared/Phone/ZigBee/Device/DoorLock.cs" Line="2757" Column="81" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="GateWay" expanded="True"> <Node name="GateWay.Droid" expanded="True"> <Node name="Assets" expanded="True" /> </Node> <Node name="Home.IOS" expanded="True"> <Node name="Resources" expanded="True" /> </Node> <Node name="Shared" expanded="True"> <Node name="Common" expanded="True" /> <Node name="Phone" expanded="True"> @@ -31,21 +19,12 @@ <Node name="Device" expanded="True"> <Node name="Logic" expanded="True"> <Node name="LogicView" expanded="True" /> <Node name="SkipView.cs" selected="True" /> </Node> </Node> <Node name="UserCenter" expanded="True"> <Node name="CommonBase" expanded="True"> <Node name="Common" expanded="True" /> <Node name="Controls" expanded="True"> <Node name="BaseCommonControl" expanded="True"> <Node name="Base" expanded="True" /> </Node> <Node name="MessageControls" expanded="True" /> </Node> <Node name="DoorLock" expanded="True"> <Node name="DoorLockCommonInfo.cs" selected="True" /> </Node> <Node name="DoorLock" expanded="True" /> <Node name="Residence" expanded="True" /> </Node> <Node name="ZigBee" expanded="True"> <Node name="Common" expanded="True" /> ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ideBinary files differ
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.csold mode 100755 new mode 100644
@@ -264,8 +264,8 @@ 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("Option4", Send.CurrentDoorLock.DeviceAddr); accounts.Add("Option2", Send.CurrentDoorLock.DeviceEpoint.ToString()); accounts.Add("UserId", userId); if (SelectedDeviceStatuscondition != "") { ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.csold mode 100755 new mode 100644
@@ -21,17 +21,27 @@ this.AddChidren(view.TopRowView()); view.toptitleNameBtn.TextID = MyInternationalizationString.linkageevent; view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); }; //加大点击热键 var addiocnclick = new Button { Width = Application.GetRealWidth(108+58), Height = Application.GetRealHeight(72+20), X = Application.GetRealWidth(1080 - 108 - 58), Y = Application.GetRealHeight(184 - 72), }; view.topRowLayout.AddChidren(addiocnclick); var addiocn = new Button { Width = Application.GetRealWidth(72), Height = Application.GetRealHeight(72), Width = Application.GetMinRealAverage(72), Height = Application.GetMinRealAverage(72), X = Application.GetRealWidth(1080 - 108 - 58), UnSelectedImagePath = "ZigeeLogic/lockadd.png", Y = Application.GetRealHeight(184 - 72 - 20), }; view.topRowLayout.AddChidren(addiocn); addiocn.MouseUpEventHandler += (sender, e) => EventHandler<MouseEventArgs> addclick = (sender, e) => { //new一个新逻辑对象; Common.Logic.CurrentLogic = new Common.Logic(); @@ -44,6 +54,10 @@ UserView.HomePage.Instance.PageIndex += 1; lockLogicCommunalPage.Show(() => { }); }; addiocnclick.MouseUpEventHandler += addclick; addiocn.MouseUpEventHandler += addclick; #endregion middle = new VerticalRefreshLayout { @@ -68,8 +82,12 @@ /// </summary> public async void Read() { CommonPage.Loading.Start(); if (Common.Logic.LockLogicList.Count == 0) if (!BoolExist()) { var Idlist = await Send.GetLogicId(1); if (Idlist.Count != 0) @@ -86,7 +104,8 @@ 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()) //Option4是设备mac;Option2是设备端口; if (logic.Accounts[a]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Option2"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) { //查找是否是那个门锁; //如果不是该门锁联动事件不显示出来; @@ -117,7 +136,8 @@ { middle.RemoveAll(); if (Common.Logic.LockLogicList.Count == 0) //if (Common.Logic.LockLogicList.Count == 0) if (!BoolExist()) { //就是为了显示引导添加图标; var noFrameLayout = new FrameLayout @@ -156,6 +176,11 @@ for (int i = 0; i < Common.Logic.LockLogicList.Count; i++) { var logic = Common.Logic.LockLogicList[i]; if (!Exist(logic)) { continue; } var logicRowlayout = new RowLayout { Width = Application.GetRealWidth(1080), @@ -259,5 +284,59 @@ } } /// <summary> /// 查找该门锁是否存在自动化 /// </summary> /// <returns></returns> private bool BoolExist() { bool yes = false; for (int i = 0; i < Common.Logic.LockLogicList.Count; i++) { var logic = Common.Logic.LockLogicList[i]; if (logic.LogicType != 1) { continue; } if (Exist(logic)) { yes = true; //存在就退出 break; } } return yes; } /// <summary> /// 查找这一条自动化是否属于该门锁 /// </summary> /// <returns></returns> private bool Exist(Common.Logic logic) { bool yes = false; for (int j = 0; j < logic.Accounts.Count; j++) { //Option4是设备mac;Option2是设备端口; if (logic.Accounts[j]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[j]["Option2"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) { //查找是否是那个门锁; //如果不是该门锁联动事件不显示出来; yes = false; break; } if (logic.Accounts[j]["Account"].ToString() == Config.Instance.Guid) { //查找自己账号下的创建联动事件; yes = true; break; } } return yes; } } } ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
@@ -81,7 +81,7 @@ TextAlignment = TextAlignment.Center, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, TextSize = 14, Height = Application.GetRealHeight(127), //Height =Application.GetRealHeight(127), Width = Application.GetRealWidth(397), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, TextID = R.MyInternationalizationString.cancel, @@ -95,7 +95,7 @@ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor, TextSize = 14, X = cancelBtn.Right, Height = Application.GetRealHeight(127), //Height =Application.GetRealHeight(127), Width = bottomFrame.Width - cancelBtn.Width, BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor, TextID = R.MyInternationalizationString.confrim, @@ -223,7 +223,7 @@ TextAlignment = TextAlignment.Center, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, TextSize = 14, Height = Application.GetRealHeight(127), // Height = Application.GetRealHeight(127), Width = Application.GetRealWidth(397), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, TextID = R.MyInternationalizationString.cancel, @@ -236,7 +236,7 @@ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor, TextSize = 14, X = cancelBtn.Right, Height = Application.GetRealHeight(127), //Height = Application.GetRealHeight(127), Width = bottomFrame.Width - cancelBtn.Width, BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor, TextID = R.MyInternationalizationString.confrim, ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -499,6 +499,15 @@ ["AccountName"] = dictionary["AccountName"], }; if (dictionary.ContainsKey("Option4")) { accounts1.Add("Option4",dictionary["Option4"]); } if (dictionary.ContainsKey("Option2")) { accounts1.Add("Option2", int.Parse(dictionary["Option2"])); } accounts.Add(accounts1); } } ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -759,7 +759,7 @@ } return exist; } ///<summary> ///获取逻辑信息 /// 返回值:null不存在;其它值都存在; @@ -799,7 +799,9 @@ } return _if; } } } ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -3,12 +3,12 @@ using Shared.Common; using Shared.R; using Shared; using Shared.Phone.UserCenter.DoorLock; namespace Shared.Phone.Device.Logic { public class SoneLogicList : FrameLayout { public static SoneLogicList soneLogicList; public SoneLogicList() { @@ -16,7 +16,7 @@ soneLogicList = this; } /// 给徐梅刷新界面用的 public Action<bool> action; public Action<bool> action; ///第二块第一级父控件 FrameLayout fLayout = new FrameLayout(); ///常开模式图标 @@ -32,7 +32,6 @@ public async void Show() { #region 界面的布局代码 UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑 TopView view = new TopView(); @@ -41,10 +40,6 @@ view.clickBtn.MouseDownEventHandler += (sender, e) => { UserView.HomePage.Instance.ScrollEnabled = true; if (updateThread != null && updateThread.IsAlive) { updateThread.Abort(); } //把静态变量的这个东西置空 soneLogicList = null; this.RemoveFromParent(); @@ -213,7 +208,7 @@ /// </summary> public async void ModeView() { if (Send.CurrentDoorLock.IsDoorLockNormallyMode) { /// 查找是否存在时效性自动化;有的话就返回自动化对象; @@ -242,23 +237,35 @@ button1.MouseUpEventHandler = async (sender, e) => { var result = await UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock); if (result) CommonPage.Loading.Start(); try { if (logic != null) var result = await UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock); if (result) { ///有可能只有常开模式,没有时效性自动化 ///没有判断的话,逻辑会为空,抛出异常; Send.DelLogic(logic.LogicId); if (logic != null) { ///有可能只有常开模式,没有时效性自动化 ///没有判断的话,逻辑会为空,抛出异常; Send.DelLogic(logic.LogicId); } Send.CurrentDoorLock.IsDoorLockNormallyMode = false; ModeView(); } Send.CurrentDoorLock.IsDoorLockNormallyMode = false; ModeView(); else { LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.closeFailed)); } } else catch { } finally { LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.closeFailed)); } Application.RunOnMainThread(() => { CommonPage.Loading.Hide(); }); } }; if (logic != null) { @@ -271,21 +278,11 @@ button2.TextSize = 15; button2.TextColor = ZigbeeColor.Current.LogicTextBlackColor; ///有时效性常开才显示时间条件文本 } else { button2.Width = Application.GetRealWidth(0); button2.Height = Application.GetRealHeight(0); } ///时效性常开只有一个条件; try { var y = DateTime.Now.Year.ToString();//那一年 var m = DateTime.Now.Month.ToString();//那一月 var d = DateTime.Now.ToString("dd");//那一天 var h = int.Parse(DateTime.Now.ToString("HH"));//当前系统时间 var timeInt = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]); var timeInt = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]); int dayInt = (h + timeInt) / 24;//算出几天后执行 int hour = (h + timeInt) % 24;//算出几天后那个时间执行 int days = int.Parse(d) + dayInt; @@ -296,7 +293,13 @@ string text5 = Language.StringByID(MyInternationalizationString.executeSone); button2.Text = text1 + y + text2 + m + text3 + days.ToString() + text4 + hour.ToString() + text5; } catch { } else { button2.Y = Application.GetRealHeight(0); button2.X = Application.GetRealWidth(0); button2.Width = Application.GetRealWidth(0); button2.Height = Application.GetRealHeight(0); } } else @@ -332,6 +335,7 @@ button2.UnSelectedImagePath = "ZigeeLogic/nextIconSone.png"; button2.TextSize = 15; button2.TextColor = ZigbeeColor.Current.LogicTextBlackColor; button2.Text =""; button2.MouseUpEventHandler = (sender, e) => { @@ -340,9 +344,11 @@ {///再次确认 LogicView.TipView.ShowInputTip(true, async (str) => {///确认发送命令 CommonPage.Loading.Start(); try { ///xm var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock); if (!result) { @@ -365,11 +371,20 @@ Send.CurrentDoorLock.IsDoorLockNormallyMode = true; ModeView(); } } catch { } finally { Application.RunOnMainThread(() => { CommonPage.Loading.Hide(); }); } }); @@ -597,30 +612,33 @@ } } //public static Action<bool> action1=DoorLockCommonInfo.LogicAction; /// <summary> /// 定时更新常开模式(防止通过门锁关闭没及时刷新状态) /// </summary> System.Threading.Thread updateThread; public void UpdateModeIcon() { updateThread = new System.Threading.Thread(() => { while (this.Parent != null) { System.Threading.Thread.Sleep(1000); Application.RunOnMainThread(() => { try { ModeView(); } catch { } }); } }); updateThread.Start(); } //System.Threading.Thread updateThread; //public void UpdateModeIcon() //{ // updateThread = new System.Threading.Thread(() => // { // while (this.Parent != null) // { // System.Threading.Thread.Sleep(1000); // Application.RunOnMainThread(() => // { // try // { // ModeView(); // } // catch { } // }); // } // }); // updateThread.Start(); //} } ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.csold mode 100755 new mode 100644
@@ -13,7 +13,7 @@ /// <summary> /// 更新“逻辑常开”界面的回调 /// </summary> public static Action<bool> LogicAction = null; public static Action<bool> LogicAction= null; /// <summary> /// 网关(门锁)所在的时间 /// </summary> @@ -324,8 +324,8 @@ }; } /// <summary> /// <summary> /// 删除常开模式 /// </summary> /// <param name="doorLock">当前门锁</param> @@ -349,10 +349,10 @@ return true; } return false; } /// <summary> } /// <summary> /// 设置常开模式 /// </summary> /// <param name="doorLock">当前门锁</param> @@ -361,7 +361,7 @@ public static async System.Threading.Tasks.Task<bool> SetNormallyOpenModeFuncAsync(ZigBee.Device.DoorLock doorLock) { //app设置“常开模式”失败 var result = await doorLock.SetNormallyOpenModeFuncAsync(false); var result = await doorLock.SetNormallyOpenModeFuncAsync(true); if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0) { return false; @@ -1220,6 +1220,7 @@ var contr = new ShowMsgControl(ShowMsgType.Tip, msg); contr.Show(); }); } #endregion ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -1056,7 +1056,7 @@ UserView.HomePage.Instance.AddChidren(addLogicPage); UserView.HomePage.Instance.PageIndex += 1; addLogicPage.Show(); addLogicPage.UpdateModeIcon(); addLogicPage.action += (w) => { doorLock.IsDoorLockNormallyMode = w;