| | |
| | | {
|
| | | listSelect.Add(i + "%");
|
| | | }
|
| | | //让它处于10的整倍数
|
| | | this.pirConfigure.dimmerLevel = (this.pirConfigure.dimmerLevel / 10) * 10;
|
| | | int index = listSelect.IndexOf(this.pirConfigure.dimmerLevel + "%");
|
| | | //这个百分比的值,直接算
|
| | | int persentValue = HdlDeviceCommonLogic.Current.CalculateLightLevelPersent(this.pirConfigure.dimmerLevel);
|
| | | int index = listSelect.IndexOf(persentValue + "%");
|
| | |
|
| | | //开灯亮度
|
| | | var row1 = new FrameRowControl(listView.rowSpace / 2);
|
| | |
| | | var btnCaption1 = row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uTurnOnBrightness), 400);
|
| | | btnCaption1.TextSize = 15;
|
| | | row1.AddRightArrow();
|
| | | var btnStatu = row1.AddMostRightView(pirConfigure.dimmerLevel + "%", 400);
|
| | | var btnStatu = row1.AddMostRightView(persentValue + "%", 400);
|
| | | row1.AddBottomLine();
|
| | | row1.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PickerView.Show(listSelect, (value) =>
|
| | | {
|
| | | btnStatu.Text = listSelect[value];
|
| | | pirConfigure.dimmerLevel = Convert.ToInt32(listSelect[value].Replace("%", string.Empty));
|
| | |
|
| | | string myValue = listSelect[value].Replace("%", string.Empty);
|
| | | pirConfigure.dimmerLevel = HdlDeviceCommonLogic.Current.CalculateLightLevel(Convert.ToDecimal(myValue));
|
| | | index = value;
|
| | |
|
| | | }, index == -1 ? 0 : index, Language.StringByID(R.MyInternationalizationString.uBrightness),
|
| | | Language.StringByID(R.MyInternationalizationString.uFinish),
|