| | |
| | | //刷新界面状态
|
| | | this.RefreshFormStatu(false);
|
| | | //档
|
| | | var strView = Language.StringByID(StringId.Gear);
|
| | | seekBarContr.ProgressChangedEvent += (div, value) =>
|
| | | {
|
| | | this.btnNowGear.Text = value + strView;
|
| | | //滑动中
|
| | | if (div == 0) { this.fanData.IsProgressing = true; }
|
| | | //滑动结束
|
| | | else
|
| | | {
|
| | | this.fanData.IsProgressing = false;
|
| | | this.fanData.ProgressEndTime = DateTime.Now;
|
| | | //发送风速命令
|
| | | this.SendSpeedComand(value);
|
| | | }
|
| | | };
|
| | | var strView = Language.StringByID(StringId.Gear); |
| | | |
| | | //if (device.online) |
| | | { |
| | | seekBarContr.ProgressChangedEvent += (div, value) => |
| | | { |
| | | this.btnNowGear.Text = value + strView; |
| | | //滑动中 |
| | | if (div == 0) { this.fanData.IsProgressing = true; } |
| | | //滑动结束 |
| | | else |
| | | { |
| | | this.fanData.IsProgressing = false; |
| | | this.fanData.ProgressEndTime = DateTime.Now; |
| | | //发送风速命令 |
| | | this.SendSpeedComand(value); |
| | | } |
| | | }; |
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// 发送开关命令
|
| | | /// </summary>
|
| | | private void SendSwitchComand()
|
| | | {
|
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //}
|
| | | this.btnSwitch.CanClick = false;
|
| | |
|
| | | string statu = this.btnSwitch.IsSelected == true ? "off" : "on";
|
| | |
| | | /// 发送风速命令
|
| | | /// </summary>
|
| | | private void SendSpeedComand(int value)
|
| | | {
|
| | | { |
| | | |
| | | var dic = new Dictionary<string, string>();
|
| | | dic.Add("fan_speed_percent", value.ToString());
|
| | | Control.Ins.SendWriteCommand(this.device, dic, true);
|