| | |
| | | //清洗滤网提示的FrameLayout
|
| | | this.frameClrean = new FrameLayout();
|
| | | frameClrean.Width = Application.GetRealWidth(600);
|
| | | frameClrean.Height = Application.GetMinRealAverage(69);
|
| | | frameClrean.X = ControlCommonResourse.XXLeft;
|
| | | frameClrean.Height = this.GetPictrueRealSize(69);
|
| | | frameClrean.X = HdlControlResourse.XXLeft;
|
| | | frameClrean.Y = Application.GetRealHeight(35);
|
| | | frameWhiteBack.AddChidren(frameClrean);
|
| | | frameClrean.Visible = false;
|
| | |
| | | //空调控件的容器
|
| | | var frameAcBack = new FrameLayout();
|
| | | frameAcBack.Y = Application.GetRealHeight(412);
|
| | | frameAcBack.Width = Application.GetMinRealAverage(671);
|
| | | frameAcBack.Height = Application.GetMinRealAverage(671);
|
| | | frameAcBack.Width = this.GetPictrueRealSize(671);
|
| | | frameAcBack.Height = this.GetPictrueRealSize(671);
|
| | | frameAcBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.AddChidren(frameAcBack);
|
| | |
|
| | |
| | |
|
| | | //空调控件里面的那个显示制热,制冷的控件
|
| | | this.btnNowModeView = new NormalViewControl(200, 55, true);
|
| | | btnNowModeView.Y = Application.GetMinRealAverage(184);
|
| | | btnNowModeView.Y = this.GetPictrueRealSize(184);
|
| | | btnNowModeView.Gravity = Gravity.CenterHorizontal;
|
| | | btnNowModeView.Text = DeviceAcDetailCardMethord.GetModeNameByModeId(deviceAc.currentSystemMode);
|
| | | btnNowModeView.TextSize = 12;
|
| | |
| | | this.btnReduce = new IconViewControl(81);
|
| | | btnReduce.CanClick = isAcOpen;
|
| | | btnReduce.UnSelectedImagePath = "AC/Reduce.png";
|
| | | btnReduce.X = Application.GetMinRealAverage(132);
|
| | | btnReduce.Y = Application.GetMinRealAverage(268);
|
| | | btnReduce.X = this.GetPictrueRealSize(132);
|
| | | btnReduce.Y = this.GetPictrueRealSize(268);
|
| | | frameAcBack.AddChidren(btnReduce);
|
| | | btnReduce.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | | this.btnAdd = new IconViewControl(81);
|
| | | btnAdd.CanClick = isAcOpen;
|
| | | btnAdd.UnSelectedImagePath = "AC/Add.png";
|
| | | btnAdd.X = frameAcBack.Width - Application.GetMinRealAverage(81 + 132);
|
| | | btnAdd.X = frameAcBack.Width - this.GetPictrueRealSize(81 + 132);
|
| | | btnAdd.Y = btnReduce.Y;
|
| | | frameAcBack.AddChidren(btnAdd);
|
| | | btnAdd.ButtonClickEvent += (sender, e) =>
|
| | |
| | |
|
| | | //℃
|
| | | var btnUint = new NormalViewControl(100, 66, true);
|
| | | btnUint.Y = Application.GetMinRealAverage(366);
|
| | | btnUint.Y = this.GetPictrueRealSize(366);
|
| | | btnUint.Gravity = Gravity.CenterHorizontal;
|
| | | btnUint.TextAlignment = TextAlignment.Center;
|
| | | btnUint.Text = "℃";
|
| | |
| | | {
|
| | | //滑动过程中
|
| | | int oldProgressValue = arcScaleSeekBar.Progress;//之前的值
|
| | | arcScaleSeekBar.OnProgressChangedEvent += (send2, value) =>
|
| | | arcScaleSeekBar.OnStopTrackingTouchEvent += (send2, value) =>
|
| | | {
|
| | | nowProgressValue = value;
|
| | | };
|
| | |
| | | //发送进度值
|
| | | if (deviceAc.currentSystemMode == 3 || deviceAc.currentSystemMode == 8)
|
| | | {
|
| | | //如果住宅是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | this.canSetProgress = true;
|
| | | deviceAc.currentCoolingSetpoint = value;
|
| | | return;
|
| | | }
|
| | | deviceAc.SetCoolingTemperatureAsync(value * 100);
|
| | | }
|
| | | else if (deviceAc.currentSystemMode == 4)
|
| | | {
|
| | | //如果住宅是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | this.canSetProgress = true;
|
| | | deviceAc.currentHeatingSetpoint = value;
|
| | | return;
|
| | | }
|
| | | deviceAc.SetHeatingTemperatureAsync(value * 100);
|
| | | }
|
| | | else if (deviceAc.currentSystemMode == 1)
|
| | | {
|
| | | //如果住宅是虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | this.canSetProgress = true;
|
| | | deviceAc.currentAutoSetpoint = value;
|
| | | return;
|
| | | }
|
| | | deviceAc.SetAutoTemperatureAsync(value * 100);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | var rowFrame = new FrameRowControl();
|
| | | rowFrame.Y = frameBack.GetChildren(frameBack.ChildrenCount - 1).Bottom;
|
| | | rowFrame.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
|
| | | rowFrame.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
|
| | | rowFrame.Height = Application.GetRealHeight(150);
|
| | | frameBack.AddChidren(rowFrame);
|
| | |
|
| | |
| | | /// <param name="fanSwingMode">Fan mode.</param>
|
| | | private void SetFanSwingComand(AC.FanSwingMode fanSwingMode)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则直接修改缓存
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | deviceAc.currentFanSwingMode = (int)fanSwingMode;
|
| | | var tempDevice = new CommonDevice();
|
| | | tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 514 };
|
| | | tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 4096 } };
|
| | | this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, tempDevice);
|
| | | return;
|
| | | }
|
| | | var oldModel = (AC.FanSwingMode)deviceAc.currentFanSwingMode;
|
| | | if (oldModel == fanSwingMode)
|
| | | {
|
| | |
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(this.listControl, (result) =>
|
| | | {
|
| | | //没有接收到网关回复
|
| | | if (result == false)
|
| | | if (result == true)
|
| | | {
|
| | | //接收到网关的回复
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //还原状态
|
| | | listControl[0].SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingMode(oldModel);
|
| | | listControl[0].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingMode(oldModel);
|
| | | listControl[0].SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | | listControl[0].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | | });
|
| | | }
|
| | | });
|
| | |
|
| | | listControl[0].SelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | | listControl[0].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanSwingModeUnSelectedImagePathByFanSwingMode(fanSwingMode);
|
| | |
|
| | | deviceAc.SetFanSwingAsyncMode(fanSwingMode);
|
| | | }
|
| | |
| | | {
|
| | | var rowFrame = new FrameRowControl();
|
| | | rowFrame.Y = frameBack.GetChildren(frameBack.ChildrenCount - 1).Bottom;
|
| | | rowFrame.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
|
| | | rowFrame.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
|
| | | rowFrame.Height = Application.GetRealHeight(150);
|
| | | frameBack.AddChidren(rowFrame);
|
| | |
|
| | |
| | | //选择的是同一个
|
| | | return;
|
| | | }
|
| | |
|
| | | //如果住宅为虚拟住宅,则直接修改缓存
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | deviceAc.currentSystemMode = (int)mode;
|
| | | var tempDevice = new CommonDevice();
|
| | | tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 513 };
|
| | | tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 28 } };
|
| | | this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, tempDevice);
|
| | | //送风的时候,没有温度的概念
|
| | | if (mode == AC.AcMode.FanOnly)
|
| | | {
|
| | | //加减不可以点击
|
| | | btnAdd.CanClick = false;
|
| | | btnReduce.CanClick = false;
|
| | | }
|
| | | //如果原来的状态是送风的话
|
| | | else if (oldModel == AC.AcMode.FanOnly)
|
| | | {
|
| | | //加减可以点击
|
| | | btnAdd.CanClick = true;
|
| | | btnReduce.CanClick = true;
|
| | | }
|
| | | return;
|
| | | }
|
| | |
|
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(this.listControl, (result) =>
|
| | | {
|
| | | //没有接收到网关回复
|
| | | if (result == false)
|
| | | if (result == true)
|
| | | {
|
| | | //接收到网关回复
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //还原状态
|
| | | listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByMode(oldModel);
|
| | | listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByMode(oldModel);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByMode(mode);
|
| | | listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByMode(mode);
|
| | |
|
| | | //送风的时候,没有温度的概念
|
| | | if (mode == AC.AcMode.FanOnly)
|
| | | {
|
| | |
| | | });
|
| | | }
|
| | | });
|
| | |
|
| | | listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByMode(mode);
|
| | | listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByMode(mode);
|
| | |
|
| | | deviceAc.SetSystemModeAsync(mode);
|
| | | }
|
| | |
|
| | |
| | | /// <param name="isOpen"></param>
|
| | | private void SetSwitchComand(bool isOpen)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则直接修改缓存
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | deviceAc.currentSystemMode = isOpen == true ? 3 : 0;
|
| | | var tempDevice = new CommonDevice();
|
| | | tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 513 };
|
| | | tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 28 } };
|
| | | this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, tempDevice);
|
| | | //加减是否可以点击
|
| | | btnAdd.CanClick = isOpen;
|
| | | btnReduce.CanClick = isOpen;
|
| | | return;
|
| | | }
|
| | |
|
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(this.listControl, (result) =>
|
| | | {
|
| | |
| | | //那四个图标变更
|
| | | this.listControl[0].IsSelected = isOpen;
|
| | | this.listControl[1].IsSelected = isOpen;
|
| | | this.listControl[2].IsSelected = isOpen;
|
| | | this.listControl[3].IsSelected = isOpen;
|
| | | if (isOpen == true)
|
| | | {
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | this.listControl[2].IsSelected = isOpen;
|
| | | if (isOpen == true)
|
| | | {
|
| | | deviceAc.Open();
|
| | |
| | | {
|
| | | var rowFrame = new FrameRowControl();
|
| | | rowFrame.Y = frameBack.GetChildren(frameBack.ChildrenCount - 1).Bottom;
|
| | | rowFrame.LeftOffset = Application.GetRealWidth(81) - ControlCommonResourse.XXLeft;
|
| | | rowFrame.LeftOffset = Application.GetRealWidth(81) - HdlControlResourse.XXLeft;
|
| | | rowFrame.Height = Application.GetRealHeight(150);
|
| | | frameBack.AddChidren(rowFrame);
|
| | |
|
| | |
| | | rowFrame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | ((DialogCommonForm)frameBack.Parent.Parent).CloseForm();
|
| | |
|
| | | //如果住宅为虚拟住宅,则直接修改缓存
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | deviceAc.currentFanMode = (int)i_div;
|
| | | var tempDevice = new CommonDevice();
|
| | | tempDevice.DeviceStatusReport = new CommonDevice.DeviceStatusReportData() { CluterID = 514 };
|
| | | tempDevice.DeviceStatusReport.AttriBute = new List<CommonDevice.AttributeDataObj>() { new CommonDevice.AttributeDataObj() { AttributeId = 0 } };
|
| | | this.CheckResponeResultStatu(ReceiveComandDiv.A设备属性上报, tempDevice);
|
| | | return;
|
| | | }
|
| | | //发送风速命令
|
| | | this.SetAcWindSpeedComand(i_div);
|
| | | };
|
| | |
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(this.listControl, (result) =>
|
| | | {
|
| | | //没有接收到网关回复
|
| | | if (result == false)
|
| | | //接收到网关回复
|
| | | if (result == true)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | //还原状态
|
| | | listControl[3].SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(oldModel);
|
| | | listControl[3].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(oldModel);
|
| | | listControl[3].SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(mode);
|
| | | listControl[3].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(mode);
|
| | | });
|
| | | }
|
| | | });
|
| | |
|
| | | listControl[3].SelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(mode);
|
| | | listControl[3].UnSelectedImagePath = DeviceAcDetailCardMethord.GetFanModeSelectedImagePathByFanMode(mode);
|
| | |
|
| | | deviceAc.SetFanModeAsync(mode);
|
| | | }
|
| | |
| | | this.listControl[1].IsSelected = false;
|
| | | this.listControl[2].IsSelected = false;
|
| | | this.listControl[3].IsSelected = false;
|
| | | arcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
|
| | | }
|
| | | arcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
|
| | | //设置状态文字 关闭
|
| | | this.SetStatuText(Language.StringByID(R.MyInternationalizationString.Close));
|
| | | return;
|
| | |
| | | this.listControl[1].IsSelected = true;
|
| | | this.listControl[2].IsSelected = true;
|
| | | this.listControl[3].IsSelected = true;
|
| | | arcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCArcScaleSeekBarStartColor, ZigbeeColor.Current.GXCArcScaleSeekBarEndColor);
|
| | | }
|
| | | arcScaleSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCArcScaleSeekBarStartColor, ZigbeeColor.Current.GXCArcScaleSeekBarEndColor);
|
| | | }
|
| | | this.listControl[1].SelectedImagePath = DeviceAcDetailCardMethord.GetModeSelectedImagePathByModeId(deviceAc.currentSystemMode);
|
| | | this.listControl[1].UnSelectedImagePath = DeviceAcDetailCardMethord.GetModeUnSelectedImagePathByModeId(deviceAc.currentSystemMode);
|