From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs | 80 ++++++++++++++++++++++++++------------- 1 files changed, 53 insertions(+), 27 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs index 77a0925..1d9e42b 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Illumination.cs @@ -22,7 +22,7 @@ { RemoveFromParent(); }; - FrameLayout middle = new FrameLayout + FrameLayout middle= new FrameLayout { Y = view.topRowLayout.Bottom, Height = Application.GetRealHeight(Method.H - 184), @@ -47,34 +47,35 @@ //TextID = MyInternationalizationString.Save, TextColor = ZigbeeColor.Current.LogicBtnCancelColor, TextSize = 12, + TextAlignment=TextAlignment.CenterLeft, }; - middle.AddChidren(illuminationBtn); + blankFraLayout.AddChidren(illuminationBtn); //-鍥炬爣鎺т欢 Button lessBtn = new Button { X = Application.GetRealWidth(847), Y = Application.GetRealHeight(46), - Height = Application.GetMinRealAverage(104), - Width = Application.GetMinRealAverage(104), + Height = Application.GetRealWidth(104), + Width = Application.GetRealWidth(104), UnSelectedImagePath = "ZigeeLogic/lesLuminositys.png", }; - middle.AddChidren(lessBtn); + blankFraLayout.AddChidren(lessBtn); //+鍥炬爣鎺т欢 Button addBtn = new Button { X = lessBtn.Right, Y = Application.GetRealHeight(46), - Height = Application.GetMinRealAverage(104), - Width = Application.GetMinRealAverage(104), + Height = Application.GetRealWidth(104), + Width = Application.GetRealWidth(104), UnSelectedImagePath = "ZigeeLogic/addLuminosity.png", }; - middle.AddChidren(addBtn); + blankFraLayout.AddChidren(addBtn); //杩涘害鏉℃帶浠� var horizontalSeekBarVol = new DiyImageSeekBar { Y = Application.GetRealHeight(173),//杩涘害鏉$埗鎺т欢Y鍧愭爣 - X = Application.GetRealWidth(104),//杩涘害鏉鍧愭爣 - Width = Application.GetRealWidth(873),//杩涘害鏉$殑闀垮害 + X = Application.GetRealWidth(104-20),//杩涘害鏉鍧愭爣 + Width = Application.GetRealWidth(873+40),//杩涘害鏉$殑闀垮害 Height = Application.GetRealHeight(56),//杩涘害鏉$埗鎺т欢楂樺害 IsProgressTextShow = false,//鏄剧ず鐧惧垎姣� IsClickable = true,//杩涘害鏉℃槸鍚︽粦鍔� @@ -89,7 +90,7 @@ MinValue = 0, Progress = progresValue, }; - middle.AddChidren(horizontalSeekBarVol); + blankFraLayout.AddChidren(horizontalSeekBarVol); lessBtn.MouseUpEventHandler += (sender, e) => { horizontalSeekBarVol.Progress = horizontalSeekBarVol.Progress - 1; @@ -109,32 +110,57 @@ Button text1Btn = new Button() { - X = Application.GetRealWidth(81), + X = Application.GetRealWidth(95), Y = Application.GetRealHeight(426 - 184), - Height = Application.GetRealHeight(100), - Width = Application.GetRealWidth(63+15), - Text = Language.StringByID(MyInternationalizationString.dark).Replace("{\\r\\n}", "\r\n"), + Height = Application.GetRealHeight(50), + Width = Application.GetRealWidth(100), + Text = Language.StringByID(MyInternationalizationString.dark), TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, TextSize = 12, - TextAlignment = TextAlignment.Center, - IsMoreLines = true, + TextAlignment = TextAlignment.CenterLeft, }; - middle.AddChidren(text1Btn); + blankFraLayout.AddChidren(text1Btn); + + Button text0Btn = new Button() + { + X = Application.GetRealWidth(81), + Y = text1Btn.Bottom, + Height = Application.GetRealHeight(50), + Width = Application.GetRealWidth(100), + Text = "0lux", + TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, + TextSize = 12, + TextAlignment = TextAlignment.CenterLeft, + }; + blankFraLayout.AddChidren(text0Btn); Button text2Btn = new Button() { - X = Application.GetRealWidth(913-20), + X = Application.GetRealWidth(950), Y = Application.GetRealHeight(426 - 184), - Height = Application.GetRealHeight(100), - Width = Application.GetRealWidth(109+20), - Text = Language.StringByID(MyInternationalizationString.bright).Replace("{\\r\\n}", "\r\n"), + Height = Application.GetRealHeight(50), + Width = Application.GetRealWidth(100), + Text = Language.StringByID(MyInternationalizationString.bright), TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, TextSize = 12, - TextAlignment = TextAlignment.Center, - IsMoreLines = true, + TextAlignment = TextAlignment.CenterLeft, }; - middle.AddChidren(text2Btn); + blankFraLayout.AddChidren(text2Btn); + + Button text100Btn = new Button() + { + X = Application.GetRealWidth(913), + Y = text2Btn.Bottom, + Height = Application.GetRealHeight(50), + Width = Application.GetRealWidth(109+17), + Text = "100lux", + TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, + TextSize = 12, + TextAlignment = TextAlignment.CenterLeft, + }; + blankFraLayout.AddChidren(text100Btn); + //鎻愮ず鍥炬爣 Button tipIconBtn = new Button { @@ -144,7 +170,7 @@ Width = Application.GetMinRealAverage(58), UnSelectedImagePath = "ZigeeLogic/tipIcon.png", }; - middle.AddChidren(tipIconBtn); + blankFraLayout.AddChidren(tipIconBtn); //鎻愮ず鏂囧瓧 Button tipTextBtn = new Button() @@ -160,7 +186,7 @@ IsMoreLines = true, }; - middle.AddChidren(tipTextBtn); + blankFraLayout.AddChidren(tipTextBtn); //淇濆瓨鎺т欢 LogicView.SaveView saveView = new LogicView.SaveView(); -- Gitblit v1.8.0