//using System; //using System.Collections.Generic; //using HDL_ON.Entity; //using HDL_ON.UI.CSS; //using Shared; //namespace HDL_ON.UI //{ // public class AddOutputSettingPage : FrameLayout // { // FrameLayout bodyView; // VerticalScrolViewLayout contentView; // Button btnOnText; // Button btnBrightnessText; // SecurityAlarm securityAlarm; // Function alarmFunction; // Action refreshAction; // List outputList = new List(); // public AddOutputSettingPage(SecurityAlarm alarm,Function function, Action action) // { // bodyView = this; // securityAlarm = alarm; // refreshAction = action; // alarmFunction = function; // } // public void LoadPage() // { // bodyView.BackgroundColor = CSS_Color.BackgroundColor; // new TopViewDiv(bodyView, Language.StringByID(StringId.AddAlarmTarget)).LoadTopView(); // contentView = new VerticalScrolViewLayout() // { // Y = Application.GetRealHeight(64), // Height = Application.GetRealHeight(520), // ScrollEnabled = false, // }; // bodyView.AddChidren(contentView); // var output = securityAlarm.output.Find((obj) => obj.sid == alarmFunction.sid); // if (output == null) // { // output = new SecurityOutput(); // output.sid = alarmFunction.sid; // } // else // { // output.addCondition = true; // } // inputList.Add(output); // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.OnOff)); // foreach (var attr in alarmFunction.attributes) // { // switch (attr.key) // { // case FunctionAttributeKey.SetTemp: // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.SetTemp)); // break; // case FunctionAttributeKey.Mode: // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.Mode)); // break; // case FunctionAttributeKey.FanSpeed: // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.FanSpeed)); // break; // case FunctionAttributeKey.Percent: // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.Percent)); // break; // case FunctionAttributeKey.Brightness: // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.Brightness)); // break; // case FunctionAttributeKey.FadeTime: // LoadFunctionRow(alarmFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.FadeTime)); // break; // } // } // var bottomView = new FrameLayout() // { // Y = Application.GetRealHeight(591), // Height = Application.GetRealHeight(106), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(16), // }; // bodyView.AddChidren(bottomView); // var btnConfrim = new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(12), // Width = Application.GetRealWidth(220), // Height = Application.GetRealWidth(44), // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.MainBackgroundColor, // BackgroundColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.SubheadingFontSize, // IsBold = true, // Radius = (uint)Application.GetRealWidth(22), // TextID = StringId.Complete // }; // bottomView.AddChidren(btnConfrim); // btnConfrim.MouseUpEventHandler = (sender, e) => // { // }; // } // /// // /// 加载功能Row // /// // void LoadFunctionRow(FunctionAttributes sceneStatus) // { // if (sceneStatus == null) // return; // #region Row code // var row = new FrameLayout() // { // Height = Application.GetRealHeight(50), // BackgroundColor = CSS_Color.MainBackgroundColor, // }; // contentView.AddChidren(row); // if (sceneStatus.key != FunctionAttributeKey.OnOff) // { // row.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); // } // else // { // if (sceneStatus.state == "stop") // { // sceneStatus.state = "on"; // } // } // Button btnRight = new Button() // { // X = Application.GetRealWidth(339), // Gravity = Gravity.CenterVertical, // Width = Application.GetMinRealAverage(16), // Height = Application.GetMinRealAverage(16), // UnSelectedImagePath = "Public/Right.png", // }; // row.AddChidren(btnRight); // var showCode = ""; // var btnFunctionText = new Button() // { // Width = Application.GetRealWidth(330), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // Text = sceneFunctionStatus.GetValueText(showCode) + sceneFunctionStatus.GetUintString() // }; // row.AddChidren(btnFunctionText); // if (sceneStatus.key == FunctionAttributeKey.OnOff) // { // btnOnText = btnFunctionText; // } // else if (sceneStatus.key == FunctionAttributeKey.Brightness || sceneStatus.key == FunctionAttributeKey.Percent) // { // btnBrightnessText = btnFunctionText; // } // var btnFunctionName = new Button() // { // X = Application.GetRealWidth(16), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.SubheadingFontSize, // Text = sceneStatus.GetNameText() // }; // row.AddChidren(btnFunctionName); // btnFunctionName.MouseUpEventHandler = (sender, e) => // { // switch (sceneStatus.key) // { // case FunctionAttributeKey.OnOff: // LoadEditDialog_OnOff(sceneStatus, btnFunctionText); // break; // case FunctionAttributeKey.Brightness: // LoadEditDialog_Percent(sceneStatus, btnFunctionText); // break; // case FunctionAttributeKey.Mode: // var statusList = new List(); // var tr = alarmFunction.localFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.Mode); // foreach (var t in tr.value) // { // statusList.Add(t); // } // LoadEditDialog_FunctionPar(sceneStatus, btnFunctionText, statusList); // break; // case FunctionAttributeKey.FanSpeed: // var fanStatusList = new List(); // var tr1 = alarmFunction.localFunction.attributes.Find((obj) => obj.key == FunctionAttributeKey.FanSpeed); // foreach (var t in tr1.value) // { // fanStatusList.Add(t); // } // LoadEditDialog_FunctionPar(sceneStatus, btnFunctionText, fanStatusList); // break; // case FunctionAttributeKey.SetTemp: // LoadEditDialog_Temp(sceneStatus, btnFunctionText); // break; // case FunctionAttributeKey.FadeTime: // break; // case "cct": // break; // case FunctionAttributeKey.Percent: // LoadEditDialog_Percent(sceneStatus, btnFunctionText); // break; // } // }; // #endregion // } // #region 属性选择弹窗 // /// // /// 加载开关选择弹窗 // /// // /// // /// // void LoadEditDialog_OnOff(SceneFunctionStatus trait, Button btn) // { // Dialog dialog = new Dialog(); // var pView = new FrameLayout() // { // BackgroundColor = CSS_Color.DialogTransparentColor1, // }; // dialog.AddChidren(pView); // var optionBaseView = new FrameLayout() // { // Y = Application.GetRealHeight(500), // Height = Application.GetRealHeight(160), // AnimateSpeed = 0.3f, // Animate = Animate.DownToUp, // }; // pView.AddChidren(optionBaseView); // var optionView = new VerticalScrolViewLayout() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(100), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // ScrollEnabled = false, // }; // optionBaseView.AddChidren(optionView); // var btnOn = new Button() // { // Height = Application.GetRealHeight(50), // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.TextualColor, // SelectedTextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.SubheadingFontSize, // TextID = StringId.On, // IsSelected = trait.value.ToString() == "on" // }; // optionView.AddChidren(btnOn); // optionView.AddChidren(new Button() { Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); // var btnOff = new Button() // { // Height = Application.GetRealHeight(50), // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.TextualColor, // SelectedTextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.SubheadingFontSize, // TextID = StringId.OFF, // IsSelected = trait.value.ToString() == "off" // }; // optionView.AddChidren(btnOff); // var btnCancel = new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(8) + optionView.Bottom, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(50), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // TextID = StringId.Cancel, // TextColor = CSS_Color.WarningColor, // TextSize = CSS_FontSize.SubheadingFontSize, // }; // optionBaseView.AddChidren(btnCancel); // dialog.Show(); // pView.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // }; // btnCancel.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // }; // btnOn.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // trait.value = "on"; // alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff).value = "on"; // btn.Text = trait.GetValueText() + trait.GetUintString(); // var temp = alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness); // if (temp == null) // { // temp = alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Percent); // } // if (temp != null) // { // if (temp.value == "0") // { // temp.value = "100"; // } // btnBrightnessText.Text = temp.GetValueText() + "%"; // } // }; // btnOff.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // trait.value = "off"; // alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff).value = "off"; // btn.Text = trait.GetValueText() + trait.GetUintString(); // var temp = alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness); // if (temp == null) // { // temp = alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Percent); // } // if (temp != null) // { // if (temp.value != "0") // { // temp.value = "0"; // } // btnBrightnessText.Text = temp.GetValueText() + "%"; // } // }; // } // /// // /// 加载温度选择弹窗 // /// // /// // /// // void LoadEditDialog_Temp(SceneFunctionStatus trait, Button btn) // { // double temp = 16; // double.TryParse(trait.value, out temp); // trait.value = temp.ToString(); // List pickerItems = new List(); // if (trait == null) // { // return; // } // Dialog dialog = new Dialog(); // var pView = new FrameLayout() // { // BackgroundColor = CSS_Color.DialogTransparentColor1, // }; // dialog.AddChidren(pView); // var optionBaseView = new FrameLayout() // { // Y = Application.GetRealHeight(456 - 60), // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(260), // AnimateSpeed = 0.3f, // Animate = Animate.DownToUp, // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // pView.AddChidren(optionBaseView); // var topView = new FrameLayout() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(40), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // optionBaseView.AddChidren(topView); // topView.AddChidren(new Button() { Y = Application.GetRealHeight(39), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); // var btnCancel = new Button() // { // X = Application.GetRealWidth(21), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Cancel, // }; // topView.AddChidren(btnCancel); // var btnConfrim = new Button() // { // Width = Application.GetRealWidth(320), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Confirm, // }; // topView.AddChidren(btnConfrim); // UIPickerView uIPickerView = new UIPickerView() // { // Y = Application.GetRealHeight(40), // Height = Application.GetRealHeight(210), // Radius = (uint)Application.GetRealWidth(12), // }; // for (int i = 16; i <= 32; i += 1) // { // pickerItems.Add(i.ToString() + trait.GetUintString()); // } // uIPickerView.setNPicker(pickerItems, null, null); // optionBaseView.AddChidren(uIPickerView); // uIPickerView.setCurrentItems(pickerItems.IndexOf(trait.value.ToString()), 4, 5); // string selectItem = pickerItems[0]; // if (pickerItems.Contains(trait.value + trait.GetUintString())) // { // selectItem = trait.value.ToString() + trait.GetUintString(); // } // dialog.Show(); // pView.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // }; // btnCancel.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // }; // uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => { // selectItem = pickerItems[int1]; // }; // btnConfrim.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // btn.Text = selectItem; // //sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff).value = trait.value.ToString() ; // trait.value = selectItem.Replace(trait.GetUintString(), ""); // }; // } // /// // /// 加载亮度选择弹窗 // /// // /// // /// // void LoadEditDialog_Percent(SceneFunctionStatus trait, Button btn) // { // if (trait == null) // { // return; // } // Dialog dialog = new Dialog(); // var pView = new FrameLayout() // { // BackgroundColor = CSS_Color.DialogTransparentColor1, // }; // dialog.AddChidren(pView); // var optionBaseView = new FrameLayout() // { // Y = Application.GetRealHeight(467), // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(180), // AnimateSpeed = 0.3f, // Animate = Animate.DownToUp, // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // pView.AddChidren(optionBaseView); // var topView = new FrameLayout() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(40), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // optionBaseView.AddChidren(topView); // topView.AddChidren(new Button() { Y = Application.GetRealHeight(39), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); // var btnTitle = new Button() // { // Gravity = Gravity.CenterHorizontal, // TextAlignment = TextAlignment.Center, // Width = Application.GetRealWidth(100), // Text = trait.GetNameText(), // IsBold = true, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.SubheadingFontSize, // }; // topView.AddChidren(btnTitle); // var btnCancel = new Button() // { // X = Application.GetRealWidth(21), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Cancel, // }; // topView.AddChidren(btnCancel); // var btnConfrim = new Button() // { // Width = Application.GetRealWidth(320), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Confirm, // }; // topView.AddChidren(btnConfrim); // Button btnMinusSignIcon = new Button() // { // X = Application.GetRealWidth(26), // Y = Application.GetRealHeight(118), // Width = Application.GetMinRealAverage(24), // Height = Application.GetMinRealAverage(24), // UnSelectedImagePath = "Public/MinusSignIcon.png", // }; // optionBaseView.AddChidren(btnMinusSignIcon); // DiyImageSeekBar controlBar = new DiyImageSeekBar() // { // X = btnMinusSignIcon.Right + Application.GetRealWidth(12), // Y = Application.GetRealHeight(100),//414,设计数据 // Width = Application.GetRealWidth(220), // Height = Application.GetRealHeight(54), // SeekBarViewHeight = Application.GetRealHeight(8), // ThumbImagePath = "Public/ThumbImage.png", // ThumbImageHeight = Application.GetRealHeight(54), // ProgressBarColor = CSS_Color.MainColor, // ProgressTextColor = CSS_Color.FirstLevelTitleColor, // ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel, // MaxValue = 100, // Progress = trait.value.ToString().Replace("{}", "") == "" ? 0 : Convert.ToInt32(trait.value.Replace("{}", "")), // SeekBarPadding = Application.GetRealWidth(20), // }; // optionBaseView.AddChidren(controlBar); // Button btnPlusSgnIcon = new Button() // { // X = controlBar.Right + Application.GetRealWidth(12), // Y = Application.GetRealHeight(118), // Width = Application.GetMinRealAverage(24), // Height = Application.GetMinRealAverage(24), // UnSelectedImagePath = "Public/PlusSignIcon.png", // }; // optionBaseView.AddChidren(btnPlusSgnIcon); // btnMinusSignIcon.MouseUpEventHandler = (sender, e) => // { // controlBar.Progress--; // }; // btnPlusSgnIcon.MouseUpEventHandler = (sender, e) => // { // controlBar.Progress++; // }; // dialog.Show(); // pView.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // }; // btnCancel.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // }; // btnConfrim.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // trait.value = controlBar.Progress.ToString(); // btn.Text = trait.value + trait.GetUintString(); // var temp = alarmFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff); // if (temp != null) // { // if (controlBar.Progress > 0) // { // temp.value = "on"; // } // else // { // temp.value = "off"; // } // btnOnText.Text = temp.GetValueText(); // } // }; // } // /// // /// 加载变化速度选择弹窗 // /// // /// // /// // void LoadEditDialog_FadeTime(SceneFunctionStatus trait, Button btn) // { // if (trait == null) // { // return; // } // Dialog dialog = new Dialog(); // var pView = new FrameLayout() // { // BackgroundColor = CSS_Color.DialogTransparentColor1, // }; // dialog.AddChidren(pView); // var optionBaseView = new FrameLayout() // { // Y = Application.GetRealHeight(467), // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(180), // AnimateSpeed = 0.3f, // Animate = Animate.DownToUp, // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // pView.AddChidren(optionBaseView); // var topView = new FrameLayout() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(40), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // optionBaseView.AddChidren(topView); // topView.AddChidren(new Button() { Y = Application.GetRealHeight(39), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor }); // var btnTitle = new Button() // { // Gravity = Gravity.CenterHorizontal, // TextAlignment = TextAlignment.Center, // Width = Application.GetRealWidth(100), // Text = trait.GetNameText(), // IsBold = true, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.SubheadingFontSize, // }; // topView.AddChidren(btnTitle); // var btnCancel = new Button() // { // X = Application.GetRealWidth(21), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Cancel, // }; // topView.AddChidren(btnCancel); // var btnConfrim = new Button() // { // Width = Application.GetRealWidth(320), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Confirm, // }; // topView.AddChidren(btnConfrim); // Button btnMinusSignIcon = new Button() // { // X = Application.GetRealWidth(26), // Y = Application.GetRealHeight(118), // Width = Application.GetMinRealAverage(24), // Height = Application.GetMinRealAverage(24), // Text = "0s", // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // }; // optionBaseView.AddChidren(btnMinusSignIcon); // DiyImageSeekBar controlBar = new DiyImageSeekBar() // { // X = btnMinusSignIcon.Right + Application.GetRealWidth(12), // Y = Application.GetRealHeight(100),//414,设计数据 // Width = Application.GetRealWidth(220), // Height = Application.GetRealHeight(54), // SeekBarViewHeight = Application.GetRealHeight(8), // ThumbImagePath = "Public/ThumbImage.png", // ThumbImageHeight = Application.GetRealHeight(54), // ProgressBarColor = CSS_Color.MainColor, // ProgressTextColor = CSS_Color.FirstLevelTitleColor, // ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel, // MaxValue = 100, // Progress = trait.value.ToString().Replace("{}", "") == "" ? 0 : Convert.ToInt32(trait.value.Replace("{}", "")), // SeekBarPadding = Application.GetRealWidth(20), // }; // optionBaseView.AddChidren(controlBar); // Button btnPlusSgnIcon = new Button() // { // X = controlBar.Right + Application.GetRealWidth(12), // Y = Application.GetRealHeight(118), // Width = Application.GetMinRealAverage(24), // Height = Application.GetMinRealAverage(24), // Text = "10s", // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // }; // optionBaseView.AddChidren(btnPlusSgnIcon); // btnMinusSignIcon.MouseUpEventHandler = (sender, e) => // { // controlBar.Progress--; // }; // btnPlusSgnIcon.MouseUpEventHandler = (sender, e) => // { // controlBar.Progress++; // }; // dialog.Show(); // pView.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // }; // btnCancel.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // }; // btnConfrim.MouseUpEventHandler = (sender, e) => // { // dialog.Close(); // trait.value = controlBar.Progress.ToString(); // btn.Text = trait.value + trait.GetUintString(); // }; // } // /// // /// 加载功能属性数据选择弹窗 // /// // void LoadEditDialog_FunctionPar(SceneFunctionStatus trait, Button btn, List statusList) // { // Button lastButton = new Button(); // var lastData = ""; // var lastText = ""; // Dialog dialog = new Dialog(); // if (DB_ResidenceData.Instance.GatewayType == 0) // { // if (SPK.AcSpkList().Contains(alarmFunction.localFunction.spk)) // { // //0 制冷1制热,2通风,3自动,4除湿 // for (int i = 0; i < statusList.Count; i++) // { // if (statusList[i] == "0") // { // statusList[i] = "cool"; // } // else if (statusList[i] == "1") // { // statusList[i] = "heat"; // } // else if (statusList[i] == "2") // { // statusList[i] = "fan"; // } // else if (statusList[i] == "3") // { // statusList[i] = "auto"; // } // else if (statusList[i] == "4") // { // statusList[i] = "dry"; // } // } // } // else if (SPK.FhSpkList().Contains(alarmFunction.localFunction.spk)) // { // //1:普通,2:白天,3:夜晚,4:离开,5:时间 // for (int i = 0; i < statusList.Count; i++) // { // if (statusList[i] == "5") // { // statusList[i] = "timer"; // } // else if (statusList[i] == "1") // { // statusList[i] = "normal"; // } // else if (statusList[i] == "2") // { // statusList[i] = "day"; // } // else if (statusList[i] == "3") // { // statusList[i] = "night"; // } // else if (statusList[i] == "4") // { // statusList[i] = "away"; // } // } // } // } // var pView = new FrameLayout() // { // BackgroundColor = CSS_Color.DialogTransparentColor1, // }; // dialog.AddChidren(pView); // var optionBaseView = new FrameLayout() // { // Y = Application.GetRealHeight(579 - 50 * statusList.Count), // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(50 * statusList.Count + 50), // AnimateSpeed = 0.3f, // Animate = Animate.DownToUp, // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // pView.AddChidren(optionBaseView); // var topView = new FrameLayout() // { // Gravity = Gravity.CenterHorizontal, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(50), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(12), // }; // optionBaseView.AddChidren(topView); // var btnTitle = new Button() // { // Gravity = Gravity.CenterHorizontal, // TextAlignment = TextAlignment.Center, // Width = Application.GetRealWidth(100), // Text = trait.GetNameText(), // IsBold = true, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.SubheadingFontSize, // }; // topView.AddChidren(btnTitle); // var btnCancel = new Button() // { // X = Application.GetRealWidth(21), // Width = Application.GetRealWidth(100), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Cancel, // }; // topView.AddChidren(btnCancel); // var btnConfrim = new Button() // { // Width = Application.GetRealWidth(320), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.TextFontSize, // TextID = StringId.Complete, // }; // topView.AddChidren(btnConfrim); // int hei = 1; // foreach (var m in statusList) // { // var row = new FrameLayout() // { // Y = Application.GetRealHeight(50 * hei), // Height = Application.GetRealHeight(50), // }; // optionBaseView.AddChidren(row); // if (statusList.Count > hei) // { // optionBaseView.AddChidren(new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = row.Bottom, // Width = Application.GetRealWidth(343), // BackgroundColor = CSS_Color.DividingLineColor, // Height = 1, // }); // } // hei++; // var btnChoose = new Button() // { // X = Application.GetRealWidth(303), // Gravity = Gravity.CenterVertical, // Width = Application.GetMinRealAverage(28), // Height = Application.GetMinRealAverage(28), // UnSelectedImagePath = "Public/ChooseIcon.png", // SelectedImagePath = "Public/ChooseOnIcon.png", // }; // row.AddChidren(btnChoose); // if (trait.value == m) // { // lastButton = btnChoose; // btnChoose.IsSelected = true; // } // var btnPropertyTitle = new Button() // { // X = Application.GetRealWidth(16), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.TextFontSize, // Tag = m, // Text = trait.GetValueText(m) // }; // row.AddChidren(btnPropertyTitle); // btnPropertyTitle.MouseUpEventHandler = (sender, e) => { // btnChoose.IsSelected = true; // if (lastButton != null) // { // lastButton.IsSelected = false; // } // lastButton = btnChoose; // lastData = btnPropertyTitle.Tag.ToString(); // lastText = btnPropertyTitle.Text; // }; // } // dialog.Show(); // pView.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // }; // btnCancel.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // }; // btnConfrim.MouseUpEventHandler = (sender, e) => { // dialog.Close(); // trait.value = lastData; // //sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff).value = trait.curValue.ToString() ; // btn.Text = lastText; // }; // } // #endregion // } //}