old mode 100755
new mode 100644
| | |
| | | seekBarContr.MinValue = 1;
|
| | | seekBarContr.MaxValue = 15;
|
| | | FrameWhiteCentet1.AddChidren(seekBarContr);
|
| | | seekBarContr.Progress = this.fanData.SpeedLevel;
|
| | | this.btnNowGear.Text = this.fanData.SpeedLevel + Language.StringByID(StringId.Gear);
|
| | |
|
| | | //开关图标
|
| | | this.btnSwitch = new IconViewControl(40);
|
| | |
| | |
|
| | | //刷新界面状态
|
| | | this.RefreshFormStatu(false);
|
| | |
|
| | | int oldProgressValue = fanData.SpeedLevel;
|
| | | int nowProgressValue = fanData.SpeedLevel;
|
| | | //档
|
| | | var strView = Language.StringByID(StringId.Gear);
|
| | | seekBarContr.ProgressChangedEvent += (div, value) =>
|
| | | {
|
| | | nowProgressValue = value;
|
| | | this.btnNowGear.Text = value + strView;
|
| | | //滑动中
|
| | | if (div == 0) { this.fanData.IsProgressing = true; }
|
| | |
| | | {
|
| | | this.fanData.IsProgressing = false;
|
| | | this.fanData.ProgressEndTime = DateTime.Now;
|
| | | //发送风速命令
|
| | | this.SendSpeedComand(value);
|
| | | }
|
| | | };
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | while (this.Parent != null)
|
| | | {
|
| | | if (nowProgressValue != oldProgressValue)
|
| | | {
|
| | | //发送风速命令
|
| | | this.SendSpeedComand(nowProgressValue);
|
| | | oldProgressValue = nowProgressValue;
|
| | | }
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | }
|
| | | //界面关闭时
|
| | | if (nowProgressValue != oldProgressValue)
|
| | | {
|
| | | //发送风速命令
|
| | | this.SendSpeedComand(nowProgressValue);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|