From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 11 九月 2020 09:16:59 +0800 Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节 --- ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs | 51 +++++++++++++++++++++++++-------------------------- 1 files changed, 25 insertions(+), 26 deletions(-) diff --git a/ZigbeeApp20200828/Shared/Phone/Device/Logic/Nightlight.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs old mode 100644 new mode 100755 similarity index 95% rename from ZigbeeApp20200828/Shared/Phone/Device/Logic/Nightlight.cs rename to ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs index 5ce1f29..1292f36 --- a/ZigbeeApp20200828/Shared/Phone/Device/Logic/Nightlight.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Nightlight.cs @@ -318,44 +318,39 @@ Send.dictionary(brightnessDictionary, "Data2", "0"); Button seekIconBtn = new Button { - Y = Application.GetRealHeight(140 + 154), + Y = Application.GetRealHeight(140 + 160), X = Application.GetRealWidth(78), Height = Application.GetRealHeight(12), - Width = Application.GetRealWidth(918), + Width = Application.GetRealWidth(918 - 120), UnSelectedImagePath = "ZigeeLogic/seek.png", + Gravity = Gravity.CenterHorizontal }; - completeView.Show(2).AddChidren(seekIconBtn); - var horizontalSeekBarVol = new DiyImageSeekBar - { - Y = Application.GetRealHeight(140), - X = Application.GetRealWidth(78), - Width = Application.GetRealWidth(918), - Height = Application.GetRealHeight(320),//婊戝姩鏉$埗鎺т欢楂樺害 - IsProgressTextShow = true,//鏄剧ず鐧惧垎姣� - IsClickable = true,//杩涘害鏉℃槸鍚︽粦鍔� - ProgressBarColor = 0x00000000,// ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹� - SeekBarBackgroundColor = 0x00000000, - ThumbImagePath = "ZigeeLogic/progressbtn2.png",//杩涘害鏉℃寜閽浘鏍� - ThumbImageHeight = Application.GetRealHeight(89),//杩涘害鏉℃寜閽浘鏍囩殑楂樺害锛堥粯璁ゆ鏂瑰舰锛氬鍜岄珮涓�鏍凤級 - ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor, - ProgressTextSize = 9,//鏄剧ず鐧惧垎姣斿瓧浣撳ぇ灏�12 - SeekBarViewHeight = Application.GetRealHeight(12),//杩涘害鏉$殑楂樺害10 - MinValue = 30, - MaxValue = 60, - ProgressBarUnitSring = "K",//鍒囨崲鍗曚綅 - }; + completeView.Show(2).AddChidren(seekIconBtn); + + var horizontalSeekBarVol = new UserCenter.SeekBarControl(918) + { + ProgressBarColor = 0x00000000,// ZigbeeColor.Current.LogicProgressColorSelected,//閫変腑杩涘害鏉¢鑹� + SeekBarBackgroundColor = 0x00000000, + SeekBarViewHeight = Application.GetRealHeight(20), + SeekBarPadding = Application.GetRealWidth(60), + MinValue = 30, + MaxValue = 60, + ProgressChangeDelayTime = 0, + }; completeView.Show(2).AddChidren(horizontalSeekBarVol); + horizontalSeekBarVol.Y = seekIconBtn.Y - (horizontalSeekBarVol.Height - seekIconBtn.Height) / 2; + horizontalSeekBarVol.ShowCustomTextView(Application.GetRealWidth(200), 12, ZigbeeColor.Current.LogicBtnCancelColor); EventHandler<int> progressclick = (sender, e) => { + horizontalSeekBarVol.SetCustomText(e * 100 + "K"); selectedDeviceStatus = "8"; var lightbrightnessvalue = 1000000 / (100 * horizontalSeekBarVol.Progress); Send.dictionary(brightnessDictionary, "Data1", lightbrightnessvalue.ToString()); DicValue("8", brightnessDictionary); - status = horizontalSeekBarVol.Progress.ToString() + "K"; + status =horizontalSeekBarVol.Progress.ToString() + "K"; }; horizontalSeekBarVol.OnProgressChangedEvent += progressclick; horizontalSeekBarVol.OnStopTrackingTouchEvent += progressclick; - if (TaskList != null && TaskList.Count != 0) { @@ -365,12 +360,16 @@ { var intvalue = int.Parse(value["Data1"]); var lightbrightnessvalue = 1000000 / (intvalue * 100); - horizontalSeekBarVol.Progress = lightbrightnessvalue; + horizontalSeekBarVol.Progress = lightbrightnessvalue; + break; } } - } + } + var intValue = horizontalSeekBarVol.Progress; + if (intValue == 0) { intValue = 30; } + horizontalSeekBarVol.SetCustomText(intValue * 100 + "K"); } break; case "铚傞福鍣�": -- Gitblit v1.8.0