From 117cf59a3a1ed52481eab58aac9dbe14e82e50a7 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期一, 01 六月 2020 12:04:49 +0800 Subject: [PATCH] 2020-06-01-1 --- ZigbeeApp/GateWay.Droid/Assets/Language.ini | 1 ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 25 +++--- ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 75 +++++++++--------- ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0 .DS_Store | 0 ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs | 41 ++++++++-- ZigbeeApp/Shared/R.cs | 1 ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs | 25 +++-- ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs | 34 ++++---- ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs | 12 +- 10 files changed, 124 insertions(+), 90 deletions(-) diff --git a/.DS_Store b/.DS_Store index 8e9340b..923826e 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml index d7566aa..dea838f 100644 --- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml +++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml @@ -1,31 +1,30 @@ 锘�<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/CurrentDeviceState.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/LogicCommunalPage.cs"> <Files> - <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="428" Column="50" /> - <File FileName="Shared/Phone/Device/Logic/CurrentDeviceState.cs" Line="334" Column="59" /> - <File FileName="Shared/Phone/Device/Logic/IgnoreTime.cs" Line="143" Column="18" /> + <File FileName="Shared/Phone/Device/Logic/TemplatePage.cs" Line="230" Column="57" /> + <File FileName="Shared/Phone/Device/Logic/LogicView/SelectedDeviceView.cs" Line="1" Column="1" /> + <File FileName="Shared/Phone/Device/Logic/RoomAndDeviceView.cs" Line="448" Column="55" /> + <File FileName="Shared/Phone/Device/Logic/CurrentDeviceState.cs" Line="1260" Column="49" /> + <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="734" Column="34" /> + <File FileName="Shared/Phone/Device/Logic/IgnoreTime.cs" Line="147" Column="22" /> + <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="196" Column="29" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="GateWay" expanded="True"> - <Node name="GateWay.Droid" expanded="True" /> + <Node name="GateWay.Droid" expanded="True"> + <Node name="Assets" expanded="True" /> + </Node> <Node name="Shared" expanded="True"> - <Node name="Common" expanded="True" /> <Node name="Phone" expanded="True"> <Node name="Device" expanded="True"> <Node name="Logic" expanded="True"> <Node name="LogicView" expanded="True" /> - <Node name="CurrentDeviceState.cs" selected="True" /> + <Node name="LogicCommunalPage.cs" selected="True" /> </Node> - </Node> - <Node name="UserCenter" expanded="True"> - <Node name="CommonBase" expanded="True"> - <Node name="Logic" expanded="True" /> - </Node> - <Node name="DoorLock" expanded="True" /> </Node> </Node> </Node> diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide index e2338dc..286bc65 100644 --- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide +++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini index 9f7e70c..ab9ca24 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini +++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini @@ -551,6 +551,7 @@ 5402=鏃舵晥鎬у父寮�灏嗚 5403=鍒嗗叧闂� 5404=鏃� +5405=绫� 10000=HDL Home 10001=甯哥敤 diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs old mode 100755 new mode 100644 index c9f4318..511bc75 --- a/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/CurrentDeviceState.cs @@ -334,7 +334,7 @@ var ignoreTime = new IgnoreTime(); UserView.HomePage.Instance.AddChidren(ignoreTime); UserView.HomePage.Instance.PageIndex += 1; - ignoreTime.Show(common, closeView.titleBtn.Text, edit, timevalue); + ignoreTime.Show(common, closeView.titleBtn.Text, edit, timevalue, _if[1]); } @@ -378,7 +378,7 @@ var ignoreTime = new IgnoreTime(); UserView.HomePage.Instance.AddChidren(ignoreTime); UserView.HomePage.Instance.PageIndex += 1; - ignoreTime.Show(common, timeoutView.titleBtn.Text, edit, timevalue); + ignoreTime.Show(common, timeoutView.titleBtn.Text, edit, timevalue, _if[1]); }; @@ -387,7 +387,7 @@ break; case 40: { - + openView.titleBtn.TextID = MyInternationalizationString.smokescreen; openView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; completeView.Show(1).AddChidren(openView.Show()); @@ -437,27 +437,30 @@ { if (devices["AttriButeId"] == "1281") { - if (devices["AttriButeData1"] == "1") + if (devices.ContainsKey("IgnoreTime")) { - openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; - closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; - openView.selectedIconBtn.Visible = true; - closeView.selectedIconBtn.Visible = false; + timevalue = int.Parse(devices["IgnoreTime"]); } else { - if (devices.ContainsKey("IgnoreTime")) + if (devices["AttriButeData1"] == "1") { - timevalue = int.Parse(devices["IgnoreTime"]); + openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; + closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; + openView.selectedIconBtn.Visible = true; + closeView.selectedIconBtn.Visible = false; } else { openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; openView.selectedIconBtn.Visible = false; - closeView.titleBtn.Visible = true; + closeView.selectedIconBtn.Visible = true; } + } + + } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs index 7ef78de..20e4cce 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs @@ -16,7 +16,7 @@ } Button selectedIcon = new Button(); - public void Show(CommonDevice common, string name, bool edit, int timevalue) + public void Show(CommonDevice common, string name, bool edit, int timevalue,string _if) { #region 涓婇潰鐨勫竷灞�浠g爜 @@ -107,7 +107,7 @@ PickerView.ShowNormal(minuteList, secondList, null, (Index1, Index2, Index3) => { selectetimedvalue = int.Parse(minuteList[Index1].Split(' ')[0]) * 60 + int.Parse(secondList[Index2].Split(' ')[0]); - TimeMethod(common, selectetimedvalue, timevalue, edit); + TimeMethod(common, selectetimedvalue, timevalue, edit, _if); }, selectIndex1, selectIndex2, 0, Language.StringByID(MyInternationalizationString.logiccustom)); } else @@ -120,11 +120,11 @@ saveView.clickviewBtn.MouseUpEventHandler += (sender, e) => { - TimeMethod(common, selectetimedvalue, timevalue, edit); + TimeMethod(common, selectetimedvalue, timevalue, edit,_if); }; } - public void TimeMethod(CommonDevice common, int selectetimedvalue, int timevalue, bool edit) + public void TimeMethod(CommonDevice common, int selectetimedvalue, int timevalue, bool edit,string _if) { var deviceConditionsInfo = new Dictionary<string, string>(); @@ -163,10 +163,35 @@ } } - var logicCommunalPage = new LogicCommunalPage(); - UserView.HomePage.Instance.AddChidren(logicCommunalPage); - UserView.HomePage.Instance.PageIndex += 1; - logicCommunalPage.Show(() => { }); + + switch (_if) + { + case "logic": + { + //鑷姩鍖� + var logicCommunalPage = new LogicCommunalPage(); + UserView.HomePage.Instance.AddChidren(logicCommunalPage); + UserView.HomePage.Instance.PageIndex += 1; + logicCommunalPage.Show(() => { }); + } + break; + case "mould": + { + //鑷姩鍖栨帹鑽愭ā鏉� + var templatePage = new TemplatePage(); + UserView.HomePage.Instance.AddChidren(templatePage); + UserView.HomePage.Instance.PageIndex += 1; + templatePage.Show(); + } + break; + + } + + + //var logicCommunalPage = new LogicCommunalPage(); + //UserView.HomePage.Instance.AddChidren(logicCommunalPage); + //UserView.HomePage.Instance.PageIndex += 1; + //logicCommunalPage.Show(() => { }); } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs old mode 100755 new mode 100644 index 97b170b..57bd780 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -312,11 +312,7 @@ { case 13: { - if (intvalue == "1") - { - state=Language.StringByID( MyInternationalizationString.someone); - } - else + if (conditions.ContainsKey("IgnoreTime")) { int minute = int.Parse(conditions["IgnoreTime"]) / 60; int second = int.Parse(conditions["IgnoreTime"]) % 60; @@ -340,48 +336,55 @@ } } + else + { + state = Language.StringByID(MyInternationalizationString.someone); + } + } break; case 21: case 22: { - if (intvalue == "1") + if (conditions.ContainsKey("IgnoreTime")) { - state =Language.StringByID( MyInternationalizationString.logicopen); - } - else - { - if (conditions.ContainsKey("IgnoreTime")) + + int minute = int.Parse(conditions["IgnoreTime"]) / 60; + int second = int.Parse(conditions["IgnoreTime"]) % 60; + if (minute != 0 && second != 0) { - - int minute = int.Parse(conditions["IgnoreTime"]) / 60; - int second = int.Parse(conditions["IgnoreTime"]) % 60; - if (minute != 0 && second != 0) - { - state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); - - } - else - { - if (minute == 0 && second != 0) - { - state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); - - } - if (minute != 0 && second == 0) - { - state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime); - - } - - } + state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); } else { - state =Language.StringByID(MyInternationalizationString.logicclose); + if (minute == 0 && second != 0) + { + state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime); + + } + if (minute != 0 && second == 0) + { + state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime); + + } + } + } + else + { + if (intvalue == "1") + { + state = Language.StringByID(MyInternationalizationString.logicopen); + } + else + { + state = Language.StringByID(MyInternationalizationString.logicclose); + } + + } + } break; case 40: @@ -563,11 +566,11 @@ { if (conditions["AtHome"] == "1") { - state = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + "绫�"; + state = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi); } else { - state = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + "绫�"; + state = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + Language.StringByID(MyInternationalizationString.mi); } } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs index ca1a3aa..caeb202 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs @@ -221,23 +221,23 @@ catch { } }; - //UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += (DoorlockKey, _bool) => - //{ - // var key = Send.CurrentDoorLock.DeviceAddr + Send.CurrentDoorLock.DeviceEpoint; - // if (DoorlockKey == key) - // { - // try - // { - // Application.RunOnMainThread(() => - // { - // Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool; - // ModeView(); - // }); - // } - // catch { } - // } - //}; - } + //UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += (DoorlockKey, _bool) => + //{ + // var key = Send.CurrentDoorLock.DeviceAddr + Send.CurrentDoorLock.DeviceEpoint; + // if (DoorlockKey == key) + // { + // try + // { + // Application.RunOnMainThread(() => + // { + // Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool; + // ModeView(); + // }); + // } + // catch { } + // } + //}; + } /// <summary> /// 甯稿紑妯″紡寮�鍏冲垏鎹㈠浘鏍囩晫闈� /// </summary> diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs old mode 100755 new mode 100644 index 9c244a8..2d5b82d --- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs @@ -229,11 +229,8 @@ { case 13: { - if (intvalue == "1") - { - selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; - } - else + + if (conditions.ContainsKey("IgnoreTime")) { int minute = int.Parse(conditions["IgnoreTime"]) / 60; int second = int.Parse(conditions["IgnoreTime"]) % 60; @@ -257,6 +254,11 @@ } } + else + { + selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; + } + } break; } diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs old mode 100755 new mode 100644 index a78715a..09d202e --- a/ZigbeeApp/Shared/R.cs +++ b/ZigbeeApp/Shared/R.cs @@ -882,6 +882,7 @@ public readonly static int timeSensitive = 5402; public readonly static int executeSone = 5403; public readonly static int hour1 = 5404; + public readonly static int mi = 5405; -- Gitblit v1.8.0