old mode 100755
new mode 100644
| | |
| | | /// </summary>
|
| | | public bool SetCanSelect
|
| | | {
|
| | | set |
| | | set |
| | | {
|
| | | m_SetCanSelect = value;
|
| | | }
|
| | |
| | | form.AddForm(title, listText, nowSelectNo);
|
| | | form.FinishSelectEvent += (selectNo) =>
|
| | | {
|
| | | if (selectNo == nowSelectNo)
|
| | | {
|
| | | //选择的是相同的
|
| | | return;
|
| | | }
|
| | | //-1:选择取消
|
| | | this.Text = selectNo == -1 ? string.Empty : listText[selectNo];
|
| | | nowSelectNo = selectNo;
|
| | |
|
| | | //记录起当前选择的功能类型
|
| | | this.RefreshDfunctionType();
|
| | |
|
| | | //设备改变功能类型的话,主页需要重新刷新
|
| | | UserView.UserPage.Instance.RefreshForm = true;
|
| | |
|
| | | //调用回调函数
|
| | | this.FinishSelectEvent?.Invoke(nowSelectNo);
|
| | |
| | | strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
|
| | | nowSelectNo = -1;
|
| | | }
|
| | | else if (this.device.Type == DeviceType.PMSensor)
|
| | | {
|
| | | //PM2.5传感器固定为 空气质量
|
| | | strType = Language.StringByID(R.MyInternationalizationString.AirQuality);
|
| | | nowSelectNo = -1;
|
| | | }
|
| | |
|
| | | //显示文本
|
| | | this.txtView.Text = strType;
|
| | |
| | | || this.device.Type == DeviceType.OnOffOutput//继电器
|
| | | || this.device.Type == DeviceType.Thermostat//空调
|
| | | || this.device.Type == DeviceType.FreshAir//新风
|
| | | || this.device.Type == DeviceType.PMSensor //PM2.5
|
| | | || this.device.Type == DeviceType.WindowCoveringDevice)//窗帘
|
| | | {
|
| | | return true;
|