From ef63c84b3b408fea661f84d3f9ecc237787af250 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 09 十二月 2019 11:10:07 +0800 Subject: [PATCH] 2019-12-09-1 --- ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 117 +++++++++++++++++++++++++++++++--------------------------- 1 files changed, 63 insertions(+), 54 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs index 4f954b9..cff085e 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -32,11 +32,11 @@ var titleName = new Button { - TextSize = 16, + TextSize = 17, TextColor = ZigbeeColor.Current.LogicTextBlackColor, TextAlignment = TextAlignment.CenterLeft, X = Application.GetRealWidth(176), - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Height = Application.GetRealHeight(69), Y = Application.GetRealHeight(92), TextID = MyInternationalizationString.selection, @@ -83,7 +83,7 @@ #endregion - + var middle = new VerticalScrolViewLayout { @@ -112,6 +112,7 @@ TextID = MyInternationalizationString.automationname, TextColor = ZigbeeColor.Current.LogicTextBlackColor, Y = Application.GetRealHeight(35), + TextSize = 15, }; logicnamefl.AddChidren(text); @@ -123,7 +124,7 @@ X = text.Right, TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, - TextSize = 13, + TextSize = 14, Text = Common.Logic.CurrentLogic.LogicName, //TextID=MyInternationalizationString.automation1, }; @@ -166,7 +167,7 @@ TextColor = ZigbeeColor.Current.LogicTextBlackColor, Width = Application.GetRealWidth(300), Height = Application.GetRealHeight(60), - TextSize = 16, + TextSize = 15, Gravity = Gravity.CenterVertical, }); @@ -277,6 +278,7 @@ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor, TextID = MyInternationalizationString.addconditions, X = Application.GetRealWidth(390), + TextSize = 14, }; addfl.AddChidren(addtextbtn); @@ -343,6 +345,7 @@ TextAlignment = TextAlignment.CenterLeft, Gravity = Gravity.CenterVertical, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(timevalue); @@ -354,6 +357,7 @@ Gravity = Gravity.CenterVertical, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, X = conditionsRowLayout.Width - Application.GetRealWidth(400), + TextSize = 14, }; conditionsRowLayout.AddChidren(timeTxet); @@ -454,6 +458,7 @@ Text = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2, //TextColor = 0xff121212, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(timevalue); var timeTxet = new Button @@ -464,6 +469,7 @@ TextColor = ZigbeeColor.Current.LogicBtnCancelColor, X = conditionsRowLayout.Width - Application.GetRealWidth(400), TextID = MyInternationalizationString.timeframe, + TextSize = 14, }; conditionsRowLayout.AddChidren(timeTxet); @@ -501,6 +507,7 @@ TextAlignment = TextAlignment.CenterLeft, Text = deviceinof.DeviceEpointName, TextColor = ZigbeeColor.Current.LogicTextBlackColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(btndevice); @@ -541,7 +548,7 @@ UserView.HomePage.Instance.AddChidren(memberList); UserView.HomePage.Instance.PageIndex += 1; MemberList.edit = true; - memberList.Show(deviceinof); + memberList.Show(deviceinof, conditions); } }; @@ -555,6 +562,7 @@ TextAlignment = TextAlignment.CenterRight, X = Application.GetRealWidth(400), TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(devicestatus); @@ -624,7 +632,6 @@ case 21: case 22: { - conditionIcon.UnSelectedImagePath = "ZigeeLogic/doormagnetism.png"; if (intvalue == "1") { devicestatus.TextID = MyInternationalizationString.logicopen; @@ -656,7 +663,6 @@ break; case 40: { - conditionIcon.UnSelectedImagePath = "ZigeeLogic/smoke.png"; if (intvalue == "1") { devicestatus.TextID = MyInternationalizationString.smokescreen; @@ -666,7 +672,6 @@ break; case 42: { - conditionIcon.UnSelectedImagePath = "ZigeeLogic/waterleakage.png"; if (intvalue == "1") { devicestatus.TextID = MyInternationalizationString.waterleakage; @@ -679,7 +684,6 @@ break; case 43: { - conditionIcon.UnSelectedImagePath = "ZigeeLogic/gas.png"; if (intvalue == "1") { devicestatus.TextID = MyInternationalizationString.gas; @@ -689,7 +693,6 @@ break; case 277: { - conditionIcon.UnSelectedImagePath = "ZigeeLogic/waterleakage.png"; if (intvalue == "1") { devicestatus.TextID = MyInternationalizationString.callthepolice; @@ -699,7 +702,6 @@ break; default: { - conditionIcon.UnSelectedImagePath = "ZigeeLogic/infraredsensor.png"; if (intvalue == "1") { devicestatus.TextID = MyInternationalizationString.callthepolice; @@ -725,7 +727,7 @@ { if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"]) { - devicestatus.Text = conditions["Account"]; + devicestatus.Text = Common.Logic.CurrentLogic.Accounts[a]["Account"]; break; } @@ -773,6 +775,7 @@ Gravity = Gravity.CenterVertical, Text = logicinof.LogicName, TextColor = ZigbeeColor.Current.LogicTextBlackColor, + TextSize = 14, //TextColor = 0xff121212, }; conditionsRowLayout.AddChidren(btnlogic); @@ -803,6 +806,7 @@ TextAlignment = TextAlignment.CenterRight, X = Application.GetRealWidth(500), TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(logicstatus); @@ -827,6 +831,7 @@ TextColor = ZigbeeColor.Current.LogicTextBlackColor, //TextColor = 0xff121212, TextID = MyInternationalizationString.security, + TextSize = 14, }; //conditionsRowLayout.AddChidren(btnsecurity); @@ -859,6 +864,7 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(securitystatus); @@ -886,15 +892,16 @@ break; case 7: { + + conditionIcon.UnSelectedImagePath = "ZigeeLogic/position.png"; var btnlocation = new Button { Width = Application.GetRealWidth(700), TextAlignment = TextAlignment.CenterLeft, Gravity = Gravity.CenterVertical, - //Text = "鍦扮悊浣嶇疆", - TextColor = ZigbeeColor.Current.LogicTextBlackColor, - //TextColor = 0xff121212, + TextColor = ZigbeeColor.Current.LogicBtnCancelColor, TextID = MyInternationalizationString.geographicalposition, + TextSize = 14, }; conditionsRowLayout.AddChidren(btnlocation); @@ -922,6 +929,7 @@ TextAlignment = TextAlignment.CenterRight, X = Application.GetRealWidth(500), TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; conditionsRowLayout.AddChidren(locationstatus); foreach (var radius in Common.Logic.CurrentLogic.Accounts) @@ -1005,7 +1013,7 @@ TextColor = ZigbeeColor.Current.LogicTextBlackColor, Width = Application.GetRealWidth(300), Height = Application.GetRealHeight(60), - TextSize = 16, + TextSize = 15, Gravity = Gravity.CenterVertical, }; targetRowLayout.AddChidren(btntargettitle); @@ -1075,6 +1083,7 @@ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor, TextID = MyInternationalizationString.addfunction, X = Application.GetRealWidth(390), + TextSize = 14, }; addfl.AddChidren(addtextbtn); EventHandler<MouseEventArgs> addfunctionclick = (sender, e) => @@ -1141,10 +1150,11 @@ { Y = Application.GetRealHeight(20), Height = Application.GetRealHeight(50), - Width = Application.GetRealWidth(450), + Width = Application.GetRealWidth(400), TextAlignment = TextAlignment.CenterLeft, Text = deviceinof.DeviceEpointName, TextColor = ZigbeeColor.Current.LogicTextBlackColor, + TextSize = 14, }; actionsrowLayout.AddChidren(btndevicename); @@ -1152,7 +1162,7 @@ var btnregionname = new Button { Y = btndevicename.Bottom + Application.GetRealHeight(10), - Width = Application.GetRealWidth(450), + Width = Application.GetRealWidth(400), TextAlignment = TextAlignment.CenterLeft, Height = Application.GetRealHeight(50), Text = "",//Language.StringByID(MyInternationalizationString.customroom), @@ -1164,12 +1174,13 @@ ///鏄剧ず璁惧鏉′欢鐘舵�佹帶浠� var devicestatus = new Button { - Width = Application.GetRealWidth(350), + Width = Application.GetRealWidth(400), Height = Application.GetRealHeight(130), Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, - X = Application.GetRealWidth(450), + X = Application.GetRealWidth(400), TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; actionsrowLayout.AddChidren(devicestatus); @@ -1333,26 +1344,23 @@ { continue; } - string modetext = "", temperaturetext="", speedtext = ""; + string modetext = "", temperaturetext = "", speedtext = ""; bool ifclose = false; foreach (var status in TaskList) { - if (status["TaskType"].ToString() == "1") + + if (TaskList.Count == 1) { - if (status["Data1"].ToString() == "0") - { - // devicestatus.Text = Language.StringByID(MyInternationalizationString.close); - - ifclose = false; - } - else if (status["Data1"].ToString() == "1") - { - //devicestatus.Text = Language.StringByID(MyInternationalizationString.open); - ifclose = true; - } - + //鏁扮粍鍙湁涓�涓厓绱犺鏄庡綋鍓嶇┖璋冪姸鎬佷负鍏筹紱 + ifclose = false; + //濡傛灉绌鸿皟鐘舵�佹槸鍏筹紱鐩存帴璺冲嚭for寰潖锛� + break; } - else if (status["TaskType"].ToString() == "5") + else + { + ifclose = true; + } + if (status["TaskType"].ToString() == "5") { if (status["Data1"] == "3") {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍) @@ -1411,7 +1419,7 @@ //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟 else if (status["Data1"] == "4" || status["Data1"] == "5" || status["Data1"] == "7") { - var s = int.Parse(status["Data2"]) /100; + var s = int.Parse(status["Data2"]) / 100; temperaturetext = s.ToString(); } else if (status["Data1"] == "20") @@ -1459,6 +1467,7 @@ TextAlignment = TextAlignment.CenterLeft, Text = sceneinof.Name, TextColor = ZigbeeColor.Current.LogicTextBlackColor, + TextSize = 14, }; actionsrowLayout.AddChidren(btndevicename); @@ -1497,6 +1506,7 @@ Gravity = Gravity.CenterVertical, Text = logicinof.LogicName, TextColor = ZigbeeColor.Current.LogicTextBlackColor, + TextSize = 14, //TextColor = 0xff121212, }; actionsrowLayout.AddChidren(btnlogic); @@ -1528,6 +1538,7 @@ X = Application.GetRealWidth(1080 - 330), TextColor = ZigbeeColor.Current.LogicTextBlackColor, TextAlignment = TextAlignment.CenterRight, + TextSize = 14, }; actionsrowLayout.AddChidren(logicstatus); @@ -1551,6 +1562,7 @@ TextColor = ZigbeeColor.Current.LogicTextBlackColor, //TextColor = 0xff121212, TextID = MyInternationalizationString.security, + TextSize = 14, }; //actionsrowLayout.AddChidren(btnsecurity); @@ -1579,6 +1591,7 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; actionsrowLayout.AddChidren(securitystatus); @@ -1626,6 +1639,7 @@ Width = Application.GetRealWidth(500), TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, }; actionsrowLayout.AddChidren(delaytimeBtn); if (Minutes != 0) @@ -1733,6 +1747,7 @@ Width = Application.GetRealWidth(300), Height = Application.GetRealHeight(60), Gravity = Gravity.CenterVertical, + TextSize = 14, }; weekRowLayout.AddChidren(settxet); var btnweektext = new Button @@ -1745,6 +1760,7 @@ TextID = MyInternationalizationString.everyday, Y = Application.GetRealHeight(35), X = settxet.Right, + TextSize = 14, }; weekRowLayout.AddChidren(btnweektext); @@ -1805,6 +1821,7 @@ Height = Application.GetRealHeight(60), Gravity = Gravity.CenterVertical, TextID = MyInternationalizationString.pushswitch, + TextSize = 14, }; pushswitchRowlayout.AddChidren(btnswitchtxet); @@ -1857,6 +1874,7 @@ Width = Application.GetRealWidth(300), Height = Application.GetRealHeight(60), Gravity = Gravity.CenterVertical, + TextSize = 14, }; custompushRowLayout.AddChidren(btncustompush); @@ -1902,15 +1920,12 @@ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor, TextID = MyInternationalizationString.Save, TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor, + TextSize=16, }; saveFrameLayout.AddChidren(btnsave); btnsave.MouseUpEventHandler += async (sender, e) => { var name = logicTextBox.Text.Trim(); - //if (Common.Logic.CurrentLogic.Conditions.Count != 0 && Common.Logic.CurrentLogic.Actions.Count != 0) - //{ - // AddChidren(btnsave); - //} if (string.IsNullOrEmpty(logicTextBox.Text.Trim())) { new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show(); @@ -1946,11 +1961,7 @@ CommonPage.Loading.Hide(); UserView.HomePage.Instance.RemoveViewByTag("Logic"); Category.Category.instance?.RefreshBodyView(); - //UserView.HomePage.Instance.RemoveAt("Logic1"); - //Category.Category category = new Category.Category(); - //UserView.HomePage.Instance.AddChidren(category); - //UserView.HomePage.Instance.PageIndex += 1; - //category.Show(2); + }; @@ -2226,14 +2237,7 @@ flMain.RemoveFromParent(); }; - var timetypeframelayout1 = new FrameLayout - { - Width = Application.GetRealWidth(1080), - Height = Application.GetRealHeight(100), - Y = Application.GetRealHeight(1920 - 100), - BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, - }; - flMain.AddChidren(timetypeframelayout1); + var framelayout = new FrameLayout { Width = Application.GetRealWidth(1080), @@ -2243,6 +2247,7 @@ Radius = (uint)Application.GetRealHeight(60), }; flMain.AddChidren(framelayout); + framelayout.SetCornerWithSameRadius(Application.GetRealHeight(58),HDLUtils.RectCornerTopLeft|HDLUtils.RectCornerTopRight); #region -------鍙栨秷 瀹屾垚 var timetype = new RowLayout @@ -2259,6 +2264,7 @@ Width = Application.GetRealWidth(200), X = Application.GetRealWidth(80), TextAlignment = TextAlignment.CenterLeft, + TextSize = 14, }; timetype.AddChidren(Btncancel); Btncancel.MouseUpEventHandler += (sender16, e16) => @@ -2286,6 +2292,7 @@ Width = Application.GetRealWidth(200), TextAlignment = TextAlignment.CenterRight, X = Btntitle.Right + Application.GetRealWidth(100), + TextSize = 14, }; timetype.AddChidren(Btncomplete); @@ -2321,6 +2328,7 @@ TextID = MyInternationalizationString.Allconditions, TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, + TextSize = 14, }; androw.AddChidren(andbtn); @@ -2356,6 +2364,7 @@ TextID = MyInternationalizationString.anycondition, TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, + TextSize = 14, }; orrow.AddChidren(orbtn); -- Gitblit v1.8.0