| | |
| | | /// mArcScaleSeekBar |
| | | /// </summary> |
| | | private ArcScaleSeekBar mArcScaleSeekBar = new ArcScaleSeekBar { }; |
| | | /// <summary> |
| | | /// 清洁状态 |
| | | /// </summary> |
| | | private LeftIconButtonRow cleanStatu; |
| | | |
| | | /// <summary> |
| | | /// IsDrawerLockMode |
| | | /// </summary> |
| | | public bool IsDrawerLockMode; |
| | | #endregion |
| | | |
| | | #region ◆ 接口___________________________ |
| | |
| | | FanSwingModeBtn.IsSelected = true; |
| | | } |
| | | break; |
| | | |
| | | case 4097: |
| | | //过虑网清洗标志:42 |
| | | ac.CleanStatu = attriButeList[0].AttriButeData == 42; |
| | | cleanStatu.Visible = ac.CleanStatu; |
| | | break; |
| | | |
| | | case 4099: |
| | | var value = Convert.ToString(attriButeList[0].AttriButeData, 2).PadLeft(16, '0'); |
| | | var modeStr = value.Substring(value.Length - 5, 5); |
| | | for (int j = 0; j < modeStr.Length; j++) |
| | | { |
| | | ac.listSupportMode[j] = Convert.ToInt32(modeStr[j]) == 49 ? 1 : 0; |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor; |
| | | ZigBee.Device.ZbGateway.StatusList.Add(this); |
| | | HomePage.Instance.ScrollEnabled = false; |
| | | |
| | | } |
| | | |
| | | #endregion |
| | |
| | | //action = null; |
| | | RemoveUpdateControlDeviceStatuAction(); |
| | | HomePage.Instance.ScrollEnabled = true; |
| | | if (IsDrawerLockMode) |
| | | { |
| | | CommonPage.Instance.IsDrawerLockMode = false; |
| | | } |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | |
| | | ac.ReadFanMode(); |
| | | ac.ReadSystemMode(); |
| | | ac.ReadSystemFansSwingMode(); |
| | | ac.ReadModeSupport(); |
| | | ac.ReadCleanStatu(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | ac.ReadFanMode(); |
| | | ac.ReadSystemMode(); |
| | | ac.ReadSystemFansSwingMode(); |
| | | ac.ReadModeSupport(); |
| | | ac.ReadCleanStatu(); |
| | | } |
| | | } |
| | | |
| | |
| | | collectionBtn.IsSelected = true; |
| | | } |
| | | |
| | | |
| | | BindEvent(); |
| | | |
| | | } |
| | | |
| | | #endregion |
| | |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | var moreBtn = new Button |
| | | { |
| | | X = Application.GetRealWidth(953), |
| | |
| | | top.topView.AddChidren(moreBtn); |
| | | |
| | | moreBtn.MouseUpEventHandler += More; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// AddBodyView |
| | |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor |
| | | }; |
| | | bodyFrameLayout.AddChidren(itemView); |
| | | |
| | | cleanStatu = new LeftIconButtonRow(400, 80, 0, 20); |
| | | itemView.AddChidren(cleanStatu); |
| | | cleanStatu.Init("AC/AC_TIP.png", "AC/AC_TIP.png", Language.StringByID(R.MyInternationalizationString.NeedCleanAC), false); |
| | | cleanStatu.Visible = false; |
| | | |
| | | collectionBtn = new Button() |
| | | { |
| | |
| | | itemView.AddChidren(mArcScaleSeekBar); |
| | | mArcScaleSeekBar.OnStopTrackingTouchEvent += (sender, e) => |
| | | { |
| | | //cool //dry |
| | | if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8) |
| | | { |
| | | ac.currentCoolingSetpoint = e; |
| | | ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100); |
| | | } |
| | | //heat |
| | | else if (ac.currentSystemMode == 4) |
| | | { |
| | | ac.currentHeatingSetpoint = e; |
| | | ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100); |
| | | } |
| | | //auto |
| | | else if (ac.currentSystemMode == 1) |
| | | { |
| | | ac.currentAutoSetpoint = e; |
| | |
| | | } |
| | | }; |
| | | |
| | | //当前模式 |
| | | currentModeBtn = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(599), |
| | |
| | | Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode) |
| | | }; |
| | | itemView.AddChidren(currentModeBtn); |
| | | //降低温度 |
| | | |
| | | reduceTemperatureBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(268), |
| | |
| | | }; |
| | | itemView.AddChidren(reduceTemperatureBtn); |
| | | |
| | | //添加温度 |
| | | addTemperatureBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(628), |
| | |
| | | }; |
| | | itemView.AddChidren(addTemperatureBtn); |
| | | |
| | | //扫风 |
| | | FanSwingModeBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(156), |
| | |
| | | }; |
| | | itemView.AddChidren(FanSwingModeBtn); |
| | | |
| | | //模式 |
| | | modeBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(346), |
| | |
| | | }; |
| | | itemView.AddChidren(modeBtn); |
| | | |
| | | //开关 |
| | | switchBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(536), |
| | |
| | | }; |
| | | itemView.AddChidren(switchBtn); |
| | | |
| | | //风速 |
| | | fanModeBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(729), |
| | |
| | | }; |
| | | closeBGview.AddChidren(changeModeBG); |
| | | |
| | | var changeModeFL = new FrameLayout() |
| | | var changeModeFL = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(230), |
| | | Y = Application.GetRealHeight(450), |
| | | Height = Application.GetRealHeight(900), |
| | | Width = Application.GetRealWidth(modeItem_Width), |
| | | Radius = CommonPage.BigFormRadius, |
| | | Radius = CommonFormResouce.BigFormRadius, |
| | | BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor, |
| | | //BackgroundIagePath="AC/SelectedModeBG.png" |
| | | }; |
| | |
| | | Height = Application.GetRealHeight(modeItem_Height), |
| | | Tag = ZigBee.Device.AC.AcMode.Auto |
| | | }; |
| | | changeModeFL.AddChidren(mode_Auto); |
| | | if (ac.listSupportMode[4] == 1) |
| | | { |
| | | changeModeFL.AddChidren(mode_Auto); |
| | | } |
| | | mode_Auto.Init("AC/Mode_Auto.png", "AC/Mode_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Auto)); |
| | | |
| | | var mode_Cool = new CommonForm.ACLeftIconButtonRowLayout() |
| | |
| | | Height = Application.GetRealHeight(modeItem_Height), |
| | | Tag = ZigBee.Device.AC.AcMode.Cool |
| | | }; |
| | | changeModeFL.AddChidren(mode_Cool); |
| | | if (ac.listSupportMode[0] == 1) |
| | | { |
| | | changeModeFL.AddChidren(mode_Cool); |
| | | } |
| | | mode_Cool.Init("AC/Mode_Cool.png", "AC/Mode_CoolSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Cool)); |
| | | |
| | | var mode_Heat = new CommonForm.ACLeftIconButtonRowLayout() |
| | |
| | | Height = Application.GetRealHeight(modeItem_Height), |
| | | Tag = ZigBee.Device.AC.AcMode.Heat |
| | | }; |
| | | changeModeFL.AddChidren(mode_Heat); |
| | | if (ac.listSupportMode[1] == 1) |
| | | { |
| | | changeModeFL.AddChidren(mode_Heat); |
| | | } |
| | | mode_Heat.Init("AC/Mode_Heat.png", "AC/Mode_HeatSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Heat)); |
| | | |
| | | var mode_Dry = new CommonForm.ACLeftIconButtonRowLayout() |
| | |
| | | Height = Application.GetRealHeight(modeItem_Height), |
| | | Tag = ZigBee.Device.AC.AcMode.Dry |
| | | }; |
| | | changeModeFL.AddChidren(mode_Dry); |
| | | if (ac.listSupportMode[3] == 1) |
| | | { |
| | | changeModeFL.AddChidren(mode_Dry); |
| | | } |
| | | mode_Dry.Init("AC/Mode_Dry.png", "AC/Mode_DrySelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Dry)); |
| | | |
| | | var mode_Fan = new CommonForm.ACLeftIconButtonRowLayout() |
| | |
| | | Height = Application.GetRealHeight(modeItem_Height), |
| | | Tag = ZigBee.Device.AC.AcMode.FanOnly |
| | | }; |
| | | changeModeFL.AddChidren(mode_Fan); |
| | | if (ac.listSupportMode[2] == 1) |
| | | { |
| | | changeModeFL.AddChidren(mode_Fan); |
| | | } |
| | | mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly), false); |
| | | |
| | | |
| | | mode_Auto.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent; |
| | | mode_Auto.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent; |
| | |
| | | ac.currentSystemMode = (int)acMode; |
| | | mArcScaleSeekBar.Progress = ACControlBase.GetCurrentModeTemperature(ac); |
| | | ac.SetSystemModeAsync(acMode); |
| | | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 切换扫风___________________________ |
| | | #region ◆ 切换扫风______________________ |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | mode = ZigBee.Device.AC.FanSwingMode.Fifth; |
| | | } |
| | | |
| | | |
| | | ChangeFanSwing(mode); |
| | | } |
| | | |
| | |
| | | ACControlBase.ShowACIsCloseTip(); |
| | | return; |
| | | } |
| | | //cool //dry |
| | | if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8) |
| | | { |
| | | if (ac.currentCoolingSetpoint >= ACControlBase.Temperature_High) |
| | |
| | | } |
| | | ac.currentCoolingSetpoint += 1; |
| | | ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100); |
| | | //currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} °C"; |
| | | mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint; |
| | | } |
| | | //heat |
| | | else if (ac.currentSystemMode == 4) |
| | | { |
| | | if (ac.currentHeatingSetpoint >= ACControlBase.Temperature_High) |
| | |
| | | } |
| | | ac.currentHeatingSetpoint += 1; |
| | | ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100); |
| | | //currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} °C"; |
| | | mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint; |
| | | } |
| | | //auto |
| | | else if (ac.currentSystemMode == 1) |
| | | { |
| | | if (ac.currentAutoSetpoint >= ACControlBase.Temperature_High) |
| | |
| | | } |
| | | ac.currentAutoSetpoint += 1; |
| | | ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100); |
| | | //currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} °C"; |
| | | mArcScaleSeekBar.Progress = ac.currentAutoSetpoint; |
| | | } |
| | | |
| | | } |
| | | |
| | | #endregion |
| | |
| | | ACControlBase.ShowACIsCloseTip(); |
| | | return; |
| | | } |
| | | //cool //dry |
| | | if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8) |
| | | { |
| | | if (ac.currentCoolingSetpoint <= ACControlBase.Temperature_Low) |
| | |
| | | } |
| | | ac.currentCoolingSetpoint -= 1; |
| | | ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint * 100); |
| | | |
| | | //currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} °C"; |
| | | mArcScaleSeekBar.Progress = ac.currentCoolingSetpoint; |
| | | } |
| | | //heat |
| | | else if (ac.currentSystemMode == 4) |
| | | { |
| | | if (ac.currentHeatingSetpoint <= ACControlBase.Temperature_Low) |
| | |
| | | } |
| | | ac.currentHeatingSetpoint -= 1; |
| | | ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint * 100); |
| | | |
| | | //currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} °C"; |
| | | mArcScaleSeekBar.Progress = ac.currentHeatingSetpoint; |
| | | } |
| | | //auto |
| | | else if (ac.currentSystemMode == 1) |
| | | { |
| | | if (ac.currentAutoSetpoint <= ACControlBase.Temperature_Low) |
| | |
| | | } |
| | | ac.currentAutoSetpoint -= 1; |
| | | ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint * 100); |
| | | |
| | | //currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} °C"; |
| | | mArcScaleSeekBar.Progress = ac.currentAutoSetpoint; |
| | | } |
| | | |
| | | } |
| | | |
| | | #endregion |
| | |
| | | /// </summary> |
| | | private void RemoveUpdateControlDeviceStatuAction() |
| | | { |
| | | //移除action |
| | | if (zbGateway != null) |
| | | { |
| | | zbGateway.ReportAction -= UpdateDeviceControllStatu; |
| | |
| | | /// <param name="e">E.</param> |
| | | private void Collection(object sender, MouseEventArgs e) |
| | | { |
| | | //collection |
| | | if (collectionBtn.IsSelected) |
| | | { |
| | | Shared.Common.Room.Lists[0].DeleteDevice(device.FileName); |
| | |
| | | private void BackToRoomHandler(object sender, MouseEventArgs mouseEventArgs) |
| | | { |
| | | //backToRoom |
| | | |
| | | } |
| | | |
| | | #endregion |