| | |
| | | btnVoiceIcon.X = btnChargeIcon.Right + Application.GetRealWidth(50);
|
| | | btnVoiceIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/Voice.png";
|
| | | btnVoiceIcon.SelectedImagePath = "FunctionIcon/Electrical/WeepRobot/VoiceSelect.png";
|
| | | btnVoiceIcon.IsSelected = true;
|
| | | FrameWhiteCentet1.AddChidren(btnVoiceIcon);
|
| | | btnVoiceIcon.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | |
| | |
|
| | | //吸力1档
|
| | | var iconPath = this.weepRobotData.Suction == "quiet" ? "FunctionIcon/Electrical/WeepRobot/SuctionSelect.png" : "FunctionIcon/Electrical/WeepRobot/Suction.png";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.SuctionOneGear), iconPath, this.weepRobotData.Suction == "strong", () =>
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.SuctionOneGear), iconPath, this.weepRobotData.Suction == "quiet", () =>
|
| | | {
|
| | | frameBack.Close();
|
| | | //发送吸力命令
|
| | |
| | |
|
| | | //吸力3档
|
| | | iconPath = this.weepRobotData.Suction == "strong" ? "FunctionIcon/Electrical/WeepRobot/SuctionSelect.png" : "FunctionIcon/Electrical/WeepRobot/Suction.png";
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.SuctionThreeGear), iconPath, this.weepRobotData.Suction == "quiet", () =>
|
| | | menuContr.AddRowMenu(Language.StringByID(StringId.SuctionThreeGear), iconPath, this.weepRobotData.Suction == "strong", () =>
|
| | | {
|
| | | frameBack.Close();
|
| | | //发送吸力命令
|
| | |
| | | //如果是清扫状态
|
| | | if (this.weepRobotData.Cleaning == true)
|
| | | {
|
| | | //吸力调节不可用
|
| | | this.btnSuctionIcon.IsSelected = false;
|
| | | this.btnSuctionIcon.CanClick = false;
|
| | | //吸力调节可用
|
| | | this.btnSuctionIcon.IsSelected = true;
|
| | | this.btnSuctionIcon.CanClick = true;
|
| | | //声音不可用
|
| | | this.btnVoiceIcon.IsSelected = false;
|
| | | this.btnVoiceIcon.CanClick = false;
|
| | | //this.btnVoiceIcon.IsSelected = false;
|
| | | //this.btnVoiceIcon.CanClick = false;
|
| | | //清扫模式不可用
|
| | | this.btnModeIcon.IsSelected = false;
|
| | | this.btnModeIcon.CanClick = false;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | //吸力调节可用
|
| | | this.btnSuctionIcon.IsSelected = true;
|
| | | this.btnSuctionIcon.CanClick = true;
|
| | | //吸力调节不可用
|
| | | this.btnSuctionIcon.IsSelected = false;
|
| | | this.btnSuctionIcon.CanClick = false;
|
| | | //声音可用
|
| | | this.btnVoiceIcon.IsSelected = true;
|
| | | this.btnVoiceIcon.CanClick = true;
|
| | | //this.btnVoiceIcon.IsSelected = true;
|
| | | //this.btnVoiceIcon.CanClick = true;
|
| | | //清扫模式可用
|
| | | this.btnModeIcon.IsSelected = true;
|
| | | this.btnModeIcon.CanClick = true;
|
| | |
| | | /// </summary>
|
| | | private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
|
| | | {
|
| | | foreach (var data in i_LocalDevice.status)
|
| | | for (int i = 0; i < i_LocalDevice.status.Count; i++)
|
| | | {
|
| | | var data = i_LocalDevice.status[i];
|
| | | //开关
|
| | | if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; }
|
| | | //寻找机器
|
| | |
| | | /// <summary>
|
| | | /// 是否处于清扫中
|
| | | /// </summary>
|
| | | public bool Cleaning = true;
|
| | | public bool Cleaning = false;
|
| | | /// <summary>
|
| | | /// 寻找机器
|
| | | /// </summary>
|
| | |
| | | /// </summary>
|
| | | public int Filter = 0;
|
| | | /// <summary>
|
| | | /// 清扫时间(0-432000)
|
| | | /// 清扫时间(0-432000) 单位为分钟
|
| | | /// </summary>
|
| | | public int CleanTime = 0;
|
| | | /// <summary>
|