CrabtreeOn,印度客户定制APP,迁移2.0平台版本
JLChen
2021-03-24 c13629a73204e22b83a383c4474a0b3633df1084
Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
@@ -746,16 +746,22 @@
            };
            dialog.AddChidren (chooseTimeBodyView);
            var chooseTime = new UIPickerView () {
            var timeView = new FrameLayout () {
                Y = Application.GetRealHeight (1136 - 420 - 90),
                Height = Application.GetRealHeight (420),
                BackgroundColor = 0xFFD7D7D7,
                //BackgroundColor = SkinStyle.Current.ViewColor,
                BackgroundColor = SkinStyle.Current.ViewColor,
            };
            chooseTimeBodyView.AddChidren (chooseTime);
            chooseTimeBodyView.AddChidren (timeView);
            var chooseTime = new UIPickerView () {
                Height = Application.GetRealHeight (400),
                BackgroundColor = SkinStyle.Current.Transparent,
                Gravity = Gravity.CenterVertical
            };
            timeView.AddChidren (chooseTime);
            var bottomView = new FrameLayout () {
                Y = chooseTime.Bottom,
                Y = timeView.Bottom,
                Height = Application.GetRealHeight (90) + 1,
                BackgroundColor = 0xFFD7D7D7,
            };
@@ -1119,6 +1125,7 @@
                                            TextColor = SkinStyle.Current.TextColor1,
                                            SelectedTextColor = SkinStyle.Current.TextColor1,
                                            Text = "OFF",
                                            //Text = "",
                                            TextAlignment = TextAlignment.CenterLeft,
                                        };
                                        deviceRowView.AddChidren (btnFanLevel);
@@ -1160,6 +1167,11 @@
                                                btnChoose.IsSelected = true;
                                            }
                                            value = e.ToString ();
                                            if (value == "0") {
                                                btnFanLevel.Text = "OFF";
                                            } else {
                                                btnFanLevel.Text = value;
                                            }
                                            DeviceDateFun (btnChoose.Tag as Function, value, btnChoose.IsSelected);
                                        };
@@ -1177,15 +1189,13 @@
                                                    for (int a = 0; a < dev.attributes.Count; a++) {
                                                        var fundev = dev.attributes [a];
                                                        if (fundev.key == "fan_speed_percent") {
                                                           // if (fundev.value == "0") {
                                                              //  btnLevel.Text = "OFF";
                                                          //  } else {
                                                                fanLevel.Progress = int.Parse (fundev.value);
                                                           // }
                                                            fanLevel.Progress = int.Parse (fundev.value);
                                                            if (fundev.value == "0") {
                                                                btnFanLevel.Text = "OFF";
                                                            } else {
                                                                btnFanLevel.Text = fundev.value;
                                                            }
                                                        }
                                                    }
                                                }
                                            } catch { }