CrabtreeOn,印度客户定制APP,迁移2.0平台版本
陈嘉乐
2021-03-26 ba30f4585670341ef85d38fa6545d8e037c6abcd
Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs
@@ -451,7 +451,7 @@
                Height = Application.GetRealHeight (60),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = SkinStyle.Current.TextColor1,
                Text = "ALL",
                Text = timerTemp.RoomName,
            };
            roomContenView.AddChidren (btnRoomChoose);
@@ -485,7 +485,7 @@
            MainPage.Loading.Start ("Please wait...");
            SmartHome.Method mMthod = new SmartHome.Method ();
            var devList = mMthod.GetRoomDeviceList ("ALL");
            var devList = mMthod.GetRoomDeviceList (timerTemp.RoomName);
            InitDeviceListView (devList);
            #region -----Room 点击事件
            btnRoomChoose.MouseUpEventHandler += (sender, e) => {
@@ -540,6 +540,8 @@
                    roomListView.AddChidren (btnLine);
                    btnRoomNameChoose.MouseUpEventHandler += (sd, ds) => {
                        //切换房间清空之前选择数据;
                        selectedDeviceList.Clear ();
                        btnRoomChoose.Text = (sd as Button).Text;
                        //获取设备列表
                        var deviceList = mMthod.GetRoomDeviceList (btnRoomChoose.Text);
@@ -746,16 +748,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 +1127,7 @@
                                            TextColor = SkinStyle.Current.TextColor1,
                                            SelectedTextColor = SkinStyle.Current.TextColor1,
                                            Text = "OFF",
                                            //Text = "",
                                            TextAlignment = TextAlignment.CenterLeft,
                                        };
                                        deviceRowView.AddChidren (btnFanLevel);
@@ -1160,6 +1169,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 +1191,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 { }